Vncserver service always status failed

Having issues with your DietPi installation or found a bug? Post it here.
amibumpin
Posts: 17
Joined: Sun Feb 14, 2021 4:40 pm

Vncserver service always status failed

Post by amibumpin »

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:

Code: Select all

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
de'.
When I installed, it says something too that the directory or file was not found...

Thank you.
User avatar
Joulinar
Posts: 4830
Joined: Sat Nov 16, 2019 12:49 am

Re: Vncserver service always status failed

Post by Joulinar »

Hi,

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

Code: Select all

ls -la /usr/local/bin/ | grep vnc
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
amibumpin
Posts: 17
Joined: Sun Feb 14, 2021 4:40 pm

Re: Vncserver service always status failed

Post by amibumpin »

Joulinar wrote: Sun Feb 14, 2021 7:47 pm Hi,

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

Code: Select all

ls -la /usr/local/bin/ | grep vnc
It does nothing..
User avatar
Joulinar
Posts: 4830
Joined: Sat Nov 16, 2019 12:49 am

Re: Vncserver service always status failed

Post by Joulinar »

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

Code: Select all

dietpi-software reinstall 28
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
amibumpin
Posts: 17
Joined: Sun Feb 14, 2021 4:40 pm

Re: Vncserver service always status failed

Post by amibumpin »

Joulinar wrote: Sun Feb 14, 2021 9:29 pm ok this means you are missing the vnc server executable. pls try to reinstall. Pls post the error message if there is one

Code: Select all

dietpi-software reinstall 28
Still the same? The services stays in failed status... No errors on reinstall log
User avatar
Joulinar
Posts: 4830
Joined: Sat Nov 16, 2019 12:49 am

Re: Vncserver service always status failed

Post by Joulinar »

and the file is still missing?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
amibumpin
Posts: 17
Joined: Sun Feb 14, 2021 4:40 pm

Re: Vncserver service always status failed

Post by amibumpin »

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.
User avatar
Joulinar
Posts: 4830
Joined: Sat Nov 16, 2019 12:49 am

Re: Vncserver service always status failed

Post by Joulinar »

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?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
amibumpin
Posts: 17
Joined: Sun Feb 14, 2021 4:40 pm

Re: Vncserver service always status failed

Post by amibumpin »

Joulinar wrote: Mon Feb 15, 2021 11:54 am 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,
User avatar
Joulinar
Posts: 4830
Joined: Sat Nov 16, 2019 12:49 am

Re: Vncserver service always status failed

Post by Joulinar »

and you like to share the same desktop?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply