diff --git a/vncstart.sh b/vncstart.sh new file mode 100755 index 0000000..4640918 --- /dev/null +++ b/vncstart.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +# Start an x11vnc server on display :0 at port 5183, with password auth and continue running after client disconnects +x11vnc -display :0 -forever -loop -noxdamage -repeat -rfbauth ~/.vnc/passwd -rfbport 5183 -shared diff --git a/x11vnc.service b/x11vnc.service new file mode 100755 index 0000000..001f2ae --- /dev/null +++ b/x11vnc.service @@ -0,0 +1,12 @@ +[Unit] +Description=run x11vnc as a service + +[Service] +Type=simple +User=sasha +WorkingDirectory=/home/sasha +ExecStart=sh /home/sasha/vncstart.sh +ExecStop=killall x11vnc + +[Install] +WantedBy=graphical.target