LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 7401|回复: 33

老总要我完成的一个小任务,我三周了还没搞定!神阿救救我。

[复制链接]
发表于 2007-5-18 13:05:40 | 显示全部楼层 |阅读模式
有装过vnc的大侠么,我的进入后黑屏。从Windows的VNC Viewer进入Linux,只是黑屏,光标是个小方块 .
要如何设定阿?我用rpm安装vncserver后,将.vnc/xstartup内的内容注释掉,写上 gnome &  ,后来改为startkde & 都不行。
从Windows的Run VNC Viewer输入服务器IP:5900(只有5900可以进入,其他的拒绝访问)进入就是黑屏,只有一个小正方形的光标。
[root@local ~]# vncserver

New 'local:1 (root)' desktop is local:1

Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/local:1.log

[root@local ~]#
查看root/.vnc/local:1.log的内容:
[root@local .vnc]# vi local: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


Fri May 18 11:10:09 2007
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!


郁闷阿,搞了三周了都没搞出来!
发表于 2007-5-18 13:17:33 | 显示全部楼层
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!

大哥 这里不是写的很清楚了
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-5-18 14:01:12 | 显示全部楼层
是啊,但我进去只能到lib这个文件夹,里面没有X11这个文件夹了。
[root@local lib]# ls
modules


这是怎么回事呢?安装vnc没有自动生成?
回复 支持 反对

使用道具 举报

发表于 2007-5-18 14:09:41 | 显示全部楼层
你开启的是5901端口(5900是连默认的X,使用x0vncserver或没有启动默认的X才能连)
至于连不上可能是被防火墙拦了或者vnc没成功启动
你试着在本机上连一下
回复 支持 反对

使用道具 举报

发表于 2007-5-18 14:15:05 | 显示全部楼层
你用的哪个发行版本?
我用的FC6连lib都没有
vnc使用很正常
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-5-18 16:32:23 | 显示全部楼层
[root@local ~]# service vncserver start
启动 VNC 服务器:no displays configured                    [确定]
[root@local ~]#
这算成功启动么?
我的OS版本是Fedora Core6(FC6)。
我在安装盘里找到这两个安装文件vnc和vncserver,使用rpm安装:
[root@local ~]# rpm -q vnc vnc-server
vnc-4.1.2-3.fc6
vnc-server-4.1.2-3.fc6
说明装上了吧。

运行vncserver:
[root@local ~]# vncserver

New 'local:1 (root)' desktop is local:1

Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/local:1.log

[root@local ~]#
然后从Windows的Viewer输入192.168.1.100:1回车,"failed to connect:Connection refused(10061)"连不上。
输入192.168.1.100:5901,同样的提示,连不上。

再运行vncserver,还是出现同一个编号1,即编号没增长:
[root@local ~]# vncserver

New 'local:1 (root)' desktop is local:1
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/local:1.log

[root@local ~]#

现在察看登陆文件root/.vnc/local: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


Fri May 18 16:29:05 2007
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'
xrdb: Connection refused
xrdb: Can't open display 'local:1'
xmodmap:  unable to open display 'local:1'
xhost:  unable to open display "local:1"
Launching a SCIM process with x11...
Loading socket Config module ...
Creating backend ...
Loading x11 FrontEnd module ...
Failed to launch SCIM.
Smart Common Input Method 1.4.4


问题到底出在哪里呢?是不是vncserver安装完后要修改什么东西?
回复 支持 反对

使用道具 举报

发表于 2007-5-18 23:38:39 | 显示全部楼层
要把/etc/X11/下的一个文件拷成~/.vnc/xstartup,网上可以很容易搜到,debian上是xinit/xinitrc
回复 支持 反对

使用道具 举报

发表于 2007-5-21 08:31:07 | 显示全部楼层
你改用普通用户吧,root 连接受限制

用 vncserver :1

你改用 gnome-session & 试验下

另外端口你设置了没有,默认就是5900么?
回复 支持 反对

使用道具 举报

发表于 2007-5-21 08:33:50 | 显示全部楼层
[ligana@ligana .vnc]$ more ligana.com\:1.log

Xvnc Free Edition 4.1.2
Copyright (C) 2002-2005 RealVNC Ltd.
See http://www.realvnc.com for information on VNC.
Underlying X server release 70101000, The X.Org Foundation


Mon May 21 08:34:52 2007
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
Could not init font path element /usr/share/X11/fonts/OTF, removing from list!
Could not init font path element /usr/share/X11/fonts/CID/, removing from list!
gnome-session: you're already running a session manager
Warning: X locale modifiers not supported, using default
Failed to open input method


---------------------------------------------

这个是我的log
回复 支持 反对

使用道具 举报

发表于 2007-5-21 08:35:44 | 显示全部楼层
#!/bin/sh

# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
exec gnome-session &
===========================================

上面是我的 .xstartup,你对照下
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表