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的问题的。
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章