Bug 1108549 - startx unsets DBUS_SESSION_BUS_ADDRESS, which breaks user dbus session launched by systemd
startx unsets DBUS_SESSION_BUS_ADDRESS, which breaks user dbus session launch...
Status: RESOLVED FIXED
Classification: openSUSE
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: X.Org
Current
Other Other
: P3 - Medium : Normal (vote)
: ---
Assigned To: Stefan Dirsch
E-mail List
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2018-09-14 22:36 UTC by Alexey Rochev
Modified: 2019-01-13 22:55 UTC (History)
1 user (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Rochev 2018-09-14 22:36:09 UTC
startx unsets DBUS_SESSION_BUS_ADDRESS environment variable, which makes gnome-session (and probably other DEs or programs, except of Plasma) launch a new D-Bus session, while systemd has already launched its own. It breaks user systemd services that use D-Bus (e.g. PulseAudio), because X uses another D-Bus session.

Debian fixed this by providing /etc/X11/Xsession.d/20dbus_xdg-runtime (https://sources.debian.org/src/dbus/1.12.10-1/debian/20dbus_xdg-runtime) script that restores DBUS_SESSION_BUS_ADDRESS, and Arch Linux devs just patched startx to not unset it (https://git.archlinux.org/svntogit/packages.git/tree/trunk/fs46369.patch?h=packages/xorg-xinit).
Comment 1 Stefan Dirsch 2018-09-15 10:24:50 UTC
Does it work to put

  https://sources.debian.org/src/dbus/1.12.10-1/debian/20dbus_xdg-runtime

below /etc/X11/xinit/xinitrc.d? It must be made executable.
Comment 2 Alexey Rochev 2018-09-15 11:27:22 UTC
Yes, but it also needed to put "#to be sourced" at the beginning. Although I think that patching startx to remove one line is easier than adding xinitrc.d script. BTW, upstream bug is https://gitlab.freedesktop.org/xorg/app/xinit/issues/9.
Comment 3 Stefan Dirsch 2018-09-15 13:33:12 UTC
You're right. This file would need to be sourced instead of being executed. And it would be much easier to just patch startx script.

Did I mention that we no longer support startx since decades? ;-)
Comment 4 Stefan Dirsch 2018-09-15 13:48:40 UTC
Anyway, added Arch Linux patch ...
Comment 5 Swamp Workflow Management 2018-09-15 14:20:05 UTC
This is an autogenerated message for OBS integration:
This bug (1108549) was mentioned in
https://build.opensuse.org/request/show/635868 Factory / xinit