VNC - server started at boot-time
Rik Scarborough
RikSca at kc.rr.com
Thu Apr 3 19:25:25 PST 2003
On Mon, 31 Mar 2003, D. Theunissen wrote:
> Does anyone know how to start /usr/local/bin/vncserver at boottime as a particular user?
>
> eg. I want to start the vncserver as user 'dan' during boot.
I've found that if you put
@reboot $HOME/bin/startvnc
in dan's crontab works really well.
startvnc is the following script:
#!/bin/sh
umask 22
PATH=<ACTUALPATH>
MAIL=/var/mail/<USER>; export MAIL
BLOCKSIZE=K; export BLOCKSIZE
FTP_PASSIVE_MODE=YES; export FTP_PASSIVE_MODE
SHELL=/bin/tcsh; export SHELL
HOME=/home/<USER>; export HOME
LOGNAME=<USER>; export LOGNAME
USER=<USER>; export USER
HOSTTYPE=FreeBSD; export HOSTTYPE
VENDOR=intel; export VENDOR
OSTYPE=FreeBSD; export OSTYPE
MACHTYPE=i386; export MACHTYPE
SHLVL=1; export SHLVL
PWD=/home/<USER>; export PWD
GROUP=<GROUP>; export GROUP
HOST=<HOST>; export HOST
CVSROOT=/usr/local/cvsroot; export CVSROOT
cd /usr/home/<USER> || {
echo 'Execution directory inaccessible' >&2
exit 1
}
/usr/local/bin/vncserver :2
you could replace items in <> with the equivalent, but I generated this
script by running the last line as an at script (man at). Finding the at script
in the queue and copying it to startvnc in my home directory.
>
> tnx in advance
>
> Dan.
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"
More information about the freebsd-questions
mailing list