linux 下通过xhost进入图形界面,经常会出现报错“unable to open display”
linux下的操作步骤如下:
[root@localhost ~]# vncserver
New 'localhost:1 (root)' desktop is localhost:1
Starting applications specified in /root/.vnc/xstartupLog file is /root/.vnc/localhost:1.log
[root@localhost ~]# export DISPLAY=localhost:1.0
注意这块变换后面为1.0 0.0等
[root@localhost ~]# xhost +
access control disabled, clients can connect from any host