Tigervnc's easy-to-use tutorials (Remote Desktop Connection for CentOS)
1. Environment and software preparation
(1) CentOS 6.5
[email protected] ~]$ Yum install Tigervnc
(2) Under Windows 7
Tigervnc-1.2.0.exe, download in http://sourceforge.net/projects/tigervnc/
2. Start Vncserver (server side)
Vncserver:n
Here n is sessionnumber, does not specify the default is 1, it can be 2, 3, and so on. The first time you are prompted for a password, you can later use the VNCPASSWD command to change the password.
3. Start Vncviewer (client)
Vncviewer localhost:n
Here n corresponds to the number specified by Vncserver, if using tools such as Xmanager, in Windows will automatically eject the CentOS desktop, here we use Tigervnc-1.2.0.exe.
4. Start the Windows version of Tigervnc (Tigervnc-1.2.0.exe)
The default port for VNC is 5900, and the Remote Desktop Connection port is 5900+n (n is specified by the Vncserver command). If you use the "vncserver:1" command to start VNC Server, the following port should be 5901.
Click "OK" and you are prompted to enter your password to see the desktop of CentOS.
5. Close Vncserver (server side)
Vncserver-kill:n
If you use VNCSERVER:N to set up remote desktops multiple times, you can use
Vncserver–list
Lists all remote desktops that are established by the current user, such as
VNC is a very powerful tool.
Here I say through VNC control intranet machine. Even the intranet, nothing but two ways, active and passive, you want to actively connect, unless you can NAT on the router, but I think very few people in the company can have this permission! I can only use the passive way, that is, the client listener, let the server to connect (exactly with the ordinary CS concept anti-anti).
Suppose I am at home, I have a public network ip,58.24.240.3 (must, at present cannot realize intranet even intranet, unless take a VPN), even the company's computer. The way is to let the company put on Vncserver and then take the initiative to connect me. Steps:
1. The home computer needs to install WINVNC, only need a vncviewer function. Then start the listening vncviewer feature. (Command behavior Vncviewer-listen) 2. Company Computer
Windows host:
Install the WINVNC, you need to install the server function.
Start Vncserver, the status bar will be more than an icon, and then click Add New Client, enter the home computer's public network IP. Of course, firewall and other issues, please exclude.
Using the command line, cut to the VNC installation directory and execute:
Winvnc4-start Winvnc4-connect 58.24.240.3 |
Linux hosts:
Install Vnc-server. (I installed the version of 4.1.2, with the RHEL5 system)
Input
Vncserver Vncconfig-display:1-connect 58.24.240.3 |
Note:
1. Vncconfig was started after version 4, and was previously used by Vncconnect to connect to the client's 2. The 1 at the back of display refers to the screen you open, starting from 1 by default.
3. VNC connected after the display if it does not look good, the default is to use only xterm, you can modify the home directory of the. VNC directory under the Xstartup file, just leave these two lines
Unset Session_manager
Exec/etc/x11/xinit/xinitrc
All the others commented out.
[Email protected] ~]$ vncserver-list
TigerVNC Server Sessions:
X DISPLAY # PROCESS ID
: 1 14174
TIGERVNC Remote Desktop, cross-intranet