#

## VNCviewer for Windows

If you install the Windows server, the viewer is also installed and is available from the VNC section of the start menu. But you can start it in other ways, and you can use the viewer without installing the server.

You can run the windows vncviewer from the command line or from a shortcut and it will prompt you for a display:

`vncviewer`

You can specify a display on the command line:

`vncviewer snoopy:2`

And you can run it with -h to get a list of other important options. The full list is below. These can all take either`-` or `/` as the switch character. Most of the options can also be set from the 'Options...' dialog box which is available from the initial connection prompt before connecting, and some from the system menu by clicking the VNC logo in the top-left corner of the window after connection, and selecting 'Connection options...'.

The system menu also allows you to see some information about the connection, start new connections, and send a Ctrl-Alt-Del to a remote machine. This will only have an effect if the remote server is able to interpret it, currently only true for WinVNC running as a service under NT 4.

Keystrokes such as Ctrl-Esc and Alt-Tab may be interpreted at the local (viewer) machine. If you want to send them to the remote machine, you can use the options on the viewer menu to send individual Ctrl-down, Ctrl-up, Alt-down and Alt-up keystrokes. For example, to type Ctrl-Esc on the remote machine, send Ctrl-down using the menu, press Esc, and then send Ctrl-up (or just tap the Ctrl key) to release the Ctrl key at the remote end.

### Command line options:

`-shared`
  When you make a connection to a VNC server, all other existing connections are normally closed. This is for security reasons, and because we normally think of VNC as a tool for mobility: your desktop follows you from place to place. This option asks the server to leave any existing connections open, allowing you to share the desktop with someone already using it. Some servers have options to change the default behaviour and to override this request.
`-8bit`
  The viewer will normally accept whatever pixel format the server offers and do the translation locally. This forces it to request 8-bit true-colour (BGR233) from the server, which will reduce network traffic. Useful over modems.
`-config` file
  You can save all the details of an open connection to a file using a command from the menu. You can then restart that connection at a later date by specifying the name of the file using this switch.
`-register`
  This tells the Windows shell that .vnc files are associated with the vncviewer. You should then be able to double-click on them to start the session. Sometimes Windows seems to need restarting before this take effect.
`-scale` n`/`m
  Specify a scaling factor for the local display. The values n and m should be integers. The '/' and the m can be omitted if m=1.
`-emulate3`
  Users with a two-button mouse can emulate a middle button by pressing both buttons at once if this option is enabled on the command line or in the dialog box. Note: On recent versions of the viewer this is the default, so there's now a -noemulate3 option to turn it off if wanted.
`-noemulate3`
  Opposite of `-emulate3`
`-swapmouse`
  This option was more commonly used before the 3-button emulation was available. Normally the PC buttons left-middle-right are mapped on to X buttons 1,2,3. This switch causes them to be mapped onto buttons 1,3,2, which may be more useful for two-button users who only have left-right, because they will then get buttons 1 & 2 instead of 1 & 3.
If combined with 3-button emulation, this also causes the middle button to emulate button 3 instead of button 2. This may be useful if you use button 2 more.
`-emulate3timeout`
  When using 3-button emulation, both mouse buttons must be pressed within a certain period for them to be registered as a single middle-click instead of separate left and right clicks. This option allows that time period to be specified in msec. The default is 100.
`-emulate3fuzz`
  When using 3-button emulation, both mouse buttons must be pressed within a certain distance of each other for them to be registered as a single middle-click. This option allows that distance to be specified in pixels. The default is 4.
`-fullscreen`
  This causes connections to start in full-screen mode by default. See below for more details.
`-listen`
  In the internal version of VNC used at AT&T Labs Cambridge, the server can initiate connections to the clients under CORBA control. This switch puts vncviewer into listening mode where it can accept these connections, but it also has a useful side-effect which may be of interest to those outside AT&T using the public version. A listening vncviewer does not pop up a connection dialog, but instead installs itself in the system tray. From there you can easily start up new connections and can set default options to be used for them during this instance of the program. RECENT NEWS! The latest versions of WinVNC can initiate the connection to a viewer using the 'Add New Client' menu option. For this to work, the viewer must be in listening mode.
`-disableclipboard`
  Clipboard changes caused by cutting or copying at either the viewer or server end are normally transmitted to the other end. This option disables clipboard transfers.
`-belldeiconify`
  VNC allows for the transmission of a 'bell' character, causing a beep at the viewer if it has sound facilities. You can set the sound to be used for the bell under the VNCviewer section of 'Sounds' in the Control Panel. Often a beep will happen because you are being notified of something such as email arriving or compilation finishing. This switch causes a minimized vncviewer to be un-minimized when a bell character is received.
`-nocursor, -dotcursor, -normalcursor`
  Most VNC servers send their cursor as part of the screen image that is displayed in the viewer. Having a local cursor in addition to this can be distracting. The default is for the viewer to use a small dot to show the position of the local cursor, and this is our recommended mode of use. You can use the -nocursor option to turn off this local cursor completely, or -normalcursor to leave it at the default Windows 'arrow'. Some things to note here:
  - When you press a mouse button, it is the local mouse position that is used to send the event. On a slow network, the remote cursor may lag behind the local one a bit. You don't need to wait for it to catch up before you click, but if you have switched off the local cursor display, it can be harder to know exactly where you're clicking!
  - The X-based server has an option which tells it not to show a cursor. This can be useful if combined with -normalcursor at the viewer, particularly on slow networks. However, the cursor will then never change shape - it will always be the arrow.
  We like the default dot the best!
`-keyboard kbdname`
  Windows uses an internal and not very helpful name for the keyboard layout currently selected for an application. You can see the one being used by vncviewer if you select 'Connection Info' from the system menu of the viewer window. If you change the keyboard settings and then make a note of this, you can specify it on the command line to cause vncviewer to attempt to load this in the future. Note that vncviewer does not currently support 'dead keys', and that the differences between language and keyboard are confusing and the way they are handled is different in Windows 95 and NT. But this may help a bit.
`-logfile filename`
  VNCviewer (R6 and later) has a logging mechanism which can save some debugging information to a file or display it on a console. This option specifies the name of a file to which a log will be written.
`-loglevel n`
  This option controls the amount of logging information sent to the log file. The default is zero, and higher values (up to about 12) will provide more detail.
`-console`
  In addition to, or instead of, logging to a file, this option will cause the debugging information to be sent to a console window.
`-viewonly`
  In View-only mode, no mouse or keyboard events will be sent back to the server. This is useful for teaching sessions or other situations where you want to observe but don't want to interfere.
`-restricted`
  In restricted mode, most of the items are removed from the menu, so that the user cannot, for example, send a Ctrl-Alt-Del to the remote end.

### Full-screen mode

Vncviewer can now be switched into a fullscreen mode. This is particularly useful when connecting to a remote screen which is the same size as your local one. If the remote screen is bigger, you won't get any scrollbars, but you can scroll by bumping the mouse against the edge of the screen.

To leave fullscreen mode you must disable it from the menu, but the menu is no longer visible! So you have to bring the taskbar to the front by typing Ctrl-Esc Esc, and then right-click on the vncviewer icon. A dialog box will appear when you select fullscreen mode to remind you of this; if, after a while you get annoyed with the dialog box, you can disable it by creating a DWORD registry value named
`HKEY_CURRENT_USER\Software\ORL\`
`VNCviewer\Settings\SkipFullScreenPrompt`

and setting it to 1. A simpler method will be in a future version!

You can cause new connections to start in fullscreen mode using the -fullscreen command-line option.

See also 'What's new in the Windows VNC package?'

go back to documentation

| For comments, feedback, etc, please see the 'Keeping in touch' page. Copyright 1999 - AT&T Laboratories Cambridge