在Oracle Linux 6.2上,执行vncserver后不能访问VNC, 再次执行vncserver,发现端口没有加1, 查看Log文件,启动VNC时报错如下 :
[root@rnd-uvp ~]# vi /root/.vnc/rnd-uvp:1.log
Couldn't open RGB_DB '/usr/X11R6/lib/X11/rgb'
Xvnc version 4.0 - built Jun 14 2004 12:01:28
Underlying X server release 40201000, The XFree86 Project, Inc
Sun Oct 26 13:09:03 2014
vncext: VNC extension running!
vncext: Listening for VNC connections on port 5901
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!
.....
Fatal server error:
could not open default font 'fixed'
xsetroot: unable to open display 'rnd-uvp:1'
/root/.vnc/xstartup: line 7: twm: command not found
vncconfig: unable to open display "rnd-uvp: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
查询发现是Oracle Linux字库问题
原因就是vncserver默认寻找的X系统的字体路径在/usr/X11R6/lib/X11/fonts/下,但Oracle Linux 却在
/usr/share/X11/fonts/下, 需要创建这个目录然后建立链接:
mkdir /usr/X11R6/lib
cd /usr/X11R6/lib
ln -s /usr/share/X11 X11
如果启动VNC时提示的是could not open default font 'fixed',则表明可能缺少字体,需要安装:
# yum install libXfont
# yum install xorg-x11-fonts*
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/35489/viewspace-1310108/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/35489/viewspace-1310108/