Autostarting session bus
hp at redhat.com
Wed Sep 12 09:18:44 PDT 2007
On 9/12/07, Ross Burton <ross at burtonini.com> wrote:
> If I have the choice would it be "best" to start a session bus in the X
> startup scripts, or rely on the first application to use DBus to
> auto-start one?
Autostart is always a broken workaround; it's just there to keep
people from whining, since the "correct fix" in some cases (ssh, sudo)
is fairly hard and nobody has done it. If those things were fixed
there would be no reason to ever autostart, though.
Avoiding autostart should mean a faster startup if nothing else
(getenv() vs. connecting to X server and doing some round trips).
Think of the session dbus-daemon as working exactly like the X server.
It starts with the X server, it's found via env variable just like the
X server, and apps exit when it exits, just like the X server. The
only thing that isn't the same is that ssh and sudo don't properly
forward the env variable as they do for the X server, but that's a
The man page for dbus-launch talks about this too but I think says
about the same as what I just wrote.
More information about the dbus