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.'