From 64b597bcacd33dfd2c22157ee905ba3c40cfda09 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sun, 6 May 2018 21:35:47 -0500 Subject: [PATCH] Add new file --- vnc-install-ubuntu.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 vnc-install-ubuntu.sh diff --git a/vnc-install-ubuntu.sh b/vnc-install-ubuntu.sh new file mode 100644 index 0000000..9cd1aef --- /dev/null +++ b/vnc-install-ubuntu.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +sudo apt install x11vnc -y +sudo x11vnc -storepasswd /etc/x11vnc.pass + +cat > /lib/systemd/system/x11vnc.service << EOF +[Unit] +Description=Start x11vnc at startup. +After=multi-user.target + +[Service] +Type=simple +ExecStart=/usr/bin/x11vnc -auth guess -forever -loop -noxdamage -repeat -rfbauth /etc/x11vnc.pass -rfbport 5900 -shared + +[Install] +WantedBy=multi-user.target +EOF + +echo "Configure Services" +sudo systemctl enable x11vnc.service +sudo systemctl daemon-reload +echo "Rebotting in 5secs..." +sleep 5s +sudo shutdown -r now