Centos6.5 vncserver installation and configuration

Source: Internet
Author: User

Centos6.5 vncserver installation and configuration

 

I. First, the server needs a graphic interface with a running level of 5, and The GNOME desktop graphic interface has been installed.

The command can be used to query

Rpm-Qa gnome

Runlevel

Ii. Use Yum to install and configure vncserver

1. Use the vncserver command to configure the VNC Remote Password

2. Edit the VNC startup graphic interface file (or change it)

VI/root/. VNC/xstartup

Comment out the last line of TWM & and then add a line of content.

Gnome-session &

Save and exit

3. Edit another VNC configuration file.

VI/etc/sysconfig/vncservers

Modify the last two rows as follows:

Vncservers = "1: Root 2: Root"

Vncserverargs [2] = "-geometry 800x600-nolisten TCP-localhost" then save and exit

4. Start the vncserver and set it to boot. (If the system firewall is not used, disable it)

Service vncserver start

Chkconfig vncserver on

Service iptables stop

Chkconfig iptables on

 

3. Add multiple users

Useradd user1 // Add user1

Passwd user1 // set the user's Linux logon Password

Su user1 // switch to user user1

Vncpasswd // set the user's user1 logon Password

Exit

Useradd user2 // Add User user2

Passwd user2 // set the user's Linux logon Password

Su user2 // switch to user user2

Vncpasswd // set the user's user2 logon Password

Exit

 

Iv. Summary

For the configuration file/etc/sysconfig/vncservers

The correct syntax for multiple users is:

Vncservers = "1: Root 3: admin"

Vncserverargs [2] = "-geometry 800x600-nolisten TCP-localhost" (with "1: Root)

Vncserverargs [4] = "-geometry 800x600-nolisten TCP-localhost" (with "3: admin)

The root login port is 5901.

The logon port of admin is 5903.

Now the vncserver server has been configured. Use the client to remotely perform graphical interface. Note that when the VNC is remote, the first port is 5901 by default, and the second interface is 5902, and so on. Therefore, when using the VNC client remotely, pay attention to it. Otherwise, the connection fails.

Centos6.5 vncserver installation and configuration

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.