aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKablersalat <crt@adastra7.net>2025-02-24 18:19:58 +0100
committerKablersalat <crt@adastra7.net>2025-02-24 18:19:58 +0100
commitb743530ece8af3aecffe4367d0456c993149a1a1 (patch)
treee60e8cbe6c71feb8909004529a74972cb370b679
parentaea6164bc864be5b0d3f4bdc430fe00925d0ed02 (diff)
nomore systemd ewww
-rw-r--r--kiosk.sh46
1 files changed, 1 insertions, 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 <<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