Xlib: connection to "0.0" refused by server Xlib: No protocol specified Error:Can't open display:0.0

发现CSDN空间做的好烂 反应忒慢了点 对chrome 支持也不是很好.

 今天准备卸载之前在Linux下安装Cognos,用cognos用户执行./unist的时候 报错

Xlib: connection to "0.0" refused by server
Xlib: No protocol specified
Error:Can't open display:0.0

在网上找到答案解决,特记录一下.

解决办法:用root登陆,在#提示符后输入:

xhost local:cognos non-network local connections being added to access control list

敲回车运行后出现:

non-network local connections being added to access control list
xhost: bad hostname "non-network"
xhost: bad hostname "local"
xhost: bad hostname "connections"
xhost: bad hostname "being"
xhost: bad hostname "added"
xhost: bad hostname "to"
xhost: bad hostname "access"
xhost: bad hostname "control"
xhost: bad hostname "list"

此时再 su - cognos 切换到cognos用户执行图形界面任务就可以了

-----------------------文章中附了段解释,不是很理解------------------

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的问题的。

http://blog.csdn.net/xzl1203/article/details/6454296

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值