linghaiyan 发表于 2018-9-23 10:45:11

oracle提示:Xlib: No protocol specified

  出现错误提示:“Xlib: connection to ":1.0" refused by server”
  如下处理:
  实用技巧:在Linux下设置xhost方法步骤
     第一步:用root登陆linux,启动vnc服务;
     第二步:根据vnc起来的端口,设置export DISPLAY=localhost:1(1表示vnc在第一个tty上启动的),vnc的启动信息如下:

[*]# vncserver
[*]
[*]New 'localhost:1 (root)' desktop is localhost:1
[*]
[*]Starting applications specified in /root/.vnc/xstartup
[*]Log file is /root/.vnc/localhost:1.log
[*]
[*]# export DISPLAY=localhost:1
[*]# xhost
[*]access control disabled, clients can connect from any host
  
     第三步:执行xhost ,并且提示“access control disabled, clients can connect from any host”才正确
  另外:
  解决办法,执行如下命令。
  export DISPLAY=:0.0   设置默认的显示器
  xhost +LOCAL:    开放 本地连接xserver的权限

页: [1]
查看完整版本: oracle提示:Xlib: No protocol specified