Article Title: Practical Tips: Set the xhost method in Linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Step 1: Use root to log on to linux and start the vnc service;
Step 2: Set export DISPLAY = localhost: 1 (1 indicates that vnc is started on the first tty) based on the port of the vnc. For more information about starting vnc, see Attachment 1;
Step 3: Execute xhost + and prompt "access control disabled, clients can connect from any host.
The operation logs in linux are as follows:
[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 |
When xhost is set, the problem of unable occurs.
The appeal method can be used.