1.安装桌面环境所需软件包:
yum grouplist | more
yum groupinstall “Desktop” “Desktop Platform” “Desktop Platform Development””Fonts” “General Purpose Desktop” “Graphical Administration Tools” “Graphics Creation Tools” “Input Methods” “X Window System” “Chinese Support [zh]” “Internet Browser”
yum install tigervnc tigervnc-server
5.配置VNC的登录账号、桌面分辨率和连接方式:
vim /etc/sysconfig/vncservers
添加:
VNCSERVERS=”1:root”
VNCSERVERARGS[1]=”-geometry 1024×768″
6.配置VNC的远程登录密码:
vncpasswd
7.配置VNC防黑屏,并重启服务:
vim /root/.vnc/xstartup
注释:
# xterm -geometry 80×24+10+10 -ls -title “$VNCDESKTOP Desktop” &
# twm &
添加:
gnome-session &
service vncserver restart
9.客户端连接:
打开vnc viewer
VNC Server: IP:5901
(密码不是登陆账号的密码,而是VNC设置的密码)
11.防火墙开放5901端口:
iptables -A INPUT -p tcp –dport 5901 -j ACCEPT
卸载Xwindows
代码如下:
#yum groupremove ‘X Window System’ -y
卸载GNOME桌面环境
代码如下:
#yum groupremove “GNOME Desktop Environment”
卸载KDE桌面环境
代码如下:
#yum groupremove “KDE (K Desktop Environment)”