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

17 lines
359 B
Desktop File

[Unit]
Description=Start TightVNC server at startup
After=syslog.target network.target
[Service]
Type=forking
User=user
Group=group
WorkingDirectory=/home/user
PIDFile=/home/user/.vnc/%H:1.pid
ExecStartPre=-/usr/bin/vncserver -kill :* > /dev/null 2>&1
ExecStart=/usr/bin/vncserve :1
ExecStop=/usr/bin/vncserver -kill :1
[Install]
WantedBy=multi-user.target