OS/2 eZine

16 June 2000

Robert Basler is the President of Aurora Systems, Inc.

If you have a comment about the content of this article, please feel free to vent in the OS/2 eZine discussion forums.

Previous Article
Next Article

Virtual Network Computing with OS/2

Yup, it's a trick.

If you look at the screenshot below, you will notice Microsoft Word 2000, Visual C++ 6 and PM Fax for OS/2 all on the same display. And no, it's not Odin, at least not yet.

[click here to view this graphic at its full size]

The secret to this unusual image is a program called VNC Viewer, developed by Oracle Research Laboratory and now made available free by AT&T Laboratories. Virtual Network Computing (VNC) allows you to view the desktop of a remote computer running the VNC server software and operate programs using the keyboard and mouse on your local workstation, just like you were sitting at the remote computer.

I started looking for a program like this because I wanted to remote control a Windows 98 computer using my OS/2 laptop. My problem was that the DVD player was on a Windows machine in the next room from my TV, and running out of the room every time I wanted to pause was a real pain - although the exercise was probably good for me.

I have been using VNC for a few weeks now. In addition to running my DVD player, I have started using it for some development work I am doing using Microsoft Visual C++. While it is slightly less responsive than sitting at the remote machine, it is nice not to have to move back and forth from my main OS/2 machine to the Windows NT 4 machine every 2 minutes.

Getting the Software

OS/2 users have a choice of client programs, the PM one is available from http://www.sra.co.jp/people/akira/os2/vnc-pm/index.html This client allows you to use any of the existing servers. The program has a few rough edges, being a version 1.0 product, but is overall stable, quick, and easy to use. It also comes with source, so if any of the minor problems cause you grief, you can fix them.

There are currently servers for Windows 9x, Windows NT, X-Windows, and Macintosh. Sorry, there doesn't seem to be any OS/2 server software yet although the source code is available if anyone is interested in making one. Client software is available for XFree 86/2, X-Windows (UNIX), Windows 9x, Windows NT, Java, Macintosh, Windows CE, and OS/2. If you want to get the VNC server software, or read over the documentation, the complete website is at http://www.uk.research.att.com/vnc

Installing the VNC Windows Server Software

I tested the Windows 9x and Windows NT server software on Windows 98 and Windows NT 4. Installation is as easy as unzipping the server ZIP file (vnc-3_3_3r6_x86_win32.zip) and running Setup. After setup is complete, you will have a VNC folder in your Programs folder. You can then either run the App Mode version of WinVNC (the server) or even better, you can install VNC as a service which allows VNC to work even at the Windows NT login screen.

The first time you run the VNC server software, it will ask you for some important information such as the password that is required to access the server from a remote computer. Once you enter this, VNC is ready to run.

Although VNC uses password security, security in VNC is not designed for high-risk environments, data is not encrypted as it travels over the network, so make sure you take that into account when setting up your server.

Installing the OS/2 PM VNC Client

If you don't already have EMX installed, you will need the EMX runtime libraries version 0.9c or later installed in a directory in your LIBPATH. EMXRT.ZIP is available at http://hobbes.nmsu.edu

To install the PM VNC Client, you need to unzip the PMVNC100.ZIP file in the directory of your choice. Make sure you use the -DIR option if you are using PKZIP to preserve the directory structure in the file. You then create a Program Object for VNCVIEW.EXE and you are all set.

A little TCP/IP Setup Help

Before you try to use VNC Viewer, make sure you have a working TCP/IP setup. The easiest way is to use PING to check the connection between the machines. My LAN uses the IP addresses 192.168.0.X so at an OS/2 prompt I can type

PING 56 data bytes
64 bytes from icmp_seq=0. time=0. ms
64 bytes from icmp_seq=1. time=0. ms
64 bytes from icmp_seq=2. time=0. ms

---- PING Statistics----
3 packets transmitted, 3 packets received, 0% packet loss
round-trip (ms) min/avg/max = 0/0/0

Press Ctrl-Break to stop PING.

It is also handy to set up local host names for the computers you are going to use. To do this, edit the \MPTN\ETC\HOSTS file and add entries for each of your computers. If this file doesn't exist, create it. On each line, put the IP address of the computer, and then the human readable name of the computer. Make sure that the last line in the file is terminated by a CR/LF pair or the last entry won't work. Your host file might look like: virgo gemini

if you had two computers named Virgo and Gemini Also, add the line


to your CONFIG.SYS file to make sure that these host names work even when you aren't connected to a DNS server. After you reboot, you could type ping Virgo which is easier than ping and get the same results.

Using the VNC Client Software

Once you start the VNC Client software you see the connection dialog.

You enter the name of the server, a colon, and then the desktop number. The desktop number is used on UNIX machines where VNC supports multiple desktops. On a Windows server, always use desktop 0. So to connect to Virgo, you would enter



into the dialog box and press Connect. You will then be prompted for a password. Once you enter it, the desktop of the selected remote computer will appear. VNC keeps a list of all the computers you have connected to in the drop box, so you usually will only ever have to type them once. One odd byproduct of Windows single desktop is that if two or more clients connect to the same server, they will all share the same mouse and keyboard.

Once you are connected, if you move your mouse over the VNC Viewer window, you will notice that there is a dot, followed by the mouse cursor on the remote machine. Since there is always a small delay between your movements and screen updates, VNC provides the dot cursor to make it easier to line your mouse up. I have found this to be very effective in day-to-day use. You can then click on programs, type, and do many of the things you would normally do on the other machine.

VNC works using the TCP/IP protocol, so in theory you could operate any computer reachable via TCP/IP, no matter where it is. In practice, I have seen peak transfer rates of 73K/second over my LAN during startup, so you are going to need an ADSL or Cable connection at both ends to see decent performance. If you really want to use dialup and don't mind waiting, typing in a remote word processor requires about 4K/second which most 28.8 modems can deliver.

There are few limitations to what you can do on a remote Windows machine, although there are special things you need to do in some cases. Although Windows NT wants you to press Ctrl-Alt-Delete to log in, if you do, your OS/2 desktop will reboot. For cases like these, VNC Viewer offers a number of options on its system menu. If you are running VNC Viewer full screen, just press Alt-Space to get at this menu, otherwise click on the menu box in the top left corner of the window. This menu offers Ctrl and Alt key combinations, function keys, as well as key combinations like Alt-Tab, Alt-Esc and Ctrl-Alt-Delete. There are even limited cut and paste facilities.

If you shut down the remote machine, the VNC Server will ask you if you are sure that is what you want to do after Windows does. If you confirm, VNC Viewer will disconnect and the remote machine will shut down. Handy.

If you start a fullscreen DOS session on the remote machine, VNC Viewer will continue to work, however you won't be able to see the output. Use the menu to send an Alt-Enter keystroke to convert the fullscreen session to a windowed one that VNC can see.

If you start a game that uses the 3D portion of your video card, you likely will not see anything on your VNC Viewer. In this case, as with the DOS fullscreen, your keyboard is still live so if possible, you can close the application using the keyboard. Usually you can Alt-Tab to the Windows desktop and close it with the mouse.

A Really Cool Feature

VNC Server also includes a tiny HTTP server facility which can provide a Java client to any web browser that connects to the VNC Server. While I didn't try this myself, the possibility of being able to connect to my VNC Server from any remote computer just with Netscape or IE sounds pretty useful.

Is it Perfect?

Unfortunately, I did experience problems with one system running a Matrox G400 and the SDDSE 7.01 drivers available from IBM. With VNC Viewer, the client display does not update correctly, especially if you move a window on the remote machine. Using VNC viewer on a system with different display drivers worked perfectly. This same problem occurs in many programs with the SDDSE drivers so hopefully Scitech will rectify this at some point.

The software can also require a fair amount of CPU time on the server computer. In order to keep track of screen updates, the program uses a variety of polling techniques. The better behaved your application, the less CPU resources are required. Using Microsoft Word takes about 30% of the CPU time on a Pentium III 550 running Windows NT 4. If you have performance problems, you can greatly improve things by reducing the color depth and resolution of the display on the server machine.

I also found a couple of programs that simply didn't work. VNC didn't seem to see when their screens updated. Reading through the documentation, I discovered that the VNC Windows Server offers a number of special tweaks that allow programs such as these to work properly so if you have an application that gives you trouble, you should be able to get it to work.

And What do I Think of it?

If you have a need for Microsoft Windows or X-Windows applications that currently don't run in OS/2, and happen to have a spare computer laying about, or if you need remote control facilities, VNC is a great solution at an amazing price. Assuming you have a working TCP/IP LAN, setup is a breeze, and in day to day use it provides a reliable solution with good performance. Go give it a try.