#1 Add patch to disable unsetting of DBUS_SESSION_BUS_ADDRESS environment variable
Opened 2 years ago by equeim. Modified 2 years ago
https://github.com/equeim/fedora-xorg-x11-xinit dbus  into  master

Add patch to disable unsetting of DBUS_SESSION_BUS_ADDRESS environment variable
Alexey Rochev • 2 years ago  
dbus-address.patch
file added
+12
@@ -0,0 +1,12 @@

+ diff --git a/startx.cpp b/startx.cpp

+ index dbc4cae..7badc54 100644

+ --- a/startx.cpp

+ +++ b/startx.cpp

+ @@ -11,7 +11,6 @@ XCOMM

+  XCOMM Site administrators are STRONGLY urged to write nicer versions.

+  XCOMM

+  

+ -unset DBUS_SESSION_BUS_ADDRESS

+  unset SESSION_MANAGER

+  

+  #ifdef __APPLE__

xorg-x11-xinit.spec
file modified
+3
@@ -25,6 +25,8 @@

  Patch5: 0003-startx-Make-startx-auto-display-select-work-with-per.patch

  # Fedora specific patch to match the similar patch in the xserver

  Patch6: xinit-1.3.4-set-XORG_RUN_AS_USER_OK.patch

+ # Fedora specific patch to disable unsetting of DBUS_SESSION_BUS_ADDRESS environment variable

+ Patch7: dbus-address.patch

  

  # The build process uses cpp (the C preprocessor) to do some text

  # processing on several files that are not C or C++. However, these
@@ -65,6 +67,7 @@

  %patch1 -p1

  %patch5 -p1

  %patch6 -p1

+ %patch7 -p1

  

  %build

  %configure

no initial comment

Currently /usr/bin/startx unsets DBUS_SESSION_BUS_ADDRESS environment variable, which makes /etc/X11/xinit/xinitrc.d/00-start-message-bus.sh script from dbus-x11 package launch a new dbus instance, ignoring the one that was already launched by user systemd session. It prevents user from communicating with user systemd services that use dbus (e.g. pulseaudio), or user systemd services to communicate with dbus services launched inside X session because they use two different dbus sessions.

Upstream bug report: https://gitlab.freedesktop.org/xorg/app/xinit/issues/9

This issue is also fixed in Debian, openSUSE and Arch Linux.