[Unit]
Description=Remote desktop service (VNC)
After=syslog.target network.target

[Service] 
Type=simple
User={{ .user.name }}
PAMName=login
PIDFile=/home/%u/.local/vnc-%H%i.pid
ExecStartPre=/usr/bin/vncserver -kill :%i > /dev/null 2>&1 || :
ExecStart=/usr/bin/vncserver :%i -localhost no -geometry 1920x1080
ExecStop=/usr/bin/vncserver -kill :%i

[Install]
WantedBy=multi-user.target