HomeInstallationinstallation and configuration of the VNC server

installation and configuration of the VNC server

VNC (Virtual Network Computing) is a graphical desktop-sharing system that can be used to control a remote computer. It transmits mouse and keyboard events from one node to another on a network and updates the graphical screen on the other end of the network. Virtual Network Computing is platform-independent. This server makes use of the RFB (Remote Frame Buffer) protocol.

Virtual Network Computing depends on two modules:

VNC server


VNC client

This server listens to the incoming connections from the client. VNC can be used to work on the GUI of your VPS.

Please note that Veeble servers have VNC pre-installed.

1. First check whether vncserver is installed on the server.

yum list vnc-server. 

If not, you can install the package using yum install vnc-server.

yum install vnc-server

2. Set up a vnc password.

Type the ” vncpasswd ” command in the shell. This prompts you to enter the password. You can use a strong password. By default, this is saved in /root/.vnc/passwd


3. Open the file /etc/sysconfig/vncservers to set up in session.

At the bottom add the following lines.

VNCSERVERARGS[1]="-geometry 1024x768 -depth 16"

Here 1 means the session number.

4. Install kde and gnome environments.

yum install kde*
yum install gnome*

5. Setting up vnc startup script.

Open the file /root/.vnc/xstartup and add the following lines to get a KDE desktop.

# Uncomment the following two lines for normal desktop:
startkde &

You can comment on the previous entries.

6. start vnc session

vncserver :1 

and check whether you are able to telnet to port 5901

root@proxy:~# telnet 5901
Connected to
Escape character is '^]'.
RFB 003.008

If you are not able to connect, make sure that port 5901 is open.

8. Testing vnc.

You can download the VNC client from here

After downloading and extracting the VNC client in your Windows machine, open vnc client. In the server field, enter the following details.


This prompts you to enter the vnc password. If everything goes well, you will be able to see the KDE desktop.

7. To kill a vnc session, use

vncserver -kill :1


Download the GNOME Desktop environment to your server:

yum groupinstall "Desktop"

After installing the GNOME Desktop environment then start to install the TigerVNC server

yum install tigervnc-server xorg-x11-fonts-Type1

Now your VNC is installed on your CentOS 6.

Start the VNC server.


This asks you to enter the password now.

VNC Client

Now time to connect to your VNC Server:

First download the appropriate VNC client from here

Then use it to connect to your server.

Use the following entry as the VNC address:


Enjoy your VNC Server

Scroll to Top