Automatic XAuthority fallback

This commit is contained in:
2024-05-29 16:36:40 -04:00
parent bf1197cba7
commit f2c56eb9f9

View File

@@ -1252,7 +1252,7 @@ setDisplayVars() {
else
declare -g NEXT_DISPLAY_NUM=$(( THIS_DISPLAY_NUM + 1 ))
fi
declare -g NEXT_DISPLAY=":$NEXT_DISPLAY_NUM"
NEXT_DISPLAY=":$NEXT_DISPLAY_NUM"
}
@@ -1298,7 +1298,7 @@ setServiceVars() {
# TODO Ubuntu needs these in the service file, fedora (and others?) do not
case $ID in
ubuntu|debian)
DISPLAY_STRING="Environment=XAUTHORITY=$XAUTHORITY"
DISPLAY_STRING="Environment=XAUTHORITY=${XAUTHORITY:-$(echo /run/user/"$(id -u)"/.mutter*)}"
;;
*)
DISPLAY_STRING=""