Skip to content. Skip to navigation

Ian Lawrence

Sections
Personal tools
You are here: Home Blog Pyphantom on Ubuntu Mobile

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 flash
ian@lawrence:~/Dev/Ume/flash$ apt-get source mobile-basic-flash
make the alterations to the flash sources explained in this post
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-flash
also 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.desktop
and put this in it:
[Mobile Entry]
Encoding=UTF-8
Name=Pyphantom
Exec=/usr/bin/pyphantom
Icon=pyphantom
and then test in a system terminal:
ian@lawrence:~$ xhost +
access control disabled, clients can connect from any host
then open the target terminal from moblin
root@lawrence:~# export DISPLAY=:0
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
this displays the UI for Ubuntu Mobile.
ume-pyphantom

Pyphantom


Next we need the call to /usr/bin/pyphantom to actually do something so:
root@lawrence:/usr/bin# nano pyphantom

#!/bin/sh
cd /usr/share/pyphantom
python pyphantom-ide
and then:
root@lawrence:/usr/bin# chmod +x pyphantom
then 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-gtk2
this gave an error of:
gtksourceview must be installed
so:
root@lawrence:/usr/share/pyphantom# aptitude install python-pygtksourceview
this 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-desktop
and clicking the icon in the flash gui executes pyphantom!

ume-pyphantom-1























here are the videos of it executing in the UI
pyphantom-on-ume.ogg
pyphantom-on-ume.avi

_____
tags:
Thursday, September 13, 2007 in CodeWork  | Permalink |  Comments (0)
del.icio.us   Digg   Yahoo   Google   Spurl
Blog
« January 2018 »
Su Mo Tu We Th Fr Sa
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31
Categories:
Borala (4)
Bricolabs (12)
Code (57)
Estudiolivre (12)
Life (26)
MetaReciclagem (9)
Thoughts (16)
Work (41)