![]() |
![]() |
|
|
![]() |
Getting Started with VNCVNC 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:
Most people will be running either a Unix server or a Windows server.
Running a Unix serverA 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: vncserveron 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 using vncpasswdWith 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 :2Nothing will appear immediately as a result of starting a server. To see anything you need to connect a viewer to the server. See below. Killing a Unix serverYou can kill a Unix VNC server using, for example:vncserver -kill :2 Running a Windows serverRunning a viewerIf you have started a server as display 2 on a machine called 'snoopy', you can start a viewer for it by typing:vncviewer snoopy:2With the Windows viewer, you can run it from the command line, but you will more typically run it from the VNC group on the Start Menu. If you do this, or if you don't specify the server on the command line, you will be prompted for the host 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). If the machine running the server does not have a proper DNS entry, you probably won't be able to use the name and will have to replace snoopy:2 with something like 192.168.1.2:2 . You can get round this on most platforms by creating a 'hosts' file which maps names onto IP addresses. Consult your local guru for help with this. Using the Java viewerThe VNC servers also contain a small web server, which can serve the Java classes needed for a browser to connect back to the server. You can then see your desktop from any Java-capable browser! For some servers you will need to specify the location of the class files when starting the VNC server. 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 before displaying the desktop. That's it! For more details see the documentation. The answers to lots of common questions can be found in the FAQ .
|
|
For comments, feedback, etc, please see the 'Keeping
in touch' page.
|