Social Icons

Sunday, January 13, 2013

Setting Up VNC Client For CentOS VPS Tutorial

If you try to find a tutorial on "How to Install a VNC on CentOS." Well, here is a guide for you!

How to Install VNC on CentOS 5.x?


On SSH enter this command:

   yum install update


  yum install vnc-server


If Asking for a Permission to Install a VNC Server then Press "y" (without quotas) and hit enter.

  yum install vnc


If Asking for a Permission to Install a VNC Server then Press "y" (without quotas) and hit enter again.

 yum groupinstall "GNOME Desktop Environment"


This will take long time(upto 20 - 30 minute - depend on your Server Internet speed)

yum install nano


Nano would usually be on your VPS already, this is just to make sure!

nano /etc/sysconfig/vncservers


Replace this file /etc/sysconfig/vncservers with:

VNCSERVERS="2:root" 
VNCSERVERARGS[1]="-geometry 640x480"


Next Command:

    vncserver


If this will asking for a enter your VNC Password then enter your root password(do not enter any other password otherwise your VNC not work or show a blank screen)

You will get this Line..

    New 'hostname.yourdomain.com:1 (root)' desktop is hostname.yourdomain.com:1

    Starting applications specified in /root/.vnc/xstartup
    Log file is /root/.vnc/hostname.yourdomain.com:1.log


Final Step:

 nano /root/.vnc/xstartup


Uncommant this two lines:
  :#unset SESSION_MANAGER 
   #exec /etc/X11/xinit/xinitrc


and change last line with this line:

   exec gnome-session &


kill ur VNCserver

    vncserver -kill :1


And restart it with:

   vncserver


You will get this:

    New 'hostname.yourdomain.com:1 (root)' desktop is hostname.yourdomain.com:1

    Starting applications specified in /root/.vnc/xstartup
    Log file is /root/.vnc/hostname.yourdomain.com:1.log



Done.... now you can access your VNC using your VPS Main

IP Address:
example: x.x.xx.x:Port


@hackingtricksmaster

No comments:

Post a Comment