Bladeren bron

googoo gaga forgot that i do x11vnc in xinitrc

Kablersalat 9 maanden geleden
bovenliggende
commit
508f7387a0
1 gewijzigde bestanden met toevoegingen van 4 en 10 verwijderingen
  1. 4 10
      kiosk.sh

+ 4 - 10
kiosk.sh

@@ -1,7 +1,5 @@
 #!/bin/bash
 #!/bin/bash
 
 
-
-
 # Function to display command output in a dialog box
 # Function to display command output in a dialog box
 execute_command() {
 execute_command() {
   output=$(mktemp /tmp/command_output.XXXXXX)
   output=$(mktemp /tmp/command_output.XXXXXX)
@@ -16,13 +14,13 @@ execute_command() {
 # Function to install necessary packages for Debian
 # Function to install necessary packages for Debian
 install_packages_debian() {
 install_packages_debian() {
   echo "Starting Package installation on Debian. Please check the terminal output."
   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
 # Function to install necessary packages for Raspberry Pi OS Lite
 install_packages_raspberry() {
 install_packages_raspberry() {
   echo "Starting Package installation on Raspberry Pi OS Lite. Please check the terminal output."
   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
   sudo ln -s /usr/bin/chromium-browser /usr/bin/chromium
 }
 }
 
 
@@ -52,7 +50,7 @@ unclutter -idle 0.1 -root &
 
 
 # Start Openbox session
 # Start Openbox session
 openbox-session &
 openbox-session &
-x11vnc -display :0 -auth guess -forever -rfbport 5901 &
+x11vnc -display :0 -rfbauth ~/.vnc/passwd -forever -rfbport 5901 &
 
 
 # Start Kiosk Script
 # Start Kiosk Script
 /bin/bash /home/kiosk/start.sh
 /bin/bash /home/kiosk/start.sh
@@ -113,7 +111,6 @@ set_start_script_single() {
   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 -passwdfile /home/kiosk/.vnc/passwd &
 EOF
 EOF
   chmod a+x /home/kiosk/start.sh
   chmod a+x /home/kiosk/start.sh
 }
 }
@@ -162,8 +159,6 @@ while true; do
         sleep 30
         sleep 30
     fi
     fi
 done
 done
-
-x11vnc -display :0 -auth guess -forever -rfbport 5901 -passwdfile /home/kiosk/.vnc/passwd &
 EOF
 EOF
   chmod a+x /home/kiosk/start.sh
   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
   echo '[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && exec startx' >> /home/$USER/.bashrc
 }
 }
 
 
-
 # Check for help option
 # Check for help option
 if [[ "$1" == "-h" || "$1" == "--help" ]]; then
 if [[ "$1" == "-h" || "$1" == "--help" ]]; then
     echo "Usage: $0 [--auto <distro> <scaling_factor> <url1> [<url2> ... <urlN>]]"
     echo "Usage: $0 [--auto <distro> <scaling_factor> <url1> [<url2> ... <urlN>]]"
@@ -203,7 +197,7 @@ if [[ $1 == "--auto" ]]; then
   configure_autologin
   configure_autologin
   edit_bashrc
   edit_bashrc
 else
 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
   # Main menu for guided installation
   current_step=1
   current_step=1
   while true; do
   while true; do