Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Maemo: Developers

Python startup desktop icon

 

 

Maemo developers RSS feed   Index | Next | Previous | View Threaded


tonymaro at gmail

Aug 9, 2007, 1:54 PM

Post #1 of 5 (417 views)
Permalink
Python startup desktop icon

I'm trying to follow the instructions at
http://maemo.org/development/documentation/how-tos/3-x/python_maemo_3.x_howto.html

I have the icon launching my app just fine, but when I use the
"X-Osso-Service" and a .service dbus file, I get something odd.

It tells me "Starting app" in the top right, and the application starts just
fine.

Then, after about 20 seconds, the app closes. If I launch it without using
X-Osso-service, it of course gives no notification that the app is opening,
but it opens and stays open.


Here's my thummim.desktop file:

[Desktop Entry]
Encoding=UTF-8
Name=Thummim Reader
Comment=Thummim Scripture Reader
Exec=/home/user/Thummim/Thummim
Type=Application
Icon=gpe-todo
X-Osso-Service=thummim
X-Osso-Type=application/x-executable

Here's my thummim.service file:

[D-BUS Service]
Name=com.nokia.thummim
Exec=/home/user/Thummim/Thummim


eblima at gmail

Aug 9, 2007, 3:07 PM

Post #2 of 5 (390 views)
Permalink
Re: Python startup desktop icon [In reply to]

Hi,

You need to call osso.Context() somewhere in your code, preferably in
the beginning of main function. You'll also need to call osso.close()
in the end of your code. Something like this:


import osso

if __name__ == "__main__":

osso_ctx = osso.Context(thummim, <version>, False)
...
<some code>
...
osso_ctx.close()

Best Regards, Etrunko.

On 8/9/07, Tony Maro <tonymaro [at] gmail> wrote:
> I'm trying to follow the instructions at
> http://maemo.org/development/documentation/how-tos/3-x/python_maemo_3.x_howto.html
>
> I have the icon launching my app just fine, but when I use the
> "X-Osso-Service" and a .service dbus file, I get something odd.
>
> It tells me "Starting app" in the top right, and the application starts just
> fine.
>
> Then, after about 20 seconds, the app closes. If I launch it without using
> X-Osso-service, it of course gives no notification that the app is opening,
> but it opens and stays open.
>
>
> Here's my thummim.desktop file:
>
> [Desktop Entry]
> Encoding=UTF-8
> Name=Thummim Reader
> Comment=Thummim Scripture Reader
> Exec=/home/user/Thummim/Thummim
> Type=Application
> Icon=gpe-todo
> X-Osso-Service=thummim
> X-Osso-Type=application/x-executable
>
> Here's my thummim.service file:
>
> [D-BUS Service]
> Name=com.nokia.thummim
> Exec=/home/user/Thummim/Thummim
>
>
> _______________________________________________
> maemo-developers mailing list
> maemo-developers [at] maemo
> https://lists.maemo.org/mailman/listinfo/maemo-developers
>
>


--
Eduardo de Barros Lima
INdT - Instituto Nokia de Tecnologia
eblima [at] gmail
_______________________________________________
maemo-developers mailing list
maemo-developers [at] maemo
https://lists.maemo.org/mailman/listinfo/maemo-developers


tonymaro at gmail

Aug 9, 2007, 5:36 PM

Post #3 of 5 (395 views)
Permalink
Re: Python startup desktop icon [In reply to]

On 8/9/07, Eduardo Lima <eblima [at] gmail> wrote:
>
> Hi,
>
> You need to call osso.Context() somewhere in your code, preferably in
> the beginning of main function. You'll also need to call osso.close()
> in the end of your code.



Aha! Exactly what I needed. Thanks!


pierre.amadio at laposte

Aug 9, 2007, 10:59 PM

Post #4 of 5 (387 views)
Permalink
Re: Python startup desktop icon [In reply to]

Hi there.

On Thu, Aug 09, 2007 at 04:54:45PM -0400, Tony Maro wrote:
> It tells me "Starting app" in the top right, and the application starts just
> fine.
>
> Then, after about 20 seconds, the app closes. If I launch it without using
> X-Osso-service, it of course gives no notification that the app is opening,
> but it opens and stays open.
>
...
...
> X-Osso-Service=thummim

What happens if you use

X-Osso-Service=com.nokia.thummim

?

I encoutered a similar problem if i try to use something else than
com.nokia (say org.maemo.something).
https://bugs.maemo.org/show_bug.cgi?id=1475

I'm a bit lost whenever i envouter a bbus or osso problem...

Hope this helps.


_______________________________________________
maemo-developers mailing list
maemo-developers [at] maemo
https://lists.maemo.org/mailman/listinfo/maemo-developers


eero.tamminen at nokia

Aug 10, 2007, 12:33 AM

Post #5 of 5 (387 views)
Permalink
Re: Python startup desktop icon [In reply to]

Hi,

ext Tony Maro wrote:
> I'm trying to follow the instructions at
> http://maemo.org/development/documentation/how-tos/3-x/python_maemo_3.x_howto.html
>
> I have the icon launching my app just fine, but when I use the
> "X-Osso-Service" and a .service dbus file, I get something odd.
>
> It tells me "Starting app" in the top right, and the application starts just
> fine.
>
> Then, after about 20 seconds, the app closes. If I launch it without using
> X-Osso-service, it of course gives no notification that the app is opening,
> but it opens and stays open.

If D-BUS service doesn't register to D-BUS daemon after it was started,
the daemon assumes that starting failed and terminates the started
process. (Why to start something with D-BUS if it doesn't use it?)

Libosso initialization does also D-BUS registration.


- Eero
_______________________________________________
maemo-developers mailing list
maemo-developers [at] maemo
https://lists.maemo.org/mailman/listinfo/maemo-developers

Maemo developers RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.