#835887 gnome-session: don't run dbus-launch if XDG_RUNTIME_DIR/bus is available

Package:
src:gnome-session
Source:
gnome-session
Submitter:
Simon McVittie
Date:
2021-06-17 17:21:16 UTC
Severity:
normal
Tags:
#835887#5
Date:
2016-08-29 00:52:07 UTC
From:
To:
As described in <https://lists.debian.org/debian-devel/2016/08/msg00554.html>
I'm trying to reduce how much dbus-launch is used in Debian.
gnome-session has code that explicitly runs dbus-launch if
DBUS_SESSION_BUS_ADDRESS isn't set.

The major D-Bus implementations (libdbus, GDBus, sd-bus) now have a
fallback code path, before trying X11 autolaunch, when
DBUS_SESSION_BUS_ADDRESS is unset: if XDG_RUNTIME_DIR is set, and
XDG_RUNTIME_DIR/bus exists, is a socket and is owned by the
process's uid, then they will use it. In particular, dbus-user-session
sets up that situation.

For the moment, dbus-user-session does make sure DBUS_SESSION_BUS_ADDRESS
is set, to be nice to packages that don't have this fallback path.
However, I'd like to avoid requiring that in future, by adapting
the dbus-launch code in gnome-session and its forks to look for
XDG_RUNTIME_DIR/bus before trying dbus-launch.

I'll open an upstream bug after doing this MBF.

Thanks,
    S

#835887#10
Date:
2016-09-10 03:57:58 UTC
From:
To:
Hi Simon

Have you filed such a bugreport in the mean time?

Regards,
Michael

#835887#15
Date:
2016-09-10 07:53:22 UTC
From:
To:
Control: forwarded 835887 https://bugzilla.gnome.org/show_bug.cgi?id=694472
on this MBF hasn't been my top priority :-)

Turns out I opened an upstream bug 3.5 years ago, with a patch (which
isn't 100% right, but should be reasonably straightforward to adapt if
someone wants to pick it up).
<https://bugzilla.gnome.org/show_bug.cgi?id=694472>

Things that need fixing in that patch before it can be applied:
<https://bugzilla.gnome.org/show_bug.cgi?id=694472#c8>

    S