[Unit] Description=X11 TigerVNC remote desktop service After=network.target [Service] Type=forking # You'll need to do one of the following: # - Add a .vnc/xstartup file in your user's home directory and mark it as executable # - Add an -xstartup argument to the vncserver command line in ExecStart with the command you want to run # These can be changed in this file: # - :60 (the X11 display number) # - :5900 (the VNC port number) # - vncuser (the user to run the vnc server as) User=vncuser ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill :60 > /dev/null 2>&1 || :' ExecStart=/usr/bin/vncserver -geometry 1280x1024 -depth 16 -autokill no -SecurityTypes none -rfbport 5900 -localhost yes :60 ExecStop=/usr/bin/vncserver -kill :60 [Install] WantedBy=multi-user.target