Howto determine the dbus session address??

Stef Bon stef at bononline.nl
Tue Aug 17 04:02:16 PDT 2010


  Hello,

I'm creating a construction to provide easy access to all kinds of
resources, like local USB devices and ATA harddisks and CDroms, and
remote shares like Windows/Samba shares, and working on integration with
OpenEnterprise server.

It's based on a Fuse module I've called fuse-workspace-union and the
automounter for Linux, and serveral other things like the at daemon
(acting as launch manager), ConsoleKIt (to make the construction session
aware, via /etc/ConsoleKit/run-session.d), udev (of course for detecting
local devices), and a lot of scripts.

It's simular to Gnome VFS, bit does not depend on the environment, like
GVFS does.
My construction works on filesystem level, using the great tool FUSE.

Now I'm working on giving the users a message when for example an
USB device is plugged in. (and maybe when a new samba server and/or 
share is detected).

For that to work the script which is run when an USB device is plugged in,
has to know the dbus session address, like:

DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-XLcqpOgL0d,guid=75c2894c8b7781e2d1c489984c6a48ac

The user for who the message is meant is already known, and the display 
device (like :0.0).

I can make use of wall but that does not have as many features 
dbus.notify has.

For text logins I can make use of write or something like that.

So how can this script determine the dbus session address? I remember 
that dbus writes
to $HOME/.dbus/session this information, but now I do not see it anymore.

Stef Bon

For more information about the construction:

http://linux.bononline.nl/projects/mount.md5key.new/




More information about the dbus mailing list