Remote Desktop (VNC Viewer)


Contents:
1. Remote Desktop Overview
2. Connecting to a VNC Server
3. Login Dialog
4. Disconnecting from a VNC Server
5. Encoding Preferences
6. Refresh Daemon

1. Remote Desktop Overview

Remote desktop panel, also called VNC viewer, represents a VNC client.

When VNCRobot is not connected to any VNC server, the panel displays the default image as is shown on the following picture.

VNCRobot - not connected

When VNCRobot is connected to a VNC server, it displays desktop of the server machine. The viewer becomes active in terms of RFB communication when you move your mouse pointer into the panel bounds. The underlying RFB module then starts to send your mouse moves, clicks and drags to the remote server as well as the keys you press or type on the keyboard. A typical VNC viewer connected to a VNC server running on a Red Hat Linux machine using a GNOME is displayed below.

VNCRobot - connected

2. Connecting to a VNC Server

You may connect to a VNC server in three ways: For a successful connection to a VNC server you need to provide a server name together with a display number and optionally a password.

Server name must be in format '<server name>[:<display number>]', e.g. 'localhost', 'localhost:1' etc. The display number corresponds to the port number on which your VNC server is running. E.g. ':1' represents port 5901, ':2' is 5902 etc. If no display number is provided, VNCRobot defaults to 0, i.e. 'localhost' and 'localhost:0' are equivalent. When you install your VNC server, you are usually asked to set the authentication type. RFB protocol allows no authentication and RFB authentication. The first one allows you to connect without password while RFB authentication requires you to provide a valid password.

3. Login Dialog

Login dialog provides a way to authenticate to a VNC server in GUI mode. It gets displayed when you: Login dialog is shown on the following picture.

Login Dialog

The 'Server and port' field must be populated with the server name and optional display or port number to connect to. While VNC servers on Unix/Linux typically listen on port 5901, the string is 'myserver:1' or 'myserver.mydomain.com:1' (using desktop numbers) or 'myserver::5901' or 'myserver.mydomain.com::5901' (using direct port). If no display number/port is passed, VNCRobot tries to connect to display number :0 (port 5900, typical default value for Windows).

VNC servers are typically protected with passwords but can be also configured to require no security. If no password is provided, VNCRobot attempts to authenticate without password. If the server requires it, a new window is displayed and user has to provide a valid password.

The flags below the password field allow to configure the VNC session:
If you select Work Offline, the VNCRobot GUI gets displayed. You may then connect to a VNC server via the File -> Connect Server or File -> Reconnect Server menu items.

4. Disconnecting from a VNC Server

If you need to disconnect from a VNC server and preserve the VNCRobot GUI open, select Disconnect Server in the File menu. You can also disconnect by execution of the Disconnect command.

If you are connected and you select File -> Connect Server or File -> Reconnect Server menu items to connect to another VNC server, VNCRobot disconnects from the original connection.

5. Encoding Preferences

VNCRobot Preferences window provides since v1.3 a comfortable way to set the image encoding used in the communication with the VNC server. Supported encodings are Raw, RRE, CoRRE, CopyRect, Hextile and Zlib.

Note that preferred encoding type has impact on performance. Raw encoding is the less effective one when updates of the remote desktop image are sent as raw pixels. See specification of the RFB protocol and the documentation on existing VNC servers for more information. he following screenshot shows the coresponding part of the Preferences->Tools->RFB Preferences window:

RFB Encodings

Changes of the order of prefered encodings are sent to server (RFB message SetEncodings) immediately after you close the Preferences window with OK. Be aware that most VNC server implementations take it just as a hint and they typically match it against the encoding types they support. It means that if you place e.g. CopyRect on the first place, it doesn't mean that the server will start to communicate in this encoding only.

6. Refresh Daemon

Refresh daemon is a background process which keeps your VNC session alive. If you don't move your mouse or type a key for a long time, the remote server usually runs a screensaver or locks up the desktop after a certain time. Also some VNC servers are known to close the connection after a period of idle time.

Refresh daemon prevents these situations. It watches the time since your last interaction and when it exceeds a certain value, it moves your mouse by one or two pixels and back. This makes your VNC server think that you are still active and keeps the connection alive.

Note that the Refresh Daemon doesn't run while a script is being executed. This is intended to prevent unwanted interference into the script execution. There's a flag in the Preferences window allowing to change this behavior.

This feature is by default on and the timeout is preset to 5 minutes. To configure it go to Preferences and select the Tools -> Refresh Daemon tree node.