1. Install and start the VNC Server:
# Apt-Get install vnc4server
# Vnc4server
After vnc4server is started, A. VNC directory will be generated in the main directory.
2. Stop a VNC session:
Vnc4server-kill: 1
3. Edit. VNC/xstartup and change it to the following content:
#! /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 &
# X-terminal-emulator-geometry 80x24 + 10 + 10-ls-title "$ vncdesktop desktop "&
# X-window-manager &
4. Modify the license for the/etc/X11/xinit/xinitrc file:
# Chmod 755/etc/X11/xinit/xinitrc
5. Restart the service
# Vnc4server
Troubleshooting:
1. If you find that the resolution is not what you want after the VNC connection, you can use this command to modify the Resolution:
# Vncserver-geometry 800x600
Refer:
Http://blogold.chinaunix.net/u3/101323/showart.php? Id = 2486664
Http://hi.baidu.com/kbkiss/blog/item/9e0e15ca33e20182c9176825.html