Configuration language

When starting, the XmetaX proxy reads configuration statements from the command line or from configuration files (Configuration file).

Statement syntax

A configuration comprises a sequence of configuration statements, which follow some general rules:

Words are separated by arbitrary white space characters. The line structure is irrelevant.

If a word contains white space characters, it has to be surrounded by double quote characters ". This special meaning of the double quote character is overridden by preceding it with a backslash character \.

Keywords are case-insensitive: the meanings of connectTimeout and ConnecttimeOut are identical.

Keywords are not reserved.

Most configuration statements consist of the name of a parameter and its new value. The name may be written with or without a directly following colon :.

Many statements are valid in the context of a meta screen or screen definition only. They are called sub-statements and must be introduced by the appropriate metaScreen (Meta screen), screen or window statement (Screen).

In the case of multiple parameter definitions with the same name, only the last one is valid, with the exception of the serverCommand statement which concatenates all arguments.

The configuration parameters are not evaluated until all configuration statements are read in. This is important with respect to relative positioning statements.

The succeding sections describe the configuration statements by a formal syntax using the following elements:

keywords have special meanings.

variable_input depends on the configuration.

alternative_1|alternative_2: Alternatives are separated by a vertical bar.

[optional]: Optional parameters are surrounded by brackets.

parameter...: Repetition (one or more times) is denoted by the ellipsis.

{element}: Braces are used for grouping.

Default configuration

If the xmetax program is called without any arguments, the default configuration is effective. The following lines show almost all configuration statements with their default values:

connection :0.0
serverNice 0
authorization none
accessControl on
serverAuthorization none
xdmcpMode off
workarounds none
options none
bell on
syncScreenSavers off
disableSlaveInput off
vendorString none
vendorReleaseNumber none
glxVendorString none
nice 0
numberOfThreads 4
logDestination /var/opt/XSOXmetaX/logs/xmetax-user_name-0.html
logTypes none

metaScreen .0
width 0
height 0
keepWindowsVisible 0

screen :1.0
display :1.0
ofMetaScreen .0
connectTimeout 20
failsafeTimeout 0
priority 0 0
clipX 0
clipY 0
clipWidth 0
clipHeight 0
displayX 0
displayY 0
displayWidth 0
displayHeight 0
borderWidth -1
followPointerX 0
followPointerY 0
followPointerMode continuous
followPointerRestrict none
pointer on
allowEnter on
sampleRate 0
sync off
wrapX off
wrapY of
zoom 1
input on
clickTransfer off
keyboardMapping none
emulateVisual none
tags atom color font glx image

Comments

Comments start with a number symbol # and extend to the end of the line.

If a comment — after elimination of white space characters — starts at the beginning of a line, it is associated with the last defined screen (Screen) or meta screen (Meta screen). When writing a configuration file, the configuration tool places these comment lines just between the corresponding screen or window statement or metaScreen statement and the following sub-statements.

The introducing comment lines preceding the first definition of a screen or meta screen are preserved.

All other comments are ignored and not saved by the configuration tool.

Variables

The environment variables are accessed like in a shell, for example:

serverCommand $OPENWINHOME/bin/X :1

Variable assignments, however, follow a different syntax:

set variable_name value

like in:

set XAUTHORITY $HOME/xmetax.xauthority

A variable name begins with a letter (including the underscore _) followed by letters or digits. Braces are used to separate the variable name in special situations:

set server1 remote:1.
screen ${server1}0

Each variable set in the configuration is copied into the environment where it may be accessed by, for instance, the X Window server.

Lists

Some statements take as argument a list of individual items in the form of:

{[+|-]item}...

The optional sign determines whether an item is included or not: if an item specifier starts with a minus character -, then the corresponding item is deleted from the configured set of items, otherwise it is included into the set. The initial set depends on the first specifier: if it starts with a minus character -, the initial set contains all possible items, otherwise the initial set is empty.

Arithmetic expressions

Arithmetic expressions may contain the operators *, /, and % (modulus), + and - as well as variable references. They are surrounded by parentheses, for instance:

set nice -5
set serverNice ($nice - 2)

Points of time and periods of time

The specification of a point of time follows an enhanced ISO syntax:

[year{-|/}month{-|/}day] hours:minutes[:seconds[.milliseconds]] [am|AM|pm|PM] [Z|{+|-hours:minutes}]

The following examples denote nearly the same time on August 20, 2008 in Central Europe:

2008-08-20 20:08:20.2008
20:08
18:08 Z
08:08 pm

The syntax for the specification of a period of time is similar:

[[hours:]minutes:]seconds[.milliseconds]

The following examples denote approximately the same period:

1:23:45.678
83:45
5025

Configuration file

The statement

source file_name|-

or, even shorter

file_name|-

is substituted by the contents of a configuration file. The file name - stands for the standard input stream. The file inclusions may be nested arbitrarily, but not cyclically.

The statement

stop

terminates the interpretation of a configuration file before reaching the end of the input. The remaining contents are neither read in nor saved by the configuration tool.

Copyright © 2018 X-Software GmbH
info@x-software.com