A first, check whether the VNC service is installed on the server. the command to check whether the VNC is installed on the server is as follows: The Linux code rpm-qa | grepvnc uses the preceding command, the returned information is as follows. & Nbsp
A first, check whether the VNC service has been installed on the server. the command to check whether the VNC is installed on the server is as follows:
Linux code
- Rpm-qa | grep vnc
With the above command, the returned information is as follows.
If no display is displayed, the vnc package is not installed.
Run the following command to install the SDK.
Linux code
- Yum install tigervnc-server
B configuration information.
1. use the following command to edit the configuration file:
Linux code
- Vi/etc/sysconfig/vncservers
2. use the following command to set the vnc password (you need to use su to switch to the user who wants to set the vnc password, for example, su root, where root is the account written in the above configuration file)
Vncpasswd
3. enable port configuration
Set the port information as follows.
4. start the VNC service, use su to switch to the corresponding account, and then start VNC
Linux code
- Vncserver
Other commands, such as restarting the VNC service, use the following command:
Linux code
- Service vncserver restart
5. run the following command to set the VNC service to start at startup:
Linux code
- Chkconfig -- level 345 vncserver on
6. run software on Windows
Set boot start.
Linux code
- Sudo mentohust-b3-y5-w
References:
Http://www.2cto.com/ OS /201108/101747.html
Http://www.th7.cn/system/lin/201303/38203.shtml
Http://www.cnblogs.com/mikevictor07/archive/2013/03/12/2955438.html
Http://www.cnblogs.com/spcc/archive/2012/11/08/2760504.html
Remarks 1 configuration information
# This is the username used to configure remote desktop login. if two users are used, use VNCSERVERS = "1: user1 2: user2 ",,
By default, 1: user1 corresponds to 5901, 2: user2 corresponds to 5902 (the default listening port of VNC is 5900, and the listening port rule is 590 + usernumber ).
VNCSERVERS = "usernumber: myusername"
# The following configuration indicates the login desktop configuration, where "1" indicates the user serial number, "800x600" indicates the resolution, "nolisten tcp" indicates that tcp packets are blocked, and "-localhost" indicates that only local listeners are monitored,
VNCSERVERARGS [1] = "-geometry 800x600-nolisten tcp-localhost"
If you want to block http packets, you can use the following configuration:
VNCSERVERARGS [1] = "-geometry 800x600-nolisten tcp-nohttpd-localhost"
Note 2 garbled box
In some minimal systems, even in English, use this command to correct the following: yum-y install fontforge
Remarks 3 about font
Starting vnc server:
WARNING: the first attempt to star Xvnc failed, possibly because the font catalog is not properly configured, attempting to determine an appropriate font path for this system and restart Xvnc using that font path...
The above problem is caused by the font path problem,
Solution: Update the library. you can see through the update interface that there are many X11 update packages to install,
If you are not familiar with which to install, you can update all the software packages. of course, it takes a long time (Command: yum-y upgrade ),
If there are no other problems, use servers vncserver start to start successfully.