VNC logo

Virtual Network Computing
from ORL

ORL

[Home]
[screenshots]
[free?]
[getting started]
[documentation]
[download]
[keep in touch]
[ORL]

back to docs

WinVNC - The Windows NT VNC server

WinVNC in system trayWinVNC is a VNC server that will allow you to view your Windows desktop from any VNC viewer. Because Windows NT in its present, standard incarnation, only supports a single graphical user being logged in at any one time, WinVNC makes the existing desktop of the logged-in user available remotely using VNC, rather than creating a separate desktop. It is only fair to emphasise that VNC does not make an NT machine into a multi-user server in the same way that Citrix-based software, for example, does. A single NT machine can therefore be accessed by multiple users, but not (usefully) at the same time.

However, this is offset to some degree by the fact that WinVNC will run on Windows NT 4.0 and on any future Win32-based systems, without the need to replace any system files or run any OS-specific versions of the program. It is a standard application that can be run from the Start... menu and closed down just as easily.  And, of course, it's free. We hope that making the source code available will enable programmers who know more about the internals of Windows than we do to find ways to improve this aspect of WinVNC.

Installation

WinVNC is fairly simple to install and even easier to use. Installation involves the following steps:

  • Run the WinVNC setup program.
  • Optionally, install the default VNCHooks registry settings by selecting Install Default Registry Settings from the WinVNC folder in the Start menu. This will install the default hooks settings, which are tweaked to cope with some common, uncooperative applications, such as the clock. See later for more information about the registry settings.
  • WinVNC can now be run from the Start menu. Alternatively, you can use the Start->Settings->Taskbar menu to add a shortcut to your Startup group, which will cause WinVNC to be run every time you log in.

Using WinVNC

On starting, WinVNC will add a small, green version of the VNC icon to the system task bar. Clicking on this icon with the right mouse button will cause a menu to be displayed, with the following options on it:

  • Properties - This will cause the Properties dialog to be displayed, allowing the user to change various WinVNC parameters.
  • Kill All Clients - This will disconnect all currently connected clients from the server.
  • Close - Shutdown the server.

WinVNC Properties

The following options are available from the Properties dialog.

Incoming Connections

  • Accept Socket Connections - The server accepts direct, socket-based connections from the vncviewer program, on a specified port number. Clearing this tick-box disables direct connection to WinVNC, so that only the CORBA interface may be used to start a connection. (See ORL internal version info)
  • Display Number - This allows the user to specify the display number which the server will use.
  • Password - Incoming connections must be authenticated to verify that the person connecting is allowed to connect to this machine. This text box allows a password to be specified for authentication. If no password is specified then no authentication is required to connect to the server.

Update Handling

  • Poll Full Screen - Some applications are incompatible with the methods currently used in WinVNC to trap screen updates. For this reason, it is sometimes useful to be able to poll the entire screen in order to check for changes, sacrificing performance for accuracy.
  • Poll Foreground Window - Polling only the currently selected window for changes is less CPU intensive than full-screen polling and often gives similar results, for example when using the Command Prompt, which is not normally compatible with WinVNC.
  • Poll Window Under Cursor - A variation on Poll Foreground Window, this option causes the window under the mouse cursor to be polled for changes. Both options may be enabled simultaneously if required.
  • Poll Console Windows Only - When this option is set, the only windows which will be ever be polled are Command Prompts. This works well in conjunction with Poll Window Under Cursor, to use polling only when the cursor is over a console window.
  • Poll On Event Received Only - When this option is set, the screen will only be polled for updates when a mouse or keyboard event is received from the remote client. This is provided for low bandwidth networks, where it may be useful to control how often the screen is polled and changes sent.

The user's settings are saved into the user-specific section of the registry when WinVNC quits, meaning that they will be used next time you run WinVNC.

VNCHooks - Advanced Settings

WinVNC uses a special library, VNCHooks, to hook into the other running applications and retrieve notifications of areas of the screen being changed.  The VNCHooks library uses the messages sent to visible Windows to decide which areas need considering for update. Not all applications use the same method of updating the screen, so you can tweak the method used by WinVNC for particular applications by editing the registry. All the entries listed can be found under

HKEY_CURRENT_USER\Software\ORL\VNCHooks\Application_Prefs

  • use_GetUpdateRect
    When a window recieves a message, (WM_PAINT), indicating that it should repaint itself, it is possible to find out precisely which regions have changed, so that WinVNC need only scan those for potential updates,increasing efficiency. However, this can cause graphical glitches occasionally, particularly when an application scrolls the contents of its window, in which case only the revealed section of the window is marked as needing to be updated. If these glitches prove to be a problem then edit the <appname>\use_GetUpdateRect entry in the registry. A value of one indicates that this optimisation will be used, while a value of zero indicates that it will not.
  • use_Timer
    A number of Windows applications, most notably the Clock program, use WM_TIMER events to trigger updates to their displays, rather than WM_PAINT messages. By default, timer messages are not used to notify WinVNC of potential updates, since many programs use timer events for purposes other than updating the screen. As a result, the clock and a few other applications don't normally update correctly under WinVNC. The fix to this is to edit the <appname>\use_Timer entry in the registry. A value of one indicates that WM_TIMER messages will trigger WinVNC updates, while a value of zero indicates that they will not.
  • use_KeyPress
    Some Windows applications write characters directly to the screen when a user types into a window, rather than using WM_PAINT messages to cause the text to be redrawn. To fix this, WinVNC can scan the window every time a key is pressed, in order to catch the change. To set this value for a problem application, edit the <appname>\use_KeyPress entry in the registry. A value of one indicates that key presses will cause updates, while a value of zero indicates that they will not.
  • use_LButtonUp
    Some Windows applications update the display directly in response to mouse clicks, without using intermediate WM_PAINT messages, for example. In order to catch such updates, it is necessary to trigger WinVNC to update the relevant window whenever the left mouse button is released. To set this value for a problem application, edit the <appname>\use_LButtonUp entry in the registry. A value of one indicates that left-button clicks will cause updates, while a value of zero indicates that they will not.
  • use_DeferredUpdate
    The VNCHooks library catches messages sent to windows before they are dealt with by the window. As a result, sending an update message to WinVNC to indicate the potential change can result in WinVNC sending the updated area to the client before it has actually been redrawn by the application! This is a common problem, especially on multiprocessor versions of NT, so deferred updates are used by default. Deferred updates are handled by posting a custom message back into the window's own message queue rather than posting to WinVNC directly. By the time this custom message is seen again by the VNCHooks library, the message that caused it will have been handled and the update can then be forwarded to WinVNC without danger of being handled prematurely. A few programs don't handle these extra messages in their queue very well, so this optimisation is optional. It can be set by editing the <appname>\use_DeferredUpdate entry in the registry. A value of one indicates that deferred updates will be used, while a value of zero indicates that they will not.

Other Win32 systems

WinVNC runs on Windows 95 and Windows 98 but has some reliability problems which we are still investigating. It runs fine on NT3.51 but the absence of a system tray means that the Properties dialog cannot be accessed.  It also runs on NT5 beta, though the animated pop-out menus do not update very well.

If you have a choice we recommend NT4.0 with the service packs and IE 4.01 desktop enhancements. The enhanced Start menu uses WM_PAINT messages and so updates better under VNC.

 

back to docsgo back to documentation


Copyright 1998 - The Olivetti & Oracle Research Lab