VNC
Index
1. What is VNC
2. How VNC can be used
3. Getting Started with VNC
4. Running a Unix server
5. Running a Windows server
6. Running a Unix viewer
7. Running a Windows viewer
8. Using a web browser as a viewer
What is VNC
VNC stands for Virtual Network Computing. It is remote control software
which allows you to view and interact with one computer using a simple
program on another computer anywhere on the Internet. The two computers
don't even have to be the same type. VNC is freely and publicly
available and is in widespread active use by millions throughout
industry, academia and privately.
The important factors which distinguish VNC from other remote display
systems are as follows:
-
No state is stored at the viewer. This means you can leave your
desk, go to another machine, whether next door or several hundred
miles away, reconnect to your desktop from there and finish the
sentence you were typing. Even the cursor will be in the same place.
-
It is truly platform-independent. A desktop running on a Linux
machine may be displayed on a PC. Or a Solaris machine. Or any
number of other architectures. There is a Java viewer so that any
desktop can be viewed with any Java-capable browser. There is a
Windows server, allowing you to view the desktop of a remote Windows
machine on any of these platforms using exactly the same viewer.
- It is small and simple.
- It is sharable. One desktop can be displayed and used by several
viewers at once
How VNC can be used?
VNC allows a person at a remote computer to assume control of another
computer across a network, as if they were sitting in front of the other
computer.
For example, VNC can be used to provide a flexible hot-desking and
road-warrior environment by allowing employees to access their office
desktop and server machines from any machine in the company's offices
or from other remote sites, regardless of the type of computers
involved at either end. An equally popular business application of
VNC is in remote system administration, where VNC is used to allow
administrators to take control of employee machines to diagnose and
fix problems, or to access and administer server machines without
making a trip to the console.
Getting Started with VNC
VNC consists of two types of component.
-
A server:
- runs on the computer you want to remotely
access
- generates a display
- A viewer:
- runs on the computere you are sitting in front of
- actually draws the display on your screen.
To get started with VNC you need to run a server, and then
connect to it with a viewer. VNC software requires a TCP/IP
connection between the server and the viewer. You'll
need to know the name or IP address of the server when you
connect a viewer to it.
Running a Unix server
To X applications, a VNC server appears just like the standard
X display you sit in front of, but without a physical screen attached.
The applications don't know this, they just carry on running whether
or not a viewer is connected. You can start a new VNC server
on a Unix machine by typing:
unix % vncserver
If you haven't run a VNC server before you will be prompted for
a password, which you will need to use when connecting to this
server. All your servers on the same Unix machine will
use the same password, and you can change it at a later date using
unix % vncpasswd
With a normal X system, the main X display of a workstation called
'snoopy' is usually snoopy:0. You can also run as many
VNC servers on a Unix machine as you like, and they will appear
as snoopy:1, snoopy:2 etc, as if they were just additional
displays. Normally vncserver will choose the first available
display number and tell you what it is, but you can specify a display
number if you always wish to use the same one:
unix % vncserver :2
You can cause applications to use a VNC server rather than the
normal X display them by setting the DISPLAY environment variable to
the VNC server you want, or by starting the application with
the -display option. For example:
unix % xterm -display snoopy:2 &
You can kill a Unix VNC server using, for example:
unix % vncserver -kill :2
Nothing will appear immediately as a result of starting a Unix
VNC server. To see anything you need to connect a viewer
to the server.
Running a Windows server
If this is the first time you've used a VNC server on this
machine you'll be prompted to set a password, which you'll need when
you connect to the machine from a remote location. A small icon will
appear in the system tray, and by right-clicking on this you can
control most aspects of the server.
You can now go to another machine and connect a viewer to the
server.
Running a UNIX viewer
If you have started a server as display 2 on machine snoopy, you
can start a viewer for it by typing:
unix % vncviewer snoopy:2
Enter it and click OK, and you will be prompted for your password,
after which you should see the remote display.
Running a Windows viewer
In this case, you will be prompted for the host name (VNC server name)
and display number:
Enter it and click OK, and you will be prompted for your password, after
which you should see the remote display. If you are connecting to a
Windows or Mac server, the display number will be 0 unless you have
explicitly changed it, and can be omitted.
You can run the viewer on Unix and Windows by typing at the command
line:
vncviewer snoopy:2
You need to specify the name of the VNC server and the number
of the desktop. If, for example, you have started a server as
display 2 on a machine called 'snoopy'. Remember that if you are
connecting to a Windows or Mac server, the display number will be 0
unless you have explicitly changed it, and can be omitted.
Using a web browser as a viewer
The VNC servers also contain a small web server. If you connect
to this with a web browser, you can download the Java version of the
viewer, and use this to view the server. You can then see your
desktop from any Java-capable browser, unless you are using a proxy
to connect to the web. The server listens for HTTP connections
on port 5800+display number. So to view display 2 on machine 'snoopy',
you would point your web browser at:
http://snoopy:5802/
The applet will prompt you for your password, and should then display
the desktop.
This document was translated from
LATEX by
HEVEA
.