(Answer) (Category) VNC FAQ-o-Matic : (Category) Special setup tricks for VNC on Linux/Unix :
Another approach to getting VNC to start at Boot
TightVNC and Redhat use a method similar to Mike Miller's.  
One advantage to this setup is that users are kept in a seperate file.
Please note: this script needs to be set executable or it won't work:

% chmod +x /etc/init.d/vncserver

To create a symbolic link for it to run at startup, try:

% chkconfig --level 5 vncserver add

Thanks to David Pascoe (dp at ii.net) for the info!
Contents of /etc/init.d/vncserver:

#!/bin/bash
#
# chkconfig: - 91 35
# description: Starts and stops vncserver. \
#              used to provide remote X administration services.

# Source function library.
. /etc/init.d/functions

# Source networking configuration.
. /etc/sysconfig/network

# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0

VNCSERVERS=""
[ -f /etc/sysconfig/vncservers ] && . /etc/sysconfig/vncservers

prog=$"VNC server"

start() {
    echo -n $"Starting $prog: "
    ulimit -S -c 0 >/dev/null 2>&1
    RETVAL=0
    for display in ${VNCSERVERS}
    do
        echo -n "${display} "
        unset BASH_ENV ENV
        initlog $INITLOG_ARGS -c \
            "su ${display##*:} -l -c \"cd ~${display##*:} && [ -f .vnc/passwd ] && vncserver :${display%%:*}\""
        RETVAL=$?
        [ "$RETVAL" -ne 0 ] && break
    done
    [ "$RETVAL" -eq 0 ] && success $"vncserver startup" || \
        failure $"vncserver start"
    echo
    [ "$RETVAL" -eq 0 ] && touch /var/lock/subsys/vncserver
}

stop() {
    echo -n $"Shutting down $prog: "
    for display in ${VNCSERVERS}
    do
        echo -n "${display} "
        unset BASH_ENV ENV
        initlog $INITLOG_ARGS -c \
            "su ${display##*:} -c \"vncserver -kill :${display%%:*}\" >/dev/null 2>&1"
    done
    RETVAL=$?
    [ "$RETVAL" -eq 0 ] && success $"vncserver shutdown" || \
        failure $"vncserver shutdown"
    echo
    [ "$RETVAL" -eq 0 ] && rm -f /var/lock/subsys/vncserver
}

# See how we were called.
case "$1" in
  start)
        start
        ;;
  stop)
        stop
        ;;
  restart|reload)
        stop
        sleep 1
        start
        ;;
  condrestart)
        if [ -f /var/lock/subsys/vncserver ]; then
            stop
            start
        fi
        ;;
  status)
        status Xvnc
        ;;
  *)
        echo $"Usage: $0 {start|stop|restart|condrestart|status}"
        exit 1
esac

--------------------
Contents of /etc/sysconfig/vncservers:

# The VNCSERVERS variable is a list of display:user pairs.
#
# Uncomment the line below to start a VNC server on display :1
# as my 'myusername' (adjust this to your own).  You will also
# need to set a VNC password; run 'man vncpasswd' to see how
# to do that.  
#
# DO NOT RUN THIS SERVICE if your local area network is
# untrusted!  For a secure way of using VNC, see
# URL:http://www.uk.research.att.com/vnc/sshvnc.html.

# VNCSERVERS="1:myusername"
VNCSERVERS="1:bob 2:sally 3:jim"
whooper
[Append to This Answer]
Previous: (Answer) How can I get VNC to start automatically at boot time?
Next: (Answer) Setting up seperate X sessions for multiple users
This document is: http://faq.gotomyvnc.com/cgi-bin/fom?file=86
[Search] [Appearance]
This is a Faq-O-Matic 2.721.
This FAQ administered by sbest@best.com