Reply
Thread Tools
fpp's Avatar
Posts: 2,853 | Thanked: 968 times | Joined on Nov 2005
#1
This is getting to be frustrating.

I have this nice little Solitaire I made with pyGame, that works perfectly well from the command line when launched in xterm. I have been spending too much time trying (and failing) to launch it from the apps menu and have it appear in the taskbar like a regular app.

I've gone through several sources of information, such as :

- the Python/PyGtk tutorials on Teemu's blog,
- the files in the pygame Nannoid also available at Teemu's,
- a printed column about the 770 in the French Linux Magazine,
- the maemo mailing list archives, etc.

Most of them contradict one another, or at least use different syntax and options in their desktop and service files. All the combinations I've tried yield the same result : the game launches from the menu (with or without a taskbar icon), stays around for ten seconds or less, and disappears. I understand this is a sure sign of a badly configured Osso D-BUS service (whatever that is), but everyone seems to have a different way to do it - Nannoid even seems to run just fine without a service file altogether, which is just another mystery.

It doesn't make sense that it takes less time and effort to code an app than to get it to launch from a menu and keep running, does it ? Why is this so complicated and mysterious ? Is there a definitive "Howto for normal humans" available somewhere ?
TIA,
fp

Last edited by fpp; 2006-04-08 at 17:09.
 

The Following User Says Thank You to fpp For This Useful Post:
gnuite's Avatar
Posts: 1,245 | Thanked: 421 times | Joined on Dec 2005
#2
Take a look at the example .desktop and .service files in the MaemoPad example application from the New Application HOWTO on maemo.org. The key (I think) is in the name of your DBUS service - it needs to be consistent everywhere, and in some places, it's referenced by full "package name" (e.g. org.maemo.MaemoPad), and in other places, it's referenced by just "class name" (e.g. MaemoPad).

I agree that it feels a bit arbitrary, and it frustrated the hell out of me at times. I also had a lot of trouble creating and launching packages that had a dash in them (dashes aren't allowed in service names) - so much trouble that I gave up and just took out the dash entirely.
 
fpp's Avatar
Posts: 2,853 | Thanked: 968 times | Joined on Nov 2005
#3
Thanks for the reminder - I forgot to say it, but I'd tried that version too. No joy.
Either I'm doing something really silly, or this stuff is unreasonable.
 
teemu's Avatar
Posts: 40 | Thanked: 1 time | Joined on Nov 2005 @ Espoo, Finland
#4
I've sort of been struggling with the same thing and already given up. I've found out that the only way to get python apps running more than ten seconds is to leave the .service file out. This is what I did with Nannoid. The downside is of course that you don't see the "Application loading..." message when you start it and you might accidentally start multiple instances of the application.

I'm no expert but I think it has something to do with the pymaemo's lack of support for libosso and dbus or something. I think there is a new version of pymaemo coming out some time soon that should have better support for these. At least the Maemo 2.0 roadmap states that it will support developing Python applications with the Maemo SDK, whatever that means...
__________________
Teemu

www.teemuharju.net
 
fpp's Avatar
Posts: 2,853 | Thanked: 968 times | Joined on Nov 2005
#5
Thanks for the confirmation, teemu. But does this means that this entry on your blog :
http://www.teemuharju.net/2006/02/14...on-misc-notes/
is actually incorrect ? Maybe you should edit it to avoid people like me wondering whether they're mad or idiots or something :-)

I have tried leaving the service file out like you did for Nannoid but it didn't work. Need to check again...

Now we all sit on our hands waiting for Maemo 2006... that release better be real good :-)
 
teemu's Avatar
Posts: 40 | Thanked: 1 time | Joined on Nov 2005 @ Espoo, Finland
#6
Originally Posted by fpp
Thanks for the confirmation, teemu. But does this means that this entry on your blog :
http://www.teemuharju.net/2006/02/14...on-misc-notes/
is actually incorrect ? Maybe you should edit it to avoid people like me wondering whether they're mad or idiots or something :-)

I have tried leaving the service file out like you did for Nannoid but it didn't work. Need to check again...

Now we all sit on our hands waiting for Maemo 2006... that release better be real good :-)
You're right... I might need to add a note to that post. Although, the title of my blog should tell it all... "The truth isn’t in here…" Just kidding...

Yeah... I also have big expectations about Maemo 2006 release. And I'm really happy that they've chosen to support Python for application development more visibly. At least I think that it is the optimal development language (after C) to develop apps for devices like Nokia 770. Or any platform, for that matter...
__________________
Teemu

www.teemuharju.net
 
fpp's Avatar
Posts: 2,853 | Thanked: 968 times | Joined on Nov 2005
#7
We're agreed on that one, of course... although I'd really like to see maemo python come out as a complete distribution in a filesystem image that you keep on the MMC and mount as a loopback device, like it's done on the Zaurus : partial, space-saving distros with missing modules are OK for a test drive on the standard hardware, but too much of a hassle as soon as you try doing serious stuff...
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 10:53.