Background: CentOS 6
Yum Groupinstall Desktop #如果不安装, may be blank after login from client
Yum Install Tigervnc-server
To modify the Vncserver configuration file:
vi/etc/sysconfig/vncserversvncservers= "1:root" vncserverargs[1]= "-geometry 1920x1080-nolisten TCP"
Note You cannot have the-localhost parameter here, or you can only listen on the local port and not connect remotely.
Setting up a VNC password
vncpasswd
The VNC access password is entered and is automatically saved in the/root/.vnc/passwd file.
Service Vncserver Restart
Check:
Netstat-tlnp
If there is a 59xx port, it proves that the Vncserver started successfully. From the remote connection, address Ip:port, you can successfully see the desktop system.
Supplemental content:
The Vncserverargs parameter describes the-geometry desktop resolution, the default 1024X768;-NOHTTPD does not listen on the HTTP port (58xx port);-nolisten TCP does not listen on X port (60xx port);-localhost Only allow access from native computer;-alwaysshared default only allows one Vncviewer connection at a time, this parameter allows to connect multiple vncviewer;-securitytypes none at the same time does not require password Authentication vncauth default value, to password authentication.
If it is not necessary, the server does not recommend enabling VNC services.
VNC Server Configuration