From bb6bcf3e85fd9b4c4e1856a10c92ababa468bbb7 Mon Sep 17 00:00:00 2001 From: Alejandro Rosales Date: Tue, 8 Sep 2026 09:46:30 -0600 Subject: [PATCH] Allow unattended Linux RustDesk connections --- scripts/Install-SguLinuxRustDeskClient.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/Install-SguLinuxRustDeskClient.sh b/scripts/Install-SguLinuxRustDeskClient.sh index 03a532f..29afabe 100644 --- a/scripts/Install-SguLinuxRustDeskClient.sh +++ b/scripts/Install-SguLinuxRustDeskClient.sh @@ -178,6 +178,7 @@ custom-rendezvous-server = '${RUSTDESK_SERVER_ADDRESS}:21116' relay-server = '${RUSTDESK_SERVER_ADDRESS}:21117' key = '${RUSTDESK_SERVER_PUBLIC_KEY}' verification-method = 'use-permanent-password' +approve-mode = 'password' EOF ) @@ -215,6 +216,7 @@ set_access_password() { rustdesk --password "$ACCESS_PASSWORD" >/dev/null rustdesk --option verification-method use-permanent-password >/dev/null + rustdesk --option approve-mode password >/dev/null if id lightdm >/dev/null 2>&1; then local lightdm_uid lightdm_uid=$(id -u lightdm) @@ -226,6 +228,10 @@ set_access_password() { XDG_CONFIG_HOME=/var/lib/lightdm/.config \ XDG_RUNTIME_DIR="/run/user/${lightdm_uid}" \ /usr/share/rustdesk/rustdesk --option verification-method use-permanent-password >/dev/null + runuser -u lightdm -- env HOME=/var/lib/lightdm \ + XDG_CONFIG_HOME=/var/lib/lightdm/.config \ + XDG_RUNTIME_DIR="/run/user/${lightdm_uid}" \ + /usr/share/rustdesk/rustdesk --option approve-mode password >/dev/null fi systemctl restart rustdesk systemctl is-active --quiet rustdesk || fail 'The RustDesk service did not restart after setting its permanent password.'