当前位置 : 主页 > 大数据 > 区块链 >

No protocol specified xhost: unable to open display

来源:互联网 收集:自由互联 发布时间:2021-06-22
[[emailprotected] ~]$ xhost + No protocol specified xhost: unable to open display "192.168.56.1:0.0" [[emailprotected] ~]$ env|grep DISPLAY DISPLAY=192.168.56.1:0.0 [[emailprotected] ~]$ exit logout [[emailprotected] ~]# env|grep DISPLAY DI

[[email protected] ~]$ xhost +
No protocol specified
xhost:  unable to open display "192.168.56.1:0.0"
[[email protected] ~]$ env|grep DISPLAY
DISPLAY=192.168.56.1:0.0
[[email protected] ~]$ exit
logout
[[email protected] ~]#  env|grep DISPLAY
DISPLAY=localhost:10.0

然后看看 /etc/hosts 发现了缺失 localhost 

[[email protected] ~]# cat /etc/hosts
192.168.56.129   hdp-01 

[ [email protected] ~]# vi /etc/hosts 127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.56.129   hdp-01   OJBK 了 [ [email protected] ~]# xhost + access control disabled, clients can connect from any host
网友评论