Check for wayland first

This commit is contained in:
2023-03-25 14:28:09 -04:00
parent f428aa1dfe
commit 4dee7b8119

View File

@@ -1387,9 +1387,9 @@ service_jriver-x11vnc() {
# If .Xauthority file is missing, generate a dummy for x11vnc -auth guess
if [[ ! -f "$HOME/.Xauthority" ]]; then
debug "Generating $HOME/.Xauthority"
[[ $XDG_SESSION_TYPE == "wayland" ]] &&
askOk "Unsupported Wayland session detected for x11vnc, continue?" || return 1
debug "Generating $HOME/.Xauthority"
execute touch "$HOME/.Xauthority"
execute chmod 644 "$HOME/.Xauthority"
xauth generate "$DISPLAY" . trusted