Dbus session daemon and remote DISPLAY

Grahame Bowland grahame at angrygoats.net
Wed May 16 19:00:51 PDT 2007

Hi all

I've had a look through the list archives (in particular the "Session
dbus-daemons not killed after logout") thread, but I can't see a
solution to this particular problem.

I have a number of users running a Gtk+ program. They run that program
on one of several servers, exporting DISPLAY to the particular
X-terminal that they are using. DISPLAY is an actual X terminal, not
an SSH tunnel; it will remain "alive" for as long as that terminal is
powered up.

Whenever a user starts up the Gtk File dialog, a new Dbus session
daemon is started by the gnome-vfs daemon. This is via:
  dbus-launch --autolaunch 9abda<...> --binary-syntax
and produces a process such as:
  dbus-daemon --fork --print-pid 5 --print-address 7 --session
and we're using dbus-1.0.2.

The problem is that as far as I can tell, dbus-daemon will never exit
unless the DISPLAY becomes unavailable. There's no "session" for it to
exit with; it was fired up by a standalone Gtk program. As the tuple
of (display, UUID) is used to determine whether a new daemon is
needed, we'll end up with dbus-session daemons around for every
DISPLAY. This can result in quite a lot of processes hanging about.

Any suggestions how to fix this would be great. A kludge would be to
add an inactivity timeout to dbus-daemon, but this wouldn't work well
for the normal session bus use case. Should gnome-vfs (or
dbus-launch?) be telling the dbus-daemon that there's no session to
exit with, and that it should exit with the PID of the process that
started it (my program?)


More information about the dbus mailing list