Skip to content

Instantly share code, notes, and snippets.

@ep4sh
Created June 13, 2018 09:56
Show Gist options
  • Save ep4sh/c9f563582e437a6aad2f91084f40925b to your computer and use it in GitHub Desktop.
Save ep4sh/c9f563582e437a6aad2f91084f40925b to your computer and use it in GitHub Desktop.
X11VNC service debian 9 GNOME3 autoinstall
sudo apt-get install x11vnc
sudo x11vnc -forever -repeat -shared -loop -auth /run/user/1000/gdm/Xauthority
sudo tee <<EOF > /lib/systemd/system/x11vnc.service
[Unit]
[Service]
Type=forking
ExecStart=/usr/bin/x11vnc -forever -repeat -shared -loop -auth /run/user/1000/gdm/Xauthority
Restart=on-failure
RestartSec=5s
#ExecStop=/usr/bin/killall x11vnc
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl start x11vnc.service
sudo systemctl enable x11vnc.service
sudo systemctl status x11vnc.service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment