Howto install and configure VNC Server on CentOS 6.3 or Redhat RHEL

Howto install and configure VNC Server on CentOS 6.3 or Redhat RHEL

1. Install GNOME Desktop Environnement:

[root@dhcppc1 ~]# yum -y groupinstall “GNOME Desktop Environment”

2. Install KDE Desktop Environnement:

[root@dhcppc1 ~]# yum groupinstall “X Window System” “KDE (K Desktop Environment)”

3. Install VNC Server:

[root@dhcppc1 ~]# yum -y install vnc-server tigervnc-server
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base:
* extras:
* updates:
Setting up Install Process
Resolving Dependencies
–> Running transaction check
—> Package tigervnc-server.i686 0:1.0.90-0.17.20110314svn4359.el6 will be installed
–> Finished Dependency Resolution

Dependencies Resolved

Package Arch Version Repository
tigervnc-server i686 1.0.90-0.17.20110314svn4359.el6 base 1.1 M

Transaction Summary
Install 1 Package(s)

Total download size: 1.1 M
Installed size: 2.9 M
Downloading Packages:
tigervnc-server-1.0.90-0.17.20110314svn4359.el6.i686.rpm | 1.1 MB 00:02
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
Importing GPG key 0xC105B9DE:
Userid : CentOS-6 Key (CentOS 6 Official Signing Key) <>
Package: centos-release-6-3.el6.centos.9.i686 (@anaconda-CentOS-201207051201.i386/6.3)
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : tigervnc-server-1.0.90-0.17.20110314svn4359.el6.i686 1/1
Verifying : tigervnc-server-1.0.90-0.17.20110314svn4359.el6.i686 1/1

tigervnc-server.i686 0:1.0.90-0.17.20110314svn4359.el6

[root@dhcppc1 ~]#

4. Configure a VNC user:

[root@dhcppc1 ~]# su -jackiebui
[jackiebui@dhcppc1 ~]# vncpasswd
[jackiebui@dhcppc1 ~]# ls .vnc/

5. Edit VNC Configuration File:

[root@dhcppc1 ~]# vi /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:

# Use “-nolisten tcp” to prevent X connections to your VNC server via TCP.

# Use “-localhost” to prevent remote VNC clients connecting except when
# doing so through a secure tunnel. See the “-via” option in the
# `man vncviewer’ manual page.

VNCSERVERARGS[2]=”-geometry 800×600 -nolisten tcp -localhost”

6. Start VNC Server:

[root@dhcppc1 ~]# vncserver
[root@dhcppc1 ~]# chkconfig vncserver on

7. Now use VNC viewer to connect to VNC Server:

8. Type your VNC password:

9. Now you can access your VNC Server from everywhere:

That’s all. Thanks for using

4 comments to Howto install and configure VNC Server on CentOS 6.3 or Redhat RHEL

  • jake  says:

    When entering the command below

    yum groupinstall “X Window System” “KDE (K Desktop Environment)”

    I get the error reading this below

    -bash: syntax error near unexpected token `(‘

    How can i fix this problem? Any help would be much appreciated

  • Sugeng Kurniawan  says:

    You are miss step on step 3, the right commands is “yum -y install tigervnc-server”, thanks.

  • Jackie Bui  says:

    jake: you can try set \ before every (

  • Jackie Bui  says:

    Sugeng Kurniawan: you can use both of command : yum -y install tigervnc-server or yum -y install vnc-server .It’s OK

Leave a reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>