Index
Overview
Networking
Running a Windows server
Running a Unix server
Running a viewer
Using a web browser as a viewer
Troubleshooting
Overview
VNC consists of two components. A server, which runs on the computer you want to remotely access, and a viewer, which runs on the computer you are sitting in front of. There are two important features of VNC:
- The server and the viewer may be on different machines and
on types of computer. 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. First of all, you have to download and install the software on the
platforms you want to use.
Networking
VNC software requires a TCP/IP connection between the server and the
viewer. This is the standard networking protocol on LANs, WANs,
broadband and dialup ISP. Each computer has a unique IP address and
may also have a name in the DNS. You will need to know the IP address
of name of the server when you connect a viewer to it.
Sometimes the IP address is fixed, and sometimes it is issued to you
dynamically by your ISP. If it is allocated dynamically, you might
consider using a third party DNS management service. Try typing
"dynamic dns management service" into a google.
Running a Windows server
Installing the Windows server, WinVNC, should create a
RealVNC group in your Start... menu. Run the VNC
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.
The IP address of the computer running the VNC server can be found
by hovering over the tray icon in the system tray. Unless this
computer has a DNS name, you will need to specify this number to the
viewer when you connect.
Full instructions for installing and running the Windows VNC server can be found under the main documentation.)
You can now go to another machine and connect a viewer to the
server.
|
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:
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
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:
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: xterm -display
snoopy:2 &
You can kill a Unix VNC server using, for example:
vncserver -kill :2
Full instructions for installing and running VNC server for Unix can
be found in the documentation.
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,
see below.
|
Running a viewer
You can run the Windows viewer the RealVNC group on the Start... menu.
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.
If the machine running the server does not have a DNS entry, you
probably won't be able to use the name and will have to replace
snoopy with its IP address, for example something that
looks like 123.456.78.9.
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.
Troubleshooting
For more details see the the
documentation. The answers to some common questions can be found
in the FAQ.
If that doesn't help, try searching the archives. There tens
of thousands of items collected over several years.
If you're still having trouble, you could subscribe to the mailing list and ask your
question there.
|