summaryrefslogtreecommitdiff
path: root/x11-misc/virtualgl/files/vgl.confd-r1
diff options
context:
space:
mode:
authorBlackNoxis <steven.darklight@gmail.com>2014-02-15 23:24:26 +0200
committerBlackNoxis <steven.darklight@gmail.com>2014-02-15 23:24:26 +0200
commit7224c1253228e5c29c78cb3f0f26ce34770f2356 (patch)
tree1684924656132935256e034f35f92abee6623265 /x11-misc/virtualgl/files/vgl.confd-r1
Added ebuilds for kogaion desktop
Diffstat (limited to 'x11-misc/virtualgl/files/vgl.confd-r1')
-rw-r--r--x11-misc/virtualgl/files/vgl.confd-r127
1 files changed, 27 insertions, 0 deletions
diff --git a/x11-misc/virtualgl/files/vgl.confd-r1 b/x11-misc/virtualgl/files/vgl.confd-r1
new file mode 100644
index 00000000..d56414d4
--- /dev/null
+++ b/x11-misc/virtualgl/files/vgl.confd-r1
@@ -0,0 +1,27 @@
+# /etc/conf.d/vgl
+
+DISPLAY="${DISPLAY:-:0}"
+
+# Make it a function in case we have to repeat it in init script later
+set_xauth() {
+
+# common case (works in almost all tested environments (except of lightdm)):
+XAUTHORITY="$(ps wwax -C X,Xorg -o args= --sort=-stime | grep -m 1 -o '\B[-]auth\s*/var\S*auth\S*' | cut -d ' ' -f 2)"
+
+# kdm and some others:
+# XAUTHORITY="$(find /var/run/xauth/A${DISPLAY}-*|tail -n1)"
+
+# gdm:
+# XAUTHORITY="/var/gdm/${DISPLAY}.Xauth"
+
+# slim:
+# XAUTHORITY="/var/run/slim.auth"
+
+# lightdm:
+# XAUTHORITY="/var/run/lightdm/root/${DISPLAY}"
+
+# lxdm:
+# XAUTHORITY="/var/run/lxdm/lxdm-${DISPLAY}.auth"
+
+}
+set_xauth