Linux (CentOS6.3) sets VNC Remote Desktop Connection

Source: Internet
Author: User
Linux (CentOS6.3) sets up VNC Remote Desktop Connection. I just studied Linux and selected the CentOS6.3 system. as I started to study Linux, I had a lot of detours for this Remote Desktop Connection, which made everyone laugh. To get this VNC Remote connection, I found a lot of information online, many of which are vague... linux (CentOS 6.3) sets up VNC Remote Desktop Connection. I just studied Linux and chose CentOS6.3. since I started to study Linux, I had a lot of detours for this Remote Desktop Connection, which made everyone laugh. To get this VNC Remote connection, I found a lot of information on the Internet, many of which were vague. I did it all night yesterday, so that new users like me could not take a detour, so I specially sorted out my yesterday's process and shared it with you. All right, you don't need to talk about it anymore. just get into the subject. 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: rpm-qa | grep vnc uses the above Command. the information returned here is as follows (if no display is displayed, the vnc package is not installed) if the tigervnc-1.1.0-5.el6.i686 tigervnc-server-1.1.0-5.el6.i686 does not install vnc, you can run the following command to install: yum install tigervnc-server next is the configuration issue after installation. Run the following command to edit the configuration file: vi/etc/sysconfig/vncservers when using the command above, this configuration file may already exist on your server, the configuration file does not exist on your server. add the following content to the configuration file: VNCSERVERS = "1: root "VNCSERVERARGS [1] ="-geometry 800x600 "the following section describes the configuration file annotations for reference: # This is the user name used to configure remote desktop login, for two users, use VNCSERVERS = "1: user1 2: user2", and so on. 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). The following VNCSERVERS = "usernumber: myusername" # the following configuration is used to configure the login desktop, "1" indicates the user ID, "800x600" indicates the resolution, and "-n" indicates the resolution. To prevent tcp packets, olisten tcp-localhost only listens to the local network. VNCSERVERARGS [1] = "-geometry 800x600-nolisten tcp-localhost" if you want to block http packets, you can use the following command to configure VNCSERVERARGS [1] = "-geometry 800x600-nolisten tcp-nohttpd-localhost" to set a password for vnc (you need to use su to switch to the vnc password to be set ): on the user, for example, su user1, where user1 is the account written in the above configuration file) after vncpasswd sets the password, it is to start the VNC service, when starting the VNC service, you also need to use su user1 (user1 is the account written in the preceding configuration file) switch to the account where you want to start the service (when many friends use the default desktop VNC of DirectSpace, they will not be able to connect to "10061 error", and then they can access Enter the following command to solve the problem !) Other commands of vncserver, such as restarting the VNC service, use the following command: service vncserver restart to set the startup of VNC service: chkconfig vncserver on in some minimal systems, even if the box is garbled in English, use this command to correct it: yum-y install fontforge. other instructions: use servers vncserver start after the configuration is complete (if it cannot be started, check whether the software is installed properly, check/etc/rc. d/init. d. check whether the vncserver control script exists in the directory. after the script is started, use netstat-nat to check the listening port (default value: 5901, 5902, 5903, etc.). If the firewall is enabled, you need to configure rules to allow the tcp packet passing through the corresponding port. Refer to the configuration: iptables-I input 1-p tcp -- dport 5901-j ACCEPT (where-I INPUT 1 indicates that a rule is inserted and the location of this rule is 1, for more information, see iptables configurations.) if you encounter the following problems: 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 font library. you can see that there are many X11 Update packages and install them. 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.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.