[maemo-developers] [maemo-developers] osso_initialize()
From: Tomas Frydrych tf at o-hand.comDate: Wed Feb 1 14:41:02 EET 2006
- Previous message: [maemo-developers] osso_initialize()
- Next message: [maemo-developers] osso_initialize()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
The osso debus service name handling is badly designed and cannot handle properly quialified names; to get your app working: * The full name of your service has to be com.nokia.revsh * the desktop file *must not* contain fully qualified name: X-Osso-Serivce=revsh * the service file *must* contain fully qualified name Name=com.nokia.revsh * you *must* pass the short name to osso_initialize: osso_initialize("revsh" ...) It is silly and ignores the dbus spec on naming, but basically, whatever you pass into osso_initialize() will always end up prefixed with 'com.nokia.'. Tomas Tomi Ollila wrote: > Hi > > > I've tried to get my "menu-launched" program to work. System keeps > kill-9:ing my prog since it was not communicating properly using > D-BUS messages > > Currently I am using the "dbus escape hax" like: > > if (fork()) { sleep(4); _exit(0); } > close(0); close(1); close(2); setsid(); > > to get the program working. With that the (escaped) prog doesn't get > killed but ... > > I've heard that calling osso_initialize() should somehow do the work, > and I have been trying to search how that actually should be used. > Thew only source code I've read is from maemopad and that seems not > to do much more than calling osso_initialize() and saving the return > value (but not using it elsewhere). The available documentation > and usage tips I've found so far have not helped too much -- and there > are so much uncertainty there that explodes my testing options... > > So far I've tried the following: > > In code: > > (void)osso_initialize("revsh", PRJ_VER, false, null); /* called after gtk_init() */ > > (what should I do with return value ???) > > > In revsh.desktop > > [Desktop Entry] > Encoding=UTF-8 > Version=1.0 > Type=Application > Name=RevSH Tunnel > Exec=/var/lib/install/usr/bin/revsh-tunnel-gui > X-Osso-Service=invalid.too.revsh > # FIXME Icon > Icon=qgn_list_home > > > In revsh.service > > [D-BUS Service] > Name=invalid.too.revsh > Exec=/var/lib/install/usr/bin/revsh-tunnel-gui > > > > For maximum portability with minimum #ifdefs the program (currently) > uses standard gtk widgets, (with the exception of setting "autocap" in text > entries)... > > The flashed system is Nokia770-51 > > > Any help is appreciated > > Tomi > > > > > _______________________________________________ > maemo-developers mailing list > maemo-developers at maemo.org > https://maemo.org/mailman/listinfo/maemo-developers > > !DSPAM:43e0a44d211872090367755! >
- Previous message: [maemo-developers] osso_initialize()
- Next message: [maemo-developers] osso_initialize()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]