Dbus setup query

Marc Murphy marcmltd at marcm.co.uk
Sat Oct 11 12:27:16 PDT 2014


Hello,
I am new to the list but not new to writing applications to use dbus.

I am currently having a play getting an embedded system up from scratch using buildroot and have written some applications that will communicate over dbus.

My main issues are:
a) I have never set up a dbus system from scratch and there aren't many tutorials online about this.
b) I need to configure the system so that the dbus system is started automatically and all applications can talk on the system or session busses.

I mainly require 1 system bus and 1 session bus (maybe more session busses if I ssh through).

Using the default init script from buildroot I seem to get a system daemon running.  When I launch any apps they complain that there is no bus:
error: couldn't get bus: Could not connect: No such file or directory

I accept that, as there is no session bus running.

I would like to know how to start the session bus from a script but to make the DBUS_SESSION_BUS_ADDRESS global so that all sessions will use it  ?

The only way I have currently managed to do it is manually but using dbus-launch in the main bash session and then exporting the DBUS_SESSION_BUS_ADDRESS in each subsequent ssh session.  That is fine for testing but when I want to launch each application/process from their relevant scripts they won't have visibility of the DBUS_SESSION_BUS_ADDRESS that would have been started in the dbus init.d script.

Any help is greatly appreciated and may help others out there.

Kind Regards
Marc.


More information about the dbus mailing list