在linux下一个普通用户someone使用某个包含xlib的软件时,遇到问题:
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
解决办法:
命令行中运行:
xhost local:someone
non-network local connections being added to access control list
这样someone用户就可以使用X程序了
[zz]原理:
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的问题的。
阅读(698) | 评论(0) | 转发(0) |