Xlib: connection to “:0.0” refused by server的解决方法

   有时候启动图形界面时常常遇到“Xlib: connection to ":0.0" refused by server”的错误,如:

[root@AS-10 ~]# wireshark 
Xlib: connection to ":0.0" refused by server
Xlib: Invalid MIT-MAGIC-COOKIE-1 key
(wireshark:7852): Gtk-WARNING **: cannot open display:  
[root@AS-10 ~]# 

   网上很多人都说是在root的用户下执行:xhost + 或者 xhost local:oracle non-network local connections being added to access control list
export DISPLAY=":1.0" 或许就能解决问题了。
   如果还不行,就执行一下vncserver, 然后查看一下VNC上面显示的窗口号,然后根据实际情况修改。DISPLAY=:0.0指本地终端图形,DISPLAY=:1.0通常是指VNC上面显示的窗口号。


电子邮件地址不会被公开。 必填项已用*标注

机器人检查 *

This site uses Akismet to reduce spam. Learn how your comment data is processed.