Closed Kevinoup closed 6 months ago
You don't need to do any of that. You just need to:
VNCSERVERS
variable as documented in the comments (and optionally the value of the VNCSERVERARGS[]
array members.)sudo systemctl enable tvncserver
sudo systemctl start tvncserver
I would like to automatically start the TurboVNC server before login on Ubuntu 22.04. My turbovnc is already the newest version (3.0.3-20231218) in ubuntu 22.04. I have taken the following steps:
1.Created a vncserver.service file in /usr/lib/systemd/system/ with the following contents:
[Unit] Description=Remote desktop service (VNC) After=syslog.target network.target
[Service] Type=forking User=root PAMName=login WorkingDirectory=/root/ PIDFile=/root/.vnc/%H:1.pid ExecStartPre=/bin/bash -c '/opt/TurboVNC/bin/vncserver -kill :1 > /dev/null 2>&1 || :' ExecStart=/opt/TurboVNC/bin/vncserver :1 -depth 24 -geometry 1920x1080 -fg ExecStop=/bin/bash -c '/opt/TurboVNC/bin/vncserver -kill :1 > /dev/null 2>&1 || :' Restart=on-abort
[Install] WantedBy=multi-user.target
2.Executed the command "sudo systemctl daemon-reload".
3.Executed the command "sudo systemctl enable vncserver.service".
4.Executed the command "sudo systemctl start vncserver.service", but the command gets stuck at this point.
Is there anyone who can help me with this issue?