Article title: Newbie School: how to use VNC to achieve remote desktop sharing. 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.
VNC, all called Virtual Network Computing, is a desktop sharing system. It is similar to the remote desktop function in windows. VNC uses the RFB (Remote FrameBuffer, Remote frame buffer) protocol to remotely control another computer. It sends keyboard and mouse actions to the remote computer and sends the screen of the remote computer back to the local computer.
VNC technology has nothing to do with the platform. VNC Viewer can be on a different operating system than VNC Server. VNC supports almost all operating systems, Java, and even Java browsers to access the VNC Server. Multiple VNC clients can connect to a VNC Server at the same time.
VNC was initially developed by AT&T and its source code is open source.
It is easy to configure the VNC service on CentOs 4.3 (assuming that VNC software has been installed on your computer)
First, you need to configure the VNC password, which is used when connecting to the server using the client.
Note: The VNC password is saved in the user's home directory. you can set your own password for each user. Therefore, use your user name (do not use root as much as possible) to run the following command:
Vncpasswd
Enter the password.
Then you can start the VNC server. When starting the VNC server, you must specify a display parameter for your server. You can regard display as a desktop, and every user can have their own desktop. When connecting to a VNC client, you can specify which desktop to connect. In the system, the display number cannot be repeated. that is to say, if a user has created a display named ": 1", another user cannot use ": 1, it can use ": 2 ".
The command to start the VNC server is:
Vncserver <display>
For example,
Vncserver: 1
Finally, you need to configure the firewall to allow the VNC client to connect to the VNC server. The VNC server listening port starts from 5900. The display: 1 listening port is 5901, the display: 2 listening port is 5902, and so on. By default, the CentOs firewall does not allow connection to these ports. Therefore, you need to use the following steps to open the firewall (root permission required ):
Vi/etc/sysconfig/iptables
Find the following statement:
-A RH-Firewall-1-INPUT-j REJECT -- reject-with icmp-host-prohibited
Add the following content before this line:
-A RH-Firewall-1-INPUT-m state -- state NEW-m tcp-p tcp -- dport 5900: 5903-j ACCEPT
The meaning of this statement is to allow other machines to access ports 5900 to 5903 of the local machine. in this way, users of display: 1, display: 2, display: 3 can connect to the local machine.
Then use the root identity to restart the firewall:
/Sbin/service iptables restart
Now you can run the client software and connect it to the VNC server.
There are many VNC client software. in linux, there is vncviewer. KDE also provides a krdc (its menu item is "Remote Desktop Connection" and Remote Desktop Connection ).
There are also many vnc clients in window. you can download them at http://www.realvnc.com/and install them.
[1] [2] Next page