centos安装图形化界面心得 Posted on 六月 26th, 2009
检查vnc客户端和服务器是否已经安装:
[9tz@centos ~]$ rpm -q vnc vnc-server
package vnc is not installed
vnc-server-4.0-8.1
cent os 5已包含vnc的安装包
如果你的centos没有装vnc那么执行下面命令:
[9tz@centos ~]#yum install vnc vnc-server
2. 将用户名称加入到配置文件:
(注:这里的“用户名”是指linux系统用户的名称)
[9tz@centos ~]# 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
# .
# VNCSERVERS=”1:myusername”
# VNCSERVERS=”1:9tz” # use the method for more user
VNCSERVERS=”1:9tz”
# VNCSERVERARGS[1]=”-geometry 800×600″
VNCSERVERARGS[1]=”-geometry 1024×768″
3. 设置用户9tz的密码
[9tz@centos ~]$ vncpasswd
Password:
Verify:
4. 启动VNC服务
[9tz@centos ~]# /sbin/service vncserver start
Starting VNC server: 1:9tz [ OK ]
5.
[9tz@centos ~]$ cd ~/.vnc/
[9tz@centos .vnc]$ vi xstartup
#!/bin/sh
# Uncomment the following two lines for normal desktop:
#unset SESSION_MANAGER
#e xec /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 80×24+10+10 -ls -title “$VNCDESKTOP Desktop” &
gnome-session & #set starting GNOME desktop
#startkde & #kde desktop
#twm & #Text interface
6. 重启vncserver
[9tz@centos ~]# /sbin/service vncserver restart
Shutting down VNC server: 1:9tz [ OK ]
Starting VNC server: 1:9tz [ OK ]
7. Windows登陆到VNC Server
启动:vnc-E4_2_8-x86_win32_viewer.exe
输入:
server:192.168.1.13:1 (这里,我的VNC服务器在192.168.1.13上,用的是Display1(对应9tz帐号))
Encryption:Let Server Choose(Default)
进行了上面的步骤你会发现 vnc并没有办法进行远程连接,远程连接后只会出现一个“X”如果你想真的看到图形化界面就必须安装一个重要插件GNOME:
yum -y groupinstall “X Window System”
然后
Leave a Reply
You must be logged in to post a comment.