diff options
author | Kablersalat <crt@adastra7.net> | 2025-02-24 18:19:58 +0100 |
---|---|---|
committer | Kablersalat <crt@adastra7.net> | 2025-02-24 18:19:58 +0100 |
commit | b743530ece8af3aecffe4367d0456c993149a1a1 (patch) | |
tree | e60e8cbe6c71feb8909004529a74972cb370b679 | |
parent | aea6164bc864be5b0d3f4bdc430fe00925d0ed02 (diff) |
nomore systemd ewww
-rw-r--r-- | kiosk.sh | 46 |
1 files changed, 1 insertions, 45 deletions
@@ -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 <<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 - sudo chmod a+x /home/kiosk/start.sh - - # Create a new VNC server configuration - sudo bash -c "cat > /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 <<EOF #!/bin/bash @@ -192,24 +166,6 @@ done x11vnc -display :0 -auth guess -forever -rfbport 5901 -passwdfile /home/kiosk/.vnc/passwd & EOF chmod a+x /home/kiosk/start.sh - - # Create a new VNC server configuration - sudo bash -c "cat > /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 |