[maemo-developers] [maemo-developers] Help on how to attach a non gtk+/hildon app to D-Bus

From: Tim Teulings rael at edge.ping.de
Date: Wed Jan 10 22:42:08 EET 2007

> Is it possible to initialize our C application (non GTK+/Hildon app.) and
> attach it to D-Bus with libOSSO library?

IMHO libOSSO is intermixed with Gtk so you must user Gtk somehow if you
want libOSSO. Depending on your needs if might be enough to just
initialize Gtk main event loop to get handling of DBus signals (quiting
main event loop if your event has been reached).

I'm not really a Gtk programmer so I can help you for that.

> Where can we get an exemple on how to write a little C script to listen
> D-Bus signals?

If you want to have a rudimentary DBus just using select and no Gtk at
all you can look at:


and watch out for "#if defined(HAVE_LIB_DBUS)" which marks the DBus
specific parts. The module is mainly for X11 interaction but the DBus
handling directly work with select and does not use X11 specific stuff.
I'm not sure that the implementation is fully correct (found no good
example) but at least I was able to get some events and did not see any
error. If you have questions, mail me privately.

I might improve the DBus implementation soon, if catching of screen
blanking events requires that (see other thread).


More information about the maemo-developers mailing list