Virtual Network Computing full report.doc (Size: 263 KB / Downloads: 595)
Have you ever found yourself away from home, wishing you had your desktop machine with you Have you ever wished you could show someone, remotely, how to do something instead of talking them through it over the phone These things and much more can be done with a nifty little freeware utility called Virtual Network Computing, or VNC.
What VNC does is this: it enables a remote user (who knows the password) to take control of your machine via the internet. They can view files, run programs, delete stuff, etc. -- in other words, they can use your computer exactly as if they were sitting in front of it, although a bit slower. This might sound a little frightening, and it is, except that you have a good deal of control over the situation. You set the password, you can kick them out if they abuse it, and you have to be online already & have VNC Server running for anyone to access your machine. In reality, youâ„¢ll usually be setting up sessions specifically, or acting as the remote user yourself.
Another nifty thing you can do with VNC is letting someone else watch your screen, but disabling their control over your computer. This is great for showing your newbie friends how to do things -- get them logged on, and do it while they watch. Itâ„¢s a lot easier than explaining it over the phone. The best part about this is that they donâ„¢t need anything special -- just a Java-capable web browser.
2. VIRTUAL NETWORK COMPUTING
Virtual network computing (V.N.C) is a process of controlling a computer by sitting kilometers away through internet. Here we can control a server computer, which is situated kilometers away by sitting in front of a viewer computer. An image of the desktop of the server is brought to our computer and making events in viewer computer we can any work in the server computer. Here internet is used as the communication between the server and the viewerâ„¢s computer.
As the operating system is graphical user interface the controlling is made by mouse events. When we brought the serverâ„¢s desktop to viewerâ„¢s computer the screen resolution of the server and viewerâ„¢s must be same (eg: 800*600). So when a mouse event is happening on a particular pixel (say 300,200), that particular pixel send to the server from the viewer and the change is brought to the viewer. So the user will not feel that two computers are working here. He will get feeling that he is using the server itself.
The V.N.C technique has got a good future in the world of computer communication, since the V.N.C is easy to use, support platform independency and multi-user. It is a 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.
3. GETTING STARTED WITH VNC
VNC consists of two types of component. A server, which generates a display, and. a viewer, which 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. Get the packages for the platforms you use from the web and install them. The current VNC software requires a TCP/IP connection between the server and the viewer.
Most people will be running either a Unix server or a Windows server, though similar principles will apply to other platforms. The technology underlying the VNC system is a simple protocol for remote access to graphical user interfaces. It works at the frame buffer level and therefore applies to all operating systems, windowing systems, and applicationsâ€indeed to any device with some form of communications link. The protocol will operate over any reliable transport such as TCP/IP. The endpoint with which the user interacts (that is, the display and/or
input devices) is called the VNC client or viewer. The endpoint where changes to the frame buffer originate (that is, the windowing system and applications) is known as the VNC server .VNC is truly a thin-client system. Its design makes very few requirements of the client, and therefore simplifies the task of creating clients to run on a wide range of hardware.
3.1 Adaptive Update
A set of rectangles of pixel data makes a frame buffer update(or simply, update). An update represents a change from one valid frame buffer state to another. In this sense, an update is similar to a frame of video. It differs, however, in that it usually affects only a small area of the frame buffer. Each rectangle may be encoded using a different scheme. The server can therefore choose the encoding most appropriate for the particular screen content being transmitted and the available network bandwidth. The update protocol is demand-driven by the client. That is, an update is only sent by the server in response to an explicit request from the client. All screen changes since the clientâ„¢s last request are coalesced into a single update. This gives the protocol an adaptive quality: the slower the client and the network, the lower the rate of updates. On a fast network, for example, as the user drags a window across the screen it will move smoothly, being drawn at all the intermediate positions. On a slower linkâ€for example, over a modemâ€the client will request updates less frequently, and the window will appear at fewer of these positions. This means that the display will reach its final state as quickly as the network bandwidth will allow, thus maximizing the speed of interaction.
The input side of the VNC protocol is based on a standard workstation model of a keyboard and multi button pointing device. The client sends input events to the server whenever the user presses a key or pointer button, or moves the pointing device. Input events can also be synthesized from other nonstandard I/O devices. On the Video tile, for example, a pen-based handwriting recognition engine generates keyboard events.
3.3 Connection Setup and Shutdown
To establish a client-server connection, the server first requests authentication from the client, using a challenge-response VNC server VNC viewer (client)VNC protocol scheme; the client typically requires the user to enter a password at this point. The server and client then exchange messages to negotiate desktop size, pixel format, and encoding schemes. The client requests an update for the entire screen, and the session begins. Because of the stateless nature of the client, either side can close the connection at any time without adverse consequences
3.4 VNC Viewers
In day-to-day use, we prefer the more descriptive term viewer to the rather overloaded word client. Writing a VNC viewer is a simple task, as indeed it should be for any thin client system. It requires only a reliable
transport (usually TCP/IP), and a way of displaying pixels (either writing directly to the frame buffer or going through a windowing system).We have written viewers for all the networked display devices available at ORL. These include the Video tile (the original VNC viewer), an X-based viewer (which runs on Solaris, Linux, and Digital Unix workstations), a Win32viewer that runs on Windows NT and 95, and a Java applet that runs on any Java-capable browser (including Sunâ„¢s Java Station). Members of our lab use these viewers on a daily basis to access their personal computing environments.
3.4.1 Running a Viewer
You can now go to another machine and connect a viewer to the server. When you run the viewer, you need to specify the name of the server and the number of the desktop. If, for example, you have started a
server as display 2 on a machine called Ëœsnoopyâ„¢, you can start a viewer for it by typing:
vnc viewer snoopy:2
With 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. In this case, 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.
Writing a VNC server is slightly harder than writing a viewer. Because the protocol is designed to make the client as simple as possible, it is usually up to the server to perform any necessary translations (for example, the server must provide pixel data in the format the client wants). We have written servers for our two main platforms, X (that is, Unix)and Windows NT/95.The X-based server was the first one we developed. A single Unix machine can run a number of VNC servers for different users, each representing a distinct VNC desktop. Each desktop is like a virtual X display, with a root window on which several X applications can appear. The Windows VNC server was a little more difficult to create. Windows has fewer places to insert hooks into the system to monitor display updates, and the model of multi user operation is less clearly defined. Our current server simply mirrors the real display to a remote client, which means that only a single VNC desktop is available from any one PC. The X-based server, the X viewer, the Win32 server, andWin32 viewer can all fit on a single floppy disk. We have also created thin servers which produce displays other than desktops, using a simple toolkit. A VNCCD player, for example, generates a CD player user interface using VNC directly without any reference to a windowing system or frame buffer. Such servers can run on very simple hardware, and can be accessed from any of the standard VNC viewers.
3.5.1 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.
A variety of desktops being accessed from different viewers: (a) a Unix desktop from a Windows viewer, (b) a Windows 95 desktop from an X viewer, © a Unix desktop from a Java applet within Internet Explorer, and (d) a Windows desktop using Netscape on Unix.
VNC AFTER INSTALLATION
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. With a PC X server, if your PC crashes or is restarted, all the remote applications will die. With VNC they go on running.
Â¢ It is small and simple:
The Win32 viewer, for example, is about 150K in size and can be run directly from a floppy. There is no installation needed.
Â¢ 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. The simplicity of the protocol makes it easy to port to new platforms. We have a Java viewer, which will run in any Java capable browser. We have a Windows NT server, allowing you to view the desktop of a remote NT machine on any of these platforms using exactly the same viewer. And other people have ported VNC to a wide variety of other platforms. Click the ËœContributedâ„¢ button on the left for details.
Â¢ It is sharable:
One desktop can be displayed and used by several viewers at once, allowing CSCW-style applications.
Â¢ It is free:
You can download it, use it, and redistribute it under the terms of the GNU Public License Both binaries and source code are available from the download page along with a complete copy of this documentation.
Â¢ Doesnâ„¢t have modem access or features.
Â¢ Display can be a bit slow, jerky, and/or incomplete
6. ADVANCE FEATURES
How do I make VNC go faster
We find VNC to be perfectly acceptable as our normal method of accessing Unix desktops on a daily basis. This is over a 10 Mbit/s ethernet on reasonably modern machines, using the X or Win32 viewer. Because Windows gives us fewer hints about what itâ„¢s doing, and because we donâ„¢t have the source code for Windows in the same way that we do for X, the WinVNC server has to work harder to find out whatâ„¢s changed, and so a really fast machine should make a big speed difference. For more information about how the Windows server works. But if youâ„¢ve been disappointed by the speed of the Windows server, donâ„¢t give up. Weâ„¢re improving it gradually, but itâ„¢ll be a while before itâ„¢s as fast as on Unix.
There are several things that can slow any VNC session down, however, and you may like to consider these if you find it too slow: Unusually Ëœbusyâ„¢ desktops. The VNC protocol is very efficient at rendering areas of a single colour, such as you generally find on window title bars, scrollbars, backgrounds of pages etc. But if, for example, you
have pretty 24-bit photographs of your girlfriend as your screen background, or dithered title-bars on your windows, you may pay a price for the aesthetics. A colourful or patterned desktop background will probably slow down VNC more than any other single factor. We have some suggestions on speedint up the twm window manager some Of which will also apply to other environments.
Hi-colour desktops. Donâ„¢t use 24-bit colour if you can use 16 or 8 equally well. Remember, on Unix you can run multiple servers, so I have a big 16-bit desktop for normal work and a small 8-bit one for when I log in from home. The server can send out a wide range of pixel formats, and some viewers will allow you to request a specific format for that session. On the Windows viewer, for example, if you click Options.., when making the connection, you can request only 8-bit pixels from the server - useful if the network gets slow. If you are using a modem, I recommend changing the shortcut in the Start menu to include the /8bit option - this will then be the default. Similarly, if you regularly connect to a remote WinVNC server, consider whether you could run happily at lower resolution. A 1280x1024 screen has more then 4 times as many pixels as a 640x480 one, and if all you are doing is checking a printer queue you probably donâ„¢t need them all! Note, though, that on WinVNC, 16-bit colour is usually the best to use. See below.
Elderly graphics cards or drivers may make quite a difference; this is a graphics-intensive application! On Windows the graphics system on. the server will affect the speed as well as the one on the viewer.
Some applications are not very economical about redrawing their display. Early versions of Unix Netscape, for example, tended to draw everything twice when scrolling, which did nothing to help the smoothness under VNC. XllAmp flashes its display very fast when in Ëœpauseâ„¢ mode.
Some Java Virtual Machines are particularly fast at reading from the network and particularly slow at drawing to the screen, or vice versa. With the Java viewer it is worth experimenting with the encodings available from the Options menu, as we sometimes find big differences in speed.
If you are connecting to WinVNC, donâ„¢t change the default settings in the Properties box unless you need to.
All the standard clients can do local rectangle copying, and this generally means that dragging a full window on X is much faster than dragging its outline. If your window manager allows this, it may speed things up. Roman Mitnitski also reports that when he increased the mouse dragging threshold (-t option of the server) the performance was improved.
Generally, with WinVNC, use 16-bit colour (65536 colours) on the server if you can. 16-bit is almost always the best depth to use, because:
256-colour screens have to be palette-converted before they can be transmitted to truecolour clients. Only if the client is 256-colour palette- based will you see any performance increase.
Even if the client is 256 colour truecolour, itâ„¢ll have to convert via a
32-bit truecolour palette!
1. 24-bit screens have to be specially munged via 32-bit since VNCâ„¢s internal colour-handling routines donâ„¢t work with 24- bit directly.
2. 24 and 32-bit screens have to have each pixel looked up in three tables to get the converted value.
3. Graphics cards claiming to do 24-bit often actually do 32-bit with munging - this in many cases makes 24-bit slower just for general use than 32-bit!
4. Finally, 16-bit involves no palette processing and a single lookup in a cached src format to dest format table to convert the pixels. On slow links, you may also want to use some software to compress the data between the two ends. SSH or Zebedee can be used for this.
How secure is VNC
Access to your VNC desktop generally allows access to your whole environment, so security is obviously important. VNC uses a challenge-response password scheme to make the initial connection the server sends a random series of bytes, which are encrypted using the password typed in, and then returned to the server, which checks them against the Ëœrightâ„¢ answer. After that the data is unencrypted and could, in theory, be watched by other malicious users, though itâ„¢s a bit harder to snoop a VNC session than, say, a telnet, rlogin, or X session. Since VNC runs over a simple
single TCP/IP socket, it is easy to add support for SSL or some other encryption scheme if this is important to you, or to tunnel it through something like SSH or Zebedee.
SSH allows you to redirect remote TCP/IP ports so that all traffic is strongly encrypted, and this can be combined with VNC. SSH can also compress the encrypted data - this can be very useful if using VNC over slow links. Zebedee is a similar system which can be sometimes simpler to use.
While weâ„¢re on the subject of security, you should also be aware that only the first 8 characters of VNC passwords are significant. This is because the Ëœgetpassâ„¢ call used in the Unix server to read a password has this restriction, and the other platforms have been made compatible with this. Wolfram Gloger < has built Xvnc with the TCP Wrapper library, allowing you more control over which hosts are allowed to connect.
Are you going to make it more secure
We do hope eventually to add better security to VNC, but thereâ„¢s also a good argument for not doing so. If security is a concern, it can be better to use a single system such as SSH, FreeS/WAN, or Zebedee to encrypt all your traffic, rather than relying on the individual packages to do the right thing. Then, if you decide in a yearâ„¢s time that one system is too easily crackable, you can replace it yourself and all of your communications will benefit. It may also be easier to fit in with corporate security systems this way.
Could you do file transfer (e.g. by drag & drop) between the two ends
Itâ„¢s certainly possible, but we arenâ„¢t going to do it. File transfer seems simple, but is actually rather complicated to do in a cross- platform way. Some examples: How do you map filenames between platforms with wildly different naming conventions How do you cope with running out of disk space What about permissions How do you do it on platforms which donâ„¢t have a concept of drag and drop Can you interrupt the transfer if itâ„¢s taking too long Can you restart it if it gets interrupted
Since there are a very large number of perfectly good systems out there for transferring files over IP, we arenâ„¢t planning to incorporate it in VNC. It would probably more than double the size of the code, and would introduce all sorts of issues that we, quite frankly, arenâ„¢t interested in! So use the standard file transfer built into Windows, or use FTP, or netcat, or the web, or rep, or ssh, or...
Access important information which you cannot take with you because it is frequently changing or not portable.
Check-up emails and download.
Start/stop any processing or computation if you forgot to do that in the office.
Make simple actions or show how-to collaborating with people in your office.
At ORL, we have used VNC to add mobility to workstation, GUIs, where the concept of at least some form of remote interaction is not new.
1. Bring up the controls for their video recorder on a mobile phone as they drive home from work.
2. Use a modem to dial a telephone answering machine and reprogram it through a graphical interface.
3. Display their car stereo or GPS receiver as part of the dashboard, regardless of the equipment brand installed.
8. FUTURE WORK
We are now building VNC software for a variety of desktop platforms, but it would not be difficult to make remote access practical for a wider range of devices. We can envisage cheap hardware that might, for example, drive a 7-segment LCD and also emit a VNC equivalent over a USB or RS232 link. The VNC commands to draw and erase each Segment could be stored as a sequence of bytes in a small amount of ROM and sent over a communications link when the segment is lit or switched off. Hardware such as this, if made in quantity, could be very cheap and could allow for mobility of much more than just a conventional desktop. If built into television sets, VNC viewers could allow them to act as displays for a very wide range of devicesâ€including, of course, the PC at the office.
http://www.Frequently Asked Questions (FAQ).htm
http://www.Cheapskate Guide to VNC.htm
I express my sincere thanks to Prof. M.N Agnisarman Namboothiri (Head of the Department, Computer Science and Engineering, MESCE), Mr. Zainul Abid (Staff incharge) for their kind co-operation for presenting the seminar.
I also extend my sincere thanks to all other members of the faculty of Computer Science and Engineering Department and my friends for their co-operation and encouragement.
1. INTRODUCTION 1
2. VIRTUAL NETWORK COMPUTING 2
3. GETTING STARTED WITH VNC 3
4. FEATURES 12
5. LIMITATIONS 13
6. ADVANCE FEATURES 13
7. APPLICATIONS 19
8. FUTURE WORK 20
9. BIBLIOGRAPHY 20