Impossible to launch tightVNC at startup

zenvice

New Member
Joined
May 2, 2020
Messages
5
Reaction score
0
Credits
62
Hello !

My system : Ubuntu 22.04.2 LTS (GNU/Linux 5.19.0-32-generic x86_64)

After installing Tightvnc, I scrupulously followed the instructions to fill in a service file so that my vnc server restarts every time ubuntu starts (Recommendation from this site, and many other tests: https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-vnc-on-ubuntu-22-04):

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

[Service]
Type=forking
User=mysusername
Group=mysusername
WorkingDirectory=/home/mysusername

PIDFile=/home/mysusername/.vnc/%H:%i.pid
ExecStartPre=-/usr/bin/vncserver -kill :%i > /dev/null 2>&1
ExecStart=/usr/bin/vncserver -depth 24 -geometry 1280x800 -localhost :%i
ExecStop=/usr/bin/vncserver -kill :%i

[Install]
WantedBy=multi-user.target

The service starts and port 5901 is busy, but I can't access my system through a vnc viewer.

The service is running and port 5901 is busy, but I can't access my system through a vnc viewer, but when I run a simple command line via ssh "vncserver:1" it works. Can you help me?

Good day to you
 


Not possible ?

i must change exectstart= command line with : ExecStart=/usr/bin/vncserver :%i

And the service run after restart now ok. But the service is launch without sudo rights.
 

Members online


Latest posts

Top