xref: /OK3568_Linux_fs/debian/overlay/etc/X11/Xsession.d/36x11-common_xhost-root (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun# This file is sourced by Xsession(5), not executed.
2*4882a593Smuzhiyun
3*4882a593Smuzhiyun# If xhost (from x11-xserver-utils) is installed, use it to give access
4*4882a593Smuzhiyun# to the X server to any process from the same user on the local host.
5*4882a593Smuzhiyun# Unlike other uses of xhost, this is safe since the kernel can check
6*4882a593Smuzhiyun# the actual owner of the calling process.
7*4882a593Smuzhiyun
8*4882a593Smuzhiyunif type xhost >/dev/null 2>&1; then
9*4882a593Smuzhiyun  xhost +si:localuser:root || :
10*4882a593Smuzhiyunfi
11