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:
add this to the beginning of the file:
Now we have to run the VNC server for the first time:
VNC server is running, but we have run it through Gnome desktop which is our working environment:
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
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