Re: Python startup desktop icon

2007-08-10 Thread Eero Tamminen
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@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Python startup desktop icon

2007-08-09 Thread Pierre Amadio
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@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Python startup desktop icon

2007-08-09 Thread Tony Maro
On 8/9/07, Eduardo Lima <[EMAIL PROTECTED]> 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!
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Python startup desktop icon

2007-08-09 Thread Eduardo Lima
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, , False)
   ...
   
   ...
   osso_ctx.close()

Best Regards, Etrunko.

On 8/9/07, Tony Maro <[EMAIL PROTECTED]> 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@maemo.org
> https://lists.maemo.org/mailman/listinfo/maemo-developers
>
>


-- 
Eduardo de Barros Lima
INdT - Instituto Nokia de Tecnologia
[EMAIL PROTECTED]
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers