(In reply to Martin Szulecki from comment #14) > There is also an example in the man page of dbus-launch regarding testing for > the dbus-daemon but I am not sure if this is the "correct" way: > https://dbus.freedesktop.org/doc/dbus-launch.1.html Yep, that is correct ... in sys.xsession this is extend to use dbus-launch with the option --exit-with-session to let dbus-daemon become one of the parent processes of the final X session leader (session of window manager). This is done the `set' which prefix the final command line with the dbus-launch command and its options.