2010年5月12日星期三

realVNC Could not init font path element /usr/X11R6/lib/X11/fonts/misc/, removing from list! 處理

 

參考:http://cha.homeip.net/blog/2005/08/137.html

vnc-4_1_3-x86_linux.tar.gz

 

安裝realvnc for linux 後發現啟動不了

查看~/.vnc/xxx.log發現

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

Xvnc Free Edition 4.1.3 - built Oct 15 2008 12:55:42
Copyright (C) 2002-2008 RealVNC Ltd.
See http://www.realvnc.com for information on VNC.
Underlying X server release 40201000, The XFree86 Project, Inc

Wed May 12 22:18:05 2010
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 'pennyho.test.com: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

(gnome-session:22056): Gtk-WARNING **: cannot open display:
vncconfig: unable to open display "pennyho.crp.com:1"

發現/usr/X11R6/lib/X11/ 沒有內容

google了一下發現http://www.linuxquestions.org/questions/linux-desktop-74/vnc-problems-could-not-open-default-font-fixed-481175/

 

cp –rf /usr/share/X11 /usr/X11R6/lib/X11

再次啟動,vncserver 查看一下端口

# netstat -untlp |grep Xvnc
tcp        0      0 0.0.0.0:5801                0.0.0.0:*                   LISTEN      3463/Xvnc
tcp        0      0 0.0.0.0:5901                0.0.0.0:*                   LISTEN      3463/Xvnc
tcp        0      0 0.0.0.0:6001                0.0.0.0:*                   LISTEN      3463/Xvnc

出來了

remote 瀏覽器訪問5801端口 ok!

記錄一下備忘

記錄一下我的過程:

tar xvfz vnc-4_1_3-x86_linux.tar.gz
cd vnc-4_1_3-x86_linux

  ./vncinstall /usr/local/bin

mkdir -p /usr/X11R6/lib/modules/extensions/

  cd vnc-4_1_3-x86_linux

cp vnc.so /usr/X11R6/lib/modules/extensions/
mkdir -p /usr/local/vnc/classes
  cp java/* /usr/local/vnc/classes
cp -rf /usr/share/X11 /usr/X11R6/lib/X11

# which vncserver
/usr/local/bin/vncserver

 

# netstat -tln
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address               Foreign Address             State
tcp        0      0 0.0.0.0:771                 0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:904                 0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:111                 0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:25300               0.0.0.0:*                   LISTEN
tcp        0      0 127.0.0.1:631               0.0.0.0:*                   LISTEN
tcp        0      0 127.0.0.1:25                0.0.0.0:*                   LISTEN
tcp        0      0 :::22                       :::*                        LISTEN

]# vncserver

You will require a password to access your desktops.

Password:
Verify:

New 'CRRACTEST.localdomain:1 (root)' desktop is CRRACTEST.localdomain:1

Creating default startup script /root/.vnc/xstartup
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/CRRACTEST.localdomain:1.log

# netstat -tln
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address               Foreign Address             State
tcp        0      0 0.0.0.0:771                 0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:904                 0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:5801                0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:5901                0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:111                 0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:6001                0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:25300               0.0.0.0:*                   LISTEN
tcp        0      0 127.0.0.1:631               0.0.0.0:*                   LISTEN
tcp        0      0 127.0.0.1:25                0.0.0.0:*                   LISTEN
tcp        0      0 :::22                       :::*                        LISTEN

從remote IE or firefox :

:5801">http://vncserver<ip>:5801

就可以訪問到了

當然如果希望gnome or kde env,修改 ~/.vnc/xstartup文件

GNOME:

xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
gnome-session &

KDE:

xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
startkde &

補充完畢

没有评论:

发表评论