HildonDesktopPortability

  1. Known issues
  2. Building Hildon Desktop
    1. Manual process
    2. Jhbuild process
  3. Running Hildon Desktop
  4. Python Support

This page is step-by-step guide to have Hildon Desktop running outside of 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 applies to Ubuntu.

MoinMoinWiki Macro: TableOfContents()

Known issues

  • Dependency on Maemo GTK+ make it difficult for distributions to ship Hildon Desktop packages because it obviously conflicts with upstream. Basicaly, what we need to do is to adapt libhildon in a way that it doesn't depend on Maemo-specific stuff in GTK+.
  • No repository for the icon theme.
  • Need to do manual work to install the translations
  • Need to create a different user to have everything working

Building Hildon Desktop

First, install the packages from Ubuntu which are dependencies for Hildon Desktop and other modules involved.

sudo aptitude install build-essential subversion automake1.7 automake1.8 automake1.9 check xserver-xephyr libtiff4-dev libxml-dev libgnomevfs2-dev libgconf2-dev xlibs-dev check libesd0-dev dbus-glib-1-dev libdbus-glib-1-dev

sudo apt-get build-dep libgtk2.0-0

To create the target directory, run:

sudo mkdir /opt/maemo
sudo chown YOUR_USER:YOUR_GROUP /opt/maemo

Manual process

Define the environment variables so that the build doesn't get dependency check errors.

export PATH=$PATH:/opt/maemo/bin
export PKG_CONFIG_PATH=/opt/maemo/lib/pkgconfig:/usr/lib/pkgconfig

Checkout, build and install glib. Building Maemo gtk+ in the next step will fail without doing this step

export PKG_CONFIG_PATH=/opt/maemo/lib/pkgconfig:$PKG_CONFIG_PATH
export LD_LIBRARY_PATH=/opt/maemo:$LD_LIBRARY_PATH
(or can add the path to /etc/ld.so.conf, and run ldconfig)
svn co https://stage.maemo.org/svn/maemo/projects/haf/trunk/glib
(then move into the glib folder)
someone@somemachine:~$ cd glib
someone@somemachine:~/glib$ ./autogen.sh --prefix=/opt/maemo 
make
sudo make install

Checkout, build, and install Maemo GTK+. Unfortunately, we still need it to build libhildon.

svn co https://stage.maemo.org/svn/maemo/projects/haf/trunk/gtk+
cd gtk+
./autogen.sh --prefix=/opt/maemo
make
make install

Checkout, build, and install libhildon. libhildon is hardcoding the locale path. Therefore, you need to copy the POT file to the system-wide locale prefix. This will be fixed soon.

svn co https://stage.maemo.org/svn/maemo/projects/haf/trunk/hildon-1
cd hildon-1
./autogen.sh <del>prefix=/opt/maemo </del>with-maemo-gtk=no
make
make install
cd hildon-1
sudo cp po/en_GB.mo /usr/share/locale/en_GB/LC_MESSAGES/hildon-libs.mo

Checkout, build, and install hildon-desktop. Also, you need to grab the default translation of hildon-desktop and install in the correct place.

svn co https://stage.maemo.org/svn/maemo/projects/haf/trunk/hildon-desktop
cd hildon-desktop
./autogen.sh --prefix=/opt/maemo
make
make install

svn co https://stage.maemo.org/svn/maemo/projects/haf/trunk/maemo-af-desktop-l10n
cd maemo-af-desktop-l10n
msgfmt -v -a --statistics po/en_GB.po -o /opt/maemo/share/locale/en_GB/LC_MESSAGES/maemo-af-desktop.mo

Checkout, build, and install the theme related modules (hildon-theme-cacher, hildon-theme-cacher, hildon-theme-layout-4, hildon-theme-plankton, sapwood theme engine).

svn co https://stage.maemo.org/svn/maemo/projects/haf/trunk/hildon-theme-cacher
cd hildon-theme-cacher
./autogen.sh --prefix=/opt/maemo
make
make install

svn co https://stage.maemo.org/svn/maemo/projects/haf/trunk/hildon-theme-tools
cd hildon-theme-tools
./autogen.sh --prefix=/opt/maemo
make
make install

svn co https://stage.maemo.org/svn/maemo/projects/haf/trunk/hildon-theme-layout-4
cd hildon-theme-layout-4
./autogen.sh --prefix=/opt/maemo
make
make install

svn co https://stage.maemo.org/svn/maemo/projects/haf/trunk/hildon-theme-plankton
cd hildon-theme-plankton
./autogen.sh --prefix=/opt/maemo
make
make install

svn co https://stage.maemo.org/svn/maemo/projects/haf/trunk/sapwood
cd sapwood
./autogen.sh --prefix=/opt/maemo
make
make install

Download, build, and install libmatchbox and Matchbox window manager.

svn co http://svn.o-hand.com/repos/matchbox/trunk/libmatchbox
cd libmatchbox
./autogen.sh --prefix=/opt/maemo
make
make install

svn co http://svn.o-hand.com/repos/matchbox/trunk/matchbox-window-manager
cd matchbox-window-manager
./autogen.sh --prefix=/opt/maemo
make
make install

Download, and install icon theme. For some reason, the icon theme is not on any repository. So, we just download the debian package, extract, and copy the icons to the right locations.

wget http://repository.maemo.org/pool/bora/free/binary/sdk-default-icons_2.0-4_all.deb
mkdir maemo-icons
dpkg-deb -x sdk-default-icons_2.0-4_all.deb maemo-icons
mkdir -p /opt/maemo/share/icons
cp -r maemo-icons/usr/share/icons/hicolor /opt/maemo/share/icons

For non-debian/ubuntu distros, replace the dpkg-deb line with:

ar x sdk-default-icons_2.0-4_all.deb && mkdir maemo-icons && tar xfz data.tar.gz -C maemo-icons

Jhbuild process

Install jhbuild:

svn co http://svn.gnome.org/svn/jhbuild/trunk jhbuild
cd jhbuild
make install

This will install jhbuild tool in ${HOME}/bin by default. If you want it to be installed somewhere else, edit "Makefile" in jhbuild source tree and change the bindir variable. Also add this directory to your $PATH for convenience.

Grab the Jhbuild files for Hildon Desktop.

svn co https://stage.maemo.org/svn/maemo/projects/haf/jhbuild_modules

Adjust hildon-desktop.jhbuildrc in jhbuild_modules to fit your environment if needed. For example, you probably want to change the "checkoutroot" value to something different. By default it will grab the source code from repositories to ${HOME}/Code/maemo.

Run jhbuild like this:

cd jhbuild_modules
jhbuild -f ./hildon-desktop.jhbuildrc -m ./hildon-desktop.modules build

libhildon is hardcoding the locale path. Therefore, you need to copy the POT file to the system-wide locale prefix. This will be fixed soon.

cd libhildon
sudo cp po/en_GB.mo /usr/share/locale/en_GB/LC_MESSAGES/hildon-libs.mo

Also, you need to grab the default translation of hildon-desktop and install in the correct place.

svn co https://stage.maemo.org/svn/maemo/projects/haf/trunk/maemo-af-desktop-l10n
cd maemo-af-desktop-l10n
msgfmt -v -a --statistics po/en_GB.po -o /opt/maemo/share/locale/en_GB/LC_MESSAGES/maemo-af-desktop.mo

Download, and install icon theme. For some reason, the icon theme is not on any repository. So, we just download the debian package, extract, and copy the icons to the right locations.

wget http://repository.maemo.org/pool/bora/free/binary/sdk-default-icons_2.0-4_all.deb
mkdir maemo-icons
dpkg-deb -x sdk-default-icons_2.0-4_all.deb maemo-icons
mkdir -p /opt/maemo/share/icons
cp -r maemo-icons/usr/share/icons/hicolor /opt/maemo/share/icons

Running Hildon Desktop

Run Xephyr:

Xephyr :2 -host-cursor -screen 800x480x16 -dpi 96 -ac

There are some problems on running Hildon Desktop with the user of the current desktop session. The background manager of Hildon Desktop 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, it's suggested that you create another user (Ex: hildon) for testing Hildon Desktop.

Run the script bellow to start Hildon Desktop session:

#!/bin/bash

export PREFIX=/opt/maemo

export DISPLAY=:2

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${PREFIX}/lib
export XDG_DATA_DIRS=${PREFIX}/share:/usr/share
export GTK2_RC_FILES=${PREFIX}/share/themes/plankton/gtk-2.0/gtkrc:${PREFIX}/share/themes/plankton/gtk-2.0/gtkrc.maemo_af_desktop
export GTK_PATH=${PREFIX}/lib:${PREFIX}/lib/gtk-2.0/2.10.0/:${PREFIX}/lib/gtk-2.0
export LANG=en_GB.UTF-8
export LC_ALL=en_GB.UTF-8
export LANGUAGE=en_GB.UTF-8

exec /usr/lib/libgconf2-4/gconfd-2 &

exec ${PREFIX}/bin/matchbox-window-manager -display ${DISPLAY} \
                                           -theme ${PREFIX}/share/themes/plankton/matchbox/theme.xml \
                                           -use_titlebar yes \
                                           -use_desktop_mode plain \
                                           -use_lowlight no \
                                           -use_cursor yes \
                                           -use_super_modal yes &

exec ${PREFIX}/lib/sapwood/sapwood-server &

exec ${PREFIX}/bin/hildon-desktop
chmod +x hildon-session
su - hildon
hildon-session

Python Support

First, install the python related distribution packages:

sudo aptitude install python python-dev python-gtk2 python-gtk2-dev python-gobject python-gobject-dev

Grab the Hildon Desktop python support module, build and install. As you will use the Python installed on your system, you'll need use "sudo" to install it.

svn co https://stage.maemo.org/svn/maemo/projects/haf/trunk/python-hildondesktop
cd python-hildondesktop
./autogen.sh
./configure --prefix=/opt/maemo
make
sudo make install

Get and install some example plugins to play with:

svn co https://stage.maemo.org/svn/maemo/projects/haf/branches/maemo-af-desktop/example-plugins
cd example-plugins
./autogen.sh
./configure <del>prefix=/opt/maemo </del>enable-python
make
make install