Centos6.3 install vnc

Source: Internet
Author: User
1. use yuminstalltigervnc-server to install vnc2 and modify the configuration file [root @ localhost ~] # Cat/etc/sysconfig/vncservers # TheVNCSERVERSvariableisalistofdisplay: userpairs. # Uncommentthelinesbelow 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 ~]# yum install pixman pixman-devel libXfont

Restart again.

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

[root@localhost ~]#iptables -I INPUT -p tcp --dport 5901 -j ACCEPT
[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.