From b743530ece8af3aecffe4367d0456c993149a1a1 Mon Sep 17 00:00:00 2001 From: Kablersalat Date: Mon, 24 Feb 2025 18:19:58 +0100 Subject: nomore systemd ewww --- kiosk.sh | 46 +--------------------------------------------- 1 file changed, 1 insertion(+), 45 deletions(-) diff --git a/kiosk.sh b/kiosk.sh index b4a81e8..6531604 100644 --- a/kiosk.sh +++ b/kiosk.sh @@ -110,34 +110,12 @@ set_start_script_single() { echo "$VNC_PASSWORD" | vncpasswd -f > /home/kiosk/.vnc/passwd chmod 600 /home/kiosk/.vnc/passwd - # Remove existing VNC server configuration if it exists - sudo systemctl stop x11vnc.service - sudo rm -f /etc/systemd/system/x11vnc.service - cat > /home/kiosk/start.sh < /etc/systemd/system/x11vnc.service << 'EOF' -[Unit] -Description=Start x11vnc at startup. -After=multi-user.target - -[Service] -Type=simple -ExecStart=/usr/bin/x11vnc -display :0 -auth guess -forever -rfbport 5901 -passwdfile /home/kiosk/.vnc/passwd - -[Install] -WantedBy=multi-user.target -EOF" - - sudo systemctl daemon-reload - sudo systemctl enable x11vnc.service - sudo systemctl start x11vnc.service + chmod a+x /home/kiosk/start.sh } # Helper function to configure start.sh for multiple tabs @@ -155,10 +133,6 @@ configure_tabs() { echo "$VNC_PASSWORD" | vncpasswd -f > /home/kiosk/.vnc/passwd chmod 600 /home/kiosk/.vnc/passwd - # Remove existing VNC server configuration if it exists - sudo systemctl stop x11vnc.service - sudo rm -f /etc/systemd/system/x11vnc.service - # Write the script with properly formatted commands cat > /home/kiosk/start.sh < /etc/systemd/system/x11vnc.service << 'EOF' -[Unit] -Description=Start x11vnc at startup. -After=multi-user.target - -[Service] -Type=simple -ExecStart=/usr/bin/x11vnc -display :0 -auth guess -forever -rfbport 5901 -passwdfile /home/kiosk/.vnc/passwd - -[Install] -WantedBy=multi-user.target -EOF" - - sudo systemctl daemon-reload - sudo systemctl enable x11vnc.service - sudo systemctl start x11vnc.service } # Function to edit .bashrc for automatic start of X session -- cgit v1.2.3-70-g09d2