如何在CentOS 5.2中安装vnc

 如何在CentOS 5.2中安装vnc
作者:李书鹏


本文介绍VNC 4.1.2在CentOS5.2中的安装过程。
将从RealVNC官方下载的vnc-4_1_2-x86_linux.tar.gz

将其放到任意目录,如/home/xxx下。

1.解压。
执行命令
#tar -zxvf vnc-4_1_2-x86_linux.tar.gz

2.安装vnc。
依次执行命令:
#cd vnc-4_1_2-x86_linux
#./vncinstall /usr/local/bin /usr/local/man

3.创建/usr/share/X11在/usr/X11R6/lib目录的连接(*注1)。
mkdir /usr/X11R6/lib
cd /usr/X11R6/lib
ln -s /usr/share/X11 X11

4.安装完成,运行vncserver
执行命令
#vncserver

之后按提示输入连接vncserver需要的密码
最后尝试使用vnc客户端连接,注意端口应为5901。至此,安装已经完成。


*注1:vncserver默认寻找的X系统的字体路径在/usr/X11R6/lib/X11/fonts/下,但CentOS5.2却在/usr /share/X11/fonts/下。因此才需要第3步的操作,建立连接,以便vncserver找到字体。否则vncserver将不能正常运行,并 在log文件中记录以下内容:

Couldn't open RGB_DB '/usr/X11R6/lib/X11/rgb'

Xvnc Free Edition 4.1.2 - built May 12 2006 17:42:24
Copyright (C) 2002-2005 RealVNC Ltd.
See http://www.realvnc.com for information on VNC.
Underlying X server release 40201000, The XFree86 Project, Inc


Wed Sep 24 21:09:19 2008
vncext:      VNC extension running!
vncext:      Listening for VNC connections on port 5901
vncext:      Listening for HTTP connections on port 5801
vncext:      created VNC server for screen 0
error opening security policy file /usr/X11R6/lib/X11/xserver/SecurityPolicy
Could not init font path element /usr/X11R6/lib/X11/fonts/misc/, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/Speedo/, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/Type1/, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/CID/, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/75dpi/, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/100dpi/, removing from list!

Fatal server error:
could not open default font 'fixed'
xsetroot: unable to open display 'localhost.localdomain:1'
vncconfig: unable to open display "localhost.localdomain:1"
Warning: This program is an suid-root program or is being run by the root user.
The full text of the error or warning message cannot be safely formatted
in this environment. You may get a more descriptive message by running the
program as a non-root user or by removing the suid bit on the executable.
xterm Xt error: Can't open display: %s
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值