Add User names to the configuration file
VI/etc/sysconfig/vncservers
#
# 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
# Http://www.uk.research.att.com/vnc/sshvnc.html>.
# Vncservers = "1: myusername"
# Vncservers = "1: Gavin 2: John" # Use the method for more user
Vncservers = "1: Gavin 2: Root 3: Root"
# Vncserverargs [1] = "-geometry 800x600"
Vncserverargs [1] = "-geometry 1024x768"
Start the vncserver service
/Sbin/service vncserver start
Enter the following command:
Cd ~ /. VNC/
VI xstartup
#! /Bin/sh
# Uncomment the following two lines for normal desktop:
# Unset session_manager
# Exec/etc/X11/xinit/xinitrc
[-X/etc/VNC/xstartup] & exec/etc/VNC/xstartup
[-R $ home/. Xresources] & xrdb $ home/. Xresources
Xsetroot-solid gray
Vncconfig-iconic &
# Xterm-geometry 80x24 + 10 + 10-ls-title "$ vncdesktop desktop "&
Gnome-session & # Set starting GNOME Desktop
# Startkde & # KDE Desktop
# TWM & # text interface
Restart vncserver
/Sbin/service vncserver restart