- Install Gnome Desktop, VNC Server and Xterm:
- yum groupinstall gnome-desktop
- yum install vnc-server xterm
- Create a normal user:
- useradd vncuser
- passwd vncuser
- Login as vncuser and create VNC password:
- vncpasswd
- exit
- Login as root again
- Create xstartup script and edit run Gnome desktop:
- vi /home/vncuser/.vnc/xstartup
- Edit the contents of the file to look like this:
#!/bin/sh
( while true; do xterm; done ) &
# 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 grey
vncconfig -iconic &
xterm -geometry 1024x768 -ls -name "$VNCDESKTOP Desktop" &
gnome-session &
- Edit the file "/etc/sysconfig/vncservers" and add this to the last two lines (change te resolution to what you want):
VNCSERVERS="1:vncuser"
VNCSERVERARGS[1]="-geometry 640×480" - Start VNC server: service vncserver start
- Connect with a VNC client, using an address like: 1.2.3.4:1 or myvps.mydomain.com:1