Parcourir la source

googoo gaga forgot that i do x11vnc in xinitrc

Kablersalat il y a 9 mois
Parent
commit
508f7387a0
1 fichiers modifiés avec 4 ajouts et 10 suppressions
  1. 4 10
      kiosk.sh

+ 4 - 10
kiosk.sh

@@ -1,7 +1,5 @@
 #!/bin/bash
 
-
-
 # Function to display command output in a dialog box
 execute_command() {
   output=$(mktemp /tmp/command_output.XXXXXX)
@@ -16,13 +14,13 @@ execute_command() {
 # Function to install necessary packages for Debian
 install_packages_debian() {
   echo "Starting Package installation on Debian. Please check the terminal output."
-  sudo apt-get update && sudo apt-get install -y net-tools chromium tightvncserver xorg x11-xserver-utils unclutter openbox xdotool vnstat x11vnc
+  sudo apt-get update && sudo apt-get install -y net-tools psmisc chromium tightvncserver xorg x11-xserver-utils unclutter openbox xdotool vnstat x11vnc
 }
 
 # Function to install necessary packages for Raspberry Pi OS Lite
 install_packages_raspberry() {
   echo "Starting Package installation on Raspberry Pi OS Lite. Please check the terminal output."
-  sudo apt-get update && sudo apt-get install -y net-tools chromium-browser tightvncserver xorg x11-xserver-utils unclutter openbox xdotool vnstat x11vnc
+  sudo apt-get update && sudo apt-get install -y net-tools psmisc chromium-browser tightvncserver xorg x11-xserver-utils unclutter openbox xdotool vnstat x11vnc
   sudo ln -s /usr/bin/chromium-browser /usr/bin/chromium
 }
 
@@ -52,7 +50,7 @@ unclutter -idle 0.1 -root &
 
 # Start Openbox session
 openbox-session &
-x11vnc -display :0 -auth guess -forever -rfbport 5901 &
+x11vnc -display :0 -rfbauth ~/.vnc/passwd -forever -rfbport 5901 &
 
 # Start Kiosk Script
 /bin/bash /home/kiosk/start.sh
@@ -113,7 +111,6 @@ set_start_script_single() {
   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 -passwdfile /home/kiosk/.vnc/passwd &
 EOF
   chmod a+x /home/kiosk/start.sh
 }
@@ -162,8 +159,6 @@ while true; do
         sleep 30
     fi
 done
-
-x11vnc -display :0 -auth guess -forever -rfbport 5901 -passwdfile /home/kiosk/.vnc/passwd &
 EOF
   chmod a+x /home/kiosk/start.sh
 }
@@ -173,7 +168,6 @@ edit_bashrc() {
   echo '[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && exec startx' >> /home/$USER/.bashrc
 }
 
-
 # Check for help option
 if [[ "$1" == "-h" || "$1" == "--help" ]]; then
     echo "Usage: $0 [--auto <distro> <scaling_factor> <url1> [<url2> ... <urlN>]]"
@@ -203,7 +197,7 @@ if [[ $1 == "--auto" ]]; then
   configure_autologin
   edit_bashrc
 else
-dialog --title "WARNING !!!" --msgbox "Do not run this script under any user other than "kiosk" and make sure the Kiosk user has sudo rights for the duration of the installation. In addition check out the -h command on this script if you wish to do the installation more automated!" 10 50
+dialog --title "WARNING !!!" --msgbox "Do not run this script under any user other than 'kiosk' and make sure the Kiosk user has sudo rights for the duration of the installation. In addition, check out the -h command on this script if you wish to do the installation more automated!" 10 50
   # Main menu for guided installation
   current_step=1
   while true; do