Running Meego Handset in an N900 chroot with Easy Debian: Part 2
In this post, I show you how to start the Meego Handset 1.1 "desktop" in a Maemo chroot, using Easy Debian and the image file you made using instructions in the last post.
This is a very shaky process. It is in no way ready for use in any way other than "Oh that's cool!"
The animations on the desktop are very slow, and
- You have a working install of Easy Debian on your N900, and you can start the LXDE desktop in a window.
- You have made the image from the last post, and you have put it in your /home/user/MyDocs folder.
I have written four little scripts that semi-automate the process of starting the Meego UI. You can download the zip file containing the four (updated!) scripts here at qole.org. You must put these scripts in the /home/user/meego directory, or edit the scripts to look in another directory.
Put the scripts in the MyDocs folder of your N900 (that's where they'll download if you just choose the root "N900" folder when downloading from the N900), and then, at the Maemo terminal prompt on your N900:
Hopefully, that's all you have to do to get the Meego 1.1 desktop to start up on your N900. Read on for more details of what's going on "under the hood."
The main script, debmee, runs the other scripts for you.
The first line runs the meegoxeph script in Easy Debian to create a nested X server (Xephyr) for Meego to run in, and the second line runs the chrootmeego script to open the Meego image in a chroot, and the startmeegoui script to start the various pieces of the Meego UI in the Easy Debian X server.debbie /home/user/meego/meegoxeph
The meegoxeph script is just a stripped-down version of the script that opens LXDE in Easy Debian. I've discussed the process elsewhere, and I'm not going to look very closely at it in this post. However, feel free to ask me questions about it, if you want.
The chrootmeego script is a simple script to open a Meego chroot and run whatever is passed to it in the chroot.
The first three lines check to see if you have a /.meego directory, and if you don't, create one. The third line, starting with IMG=, looks for an image file that starts with "meego" in your MyDocs directory, and the third line chroots into that image file and runs the parameters. The parameter that it runs in this case is...if [ ! -d "/.meego" ] ; then
sudo mkdir /.meego
IMG="`ls -1 /home/user/MyDocs/meego*.img* | head -1`"
sudo qchroot $IMG /.meego "$@"
The core of the process: the startmeegoui script.
This script is the most interesting script. It starts all the pieces needed to get the Meego 1.1 desktop running.
/usr/bin/mthemedaemon 1>/dev/null 2>&1 &
/usr/bin/sysuid -software -remote-theme 1>/dev/null 2>&1 &
/usr/bin/meego-im-uiserver -software -remote-theme 2>/dev/null &
/usr/bin/mdecorator -software -remote-theme 2>/dev/null &
/usr/bin/duihome --desktop -software -remote-theme 2>/dev/null &
The first line just sets the display to the Xephyr nested X server.
The rest of the lines are taken from the list of started apps found in /etc/xdg/autostart in an early version (August 2010) of Meego Handset. See this post and this one especially. This is the same script I used back in August to start the desktop, and I think it is outdated now. (There are some commented-out lines in the script that I'm not going to discuss in this post, but if you wish to experiment with them, you may).
The list of apps in /etc/xdg/autostart is much larger now, so I think the next step would be to try starting more of them (applauncherd in particular looks promising) and to see if we still need to use software rendering (the -software parameter I'm using on many of the lines).
Another note: the 1>/dev/null 2>&1 stuff that you see on the end of most of the lines of that script just silences the huge amounts of error messages the apps produce. This seems to speed up the whole desktop.
Interesting Problems and Side Effects:
One of the interesting new side effects of this is that the GPS icon starts flashing in Maemo. I guess Meego is trying to acquire a fix for some reason.
You can shut down Meego (and then the Easy Debian host window) by typing the following at a Maemo terminal prompt:
If you've read to the bottom of the post, I'll give you a treat. Here's a link to my image file that I made using the instructions from the last post.