Skip to content

Instantly share code, notes, and snippets.

@lightrush
Created November 3, 2017 05:18
Show Gist options
  • Save lightrush/e6c3310fd0795b03f19daa40abf674e1 to your computer and use it in GitHub Desktop.
Save lightrush/e6c3310fd0795b03f19daa40abf674e1 to your computer and use it in GitHub Desktop.
X11vnc Systemd Unit File

X11vnc Systemd Unit File

This Systemd unit file starts X11VNC on boot

  1. Set VNC password: sudo x11vnc -storepasswd [YOUR VNC PASSWORD] /etc/x11vnc.passwd
  2. Install Systemd Unit File
sudo cp [path to]/vnc.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable vnc.service
[Unit]
Description=VNC Server
After=multi-user.target network.target
[Service]
Restart=always
# Replace this with x0vncserver from TigerVNC in Ubuntu 18.04.
# Set password by running `sudo x11vnc -storepasswd [PASSWORD] /etc/x11vnc.passwd`
ExecStart=/usr/bin/x11vnc -auth guess -forever -loop -noxdamage -repeat -rfbauth /etc/x11vnc.passwd -rfbport 5900 -shared
[Install]
WantedBy=multi-user.target
@grayguest
Copy link

@grayguest where would the vnc.service be located?

/lib/systemd/system/ also ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment