websoft9/apps/roles/os/templates/vncserver.service1.j2
chendelin1982 6ef98dd4eb os suport
2022-11-16 08:34:24 +08:00

17 lines
336 B
Django/Jinja

[Unit]
Description=Start TigerVNC server at startup
After=syslog.target network.target
[Service]
Type=forking
PAMName=login
User=%u
PIDFile=/%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