xlib 不能在本地主機上顯示的問題

由於經常在windows 和其他linux 機器上訪問服務器,有時會導致本機上的Xlib 不能正確顯示,  運行 xhost local:local 可以解決該問題.

Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

Error: Can't open display: :0.0

這是老問題了,不過這次對我來說卻有些不同。想在自己的本本ubuntu上安裝oracle10,結果新增加的用戶oracle不能運行X程序。

查了查資料和手冊,以日常工作用的那個用戶登錄,在shell中運行
xhost local:oracle
non-network local connections being added to access control list

然後oracle身份就可以運行X程序了。

man xhost中有這樣一段

       A complete name has the syntax ‘‘family:name’’ where the families are as follows:

       inet      Internet host (IPv4)
       inet6     Internet host (IPv6)
       dnet      DECnet host
       nis       Secure RPC network name
       krb       Kerberos V5 principal
       local     contains only one name, the empty string
       si        Server Interpreted

其中local那個是用來解決同一臺機器的不同用戶訪問X的問題的。
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章