Brian J. Tarricone
bjt23 at cornell.edu
Fri Feb 15 19:02:39 PST 2008
Havoc Pennington wrote:
> On Fri, Feb 15, 2008 at 9:48 PM, Brian J. Tarricone <bjt23 at cornell.edu> wrote:
>> This somewhat highlights what IMHO is one of the worst things about
>> dbus: its reliance on environment variables to tell clients how to
>> contact the session bus.
> It can also get the session bus from an X property. Other ideas are
> welcome, but env variable and X prop are the only two I can even come
> up with...
How about storing a file somewhere in $XDG_CACHE_HOME with the relevant
info? If DBUS_SESSION_BUS_ADDRESS isn't set, and for some reason the X
property can't be read, libdbus can (automatically!) fall back to this file.
There are problems with this if more than one session bus is running for
the user, but I imagine someone smarter than me could figure out how
that could work in that case. ^_^
> This was simply copied from X and DISPLAY btw. If you can get DISPLAY
> set, presumably the same mechanism can set DBUS_SESSION_BUS_ADDRESS.
There are some instances where I don't care if DISPLAY is set or not.
E.g., ssh-ing into a machine to use purple-remote to change Pidgin's
More information about the xdg