Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 498880

Summary: x11-misc/virtualgl - /etc/conf.d/vgl should automatically reconfigure when you switch desktop manager
Product: Gentoo Linux Reporter: Gino McCarty <onigino>
Component: Current packagesAssignee: Pacho Ramos <pacho>
Status: RESOLVED TEST-REQUEST    
Severity: normal CC: bircoph, mva, pacho, proxy-maint, rei4dan, silvio.gerli
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: new /etc/conf.d/vgl file

Description Gino McCarty 2014-01-22 03:50:07 UTC
Created attachment 368418 [details]
new /etc/conf.d/vgl file

Here is a new /etc/conf.d/vgl file
it auto configures when you switch DM's so, less headaches than the other one..
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2014-01-22 14:48:49 UTC
Comment on attachment 368418 [details]
new /etc/conf.d/vgl file

--- files/vgl.confd-r1  2013-07-22 03:27:10.564280507 +0200
+++ -   2014-01-22 15:48:12.440668285 +0100
@@ -2,26 +2,37 @@
 DISPLAY="${DISPLAY:-:0}"
+. /etc/conf.d/xdm
+
 # 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"
+local MY_XDM
+
+MY_XDM=$(echo "${DISPLAYMANAGER}" | tr '[:upper:]' '[:lower:]')
+
+case "${MY_XDM}" in
+       kdm)
+         XAUTHORITY="$(find /run/xauth/A${DISPLAY}-*|tail -n1)"
+         ;;
+       gdm)
+         XAUTHORITY="/var/gdm/${DISPLAY}.Xauth"
+         ;;
+       slim)
+         XAUTHORITY="/run/slim.auth"
+         ;;
+       lxdm)
+         XAUTHORITY="/run/lxdm/lxdm-:0.auth"
+         ;;
+       sddm)
+         XAUTHORITY="$(find /run/sddm/A${DISPLAY}-*|tail -n1)"
+         ;;
+       lightdm)
+         XAUTHORITY="/run/lightdm/root/${DISPLAY}"
+         ;;
+        *)
+         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)"
+         ;;
+esac
 }
 set_xauth
Comment 2 Pacho Ramos gentoo-dev 2022-07-20 13:07:09 UTC
Is this still needed with latest virtualgl?