歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux編程 >> PERL編程 >> centos 6.3 vnc連接—— catalog is not properly configured, attempting to determine an appropriate font p

centos 6.3 vnc連接—— catalog is not properly configured, attempting to determine an appropriate font p

日期:2017/3/1 14:51:19   编辑:PERL編程
centos 6.3 vnc連接—— catalog is not properly configured, attempting to determine an appropriate font p 摘要:linux環境下,利用VNC連接遠程桌面是經常用到的。這裡,我們介紹centos上,利用VNC連接遠程桌面的方法和常見的兩個問題的解決方法1)由於字體問題,導致VNCserver無法啟動 2)由於防火牆問題,導致開啟VNCserver以後,無法在VNCviewer連接過來。 一、查看是否安裝 VNC [root@xen ~]# rpm -qa|grep tigervnc tigervnc-1.0.90-0.17.20110314svn4359.el6.x86_64 tigervnc-server-1.0.90-0.17.20110314svn4359.el6.x86_64 如果沒有就安裝下了 [root@xen ~]# yum install tigervnc tigervnc-server 添加啟動項 [root@xen ~]# chkconfig --add vncserver [root@xen ~]# chkconfig vncserver on 二、設置 VNC 密碼 [root@xen ~]# vncserver Creating default startup script /root/.vnc/xstartup Starting applications specified in /root/.vnc/xstartup Log file is /root/.vnc/xen:1.log 會在當前用戶主目錄下 生成 .vnc 目錄和配置文件 [root@xen ~]# vncpasswd Password: Verify: 設置的密碼保存在 /root/.vnc/passwd 三、VNC 配置 修改 xstartup 文件 把最後的 twm & 刪掉 加上 gnome-session & 編輯/root/.vnc/xstartup, vi /root/.vnc/xstartup 如果直接 啟動 [root@xen .vnc]# /etc/init.d/vncserver start 正在啟動 VNC 服務器:no displays configured [失敗] 所以要修改 /etc/sysconfig/vncservers 文件添加以下內容 VNCSERVERS="2:root" # 桌面號:用戶 監聽 590* 端口 VNCSERVERARGS[2]="-geometry 800x600" 這樣修改後,就算 /etc/inittab 啟動模式為 3 也可以正常進入圖形界面 啟動 vncserver [root@xen ~]# /etc/init.d/vncserver start 正在啟動 VNC 服務器:2:root xauth: (stdin):1: bad display name "xen:2" in "add" command New 'xen:2 (root)' desktop is xen:2 Starting applications specified in /root/.vnc/xstartup Log file is /root/.vnc/xen:2.log 四、常見問題 1)由於防火牆,導致外部無法連接遠程桌面 解決方法:啟動完畢後使用netstat -nat查看監聽端口(默認為5901,5902,5903等),如果開啟了防火牆,則需要配置規則允許對應端口tcp包通過。 iptables -I INPUT 1 -p tcp --dport 5901 -j ACCEPT(其中-I INPUT 1代表插入一條規則,這條規則的位置是1,詳情請查閱iptables相關配置) 2)字體問題導致無法啟動vncserver 出錯提示:WARNING: the first attempt to star 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 ... 解決方法: a.查看需要更新的字體:yum list updates | grep font b.將上一步中需要更新的字體都安裝
Copyright © Linux教程網 All Rights Reserved