diff options
-rw-r--r-- | debian/changelog | 10 | ||||
-rw-r--r-- | debian/local/Xsession.5 | 7 | ||||
-rw-r--r-- | debian/local/Xsession.d/35x11-common_xhost-local | 10 |
3 files changed, 27 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog index 632ff14..07109a2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +xorg (1:7.6+11) UNRELEASED; urgency=low + + * debian/local/Xsession.d/35x11-common_xhost-local: add a new script + to the default X session. It will give access to the running X + server to the logged on user. This is useful for gdm3 which does not + give access to $XAUTHORITY outside the session, but can also be of + use for other display managers. Closes: #586685. + + -- Josselin Mouette <joss@debian.org> Thu, 24 Nov 2011 22:52:19 +0100 + xorg (1:7.6+10) unstable; urgency=high * Fixes for xserver-wrapper: diff --git a/debian/local/Xsession.5 b/debian/local/Xsession.5 index 74d6911..2e954bb 100644 --- a/debian/local/Xsession.5 +++ b/debian/local/Xsession.5 @@ -186,6 +186,13 @@ the user's .I $HOME/.Xresources file is merged in the same way. .TP +.I /etc/X11/Xsession.d/35x11\-common_xhost\-local +Give access to the X server to the same user on the local host. +If the +.I xhost +command is available, it will use it to allow any process of the same +user running on the local host to access the X server. +.TP .I /etc/X11/Xsession.d/40x11\-common_xsessionrc Source global environment variables. This script will source anything in diff --git a/debian/local/Xsession.d/35x11-common_xhost-local b/debian/local/Xsession.d/35x11-common_xhost-local new file mode 100644 index 0000000..d127a6c --- /dev/null +++ b/debian/local/Xsession.d/35x11-common_xhost-local @@ -0,0 +1,10 @@ +# This file is sourced by Xsession(5), not executed. + +# If xhost (from x11-xserver-utils) is installed, use it to give access +# to the X server to any process from the same user on the local host. +# Unlike other uses of xhost, this is safe since the kernel can check +# the actual owner of the calling process. + +if type xhost >/dev/null 2>&1; then + xhost +si:localuser:$(id -un) || : +fi |