Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 498880 - x11-misc/virtualgl - /etc/conf.d/vgl should automatically reconfigure when you switch desktop manager
Summary: x11-misc/virtualgl - /etc/conf.d/vgl should automatically reconfigure when yo...
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Pacho Ramos
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2014-01-22 03:50 UTC by Gino McCarty
Modified: 2022-10-23 15:53 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
new /etc/conf.d/vgl file (vgl,752 bytes, text/plain)
2014-01-22 03:50 UTC, Gino McCarty
Details

Note You need to log in before you can comment on or make changes to this bug.
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?