VNCRobot CLI Options


SYNOPSIS
To run VNCRobot use one of the following commands. Note that the wrapper scripts can't handle more than 9 parameters. If you need to pass more parameters or customize the VNCRobot start command, use the command with java.

Unix/Linux:
./vncrobot.sh [options]
java -classpath jh.jar:vncrobot.jar com.vncrobot.VNCRobot [options]

MS Windows:
vncrobot.bat [options]
java -classpath jh.jar;vncrobot.jar com.vncrobot.VNCRobot [options]


OPTIONS
-h, --help
Display a shorter version of this help.


-c [server[:display]], --connect [server[:display]]

Connect to a VNC server, e.g. 'localhost', 'localhost:1' etc. The display number corresponds to the port number on which your VNC server is running, :1 is port 5901, :2 is 5902 etc.. If no display number is provided, VNCRobot defaults to 0, i.e. 'localhost' and 'localhost:0' are equivalent.

-p [password], --password [password]
Password to authenticate to the VNC server. The server may or may not require it depending on its configuration.


-v [variablename]=[value], --variable [variablename]=[value]
Override a script variable value. See the documentation on the Var command. Variable values defined through this parameter will remain unmodified for the whole time of script execution and they will override any variable modifications done in the script. You may use this feature to run the same script for different configurations.


-o [optionname]=[value], --option [optionname]=[value]
Redefine a user preference value. Anything that is configurable via the Preferences dialog can be redefined here. Any preference changes redefined this way will be maintained only for the time of the script execution and they are not written to the user configuration file. See the VNCRobot default configuration file for info about option names and acceptable values.


-r [filename], --run [filename]
Run a test script. The file name can be either relative or absolute. This option can be used in both GUI and CLI modes.


-n, [--nodisplay]

Run in the CLI mode. Use this option if you want to execute a script without displaying the VNCRobot GUI.

EXAMPLES
./vncrobot.sh --connect fox.vncrobot.com:2
Connect to a VNC server running on machine fox.vncrobot.com on port 5902. If the server doesn't require any authentication, VNCRobot GUI starts and displays the server desktop in the frame buffer. If the server requires password, a login dialog gets displayed and user has to provide a valid password.


Let's have a test script test.txt:

# This script opens an application on GNOME
# We take advantage of the feature that Alt+F2 opens the Run Application window
Var APPLICATION=""
Press Alt+F2 delay=5000
Typeline "{APPLICATION}" delay=5000

Then commands:

vncrobot.sh -c fox.vncrobot.com:2 -p mypassword -r test.txt -o com.vncrobot.scripting.delayBeforeAutomaticExecutionSeconds=5 -v APPLICATION=gnome-terminal
Connect to a VNC server running on machine fox.vncrobot.com on port 5902 and start automatic execution of a script called test.txt in GUI mode. If authentication succeeds and connection to the server gets established, the GUI gets displayed and a timeout countdown is started. It will last 5 seconds instead of the standard 15 secs because the parameter -o redefines the timeout value. Once the time is out, execution of the script starts. As the APPLICATION variable is redefined by the -v option, the script starts a GNOME terminal window. A shutdown countdown of standard 15 seconds is then initiated. When the time is out, the GUI gets disposed and VNCRobot exits.

vncrobot.sh -c fox.vncrobot.com:2 -p mypassword -r test.txt -o com.vncrobot.scripting.delayBeforeAutomaticExecutionSeconds=5 -v APPLICATION=gnome-terminal -n
This command should provide the same result as the previous one except that no GUI gets displayed and VNCRobot runs in the CLI mode.