Hi there,
If I reboot the server SLES 11SP3 I like to have a auto run on vncserver :2
. I found 2 ways to solve the problem:
-
#/etc/init.d/my_mainenance.sh
vncserver :2 geometry 1440x900
sudo /sbin/insserv my_maintenance.sh
root's password:
insserv:warning: script 'my_maintenance.sh' missing LSB tags
insserv: Default-Start undefined, assuming default start runlevel(s) for script 'my_maintenance.sh'
-
create an entry in the personal crontab (not root’s crontab). The line for the cron job is like this:
@reboot sleep 15; vncserver :2 -geometry 1440x900
which way I should prefer?
Hi Heiko,
[QUOTE=HeikoSchlicht;22358]Hi there,
If I reboot the server SLES 11SP3 I like to have a auto run on vncserver :2
. I found 2 ways to solve the problem:
-
#/etc/init.d/my_mainenance.sh
vncserver :2 geometry 1440x900
sudo /sbin/insserv my_maintenance.sh
root's password:
insserv:warning: script 'my_maintenance.sh' missing LSB tags
insserv: Default-Start undefined, assuming default start runlevel(s) for script 'my_maintenance.sh'
-
create an entry in the personal crontab (not root’s crontab). The line for the cron job is like this:
@reboot sleep 15; vncserver :2 -geometry 1440x900
which way I should prefer?[/QUOTE]
while I do like the idea of creating rc scripts, yours doesn’t conform to the standards at all (thus the warnings on “insserv” and that together with a good chance that the script is called at the wrong moment, within the boot chain). So my suggestion would be to pimp that script to at least include the proper LSB headers and to handle parameter $1 (at least “start”, “stop”, “status”).
If you want to keep it as short as you started, how about adding that line to “/etc/init.d/after.local”? From the master script “/etc/init.d/rc”:
[CODE]#
Start the user defined resource control script which
should be executed after runlevel is reached.
if test -f /etc/init.d/after.local ; then
echo -n "Master Resource Control: "
echo “Running /etc/init.d/after.local”
/bin/sh /etc/init.d/after.local
rc_status -v1 -r
splashtrigger “after.local”
fi[/CODE]
Regards,
Jens
Do you know this exists?
YaST2/Network Services/Remote Administration (VNC)
Or do you want something different?