diff options
author | Kablersalat <crt@adastra7.net> | 2025-02-24 14:04:31 +0100 |
---|---|---|
committer | Kablersalat <crt@adastra7.net> | 2025-02-24 14:04:31 +0100 |
commit | f06fd74bd35a842ba1b73fe7eb1c3f7b4c8c1adc (patch) | |
tree | c0398bc68d67af63d1f0628dc96267fdea5be00a | |
parent | f335ffcd799158157c7aa5c2b0e9bbc741c78b79 (diff) |
attempt 2
-rw-r--r-- | kiosk.sh | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -94,7 +94,7 @@ configure_start_sh() { configure_tabs $SCALE_FACTOR "${tab_urls[@]}" fi else # Automated mode with URLs as arguments - if [ $# -eq 1 ]; then # Single website + if [ $# -eq 1]; then # Single website set_start_script_single $SCALE_FACTOR $1 else # Multiple tabs configure_tabs $SCALE_FACTOR "$@" @@ -102,17 +102,17 @@ configure_start_sh() { fi } - # Helper function to configure start.sh for a single website set_start_script_single() { VNC_PASSWORD=$(dialog --title "VNC Password" --inputbox "Please enter the VNC password:" 8 50 "" 3>&1 1>&2 2>&3 3>&-) + mkdir -p /home/kiosk/.vnc echo "$VNC_PASSWORD" | vncpasswd -f > /home/kiosk/.vnc/passwd chmod 600 /home/kiosk/.vnc/passwd cat > /home/kiosk/start.sh <<EOF #!/bin/bash /usr/bin/chromium --no-first-run --disable-translate --no-default-browser-check --disable-cache --kiosk $2 & -x11vnc -display :0 -auth guess -forever -rfbport 5901 -passwd $VNC_PASSWORD & +x11vnc -display :0 -auth guess -forever -rfbport 5901 -passwdfile /home/kiosk/.vnc/passwd & EOF sudo chmod a+x /home/kiosk/start.sh } |