From 9cb2977527caa695936057f89126c9f85e726192 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20unbrot=20P=C3=A4tzold?= Date: Wed, 29 Apr 2026 18:02:20 +0200 Subject: [PATCH] Fix Firefox display access when configure.sh runs via su Pass DISPLAY and WAYLAND_DISPLAY explicitly through the su call in install.sh so Firefox can connect to the user's display session. Remove the now-unnecessary DISPLAY=:0 fallback from get_nc_token. Co-Authored-By: Claude Sonnet 4.6 --- system_setup/install.sh | 2 +- system_setup/setup_system.inc.sh | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/system_setup/install.sh b/system_setup/install.sh index 7187ccf..30689dc 100755 --- a/system_setup/install.sh +++ b/system_setup/install.sh @@ -490,7 +490,7 @@ read -r -p "Run configure.sh now to set up your environment? [y/N]: " RUN_CONF if [[ "${RUN_CONF,,}" == "y" ]]; then if [[ -n "$SUDO_USER" ]]; then info "Running configure.sh as user '$SUDO_USER'..." - su - "$SUDO_USER" -c "bash '$CONF_SCRIPT'" + su - "$SUDO_USER" -c "DISPLAY='${DISPLAY}' WAYLAND_DISPLAY='${WAYLAND_DISPLAY}' bash '$CONF_SCRIPT'" else echo echo "configure.sh must be run as a non-root user. Please run:" diff --git a/system_setup/setup_system.inc.sh b/system_setup/setup_system.inc.sh index 523f7b3..6256c27 100755 --- a/system_setup/setup_system.inc.sh +++ b/system_setup/setup_system.inc.sh @@ -102,9 +102,6 @@ get_nc_token() { REQTOKEN=$( echo "${REQJSON}" | grep -oP '(?<="token":")[^"]+(?=")' ) REQURL=$( echo "${REQJSON}" | grep -oP '(?<="login":")[^"]+(?=")' ) - if [[ -z ${DISPLAY} ]]; then - export DISPLAY=:0 - fi /usr/bin/firefox "${REQURL}" & for i in {1..200}