0

I have a Parrot OS Linux installed on my raspberry pi 3. I installed a VNC server using vnc4server and after some fight with ~/.vnc/xstartup file is working fine with my xfce4 Desktop Environment:

xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
startxfce4 &

I made a daemon (here it is) which is on /etc/init.d and has 755 permissions. The daemon works fine if you execute it manually /etc/init.d/vncboot start|stop|restart . Some example output:

#/etc/init.d/vncboot restart
Stopping VNC Server
Killing Xvnc4 process ID 6663

Starting VNC Server

New 'station:1 (root)' desktop is station:1

Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/station:1.log

And after that, I can connect without any problem. I already executed update-rc.d vncboot enable in order to try to start this automatically... but the problem is after a reboot, I try to connect to VNC server and some errors appear. Sorry because the errors are in Spanish:

error1 error2

Anyway, If I use the daemon /etc/init.d/vncboot restart the errors disappear and it works again connecting fine. This is the VNC server log when it has errors on reboot: Log

Where is my problem? on daemon config? On xserver config? On vncserver config? Even is valid to me the "dirty trick" of automatize a command using the daemon restart on every boot if possible because the daemon makes it work. Any idea would be appreciated.

0

1 Answer 1

0

I'm going to answer myself... I found a solution. Maybe useful for others...

I created a script on /etc/rc5.d because is the last runlevel to start... and the script was called S99vncboot. The 99 is because I want it to be executed in the end. After put it permissions 755 with chmod, the script has this content:

#!/bin/bash
sleep 30
/etc/init.d/vncboot restart

With this, the daemon is restarted after reboot and after 30 seconds... which made it work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.