[Unit]
Description=Start TigerVNC server at startup
After=syslog.target network.target

[Service]
Type=forking
PAMName=login
User=%u

PIDFile=/home/%u/.vnc/%H:1.pid
ExecStartPre=-/usr/bin/vncserver -kill :1 > /dev/null 2>&1
ExecStart=/usr/bin/vncserver -depth 24 :1
ExecStop=/usr/bin/vncserver -kill :1

[Install]
WantedBy=multi-user.target
