> > -----Original Message-----
> >
> > I'm a newbie to unix and I'm trying to get VNC to automatically start
> > when the Sun system boots. I have read many threads throughout the
> > archives but I still don't understand the correct procedure. I can
> > launch VNC from a shell prompt and it works every time. I'd like it
> > to be used by anyone except root. Can someone explain how an
> > automatic startup process for VNC should occur. Also, does anyone
> > have any configuration files as examples? Thanks for any help...
My approach is to use the usual startup/stop script approach used by
other Solaris programs.
First become root. Then create a file called /etc/init.d/rc.vnc with the
following content (modified appropriately, see below):
---------------start file on next line--------------------
#!/bin/sh
#
# Startup/Stop script for vncservers for some users.
#
case "$1" in
'start')
/bin/su - bob -c "/usr/local/bin/vncserver :1"
/bin/su - sally -c "/usr/local/bin/vncserver :2"
/bin/su - jim -c "/usr/local/bin/vncserver :3"
;;
'stop')
/bin/su - bob -c "/usr/local/bin/vncserver -kill :1"
/bin/su - sally -c "/usr/local/bin/vncserver -kill :2"
/bin/su - jim -c "/usr/local/bin/vncserver -kill :3"
;;
*)
echo "Usage: /etc/init.d/rc.vnc { start | stop }"
;;
esac
---------------end file on previous line--------------------
The names bob, sally and jim are usernames. Modify accordingly. The
corresponding numbers :1, :2, :3 for VNC may also need to be changed.
Make sure that /etc/init.d/rc.vnc has the correct ownership/permissions:
chown root:other /etc/init.d/rc.vnc
chmod 744 /etc/init.d/rc.vnc
Next create symbolic links to that file as follows:
cd /etc/rc0.d
ln -s ../init.d/rc.vnc K40rc.vnc
cd /etc/rc2.d
ln -s ../init.d/rc.vnc S99rc.vnc
That should do it. I've been doing it this way for years and it works
great for me. I'd rather not add things to inetd.conf when I don't have
to.
Mike
--
Michael B. Miller, Ph.D.
Assistant Professor
Division of Epidemiology
University of Minnesota
http://taxa.epi.umn.edu/~mbmiller/
_______________________________________________
VNC-List mailing list
[EMAIL PROTECTED]
http://www.realvnc.com/mailman/listinfo/vnc-list