Application Framework

Our major goal is to make it easy for distributions to package Hildon Desktop so that developers can have a quick-to-setup environment for the development of plugins which do not need to be built against ARM such as Python plugins

Ubuntu Mobile and Embedded (UME) uses the Hildon Application Framework found in the Maemo project as the application framework for the UME project. Mobile internet devices and tablets for which this distribution is targeted need an application framework that can provide a way to create applications with a very consistent look and feel and be prepared to run and interface nicely using restricted resources found on small devices like small resolution, little CPU power and storage. In addition, applications should be designed for touchscreen use, finger-friendly navigation, gestures, etc. Thus a specific UI framework, prepared for this kind of demand is necessary.

Figure 2.1. Hildon Desktop Architecture

Hildon Desktop Architecture

The Hildon Application Framework is one of a few existing frameworks designed for small devices and is a good candidate for tablet use. It has strong support from Nokia and has been separated from Maemo to become part of GNOME Mobile. This has allowed the Ubuntu community and others to contribute in a way that benefits all users.

This is the step-by-step procedure to have the Hildon Desktop that will be used in the Ubuntu Mobile and Embedded project.

Warning: Having the mobile system running in a normal Gutsy installation is likely to cause problems, especially in this early stage of development therefore, it's safer to have a chroot environment, which is what is described below.

Prepare a gutsy chroot in ${DIR}:

						  $ sudo debootstrap --arch i386 gutsy ${DIR} http://archive.ubuntu.com/ubuntu
						  $ sudo mount --bind /tmp ${DIR}/tmp
						  $ sudo mount -t proc none ${DIR}/proc
						  $ sudo mount --bind /sys ${DIR}/sys

Everything should be ready, so:

						  $ sudo chroot ${DIR}
					  

The meta-package ubuntu-mobile provides all the necessary packages and it's dependencies so, inside the chroot:

Add the universe repository to `/etc/apt/sources.list`:

						  deb http://gb.archive.ubuntu.com/ubuntu/ gutsy main restricted universe
					  

Update the repositories and install `ubuntu-mobile`:

						  $ sudo apt-get install ubuntu-mobile
					  

Those are packages that are likely to be used when developing applications using the environment above so you can have the hildon desktop shown in your normal desktop.

`xserver-xephyr`

Create a normal user inside the chroot

						  sudo adduser ume
					  

Prepare the script that the user just created will use to start hildon desktop.

						  
							   #!/bin/bash
							   
							   PREFIX=/usr
							   THEME=${PREFIX}/share/themes/plankton
							   
							   export DISPLAY=:1
							   
							   export GTK2_RC_FILES=${THEME}/gtk-2.0/gtkrc:${THEME}/gtk-2.0/gtkrc.maemo_af_desktop
							   export LANG=en_GB.UTF-8
							   export LC_ALL=en_GB.UTF-8
							   export LANGUAGE=en_GB.UTF-8
							   
							   /usr/lib/libgconf2-4/gconfd-2 &
							   
							   ${PREFIX}/bin/matchbox-window-manager -display ${DISPLAY} \
							   -theme ${THEME}/matchbox/theme.xml \
							   -use_titlebar yes \
							   -use_desktop_mode plain \
							   -use_lowlight no \
							   -use_cursor yes \
							   -use_super_modal yes &
							   
							   ${PREFIX}/lib/sapwood/sapwood-server &
							   
							   exec ${PREFIX}/bin/hildon-desktop
							   
					  

Edit `/etc/hildon-desktop/desktop.conf` and remove or comment out the [Statusbar] session if necessary.

Enter the chroot start dbus

						  /etc/init.d/dbus restart
					  

and su - to the user created above. Outside the chroot execute Xephyr like this:

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

Execute the `hildon-desktop` script as the user you created above.