Server:
1. install rpm
rpm name: vnc-server-4.1.2-14.el5_3.1
> sudo yum install vnc-server
> sudo yum install xorg-x11-twm-1.0.1-3.1.x86_64
> sudo yum install xterm-215-8.el5_4.1.x86_64
> sudo yum install gtk+-1.2.10-56.el5.x86_64
> sudo yum install libglade2.x86_64
Change the startup script:
> vi ~/.vnc/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 grey
vncconfig -iconic &
#xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#twm &
#startkde & #启动KDE桌面
gnome-session & #启动gnome桌面
2. start up vnc-server
$vncserver
You will require a password to access your desktops.
Password:
Verify:
New 'vm10062:1 (xiwang)' desktop is vm10062:1
Creating default startup script /home/xiwang/.vnc/xstartup
Starting applications specified in /home/xiwang/.vnc/xstartup
Log file is /home/xiwang/.vnc/vm10062:1.log
3. Kill vnc-server
vncserver -kill :1
Client: