Installation:
1. Download the VNC file that I used: vnc-5.2.2-linux-x64-rpm.tar.gz. Go to the official website to download.
2. Decompression: TAR-XZVF vnc-5.2.2-linux-x64-rpm.tar.gz
3. Installation: Yum install vnc-server-5.2.2-linux-x64.rpm
If you need to rely on some programs, you can install common development packages by mounting impressions to resolve
4. installation completed, vncserver or VNCPASSWD command set user name and password, follow-up can only be modified by VNCPASSWD settings password
5. some VNC graphical interfaces may also require configuration files to be displayed. As follows: Modify/root/.vnc/xstartup,
Change the last line twm& to gnome-session& or kde& (KDE is said to be less stable on the current VNC viewer)
6. Client Login: Enter in the VNC client: server-side ip:1 or server-side ip:5901 (subsequent ports are based on server-side ports)
7. To configure multiple desktops, you can use the following method to start VNC for multiple desktops
Vncserver:1
Vncserver:2
Vncserver:3
Common commands:
1. Start: Vncserver (the first recommendation, the password can be set by this command) or vncserver:1 (recommend this startup after setting the password, specify the boot port)
2. Close command: vncserver-kill:1; Vncserver-kill:2
3. set self-boot: Configure VNC to start automatically. There is a vncservers configuration file under/etc/sysconfig. Modified to read as follows: vncservers= "1:root" means using ip:1 to use root
User Desktop. It is not displayed on the screen. Use Chkconfig--level 3 vncserver to load vncserver at boot time
4. Start/stop/restart of VNC after Setup: Service Vncserver Start/stop/restart
Note: 3 and 4 are not validated and are for informational purposes only
Description
1. The password that is set is encrypted in the. VNC subdirectory (/ROOT/.VNC/PASSWD) directory in the user's home directory, and the Xstartup profile is automatically created for the user in the. VNC subdirectory of the user's home directory.
(/root/.vnc/xstartup), the configuration information in the file is read every time the VND service is started.
There is also a "testdb:1.pid" file under the/root/.vnc/directory that records the process number that corresponds to the acquired operating system after VNC is started, which is used to accurately locate the process number when the VNC service is stopped.
The above is the general configuration, I have once loaded in the above directory can not find, in fact Xstartup in the/etc/vnc directory. You can find the specified file by locate the search name.
2. If VNC is not properly shut down, the port that is currently not properly closed will always be occupied (the. pid file mentioned above). You must manually clear the relevant files, files generally in/tmp and/tmp/. The x11-unix/directory.
For example:/tmp/. X1-lock and/tmp/. X11-unix/x1
If you can't remember, we can specify the boot port by starting the command: Vncserver:1. An error message indicates where the lock file is located.
Recommended reference article: http://blog.itpub.net/519536/viewspace-607549/
Installation and common commands for VNC