VNC (Virtual Network Computing) is the abbreviation of virtual network computer. VNC is an excellent remote control tool software developed by the famous European Research Laboratory of at & T. VNC is a free open source software based on UNIX and Linux operating systems. Its remote control capability is powerful, efficient and practical. Its performance can be comparable to any remote control software in windows and MAC. In Linux, vnc includes the following four commands: vncserver, vncviewer, vncpasswd, and vncconnect. In most cases, I only need two of these commands: vncserver and vncviewer.
VNC basically belongs to a display system, that is, it can transmit the complete window interface to the screen of another computer through the network. The “terminal server” contained in the windows server, the charging software PcAnyWhere developed by Symantec, the recently popular TeamViewer, domestic Xietong XT800 and express KDT all belong to this principle, At the same time, these software have made corresponding improvements based on the principle of VNC, improving the ease of use, connectivity and permeable intranet (TeamViewer, Xietong XT800, KDT)
You must understand:
When calling vncserver, the listening port on the server side will be enabled according to your configuration. By default, the port starts from 5900, plus your desktop number.
• for example, if your desktop number is 1, the connection port number of VNC is 5900 + 1 = 5901
• for example, if your desktop number is 10000, the connection port number of VNC is 5900 + 10000 = 15900
Next, configure the VNC server so that the user (root) can remotely connect to the graphical interface of the Linux system through the VNC client (provided that your server is installed on the desktop)
1. Check whether VNC is installed on Linux system
Enter the command in the terminal window:
The code is as follows:
The returned information is as follows
The code is as follows:
Description VNC server is not installed
2. Run the following command to install:
The code is as follows:
3. Start VNC service
The code is as follows:
You will require a password to access your desktops.
Password:
Verify:
You will be prompted to enter the password, which is required for remote login. Enter the password and press enter
4. Switch to the root account: Su root, and then enter the password of the root account
The code is as follows:
Vncservers = “10000: root” # cancel the previous # 10000: root (desktop number: user) # vncservergas [2] = “- geometry 800×600 – nolisten TCP – localhost”
Last save exit
5. Configure the firewall to allow port 10000 + 5900 = 15900 to pass through the firewall (otherwise the VNC server cannot be connected remotely)
The code is as follows:
-A input – M state — state new – M TCP – P TCP — dport 15900 – J accept
Save exit
6. Restart VNC server
The code is as follows:
perhaps
service vncserver restart
7. Restart the firewall to make the port configuration take effect
The code is as follows:
service iptables restart
8. Set VNC server to start automatically after startup
The first method: use the “ntsysv” command to start the graphical service configuration program, add an asterisk in front of the vncserver service, and click OK to complete the configuration.
The second method: use “chkconfig” to operate in command line mode. The command is as follows
The code is as follows:
chkconfig –list vncserver
vncserver 0:off 1:off 2:on 3:on 4:on 5:on 6:off
9. Change VNC connection password
The code is as follows:
At this point, the VNC server is set up and can be connected with the VNC client
VNC server: your IP: 15900
Note: if a gray screen appears after connection, you can set it according to the following method
Enter the user’s home directory, CD / home / user
If you log in with the root account, the current directory is the user root directory
The code is as follows:
VI xstartup # editing
#TWM & # comment out this line
Gnome session & # add this line
Save and exit to connect normally!
It’s done here. You can use it next http://IP:port Web login, for example
http://IP:5801 , you can also log in with IP: 1 in vncviewer.