how to connect to your own message bus

Havoc Pennington hp at redhat.com
Tue Nov 6 12:06:42 PST 2007


Hi,

Wang Jun wrote:
>  1, is it possible to have a separate message bus that is only
> used by the few modules.(other than SYSTEM_BUS, SESSION_BUS)

Yes, by creating a different config file. Look at session.conf, 
system.conf for examples, and the man page for dbus-daemon.

>  2. how to start a message bus of your own and specify connection
> in an application.
> DBusConnection * 	dbus_connection_open (const char *address, DBusError
> *error)
> any sample about the address parameter.

If you make it work like the system bus, you would specify a socket 
filename in the config file, so your address would use that.

If you make it work like the session bus, you would have the bus 
generate an address on startup, which means you need to have the bus 
print out the address and then you have to set it in an environment 
variable or otherwise communicate it to your app.

Havoc



More information about the dbus mailing list