Configuring VNC Server in CentOS

Source: Internet
Author: User

Environment: CentOS 6.4

1. Installation of tigervnc-server and related software

First check if the Tigervnc-server installation package is installed in the system

Rpm-qa Tigervnc-server

If not, install directly

Yum Install tigervnc-server*

2, modify the Vncserver configuration file, configure the user and resolution

Configuration file for Vncserver/etc/sysconfig/vncservers

Follow the last two lines of comments, corresponding to your own settings, add a new two lines

Vncservers= "2:test"

vncserverargs[2]= "-geometry 1024x768"

Vncservers= "2:test" in 2 represents Port 5902, which is accessed through the host ip:5902. Test is the user name of the system, which must exist in the host, and if it does not exist, create the user.

For example, your host IP is 192.168.1.10, then through the setup, using VNC client login 192.168.1.10:5902, is the login test user.

vncserverargs[2]= "-geometry 1024x768" is the setting of the screen resolution (which can be set according to your own screen resolution).

3. start the VNC Server service

Switch to administrator, restart service

Service Vncserver Restart

4. Configure Iptables Firewall

In the second step we use 5902 port, so we should open the corresponding port in iptables, otherwise we can't access the host from outside.

Iptables-a input-p tcp–-dport 5902-j ACCEPT

Service Iptables Save

5. Set Vncserver service to start

Chkconfig–level 345 Vncserver on

6. Testing

Testing under windows, I'm using the RealVNC viewer

Open the program, enter 192.168.1.10:5902 will default login test user

Configuring VNC Server in CentOS

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.