From 1463eb3fd8d60a72f0dbf99b3c19ee7de26d7cc1 Mon Sep 17 00:00:00 2001 From: bryan Date: Fri, 14 Jan 2022 10:53:06 -0500 Subject: [PATCH] Improve .Xauthority handling and detect wayland for x11vnc --- installJRMC | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/installJRMC b/installJRMC index 540c710..d0f16d1 100755 --- a/installJRMC +++ b/installJRMC @@ -1113,6 +1113,14 @@ service_jriver-x11vnc() { # } # _getResolution + # If .Xauthority file is missing, generate a dummy for x11vnc -auth guess + if [[ ! -f "$HOME/.Xauthority" ]]; then + [[ "$XDG_SESSION_TYPE" == "wayland" ]] && ask_ok "Unsupported Wayland session detected for x11vnc, continue?" || return 1 + touch "$HOME/.Xauthority" + xauth generate "$DISPLAY" . trusted + xauth add "$HOST$DISPLAY" . "$(xxd -l 16 -p /dev/urandom)" + fi + if (( NOVNCAUTH )); then start_cmd="/usr/bin/x11vnc -display $DISPLAY -noscr -auth guess -forever -bg -nopw" else