Page 1 of 1

vncserver

Posted: October 30th, 2012, 8:28 pm
by georgeo5664
hi
i am very new to ubuntu i am working my way thought the step by step guide but have came across a problem trying to assign the VNC script to a runlevel after i have put in the following command update-rc.d StartVNC.sh defaults i get the following information:
george@ubuntu:~/MyScripts$ update-rc.d StartVNC.sh defaults
update-rc.d: warning: /etc/init.d/StartVNC.sh missing LSB information
update-rc.d: see <http://wiki.debian.org/LSBInitScripts>
Adding system startup for /etc/init.d/StartVNC.sh ...
/etc/rc0.d/K20StartVNC.sh -> ../init.d/StartVNC.sh
update-rc.d: symlink: Permission denied

I hope someone will help me!

Re: vncserver

Posted: October 30th, 2012, 10:19 pm
by Ian
Hello and welcome to the forums :thumbup:

Try instead creating a cron job to run the script rather than assigning it to a run level. The guide for that is further down that page.

Ian.

Re: vncserver

Posted: October 31st, 2012, 5:57 am
by georgeo5664
Thank you Ian i will try this tonite and let you know how i got on Thanks again.

Re: vncserver

Posted: November 1st, 2012, 10:18 am
by georgeo5664
Hi Ian thanks for the advice I did thou webmin and it worked all good.

Re: vncserver

Posted: June 23rd, 2014, 4:31 am
by Shag
georgeo5664 wrote:hi
i am very new to ubuntu i am working my way thought the step by step guide but have came across a problem trying to assign the VNC script to a runlevel after i have put in the following command update-rc.d StartVNC.sh defaults i get the following information:
george@ubuntu:~/MyScripts$ update-rc.d StartVNC.sh defaults
update-rc.d: warning: /etc/init.d/StartVNC.sh missing LSB information
update-rc.d: see <http://wiki.debian.org/LSBInitScripts>
Adding system startup for /etc/init.d/StartVNC.sh ...
/etc/rc0.d/K20StartVNC.sh -> ../init.d/StartVNC.sh
update-rc.d: symlink: Permission denied

I hope someone will help me!
If someone would Still like to Assign the VNC script to a run level, you can.

I successfully did it by following this info from here: https://wiki.debian.org/LSBInitScripts
This will remove the missing LSB error. Then you have to edit your command line within your script to run as your user and not root. it will ask for your password when you test your script but not at startup or reboot.

Here is what my script looks like:

Code: Select all

## BEGIN INIT INFO
# Provides:          startVNC
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start VNCServer at boot time
# Description:       Enable service provided by daemon.
### END INIT INFO
#!/bin/sh
echo "JOB RUN AT $(date)"
echo "============================"
echo ""

su your_user_name -c "//usr/bin/vncserver -geometry 1920x1080"


~                                                                                                                                   
~                                                                                                                                   
~
Then I updated with this command instead of the one in the guide:

Code: Select all

sudo update-rc.d -f StartVNC.sh start 99 2 3 4 5 .
It will warn you about your stop if you edit your script and leave the stop empty, I just continued and it put in 0 1 6.

Here is another quick guide I used:
http://unix.stackexchange.com/questions ... untu-10-04

Hope this helps some,
Shag