Where to start

Tony Houghton h at realh.co.uk
Sat Mar 26 05:25:35 PST 2005


I want to use dbus in an application I'm writing, but I can't really
work out how to use it. I've looked at the tutorial, the glib section of
the Doxygen manual, and some code examples from ROX, but I'm still a bit
bewildered.

I'm writing my program as a main application and a separate config
applet. The capplet needs to be able to send messages to multiple
instances of the main application. I know gconf would make that easier
on the face of it, but using my own storage scheme makes it easier to
manage the storage of arbitrary named profiles. Also, the main program
needs to be able to start the capplet or, if it's running already, send
it a message to start configuring a set of options.

It's primarily designed to run in a ROX-Session environment, which
already uses dbus, so I can connect to the dbus session that starts. But
I'm not really sure what to do from there.

I guess I need to run my own dbus service, but how? Is it as simple as
calling dbus_g_proxy_new_for_name in each instance of the application
and in the capplet, and calling dbus_g_proxy_send automatically sends
the message to all other programs with a proxy for the same name?

Or do I have to explicitly start the service name? I can't see how to do
that. And if I do, is it OK just to start it in the capplet, while the
main instances only have to register their proxy once and can still
continue to receive messages OK, no matter if the service is stopped and
restarted?

-- 
TH * http://www.realh.co.uk


More information about the dbus mailing list