how to "discover" the session bus

Colin Walters walters at
Tue Apr 8 11:53:34 PDT 2008

On Tue, Apr 8, 2008 at 2:08 PM, Shawn Rutledge
<shawn.t.rutledge at> wrote:
>  What other mechanisms are there besides environment variables to do this?

On Linux you could read the environment variable out of /proc/<session
pid>/env which would be slightly cleaner (no predictably named files
in /tmp).
I think newer versions of ConsoleKit export the session bus address as
a property.

But in the original design of DBus was that if you wanted to do
something with the session bus outside of the session, for example pop
up a notification, then you'd have the session itself watch for an
event on the system bus.  There is talk of changing that architecture
a bit so that it's easier to inject messages on the session bus.

More information about the dbus mailing list