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.

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.

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.
- Unix/Linux - Unix like systems running X-Windows are capable of
running multiple window servers. Number of your display actually depends
on the number of VNC server instances running on your machine. If you
for example start the VNC server three times on a test machine called
mymachine
,
there will be three independent remote desktops available at mymachine:1
,mymachine:2
and mymachine:3
.
- MS Windows - Since Windows are not capable to run multiple window
servers (i.e. provide multiple displays), the VNC server always runs on
port 5900 and you may provide just the server name, e.g. '
mymachine
'.
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:
- Start VNCRobot application in default mode without the CLI
connect options,
- Start VNCRobot application with CLI connect options and the
connection fails,
- Select File -> Connect Server
or File -> Reconnect in theVNCRobot
menu,
Login dialog is shown on the following picture.

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:
- Shared access to the VNC server - If you leave this flag
on, the VNC server desktop will be shared and anyone can connect to the
and share the desktop. If you deselect this flag, you will run in an
exclusive access mode and only one VNC client will be allowed to be
connected to the VNC server. Any new attempt to connect to the server
then usually disconnects the currently connected client. This flag is
defined by RFB protocol and it is sent to the VNC server during
initialization of connection. You may also modify this flag in the Preferences window. Once you are connected
to a server, you need to reconnect to apply a new value.
- Read-only mode - This flag affects whether the VNC viewer
will accept user interaction or not. If you leave the flag on, you will
be able to see the remote desktop but your mouse moves and keyboard
events will not be sent to the VNC server. This is a preferred way to
watch e.g. script execution. This mode is is not defined by the RFB
protocol and can be switched any time via Read
Only Mode menu item or tool bar button.
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:

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.