[转] vnc viewer 远程桌面连接CentOS 安装oracle 11g出现的Xlib问题解决

原文:http://bluestar.javaeye.com/blog/252792

出现错误提示:“Xlib: connection to ":1.0" refused by server”

如下处理:

实用技巧:在Linux下设置xhost方法步骤

    第一步:用root登陆linux,启动vnc服务;

    第二步:根据vnc起来的端口,设置export DISPLAY=localhost:1(1表示vnc在第一个tty上启动的),vnc的启动信息如下:

Java代码
  1. [root@localhost ~]# vncserver  
  2.   
  3. New 'localhost:1 (root)' desktop is localhost:1  
  4.   
  5. Starting applications specified in /root/.vnc/xstartup  
  6. Log file is /root/.vnc/localhost:1.log  
  7.   
  8. [root@localhost ~]# export DISPLAY=localhost:1   
  9. [root@localhost ~]# xhost +  
  10. access control disabled, clients can connect from any host  
[root@localhost ~]# vncserverNew 'localhost:1 (root)' desktop is localhost:1Starting applications specified in /root/.vnc/xstartupLog file is /root/.vnc/localhost:1.log[root@localhost ~]# export DISPLAY=localhost:1 [root@localhost ~]# xhost +access control disabled, clients can connect from any host

 

    第三步:执行xhost +,并且提示“access control disabled, clients can connect from any host”才正确。 

使用上诉方法就可以搞定。

posted @ 2010-09-29 22:59  Victor.J  阅读(1008)  评论(0)    收藏  举报