walters at verbum.org
Wed Jan 16 14:08:17 PST 2008
On Jan 16, 2008 5:01 PM, Shreevatsa R <shreevatsa.public at gmail.com> wrote:
> My current understanding is this:
> When a D-Bus-using program is started,
> (a) if DBUS_SESSION_BUS_ADDRESS is set, it uses that bus
Applications can choose to connect to the session or system bus.
> (b) else, it invokes dbus-launch --autolaunch. This will:
libdbus certainly doesn't try to spawn a bus for you, because that
would generally be wrong.
> Now, I am on OS X, and not running X11 [...]
> So my question is: How do I launch dbus and have the session bus
> address available to all programs that are launched later?
The way it works on Unix/Linux/X11 is typically that it runs as part
of a "session startup" script. I have no idea how this works on OS X,
but you should try to find out what the place is where any
subprocesses will inherit the environment variable.
There is also the detail that babysitting using the X connection
doesn't really work if you're not running X...ideally the dbus-launch
script would have support for monitoring an OS X login session and
terminating when it closes.
Does your system run ssh-agent? Try to find out where/how that gets
started; dbus-launch should go in the same place.
More information about the dbus