Pyphantom on Ubuntu Mobile
I wanted to use Pyphantom on Ubuntu Mobile (In the best 'recursive' traditions of the GNU project et al :)
This assumes you have the development environment set up as explained here
What similarities are there between maemo and ubuntu-mobile for plug-in development??
A Home plugin in maemo allows a user to choose an applet to sit permanently on the user desktop.
This can include things like a clock, a google searchbar, a RSS reader or Web Shortcuts. The concept is similar to the Gnome gdesklets. From the gdesklets website:
"gDesklets is a system for bringing mini programs (desklets), such as weather forecasts, news tickers, system information displays, or music player controls, onto your desktop, where they are sitting there in a symbiotic relationship of eye candy and usefulness."
You do add a Home plugin on an actual device such as the N800 by going to Home -> Select applets.
This concept does not 'currently' exist for UME as far as I can tell.
A Task Navigator plugin in meamo allows the user to choose an application to start, change settings through the control panel or access utilities such as the file manager or calculator . On the actual device such as the N800 this is the left hand vertical panel. The equivalent on UME is called the marquee panel and it serves to provide basic user interface functions.
A statusbar plugin in maemo shows , well, the status of things on the device such as the battery, sound level and strength of the wi-fi connection. On Ume it is also called a status bar plugin and contains user defined items, as well as some system notification plug-ins, like wireless connection, and battery information. The status bar is located at the top bar of the screen and can be refreshed at run-time on UME
Changing the Flash UI
ian@lawrence:~/Dev/Ume$ mkdir flash;cd flashmake the alterations to the flash sources explained in this post
ian@lawrence:~/Dev/Ume/flash$ apt-get source mobile-basic-flash
and then copy to the file system:
ian@lawrence:~/Dev/Ume/flash/mobile-basic-flash-0.6/content$ sudo cp conf.xml flash_home.html /home/ian/Dev/Ume/olpcimage/targets/metahacker/fs/usr/share/mobile-basic-flashalso inside the target file system in the mobile-basic-flash/applications folder create a .desktop file:
root@lawrence:/usr/share/mobile-basic-flash/applications# nano pyphantom.desktopand put this in it:
[Mobile Entry]and then test in a system terminal:
Encoding=UTF-8
Name=Pyphantom
Exec=/usr/bin/pyphantom
Icon=pyphantom
ian@lawrence:~$ xhost +then open the target terminal from moblin
access control disabled, clients can connect from any host
root@lawrence:~# export DISPLAY=:0this displays the UI for Ubuntu Mobile.
root@lawrence:~# /etc/init.d/dbus start
root@lawrence:~# xinit /etc/X11/xinit/xinitrc -- /usr/bin/Xephyr :2 -host-cursor -screen 1024x600x32 -dpi 96 -ac
Pyphantom
Next we need the call to /usr/bin/pyphantom to actually do something so:
root@lawrence:/usr/bin# nano pyphantomand then:
#!/bin/sh
cd /usr/share/pyphantom
python pyphantom-ide
root@lawrence:/usr/bin# chmod +x pyphantomthen outside the target file system copy pyphantom to the directory:
ian@lawrence:~/Dev/Indt/Pyphantom/pyphantom$ sudo cp -R pyphantom/ /home/ian/Dev/Ume/olpcimage/targets/metahacker/fs/usr/share/trying this out gave an error of a missing module gtk so:
root@lawrence:/usr/share/pyphantom# aptitude install python-gtk2this gave an error of:
gtksourceview must be installedso:
root@lawrence:/usr/share/pyphantom# aptitude install python-pygtksourceviewthis gave the same error!!??. Running pyphantom in a normal gutsy install works but inside a hildon desktop gutsy it does not...so what gives? It appears that in a normal gutsy install gtksourceview is pulled in by the package python-gnome2-desktop... as this is hildon desktop we have gtksourceview2 and hence the errors. The choice is to modify the pyphantom code replacing gtksourceview with gtksourceview2 or installing the package python-gnome2-desktop. This is nearly 30 MB in size. I am not optimizing for the install image size yet so:
root@lawrence:/usr/share/pyphantom# apt-get install python-gnome2-desktopand clicking the icon in the flash gui executes pyphantom!
here are the videos of it executing in the UI
pyphantom-on-ume.ogg
pyphantom-on-ume.avi
tags:




