Linux 如何解决 xhost: unable to open display ""

[root@host02 ~]# vncservice
You will require a password to access your desktops.

Password:
Verify:
xauth:  creating new authority file /root/.Xauthority

New 'host02:1 (root)' desktop is host02:1
#我没设置过密码  这里需要设置密码
[root@host02 ~]# export DISPLAY=host02:2
#根据上面的结果   设置DISPLAY
[root@host02 ~]# xhost +
access control disabled, clients can connect from any host

 

posted on 2017-01-04 22:05  liu_xiya  阅读(1913)  评论(0编辑  收藏  举报