VNC Configuration

Ratings:
(4)
Views:139
Banner-Img
  • Share this blog:

VNC stands for Virtual Network Computing and it was developed at the Olivetti & Oracle Research Laboratory (Cambridge, England) in 1994. Originally running on an ATM-connected thin client device, it was ported to other platforms, including Win32, UNIX, GNU/Linux, and Mac OS. I this a remote display system which allows a thin client (called the VNC viewer) to remotely access a desktop GUI environment on another computer over the network. Since it is platform independent, you can remotely run an Apple desktop from a Windows client, or a UNIX desktop from an Apple client, and so on. VNC allows viewing and operating the console of other computer remotely. Generally it is also known as Remote Frame Buffer (RFB). This document covers the installation of VNC server on Linux Redhat AS 4 and setting up VNC client on Windows XP machine to operate the Redhat Linux server remotely.   1. Server Side Configuration 1.1. Login as root on Redhat Linux Server. 1.2. First we need to check the VNC packages installation. rpm -qa | grep vnc # rpm -qa | grep vnc vnc-server-4.0-8.1 vnc-4.0-8.1 The vnc package is installed as shown above. I f not then install vnc package. 1.3. To start the VNC on system boot time, # chkconfig --level 345 vncserver on  

chkconfig - is a simple command line tool to updates and queries runlevel information for system services - - level Specifies the run levels where the operation should affect. I t is given as a string of numbers from 0 to 7. For example, --level 35 specifies runlevels 3 and 5. 0 – Halt 1 – Single User Mode 2 – User Defined 3 – Full Multi User Mode 4 – User Definable 5 – Full Multi User Mode (X-Based login screen) 6 – Reboot

  Note: On system reboot the VNC-based X sessions will be updated in the /etc/ sysconfig/ vncservers file and will be start automatically. 1.4. The next step is to uncomment the following lines and add all the VNC sessions required to start at the startup time in the /etc/ sysconfig/ vncservers file. VNCSERVERS= "1: root 2:oracle" VNCSERVERARGS[1]= "-geometry 800x600" # vi /etc/ sysconfig/ vncservers   vncservers file before update

# The VNCSERVERS variable is a list of display:user pairs. # # Uncomment the line below to start a VNC server on display :1 # as my 'myusername' (adjust this to your own). You will also # need to set a VNC password; run 'man vncpasswd' to see how # to do that. # # DO NOT RUN THIS SERVICE if your local area network is # untrusted! For a secure way of using VNC, see # < URL:http: / /www.uk.research.att.com/ vnc/ sshvnc.html> . # VNCSERVERS= "1:myusername" # VNCSERVERARGS[1]= "-geometry 800x600"

  vncservers file before update

# The VNCSERVERS variable is a list of display:user pairs. # # Uncomment the line below to start a VNC server on display :1 # as my 'myusername' (adjust this to your own). You will also # need to set a VNC password; run 'man vncpasswd' to see how # to do that. # # DO NOT RUN THIS SERVICE if your local area network is # untrusted! For a secure way of using VNC, see # < URL:http: / /www.uk.research.att.com/ vnc/ sshvnc.html> . VNCSERVERS= "1: root 2:oracle" VNCSERVERARGS[1]= "-geometry 800x600"

  1.5. Now login as the user for whom you want to configure VNC or use this command to login. # su – oracle 1.6. Run the vncserver command to configure the VNC-based X session. Note: Replace N (vncserver :N) with a number greater than zero. N represents the VNC-based X session permanently assigned for a particular user. We will assign 1 as number of sessions.  

$ vncserver :1 You will require a password to access your desktops. Password: Verify: xauth: creating new authority file /home/oracle/ .Xauthority New 'vision.erpstuff.com:1 (oracle)' desktop is vision.erpstuff.com:1 Creating default startup script /home/oracle/ .vnc/ xstartup Starting applications specified in /home/oracle/ .vnc/ xstartup Log file is /home/oracle/ .vnc/ vision.erpstuff.com:1.log

   Note: The above command (vncserver :1) will create the $HOME/ .vnc> directory for the user and will ask for a VNC password. This password will be requested by the VNC viewer program when connecting from a remote machine. 1.7. I f the user wants to change the VNC password, in future the following command will be used: $ vncpasswd Password: Verify: 1.8. By default VNC uses the twm windows manager. We will configure GNOME (the default environment in Red Hat Enterprise Linux) desktop environment. Open the $HOME/ .vnc/ xstartup file using vi editor and comment out or delete the lines that start with xterm and twm. $ cd ~ $ pwd /home/oracle $ cd .vnc $ vi xstartup Add gnome-session & as shown below, 1    1.9. Save the file. Note: I f you want to use KDE, add the following line instead of gnome-session &, startkde & 1.10. After setting the desktop, the existing VNC-based X session must be killed through this command.

$ vncserver -kill :1 Killing Xvnc process ID 3218

 1.11. Restart the VNC session for the effect of the changes. Enter the following commands to restart the newly configured VNC session:  

vncserver :1 New 'vision.erpstuff.com:1 (oracle)' desktop is vision.erpstuff.com:1 Starting applications specified in /home/oracle/ .vnc/ xstartup Log file is /home/oracle/ .vnc/ vision.erpstuff.com:1.log

  Server side configuration is competed now we will configure the Windows XP client machine   <<<<<<<<<--------------------****************-------------------->>>>>>>>>>>>> 2. Client Side Configuration 2.1. First of all we need the VNC viewer software. To download visit the following link, http: / /www.realvnc.com/download.html 2.2. Download any of the following two options of VNC Free Edition Viewer for Windows. 2 Note: I f you are going to download Zip Archive then you need WinZip software to extract the executable file. http: / /www.winzip.com/ 2.3. Extract or place the file in a folder on your local drive. C: \ vncviewer 2.4. On running the exe file on your windows client and the following screen will appear. 3 2.5. Enter IP address of your VNC server we configured above in the following format, IP address :1 Note: For security reasons the IP address is not shown here but hope there should be no issue in providing your server IP in this field. Don’t forget to click on Options button to have few setting of vnc viewer. 2.6. Enter the password same we set above while configuring server side, 4 2.7. The following options screen will appear, 5 2.8. By default, VNC starts up only a simple window manager and a terminal window. To avoid the above options screen we will perform the following steps and will uncomment the unset and exec lines and will add shost + in the xstartup file as shown below, 6 2.9. Save the file after modification. 1.12. After setting the desktop, the existing VNC-based X session must be killed through this command.

$ vncserver -kill :1 Killing Xvnc process ID 3218

   1.13. Restart the VNC session for the effect of the changes. Enter the following commands to restart the newly configured VNC session:

vncserver :1 New 'vision.erpstuff.com:1 (oracle)' desktop is vision.erpstuff.com:1 Starting applications specified in /home/oracle/ .vnc/ xstartup Log file is /home/oracle/ .vnc/ vision.erpstuff.com:1.log

 2.10. Here is the Linux Redhat server desktop on you windows XP client. 7        

You liked the article?

Like : 0

Vote for difficulty

Current difficulty (Avg): Medium

Recommended Courses

1/15

About Author
Authorlogo
Name
TekSlate
Author Bio

TekSlate is the best online training provider in delivering world-class IT skills to individuals and corporates from all parts of the globe. We are proven experts in accumulating every need of an IT skills upgrade aspirant and have delivered excellent services. We aim to bring you all the essentials to learn and master new technologies in the market with our articles, blogs, and videos. Build your career success with us, enhancing most in-demand skills in the market.


Stay Updated


Get stories of change makers and innovators from the startup ecosystem in your inbox