|
VNC
Networking Information Site
|
- VNC
VNC
stands for Virtual Network Computing. It's a FREE remote
display system which allows you to view a computing 'desktop'
environment not only on the machine where it is running,
but from anywhere on the Internet and from a wide variety
of machine architectures. (No file transfer capability,
however.)
VNC consists of two types of component. A server,
which generates a display, and a viewer, which actually
draws the display on your screen. There are two
important features of VNC:
- The server and the viewer may be on different
machines and on different architectures. We expect
the most common use to be the display of a Unix X desktop
on a PC, for example. The protocol which connects
the server and viewer is simple, open, and platform- independent.
- No state is stored at the viewer. Breaking the viewer's
connection to the server and then reconnecting will not
result in any loss of data. Because the connection
can be remade from somewhere else, you have easy mobility.
So, to get started with VNC you need to run a server, and
then connect to it with a viewer. Get the packages for the
platforms you use from the download
page, if you haven't already, and install them. The current
VNC software requires a TCP/IP connection between the server
and the viewer, though there is no reason why the software
couldn't be modified to use, for example, RS232 or Firewire.
We have internal versions that use other network transport
layers. But for now you'll need to know the name or the IP
address of the server machine.
Most people will be running either a Unix server or a Windows
server, though similar principles will apply to other platforms.
Running a Unix server
A VNC server appears, to the Unix applications which
appear on it, to be a standard X display just
like the one you sit in front of; but it doesn't have
a physical screen attached. The applications don't
know this. They just carry on running whether
or not a viewer is connected, in the same way as they
would regardless of whether you were actually looking
at your physical screen.
You can start a new VNC server by typing:
vncserver
on a Unix machine. (If you're sitting at a PC
you may need to telnet to the Unix machine to get a
command shell into which you can type this.) The
vncserver program is a Perl script which you
may need to edit to set up the directories appropriate
for your local installation.
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 will
use the same password, and you can change it at a
later date using
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.
You can cause applications to use them by setting the
DISPLAY environment variable to the VNC server you want,
or by starting the application with the -display
option. For example:
xterm -display snoopy:2 &
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:
vncserver :2
Nothing will appear immediately as a result of starting
a server. To see anything you need to connect a viewer
to the server. See below. The server will generate
a log in your ~/.vnc directory. If you have
problems at this stage, see the full documentation
and the FAQ
.
Killing a Unix server
You can kill a Unix VNC server using, for example:
vncserver -kill :2
|
Running a Windows server
Install the Windows server, WinVNC, by running the
Setup program included in the distribution.
This will create a VNC group in your Start Menu.
Install the default registry settings using the option
in the VNC group.
Run the WinVNC server. If this is the first time
you've used WinVNC 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. Normally you'll
want to leave the other options on their default settings.
(Note that the default display number is 0 on a PC.
You'll need to specify this to the viewer when you
connect.) Click OK and the server should be
running. It will install a small icon on the
system tray, and by right-clicking on this you can
control most aspects of the server. (Full instructions
for installing and running the WinVNC
server can be found under the main
documentation.)
You can now go to another machine and connect a viewer
to the server. (see below)
|
|