switched http://blog.sina.com.cn/s/blog_66719ff30100sdib.html
Set xhost + to allow all servers to use the current X Server . By default, other servers cannot access the local X Server . At this time, if you execute commands that require graphical display, it will cause the above Xlib: connection to "172.25 .198.226:1.0" refused by server error.
Execute #xhost + under root user
I saw the following display: access control disabled, clients can connect from any host. Inaddition, I also followed the statement http://blog.sina.com.cn/s/blog_4d6e44860100lyo2.html to operate once, but did not succeed at that time.
But it does set some environment variables. I don't know if this environment variable has any effect. The key step is to " execute #xhost + under root user "
An error message appears: "Xlib: connection to ":1.0" refused by server"
Treat as follows:
Practical skills: Steps to set up xhost method under Linux
- [root@localhost
~]# vncserver -
- New
'localhost:1 (root)' desktop is localhost:1 -
- Starting
applications specified in /root/.vnc/xstartup - Log
file is /root/.vnc/localhost:1.log -
- [root@localhost
~]# export DISPLAY=localhost:1 - [root@localhost
~]# xhost - access
control disabled, clients can connect from any host