How to install the VNC server on CentOS 6

Source: Internet
Author: User

Reference: https://rbgeek.wordpress.com/2012/06/26/how-to-install-vnc-server-on-centos-6/

VNC is a protocol, that's used to share, the desktop with other users/computers over the network/internet.in order to share A desktop, VNC server must is install and configure on the computer and VNC client must is run on the computer that would Access the shared desktop.

When we install the minimal copy of the CentOS Server, it is gives us the "Command line" interface.
But the some people prefer GUI instead and for this they the install full version of Gnome on CentOS. Actually there is a better-of-the-and that's to install VNC. VNC provides a lightweight virtual desktop than full blown version of Gnome.

To run of the VNC Server on CentOS, we had to install these required packages:
sudo yum groupinstall Desktop
sudo yum install Tigervnc-server
sudo yum install Xorg-x11-fonts-type1

This is optional:
sudo yum install VNC

To-start VNC Server on boot
sudo chkconfig vncserver on
To setup users ' VNC password:

vncpasswd
Edit the/etc/sysconfig/vncservers File:
sudo nano/etc/sysconfig/vncservers

Add the following to the end of the file:
Vncservers= "1:root"
vncserverargs[1]= "-geometry 1024x600"

The iptables rules need to being amended to open the VNC ports:
sudo iptables-i INPUT 5-m State--state new-m tcp-p tcp-m multiport--dports 5901:5903,6001:6003-j ACCEPT Remove 5 after Operation normal
sudo service iptables Save
sudo service iptables restart

Restart the VNC Server:
sudo service vncserver restart

Now kill the VNC Server:
Vncserver-kill:1

Edit the Xstartup file in. VNC directory:
Nano. Vnc/xstartup

Comment the last line and run the Gnome:
#twm &
EXEC gnome-session & Some files do not exist in this line

Restart the service:
sudo service vncserver restart

sudo service Vncserver save resources after shutting down the service

Edit/etc/inittab to set the start CLI or GUI

How to install the VNC server on CentOS 6

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.