X11: Add xauthority parameter
authorWim Taymans <wtaymans@redhat.com>
Thu, 12 Sep 2019 07:49:40 +0000 (09:49 +0200)
committerTanu Kaskinen <tanuk@iki.fi>
Thu, 21 Nov 2019 12:44:09 +0000 (14:44 +0200)
commitc7a55174dc5b087cdd96524530aa10ed1d39968e
tree0d15d709730a2710ad77bd967b3195f542ece73d
parent6f28865950e798e6d31dbe6ddfb6b05161589c9d
X11: Add xauthority parameter

Add an xauthority parameter and use it in the startup script.

Apparently on some systems the X authentication cookie is not stored in
~/.Xauthority but in some dynamic location pointed to by the XAUTHORITY
environment variable. The environment variable therefore needs to be set
in the PulseAudio daemon environment in order to have access to the X
server from the PulseAudio daemon, but the variable is not necessarily
set when starting PulseAudio. For example, systemd starts PulseAudio
outside the X session. The start-pulseaudio-x11 script is run in the
X session, so it has the environment variable available, and can pass it
to the X modules, which then can set the variable in the daemon
environment.

RedHat bug: https://bugzilla.redhat.com/show_bug.cgi?id=1723065
Debian bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=593746

Based on patch by Alexander Kurtz <kurtz.alex@googlemail.com>
src/daemon/start-pulseaudio-x11.in
src/modules/x11/module-x11-bell.c
src/modules/x11/module-x11-cork-request.c
src/modules/x11/module-x11-publish.c
src/modules/x11/module-x11-xsmp.c