Configuration

GOnnect, as a Qt application, uses INI files for configuration.

To allow a structured provisioning, the settings could be distributed over multiple files and GOnnect aggregates them in order of their file names.

To make the file order deterministic, the filename must follow the a convention:

  • two digit number

  • a dash

  • a description

  • .conf extension

00-number.conf
01-sip-base.conf
10-jitsi.conf
20-toggler.conf
40-addressbook.conf
99-user.conf

GOnnect process all config files in the order of their name and aggregates the setting. Settings in a later file override the setting in a former one.

The 99-user.conf is a special file and must be named exactly like this. This is the only file where GOnnect saves the user configuration for the UI settings. All other files are readonly.

Presets

GOnnect is bundled with some configuration presets. If GOnnect starts the first time and does not find a configuration, it asks the user to choose a preset. Some presets also include substitutions like username for which GOnnect will ask for.

Variable substitution

The config files may contain special strings which are replaced by the value of environment variables or by other config settings.

Environment variables

%ENV[<name of env var>]%

Example 1. 01-sip-base.conf: insert the value of the environment variable USER
[account0]
...
userUri=sip:%ENV[USER]%@example.net
...

Config setting

The substitution can replace a setting with a former defined value.

%CFG[<a setting definition>]%

The setting definition consists of the section heading (which is the part of an INI file in brackets) and the config name separated by a forward slash.

This only works, if the value is defined in an earlier processed file or section.

Example 2. 20-toggler.conf: insert the value of the setting number in the generic section
[toggler_0]
...
subscribe=sip:*2%CFG[generic/number]%@example.net
...