Xentara v2.0.3
User Manual
Configuration File Location

Standard Configuration Directories

Xentara searches for all configuration files in a number of different directories. By default, the directories consist of one user specific directory, as well as one user-independent system directory.

Linux

Under Linux, Xentara follows the recommendations of the XDG Base Directory Specification to locate configuration files. The configuration files are placed in a subdirectory “xentara” within the XDG configuration directories (referred to as $XDG_CONFIG_DIRS in the specification).

By default, Xentara searches for configuration files in the following two directories, in order:

  • ${HOME}/.config/xentara
  • /etc/xdg/xentara

The XDG Base Directory Specification specifies two environment variables called XDG_CONFIG_HOME and XDG_CONFIG_DIRS that can be used to modify this search path. Please refer to the XDG Base Directory Specification for details.

You can also specify additional search directories using the Xentara command line option --config-dir.

Windows

Under Windows, Xentara looks for configuration files in the local app data directory, and in the program data directory. These directories are stored in the environment variables %LOCALAPPDATA% and %ProgramData%, respectively. Xentara searches the following two directories, in order:

  • %LOCALAPPDATA%\Xentara\Config
  • %ProgramData%\Xentara\Config

%LOCALAPPDATA% is usually C:\Users\<UserName>\AppData\Local, and %ProgramData% is usually C:\ProgramData\Xentara\Config.

You can specify additional search directories using the Xentara command line option -ConfigDir.

Note
In the Windows Explorer, the directory “Users” is usually shown in the local language of the computer. If your system language is German, e.g., the directory will be shown as “Benutzer”. The actual path remains C:\Users, however. Also, the “AppData” directory is hidden in the Windows Explorer by default, and can only be seen if the option to show hidden files is turned on.

Built-In Configuration Files

The built-in configuration files have specific names that are described in their respective documentation chapters. By default, these files should be placed directly into one of the configuration directories listed above. The Xentara model file, for example, has the default name “model.json”, and the following locations will be searched:

Linux:

  • ${HOME}/.config/xentara/model.json
  • /etc/xdg/xentara/model.json

Windows:

  • %LOCALAPPDATA%\Xentara\Config\model.json
  • %ProgramData%\Xentara\Config\model.json
Note
This search path can be modified using the command line option --config-dir (Linux) or -ConfigDir (Windows), or the environment variables XDG_CONFIG_HOME and XDG_CONFIG_DIRS (Linux only), as described above.

Each file has a command line option that allows you to specify an alternate location. The option --model (Linux) or -Model (Windows) can be used to specify an alternate location for the Xentara model file. These command line options disable the search path described here, and load the file directly from the specified location.

Xentara has the following built-in configuration files:

External Configuration Files

Sometimes, Xentara will load configurations from external configuration files that are not one of the built-in files mentioned in the previous chapter. This is the case, for example, for the TLS server certificate and private key. The path for these files are generally configured in one of the built-in configuration files. The path to the TLS server certificate, for example, is configured in the Xentara security configuration file. Most external configurations are skill-specific, and are configured either in the Xentara model file, or in the Xentara config file.

Specifying Absolute Paths

The path of an external configuration file can be specified using an absolute path. If an absolute path is specified, the file is loaded from exactly that path, and the configuration directories are not searched.

Under Windows, paths can be specified using forward slashed or backslashes as directory separator.

Specifying Relative Paths

The path of an external configuration file can be specified using a relative path. If a relative path is specified, the path is appended to each of the search directories in turn, until the file is found. If no file is found, an error is emitted.

If the configuration contains the relative path “codesys/plc.ini”, for example, the following paths will be searched:

Linux:

  • ${HOME}/.config/xentara/codesys/plc.ini
  • /etc/xdg/xentara/codesys/plc.ini

Windows:

  • %LOCALAPPDATA%\Xentara\Config\codesys\plc.ini
  • %ProgramData%\Xentara\Config\codesys\plc.ini
Note
This search path can be modified using the command line option --config-dir (Linux) or -ConfigDir (Windows), or the environment variables XDG_CONFIG_HOME and XDG_CONFIG_DIRS (Linux only), as described above.

Relative paths can be simple file named (e.g. “plc.ini”), or relative paths with sub directories (e.g. “codesys/plc.ini”), as in the example above. Under Windows, paths can be spacified using forward slashed or backslashes as directory separator.

Configuration Sub Directories

Some configurations will look for files in a special subdirectory underneath each configuration directories. For certificate files, for example, Xentara will search in a subdirectory named certs underneath the configuration directory, rather than the configuration directory itself. If you specify “mqtt/client.pem” as the certificate path, for example, the following the following paths will be searched:

Linux:

  • ${HOME}/.config/xentara/certs/mqtt/client.pem
  • /etc/xdg/xentara/certs/mqtt/client.pem

Windows:

  • %LOCALAPPDATA%\Xentara\Config\certs\mqtt\client.pem
  • %ProgramData%\Xentara\Config\certs\mqtt\client.pem

Please refer to the documentation for the individual configuration parameter on information on whether the file should be located in a subdirectory, and what that subdirectory is.

External Configuration Directories

Sometimes, the path of an entire directory must be specified in a configuration file, rather than the path of an individual file. The search strategy for directories is exactly the same as that for files described above.