# Run vncserver during boot

**URL:** <https://forums.suse.com/t/run-vncserver-during-boot/25816>\
**Category:** SLES Configure-Administer\
**Created:** [July 2, 2014, 3:15pm UTC](https://forums.suse.com/t/run-vncserver-during-boot/25816 "2014-07-02T15:15:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![HeikoSchlicht](https://avatars.discourse-cdn.com/v4/letter/h/f1d935/32.png) [@HeikoSchlicht](https://forums.suse.com/u/HeikoSchlicht)\
**Post date:** [July 2, 2014, 3:15pm UTC](https://forums.suse.com/t/run-vncserver-during-boot/25816/1 "2014-07-02T15:15:07Z")

</div>

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:

1. 

```auto
#/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'
`

1. 

create an entry in the personal crontab (not root’s crontab). The line for the cron job is like this:

```auto
@reboot sleep 15; vncserver :2 -geometry 1440x900
```

which way I should prefer?

---

<div class="post-metadata">

**Author:** ![Jens-U](https://avatars.discourse-cdn.com/v4/letter/j/d78d45/32.png) [@Jens-U](https://forums.suse.com/u/Jens-U)\
**Post date:** [July 3, 2014, 3:39pm UTC](https://forums.suse.com/t/run-vncserver-during-boot/25816/2 "2014-07-03T15:39:52Z")

</div>

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:

1. 

```auto
#/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'
`

1. 

create an entry in the personal crontab (not root’s crontab). The line for the cron job is like this:

```auto
@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

---

<div class="post-metadata">

**Author:** ![Silviu2](https://avatars.discourse-cdn.com/v4/letter/s/c57346/32.png) [@Silviu2](https://forums.suse.com/u/Silviu2)\
**Post date:** [July 16, 2014, 2:19pm UTC](https://forums.suse.com/t/run-vncserver-during-boot/25816/3 "2014-07-16T14:19:41Z")

</div>

Do you know this exists?

YaST2/Network Services/Remote Administration (VNC)

Or do you want something different?
