CentOS 6.3安装VNC报错Could not start Xvnc的解决办法

在CentOS 6.3环境下安装VNC报错如下
[root@localhost media]# service vncserver start
Starting VNC server: 1:root 
WARNING: The first attempt to start Xvnc failed, possibly because the font
catalog is not properly configured.  Attempting to determine an appropriate
font path for this system and restart Xvnc using that font path ...

Could not start Xvnc.


问题就出现在这一段:


WARNING: The first attempt to start Xvnc failed, possibly because the font
catalog is not properly configured.  Attempting to determine an appropriate
font path for this system and restart Xvnc using that font path ...
Could not start Xvnc

之前用Redhat的时候,没有遇到过这个问题,现在用的是Ali 云的centos 6.3,可能是系统是minimal 安装,解决方法就是安装相应的font 包:
ls -l /usr/share/fonts

yum install pixman pixman-devel libXfont

yum install xorg-x11-fonts-Type1
yum update libXfont


  
  


当然,安装X11 也是必要的:
# Start by installing the X Windows System (-y to auto accept) 
yum groupinstall -y "X Window System"
一个包括安装Desktop,VNC的命令集合:
yum groupinstall -y Desktop

yum -y install tigervnc-server pixman pixman-devel libXfont

chkconfig --levels 235 vncsever on



我似乎运行的是这个,其他的貌似没有源:
yum groupinstall "Desktop"


 出现这个问题后,试了很多方案,最后成功了,这里的几个命令可能不一定解决问题,在这里记录一下吧
这里是另外的一个链接:
http://www.krizna.com/centos/install-vnc-on-centos-6/

How to install vnc on centos 6

VNC server

VNC is used to display X windows sessions on remote computers.In this tutorial, we can learn how to setup VNC server on centos 6. Desktop environment is required in order to enable VNC server on centos.

Install VNC on Centos 6

Before installing VNC server, make sure you have installed any Desktop environment.
Step 1 » Issue the below command to install gnome desktop environment.
[root@krizna ~]# yum groupinstall Desktop
Step 2 » After installing gnome packages .Issue the below command to install VNC package along with dependencies.
[root@krizna ~]# yum -y install tigervnc-server pixman pixman-devel libXfont
Step 3 » Create user name and password.
[root@krizna ~]# adduser user1
[root@krizna ~]# adduser user2
[root@krizna ~]# passwd user1
[root@krizna ~]# passwd user2

Step 4 » Create VNC passwords for the Users created.
[root@krizna ~]# su - user1
[user1@krizna ~]$ vncpasswd
Password:
Verify:
[user1@krizna ~]$ logout
[root@krizna ~]# su - user2
[user2@krizna ~]$ vncpasswd
Password:
Verify:
[user2@krizna ~]$ logout

Step 5 » Now open /etc/sysconfig/vncservers file and add the following lines at the end of the file( Edit as per your usernames ).
VNCSERVERS="1:user1 2:user2"
VNCSERVERARGS[1]="-geometry 640x480"
VNCSERVERARGS[2]="-geometry 800x600"

Here we have configured session 1 with 640×480 resolution for the user “user1″ and session 2 with 800×600 resolution for the user “user2″.
Step 6 » Start vnc service
[root@krizna ~]# service vncserver start
and issue this command to start vnc service automatically during startup.
[root@krizna ~]# chkconfig --levels 235 vncsever on
Step 7 » Now in remote machine, start vncviewer type the IP and session as below to view their respective sessions.
192.168.1.10:1 for user1
192.168.1.10:2 for user2

install vnc on centos 6
Users sessions.
install vnc server centos 6

Troubleshooting

» Check the iptables in the server, if you are not able to connect the sessions.
Issue the below command to stop iptables service.
[root@krizna ~]# service iptables stop
try again.
» you might receive the below error while starting the vnc service.
/usr/bin/Xvnc: symbol lookup error: /usr/bin/Xvnc: undefined symbol: pixman_composite_trapezoids
/usr/bin/Xvnc: symbol lookup error: /usr/bin/Xvnc: undefined symbol: pixman_composite_trapezoids

[FAILED]
Issue the below command to install pixman,pixman-devel and libXfont packages.
[root@krizna ~]# yum -y pixman pixman-devel libXfont
[or]
This command will update everything .
[root@krizna ~]# yum update
and restart the VNC service and try again.

Good luck


评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值