Vncserver service always status failed

Hi, I installed TigerVNC and Xrdp, with xrdp I have no problem, but vncserver is not started every boot. I had to open x11vncserver everytime, but even with that, the service stays on failed status.

I read other post, to check the service and this is what is says:

root@DietPi:~# systemctl status vncserver.service -l
● vncserver.service - Manage VNC Server (DietPi)
   Loaded: loaded (/etc/systemd/system/vncserver.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sun 2021-02-14 15:30:44 GMT; 15min ago
  Process: 2372 ExecStart=/usr/local/bin/vncserver start (code=exited, status=203/EXEC)
 Main PID: 2372 (code=exited, status=203/EXEC)

feb 14 15:30:43 DietPi systemd[1]: Started Manage VNC Server (DietPi).
feb 14 15:30:43 DietPi systemd[2372]: pam_unix(login:session): session opened for user root by (uid=0)
feb 14 15:30:44 DietPi systemd[2372]: vncserver.service: Failed to execute comman
d: No such file or directory
feb 14 15:30:44 DietPi systemd[2372]: vncserver.service: Failed at step EXEC spaw
ning /usr/local/bin/vncserver: No such file or directory
feb 14 15:30:44 DietPi systemd[1]: vncserver.service: Main process exited, code=e
xited, status=203/EXEC
feb 14 15:30:44 DietPi systemd[1]: vncserver.service: Failed with result 'exit-co

When I installed, it says something too that the directory or file was not found…

Thank you.


did you checked if vnc server executable is present? Does the following give anything?

ls -la /usr/local/bin/ | grep vnc

It does nothing…

ok this means you are missing the vnc server executable. pls try to reinstall. Pls post the error message if there is one

dietpi-software reinstall 28

Still the same? The services stays in failed status… No errors on reinstall log

and the file is still missing?

It seems now it’s working, nothing else apart from a reboot was done…

But what I see, for having access throug vnc, I have to manually start x11vncserver every start to be able to connect.

x11vnc should be called automatically if you set shared desktop mode in /boot/dietpi.txt.

Did you have set anything on automatic start? Is it a headless system or do you really use a desktop that needs to be shared via VNC?

Is not a headless system.

I have set on autostart, Desktop → automatic login,

and you like to share the same desktop?

Yes, if it is possible

can you share following cat /boot/dietpi.txt | grep VNCSERVER

There you go:

root@DietPi:~# cat /boot/dietpi.txt | grep VNCSERVER

pls change following 2 values as follow and restart your system