linux解決xhost unable to open display‘’

keeptrying發表於2012-11-21

實用技巧:在Linux下設定xhost方法步驟

第一步:用root登陸linux,啟動vnc服務;

第二步:根據vnc起來的埠,設定export DISPLAY=localhost:11表示vnc在第一個tty上啟動的),vnc的啟動資訊見附件1

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

linux下的操作日誌如下:

[root@localhost ~]# vncserver

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

Starting 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時,出現了unable的問題。使用上訴方法就可以搞定。

 

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/25744374/viewspace-749657/,如需轉載,請註明出處,否則將追究法律責任。

相關文章