Install VNC and Gnome for Cent OS

To setup remote desktop access on any Cent OS machine you can install VNC + Gnome environment using these simple steps:

First login to your VPS/Server using your SSH client (such as putty) then run these commands:

yum install vnc-server
yum install vnc
yum groupinstall “GNOME Desktop Environment”
yum install nano

Now we have to modify the VNC settings:

nano /etc/sysconfig/vncservers

add this to the beginning of the file:

VNCSERVERS=”2:root”
VNCSERVERARGS[1]=”-geometry 640×480″

Now we have to run the VNC server for the first time:

vncserver

VNC server is running, but we have run it through Gnome desktop which is our working environment:

nano /root/.vnc/xstartup

Now you have to remove “#” from starting lines ‘#unset SESSION_MANAGER’ and ‘#exec /etc/X11/xinit/xinitrc` and change the last line (‘#exec /etc/X11/xinit/xinitrc`) to “exec gnome-session &”.

Now stop and start the VNC server again:

vncserver -kill :1
vncserver

Its ready! You can connect to <ip>:1 using VNC viewer.

Note: You can install your needed applications too. For example you can run this command to install Firefox on your VNC remote desktop:

yum install firefox

Privacy Preferences
When you visit our website, it may store information through your browser from specific services, usually in form of cookies. Here you can change your privacy preferences. Please note that blocking some types of cookies may impact your experience on our website and the services we offer.