Monday, May 7, 2012

How to configure VNC in Linux

VNC is platform-independent – a VNC viewer on one operating system may connect to a VNC server on the same or any other operating system. There are clients and servers for many GUI-based operating systems and for Java. Multiple clients may connect to a VNC server at the same time. Popular uses for this technology include remote technical support and accessing files on one's work computer from one's home computer, or vice versa.

Below are the steps to configure the VNC server in Redhat Enterprise Linux

1) Install vnc packages

   a) vnc-server
   b) vnc

2) vi /etc/sysconfig/vncservers

     add the new user 

     VNCSERVERS="1:sri"              -----> here 1 is your port number i.e 5901
     VNCSERVERARGS[1]="-geometry 1024x768 -depth 16"

3) set the password
   ---- type the command vncpasswd enter the password
   

4) If you want normal desktop then edit the file

   vi ~/.vnc/startup

   -----> uncomment first two lines for noraml desktop

5)  Start the vnc server

    vncserver :1   

6) For stopping you can /sbin/service vncserver stop (or) vncserver -kill :1

7) To connect from your own computer use the vncviewer command

   vncviewer localhost:5901

8) For remote connections

 i)  Change and allow the users to connect to the server

      Preferences--> Remote desktop preferences
   
 ii) open system--->Administration---> security level and firewal in other ports section add the port number

 iii) Add the following line in /etc/sysconfig/iptables before the last line
      -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 5901 

  iV) service iptables save

  v) service iptables restart

9) start the vnc server from remote location

10) ip:port number (192.168.64.128:5901)

Enjoy Vncing....

Related Posts Plugin for WordPress, Blogger...
 

Thinking Redefined Copyright © Arumugam S 2017