Building Hildon Desktop outside Maemo/Scratchbox environment

I wrote a step-by-step guide to have Hildon Desktop running outside the Maemo/Scratchbox environment. Our major goal here is to make it easy for distributons to package Hildon Desktop so that developers can have a quick-to-setup environment for the development of plugins which doesn’t need to be built against ARM such as Python plugins. For now, this guide only applies to Ubuntu (If you can point out the changes needed to work on another distribution, please let me know). This is a call for testers and brave developers to follow the guide and report the missing/problematic bits.

  http://maemo.org/maemowiki/HildonDesktopPortability

There are some issues that still block us from getting Hildon Desktop in a distribution but we’re working on that.

Published by

lucasr

Lucas Rocha is just a brazilian guy who loves hacking and music. He lives in the frozen lands of Finland with his lovely wife Carol. He works for Nokia in the development of Hildon and Maemo. In his free time, he's a happy GNOME contributor. He has a mustache, a beard and big smile in his face.

22 thoughts on “Building Hildon Desktop outside Maemo/Scratchbox environment”

  1. Would it be possible to write a jhbuild module set for the svn and tarball bits?

  2. I seems it’s autogen.sh instead of autogen

    But I can get further than the first step. When trying to build maemo-gtk-2-10 it fails with the next error.

    file=./`echo hy sed ‘s,.*/,,’`.gmo \
    && rm -f $file && /usr/bin/msgfmt -c -o $file hy.po
    hy.po:160: number of format specifications in ‘msgid’ and ‘msgstr[1]’ does not match
    /usr/bin/msgfmt: found 1 fatal error
    make[2]: *** [hy.gmo] Fout 1
    make[2]: Map ‘/home/swatje/Projects/N800/maemo-gtk-2-10/po’ wordt verlaten

    Please mail me for further testing

  3. Ok, everything seems fine, I just had to time make a couple of times, and it builds further.

    I will tell you if I get an other problem

  4. I had to install libesd0-dev too, before I could compile hildon-1.

    In last message I ment “I just had to type ‘make’ a couple of times”

  5. For hildon-deskop I installed dbus-glib-1-dev

    but it still doesn’t build:

    I get the following error:
    gcc -DHAVE_CONFIG_H -I. -I. -I.. -DMAEMO_CHANGES -I/opt/maemo/include/hildon-1 -I/opt/maemo/include/gtk-2.0 -I/opt/maemo/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12 -pthread -DORBIT2=1 -I/usr/include/gnome-vfs-2.0 -I/usr/lib/gnome-vfs-2.0/include -I/usr/include/gconf/2 -I/usr/include/orbit-2.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DLOCALEDIR=\”/opt/maemo/share/locale\” -DHILDON_HOME_DESKTOP_ENTRY_DIR=\”/opt/maemo/share/applications/hildon-home\” -I../libhildonwm -g -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -Werror -Wno-format-extra-args -MT hildon-desktop-plugin.lo -MD -MP -MF .deps/hildon-desktop-plugin.Tpo -c hildon-desktop-plugin.c -fPIC -DPIC -o .libs/hildon-desktop-plugin.o
    cc1: warnings being treated as errors
    hildon-desktop-plugin.c: In function ‘hildon_desktop_plugin_load’:
    hildon-desktop-plugin.c:182: warning: dereferencing type-punned pointer will break strict-aliasing rules
    hildon-desktop-plugin.c:185: warning: dereferencing type-punned pointer will break strict-aliasing rules
    make[3]: *** [hildon-desktop-plugin.lo] Fout 1
    make[3]: Map ‘/home/swatje/Projects/N800/hildon-desktop/libhildondesktop’ wordt verlaten

  6. There seems to be a copy past error;
    one of the 2
    svn co https://stage.maemo.org/svn/maemo/projects/haf/trunk/hildon-theme-cacher

    should be:
    svn co https://stage.maemo.org/svn/maemo/projects/haf/trunk/hildon-theme-tools

    I also think that there is a ‘t’ from ‘tar’ missing in the line for extracting the icons for non debian users.

    Next problem i get with jhbuild. First after installing jhbuild in my home with make install, the directory /home/swatje/bin is still not in my search pad.
    So I have to execute:
    swatje@Titan:~/Projects/N800/jhbuild_modules$ /home/swatje/bin/jhbuild -f ./hildon-desktop.jhbuildrc -m ./hildon-desktop.modules build

    instead of just:
    jhbuild -f ./hildon-desktop.jhbuildrc -m ./hildon-desktop.modules build

    After that I get an error.

    Traceback (most recent call last):
    File “/home/swatje/bin/jhbuild”, line 6, in
    jhbuild.main.main(sys.argv[1:])
    File “/home/swatje/Projects/N800/jhbuild/jhbuild/main.py”, line 89, in main
    rc = jhbuild.commands.run(command, config, args)
    File “/home/swatje/Projects/N800/jhbuild/jhbuild/commands/__init__.py”, line 74, in run
    return cmd.execute(config, args)
    File “/home/swatje/Projects/N800/jhbuild/jhbuild/commands/__init__.py”, line 43, in execute
    return self.run(config, options, args)
    File “/home/swatje/Projects/N800/jhbuild/jhbuild/commands/base.py”, line 170, in run
    build = jhbuild.frontends.get_buildscript(config, module_list)
    File “/home/swatje/Projects/N800/jhbuild/jhbuild/frontends/__init__.py”, line 26, in get_buildscript
    return BuildScript(config, module_list)
    File “/home/swatje/Projects/N800/jhbuild/jhbuild/frontends/terminal.py”, line 66, in __init__
    buildscript.BuildScript.__init__(self, config, module_list)
    File “/home/swatje/Projects/N800/jhbuild/jhbuild/frontends/buildscript.py”, line 37, in __init__
    os.mkdir(self.config.checkoutroot)
    OSError: [Errno 2] No such file or directory: ‘/home/swatje/Code/maemo’
    swatje@Titan:~/Projects/N800/jhbuild_modules$

  7. @Cauwe,

    I’ve fixed the page. The “ar” is tool for managing archives and the suggested command works fine.

    About your jhbuild issues, I generaly replace “bindir=$(HOME)/bin” with “bindir=$(HOME)/.bin” in the Makefile of jhbuild, and add ~/.bin to my $PATH in ~/.bash_profile. :-)

    The error you’re getting when running jhbuild is because the files (hildon-desktop.jhbuildrc and hildon-desktop.modules) are not being found. You can provide a full path to the files to make sure they’re found by jhbuild.

    Thanks!

  8. I already added the bin directory to the pad, but I posted it because it’s usefull to know you should add it when you follow the page and you are a beginner.

    The problem that I have know is because the script is looking for /home/swatje/Code/maemo, which doesn’t exist for me.

    The value is defined in th hildon-desktop.jhbuild script:
    checkoutroot = os.path.expanduser(‘~/Code/maemo’)

    This folder doesn’t exist on my system, I changed it to a temporay folder, and now everything seems to work.

    I will let you know if I have further problems

  9. Sorry for disturbing you so much,
    It seems that I also got a problem with plankton theme:

    install -c -m 644 wallpaper.png //opt/maemo/share/backgrounds/plankton.png
    install: kan map “//opt/maemo/share/backgrounds/plankton.png” niet aanmaken: No such file or directory
    make[1]: *** [install] Fout 1
    make[1]: Map ‘/home/swatje/Projects/N800/hildon-theme-plankton/wallpaper’ wordt verlaten
    make: *** [install-recursive] Fout 1

    The folder /opt/maemo/share/backgrounds/ didn’t exist, so I made it, and now it installs fine.

  10. When I start the hildon session, i don’t really get what I expected, there is still a problem with the localisation. Ans I don’t get a wallpaper, screenshot:
    http://network.cauwe.org/swatje/temp/Hildon-session.png

    swatje@Titan:~/Projects/N800$ ./hildon-session
    /opt/maemo/share/themes/plankton/gtk-2.0/gtkrc:5760: Unable to locate image file in pixmap_path: “../images/qgn_plat_application_chat_background.jpg”
    /opt/maemo/share/themes/plankton/gtk-2.0/gtkrc:5761: “Background” image options specified without filename
    /opt/maemo/share/themes/plankton/gtk-2.0/gtkrc:6148: error: invalid string constant “osso-entry-special”, expected valid string constant

    ** (hildon-desktop:5512): WARNING **: Plugin desktop file not found, ignoring plugin

    ** (hildon-desktop:5512): WARNING **: Plugin desktop file not found, ignoring plugin
    ** (hildon-desktop:5512): DEBUG: Attempting to open directory [/opt/maemo/share/applications]
    ** (hildon-desktop:5512): DEBUG: I couldn’t get contents
    ** (hildon-desktop:5512): DEBUG: inside hn_app_switcher_constructor…
    matchbox-wm: unable to open theme: /opt/maemo/share/themes/hildon/matchbox/theme.xml
    ** INFO: server started
    esd: pcm_params.c:2351: sndrv_pcm_hw_params: Assertion `err >= 0′ failed.
    Audio File Library: could not open file ‘/opt/maemo/share/sounds/ui-window_open.wav’ [error 3]
    Audio File Library: could not open file ‘/opt/maemo/share/sounds/ui-window_close.wav’ [error 3]

    (hildon-desktop:5512): Gtk-CRITICAL **: gtk_container_foreach: assertion `GTK_IS_CONTAINER (container)’ failed
    ** (hildon-desktop:5512): DEBUG: building HNAppSwitcher widget
    ** (hildon-desktop:5512): DEBUG: Adding inner VBox
    ** (hildon-desktop:5512): DEBUG: Adding buttons
    ** (hildon-desktop:5512): DEBUG: Creating app button at pos 0 (name hildon-navigator-small-button1)
    ** (hildon-desktop:5512): DEBUG: Creating app button at pos 1 (name hildon-navigator-small-button2)
    ** (hildon-desktop:5512): DEBUG: Creating app button at pos 2 (name hildon-navigator-small-button3)
    ** (hildon-desktop:5512): DEBUG: Adding menu button

    (hildon-desktop:5512): GLib-GObject-WARNING **: gsignal.c:1669: signal `long-press-key’ is invalid for instance `0x81000b0′
    ** (hildon-desktop:5512): DEBUG: Changing orientation app_switcher
    ** (hildon-desktop:5512): DEBUG: Move: TRUE to x:0 y:0 & Resize: TRUE

    ** (hildon-desktop:5512): WARNING **: hd-home-window.c:396: invalid property id 1 for “osso-context” of type `GParamPointer’ in `HDHomeWindow’

    (hildon-desktop:5512): hildon-1-WARNING **: Failed to lookup ‘TitleTextColor’ color!
    ** (hildon-desktop:5512): DEBUG: Loading background from /home/swatje/.osso/hildon-desktop/home-background.conf
    ** (hildon-desktop:5512): DEBUG: Loading background from /opt/maemo/etc/hildon-desktop/home-background.conf
    ** (hildon-desktop:5512): DEBUG: Work area changed, reapplying the background
    ** (hildon-desktop:5512): DEBUG: Loading Hildon Home layout from /etc/hildon-desktop/home-layout.conf

    ** (hildon-desktop:5512): WARNING **: An error occurred when reading HildonHome applets’ configuration: No such file or directory

    ** (hildon-desktop:5512): WARNING **: Plugin desktop file not found, ignoring plugin
    ** (hildon-desktop:5512): DEBUG: Work area changed, reapplying the background
    ** (hildon-desktop:5512): DEBUG: Applying background /usr/share/themes/default/images/qgn_plat_home_background.png aynchronously
    ** (hildon-desktop:5512): DEBUG: DBUS Callback

    ** (hildon-desktop:5512): WARNING **: Error when setting background: The name org.maemo.hildon.background_manager was not provided by any .service files
    ** (hildon-desktop:5512): DEBUG: Received MODAL WINDOWS notification
    ** (hildon-desktop:5512): DEBUG: value = 0
    ** (hildon-desktop:5512): DEBUG: Applying background /usr/share/themes/default/images/qgn_plat_home_background.png aynchronously
    ** (hildon-desktop:5512): DEBUG: DBUS Callback

    ** (hildon-desktop:5512): WARNING **: Error when setting background: The name org.maemo.hildon.background_manager was not provided by any .service files
    ** (hildon-desktop:5512): DEBUG: Received MODAL WINDOWS notification
    ** (hildon-desktop:5512): DEBUG: value = 0
    ** (hildon-desktop:5512): DEBUG: called
    ** (hildon-desktop:5512): DEBUG: ***************** No Home info yet
    ** (hildon-desktop:5512): DEBUG: setting button (pos=0) (inconsistent=”, active=”) name: hildon-navigator-small-button1
    ** (hildon-desktop:5512): DEBUG: setting button (pos=1) (inconsistent=”, active=”) name: hildon-navigator-small-button2
    ** (hildon-desktop:5512): DEBUG: setting button (pos=2) (inconsistent=”, active=”) name: hildon-navigator-small-button3
    ** (hildon-desktop:5512): DEBUG: Hiding main button icon
    ** (hildon-desktop:5512): DEBUG: Move: FALSE to x:0 y:0 & Resize: FALSE
    Aborted (core dumped)

  11. @Cauwe,

    About your jhbuild directories thing, I’ve added some additional notes about this in the page. Please, check if it’s clear enough.

    About the error on hildon-theme-plankton is solved now.

    About the problems on running Hildon Desktop:

    This line is strange:
    matchbox-wm: unable to open theme: /opt/maemo/share/themes/hildon/matchbox/theme.xml

    Did you change anything in the hildon-session script? It should be looking for the matchbox theme in /opt/maemo/share/themes/plankton/matchbox/theme.xml.

    About the localization problem, try to copy po/en_GB.mo in hildon-desktop to the same location than hildon-libs.mo as described in the guide.

    The problem with the background manager is that background manager is a D-Bus service which will use the dbus-daemon for current session. What happens is that for this running dbus-daemon the DISPLAY and XDG_DATA_DIRS (where to look for dbus services) are already defined. If you run hildon-session with a different user then a brand new dbus-daemon will run with the correct environment variables.

    So, a simple way to make the background manager work is:
    1) Create a new user in the system. Ex: hildon
    2) Switch to this new user. “su – hildon”
    3) Run hildon-session with this user

    Let me know if you have any problems.

  12. Yes, Sorry I changed the lauch script, because of the background problem.

    The localisation don’t work yet (I couldn’t find hildon-desktop/po/en_GB.mo), but it’s not such big deal.
    If I start everything in an other user it seems to work.

    Thanks for the guide!

  13. Hi,
    I was just testing some of my python scripts I made for the N800. But…

    I still need to install some python parts like the hildon/osso parts.

    I found they are in svn, but maybe it can be usefull to add them to the howto?

    I was also thinking that maybe it’s also easy to make a tar.gz with the /opt/maemo dir and a simpel install script?
    This would be really simpel for new developers and python programmers

  14. @Cauwe,

    I gave you wrong instructions about the localization :-P

    You need to grab the translation in another module. I added the instructions in the wiki page. Have a look there.

    About the Python stuff, I’ll add the python related instructions still today. :-)

    Consider those instructions as the very first step towards having packages in the distributions. Therefore, I’m not thinking on providing tarballs for now. Feel free to experiment this and tell me about the issues you find.

  15. I think there is a typo in:
    msgfmt -v -a –statistics po/en_BG.po -o /opt/maemo/share/locale/en_GB/LC_MESSAGES/maemo-af-desktop.mo

    it’s not en_BG.po but en_GB.po

    Now it seems to work right

  16. I tried the python thing, but it seems that python doesn’t install in the right dir( not it /opt/maemo), and i did:
    ./configure –prefix=/opt/maemo

    The output from make install is:
    -/usr/bin/install: cannot create regular file `/usr/lib/python2.5/site-packages/hildondesktop.so’: Permission denied
    make[3]: *** [install-pygtkexecLTLIBRARIES] Fout 1
    make[3]: Map ‘/home/swatje/Projects/N800/python-hildondesktop/libhildondesktop’ wordt verlaten
    make[2]: *** [install-am] Fout 2
    make[2]: Map ‘/home/swatje/Projects/N800/python-hildondesktop/libhildondesktop’ wordt verlaten
    make[1]: *** [install] Fout 2
    make[1]: Map ‘/home/swatje/Projects/N800/python-hildondesktop/libhildondesktop’ wordt verlaten
    make: *** [install-recursive] Fout 1

  17. sorry, I didn’t read the instruction well :D

    I had to type sudo :D

    But I don’t like it too much because this makes a mess of my system.

  18. @Cauwe, I agree this is not the ideal way but it doesn’t exactly “mess” your system. It just installs the hildondesktop python module in your Python path. :-)

    Another option is to use “jhbuild bootstrap” which will install a fresh copy of Python in your prefix (/opt/maemo). Then, you wouldn’t have to install anything in your system.

Comments are closed.

Attribution-NonCommercial 3.0
This work is licensed under a Attribution-NonCommercial 3.0.