From 07b4f54d8d43425ebc42da12e30723f8586ecae2 Mon Sep 17 00:00:00 2001 From: myve Date: Tue, 21 Apr 2026 07:36:15 +0000 Subject: [PATCH] Add passwordless login --- firefox/entrypoint | 6 +++--- i3/entrypoint | 22 ++++++++++------------ plasma/entrypoint | 22 ++++++++++------------ 3 files changed, 23 insertions(+), 27 deletions(-) diff --git a/firefox/entrypoint b/firefox/entrypoint index 4fe185e..806186b 100755 --- a/firefox/entrypoint +++ b/firefox/entrypoint @@ -26,7 +26,7 @@ then chmod 0600 ~/.config/tigervnc/passwd fi else - echo "SecurityTypes=none" >~/.config/tigervnc/config + MYVNC_PASSWORDLESS="-SecurityTypes none" fi # Remove VNCPASS env @@ -49,7 +49,7 @@ else fi # VNC config -cat >>~/.config/tigervnc/config <<- vncconfig +cat >~/.config/tigervnc/config <<- vncconfig session=i3 dpi=192 geometry=1920x1080 @@ -150,4 +150,4 @@ done startup # Launch Tigervnc -/usr/bin/dbus-launch vncserver :0 +/usr/bin/dbus-launch vncserver :0 ${MYVNC_PASSWORDLESS} diff --git a/i3/entrypoint b/i3/entrypoint index 96c9a81..c651a5e 100755 --- a/i3/entrypoint +++ b/i3/entrypoint @@ -17,18 +17,16 @@ do [ -d ~/.${dir} ] || mkdir -p ~/.${dir}/ done -# Check for MYVNC_VNCPASS variable -if [ -z ${MYVNC_VNCPASS} ] +# Configure tigervnc auth if MYVNC_VNCPASS is set +if [ ${MYVNC_VNCPASS} ] then - echo "MYVNC_VNCPASS env variable is missing" - exit 1 -fi - -# Configure tigervnc auth -if [ ! -f ~/.config/tigervnc/passwd ] -then - echo "${MYVNC_VNCPASS}" | vncpasswd -f >~/.config/tigervnc/passwd - chmod 0600 ~/.config/tigervnc/passwd + if [ ! -f ~/.config/tigervnc/passwd ] + then + echo "${MYVNC_VNCPASS}" | vncpasswd -f >~/.config/tigervnc/passwd + chmod 0600 ~/.config/tigervnc/passwd + fi +else + MYVNC_PASSWORDLESS="-SecurityTypes none" fi # Remove VNCPASS env @@ -86,4 +84,4 @@ tztime local { i3status # Launch Tigervnc -/usr/bin/dbus-launch vncserver :0 +/usr/bin/dbus-launch vncserver :0 ${MYVNC_PASSWORDLESS} diff --git a/plasma/entrypoint b/plasma/entrypoint index 2293152..e418662 100755 --- a/plasma/entrypoint +++ b/plasma/entrypoint @@ -17,18 +17,16 @@ do [ -d ~/.${dir} ] || mkdir -p ~/.${dir}/ done -# Check for MYVNC_VNCPASS variable -if [ -z ${MYVNC_VNCPASS} ] +# Configure tigervnc auth if MYVNC_VNCPASS is set +if [ ${MYVNC_VNCPASS} ] then - echo "MYVNC_VNCPASS env variable is missing" - exit 1 -fi - -# Configure tigervnc auth -if [ ! -f ~/.config/tigervnc/passwd ] -then - echo "${MYVNC_VNCPASS}" | vncpasswd -f >~/.config/tigervnc/passwd - chmod 0600 ~/.config/tigervnc/passwd + if [ ! -f ~/.config/tigervnc/passwd ] + then + echo "${MYVNC_VNCPASS}" | vncpasswd -f >~/.config/tigervnc/passwd + chmod 0600 ~/.config/tigervnc/passwd + fi +else + MYVNC_PASSWORDLESS="-SecurityTypes none" fi # Remove VNCPASS env @@ -72,4 +70,4 @@ kscreenlockerrc exec "${@}" & # Launch Tigervnc -/usr/bin/dbus-launch vncserver :0 +/usr/bin/dbus-launch vncserver :0 ${MYVNC_PASSWORDLESS}