Initial VNC Configuration in Desktop VPS

January 9th, 2012 by

As you noticed we started to offer Linux Desktop VPS to bridge the gap between usual Windows users who want to start using linux but dont have enough skills yet to run it completely from command line.

To test with Desktop Linux you have to choose a Desktop Linux operating system when you order your VPS or reinstall your VPS with Linux Desktop version.

Currently we have the following templates for Desktop VPS

CentOS Desktop (Gnome)

Ubuntu Desktop (lxde)

Debian Desktop (Gnome)


Gnome and lxde are common desktop enviroments for Linux OS . Gnome is the more fancy one while lxde is the minimal one.


VNC Initial Setup

the following steps are needed to enable VNC in the VPS (it is not enabled by default)

1- Create VNC User (Optional) :

Generally in Linux we don’t login as root unless we need to and this is even more needed in case of desktop enviroment as some services may not run correctly under user root.

For this we need to create a user just for VNC access

as root

[codesyntax lang="bash" title="Type The following"]
useradd vncuser
su vncuser

2- create VNC Password for the user :
login as the user you want to create vnc password for and execute
[codesyntax lang="bash" title="Type The following"]

to return to root shell type
[codesyntax lang="bash" title="Type The following"]
you will be asked to write a password and verify it (remember it)

3- Activate VNC User:
edit the following file /etc/sysconfig/vncservers by adding those 2 lines

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

first line means that we are adding VNC user 1 as vncuser
second line specify the window size and prevent apps to connect to your xwindows

you can add them using these 2 commands
[codesyntax lang="bash" title="Type The following"]
echo "VNCSERVERS=\"1:vncuser\"" >> /etc/sysconfig/vncservers
echo "VNCSERVERARGS[2]=\"-geometry 800x600 -nolisten tcp \"" >> /etc/sysconfig/vncservers

4- Make VNC server running at system boot:

run the following command

[codesyntax lang="bash" title="Type The following"]

chkconfig --level 5 vncserver on


5- Run VNC server:

run the following

[codesyntax lang="bash" title="Type The following"]

/etc/init.d/vncserver start


You are done. Try to connect to your VNC server using any available VNC client



Post a Comment

Your email is never published nor shared.

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>

Copyright 2013 Servarica | All Rights Reserved | Designed By Webdevia