& Nbsp; Step 1: Use root to log on to linux and start the vnc service. Step 2: Set exportDISPLAYlocalhost based on the vnc port: 1 (1 indicates that vnc is started on the first tty). For vnc startup information, see Appendix 1. Step 3: execute xhost + and prompt "accesscontroldisabl ".
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 ~]# vncserverNew localhost:1 (root) desktop is localhost:1Starting applications specified in /root/.vnc/xstartupLog 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.