Centos6.3 install vnc

Source: Internet
Author: User

1. Use yum install tigervnc-server to install vnc

2. modify the configuration file

[Root @ localhost ~] # Cat/etc/sysconfig/vncservers
# The VNCSERVERS variable is a list of display: user pairs.
#
# Uncomment the lines below to start a VNC server on display: 2
# As my 'myusername' (adjust this to your own). You will also
# Need to set a VNC password; run 'man vncpasswd' to see how
# To do that.
#
# Do not run this service if your local area network is
# Untrusted! For a secure way of using VNC, see this URL:
# Http://kbase.redhat.com/faq/docs/DOC-7028
# Use "-nolisten tcp" to prevent X connections to your VNC server via TCP.
# Use "-localhost" to prevent remote VNC clients connecting tables t when
# Doing so through a secure tunnel. See the "-via" option in
# 'Man vncviewer 'manual page.
# VNCSERVERS = "10: myusername"

# VNCSERVERARGS [1] = "-geometry 800x600-nolisten tcp-localhost"

Remove # VNCSERVERS = "10: myusername"

# VNCSERVERARGS [1] = "-geometry 800x600-nolisten tcp-localhost" the "#" before the two statements (that is, remove the comment)

Change myusername to the user name you log on to. Set the preceding number. vnc is defined by port + desktop number,

The vnc port is 5900. Here, my desktop number is 10. When connecting to the vnc, the port is 5900 + 10, that is, 5910.

"1" in VNCSERVERARGS [1] indicates that I only open services to one user.

3. Set the password

[Root @ localhost ~] # Vncserver

After entering the vncserver, the system prompts you to set the password.
You will require a password to access your tops.
Password:
Verify:
4. Restart the service

[Root @ localhost ~] # Service vncserver restart

If prompted

Starting VNC server: 1: root
WARNING: The first attempt to start 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...
Cocould not start Xvnc.

/Usr/bin/Xvnc: symbol lookup error:/usr/bin/Xvnc: undefined symbol: pixman_composite_trapezoids
/Usr/bin/Xvnc: symbol lookup error:/usr/bin/Xvnc: undefined symbol: pixman_composite_trapezoids

Install the missing package.

[root@localhost ~]# yuminstallpixmanpixman-devellibXfont

Restart again.

5. We recommend that you add this port to the firewall and set it to a boot entry.

[root@localhost ~]#iptables-IINPUT-ptcp--dport5901-jACCEPT
[root@localhost ~]#Chkconfig vncserver on

6. Restart the firewall.

7. Test the connection on the client. The ip address of my server is 192.168.7.198, enter 192.168.7.198: 10 on the client, and the password is the password set in step 3.

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.