|
@@ -105,9 +105,14 @@ configure_start_sh() {
|
|
|
|
|
|
|
|
# Helper function to configure start.sh for a single website
|
|
# Helper function to configure start.sh for a single website
|
|
|
set_start_script_single() {
|
|
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>&-)
|
|
|
|
|
+ echo "$VNC_PASSWORD" | vncpasswd -f > /home/kiosk/.vnc/passwd
|
|
|
|
|
+ chmod 600 /home/kiosk/.vnc/passwd
|
|
|
|
|
+
|
|
|
cat > /home/kiosk/start.sh <<EOF
|
|
cat > /home/kiosk/start.sh <<EOF
|
|
|
#!/bin/bash
|
|
#!/bin/bash
|
|
|
-/usr/bin/chromium --no-first-run --disable-translate --no-default-browser-check --disable-cache --kiosk $2
|
|
|
|
|
|
|
+/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 &
|
|
|
EOF
|
|
EOF
|
|
|
sudo chmod a+x /home/kiosk/start.sh
|
|
sudo chmod a+x /home/kiosk/start.sh
|
|
|
}
|
|
}
|
|
@@ -121,6 +126,10 @@ configure_tabs() {
|
|
|
tab_urls+="'$url' " # Ensure URLs are properly quoted
|
|
tab_urls+="'$url' " # Ensure URLs are properly quoted
|
|
|
done
|
|
done
|
|
|
|
|
|
|
|
|
|
+ VNC_PASSWORD=$(dialog --title "VNC Password" --inputbox "Please enter the VNC password:" 8 50 "" 3>&1 1>&2 2>&3 3>&-)
|
|
|
|
|
+ echo "$VNC_PASSWORD" | vncpasswd -f > /home/kiosk/.vnc/passwd
|
|
|
|
|
+ chmod 600 /home/kiosk/.vnc/passwd
|
|
|
|
|
+
|
|
|
# Write the script with properly formatted commands
|
|
# Write the script with properly formatted commands
|
|
|
cat > /home/kiosk/start.sh <<EOF
|
|
cat > /home/kiosk/start.sh <<EOF
|
|
|
#!/bin/bash
|
|
#!/bin/bash
|
|
@@ -150,6 +159,8 @@ while true; do
|
|
|
sleep 30
|
|
sleep 30
|
|
|
fi
|
|
fi
|
|
|
done
|
|
done
|
|
|
|
|
+
|
|
|
|
|
+x11vnc -display :0 -auth guess -forever -rfbport 5901 -passwd $VNC_PASSWORD &
|
|
|
EOF
|
|
EOF
|
|
|
chmod a+x /home/kiosk/start.sh
|
|
chmod a+x /home/kiosk/start.sh
|
|
|
}
|
|
}
|