Configuration

Main Configuration

The application-manager can be configured through config files and the command line. The currently supported command-line options can always be displayed by running appman --help. Some of these options can also be set via config files, which in itself are referenced on the command-line with the --config-file <filename> option.

The config file is a YAML file, consisting of exactly one object and it supports a subset of the command-line options.

Any value that starts with the magic string ${CONFIG_PWD} will have this magic string replaced with the absolute path to the config file where it appears in - this makes it very easy to have all your imports paths and file references relative to your main config file.

Command Line
Config key
TypeDescription
(first non-option)
ui/mainQml
stringThe main QML file.
--help
-
boolPrints the supported options and exits.
--version
-
boolPrints the current version of the application-manager and exits.
--build-config
-
boolPrints the build configuration of the application-manager in YAML format and exits.
--config-file or -c
-
array<string>Loads configuration settings from a set of files. Using more than one config file could be used to cleanly split the configuration into a device specific and a UI specific part. All the config files' content will be merged in the order they appear on the command line: keys that did not appear in an earlier config value are taken as is; duplicate keys are merged according to the following algorithm:
  1. scalar values simply overwrite earlier config values.
  2. lists get appended to earlier lists' content.
  3. maps will be merged with earlier maps recursively on a key-by-key basis, according to rules 1 and 2.

The application-manager will save the result of parsing and evaluating all the configuration files into a cache. This cache is loaded on subsequent starts if the exact same set of config files is used unchanged.

(default: /opt/am/config.yaml)

--no-config-cache
-
boolDisables the caching functionality for the configuration files: the cache is neither read from or written to.
--clear-config-cache
-
boolAlthough the application-manager should detect if the configuration file cache is out of sync, you can force-clear the cache on startup with this option.
--option or -o
-
YAMLUse this option to set or override parts of your config files from the command-line. This option can be given multiple times and its values are evaluated the same way as the content of configuration files specified via -c. The evaluation order is after the configuration files, but before more specific, direct options like e.g. --fullscreen (which could be rewritten as -o 'ui: { fullscreen: no }').
--database
applications/database
stringThe location of the application database. (default: /opt/am/apps.db)
--recreate-database or -r
-
boolRecreate the application database by (re)scanning all info.yaml files in builtin-apps-manifest-dir and installed-apps-manifest-dir. (default: false)
--builtin-apps-manifest-dir
applications/builtinAppsManifestDir
stringThe base directory for built-in application manifests. You can also specify multiple directories as a list.
--installed-apps-manifest-dir
applications/installedAppsManifestDir
stringThe base directory for installed application manifests. (defaults: /opt/am/manifests)
--app-image-mount-dir
applications/appImageMountDir
stringThe base directory where application images are mounted to. (defaults: /opt/am/image-mounts)
--dbus
-
stringRegister the ApplicationManager, ApplicationInstaller, NotificationManager and WindowManager on the specified D-Bus: can be either session, system, none (for no registration at all) or a full D-Bus bus specification string. (default: session on Linux, none on all other platforms)

Note: On production systems, you most likely want to put the application-manager on the system bus, where you can set detailed security policies using standard D-Bus mechanisms, while keeping the NotificationManager on the session bus. See the more advanced config-file option dbus below.

-
dbus
map<object>Allows for more fine-grained control over D-Bus registrations and function call policies. Every key (with one exception - see next) in this map corresponds to the D-Bus interface name you want to configure (io.qt.ApplicationManager, io.qt.ApplicationInstaller or org.freedesktop.Notifications). If such a key is present, it will take precedence over the command-line option dbus. Each key's value is a D-Bus specification object.
-
dbus/registrationDelay
intThe non-interface key registrationDelay within the dbus object is an integer value, which delays the registration of the global D-Bus interfaces by the field's value in milli-seconds. Values must be greater than or equal to 0, which is also the default value (in this case registration will be done immediately after the event loop is executing).
--start-session-dbus
-
boolStart a private session bus instead of using an existing one.
--fullscreen
ui/fullscreen
boolDisplay in full-screen. (default: false)
--no-fullscreen
-
boolOverride full-screen setting in the System-UI's config file. Useful for development on the desktop. (default: false)
-
ui/windowIcon
stringIf set, the given image file will be used as a window icon for all application-manager windows. This setting is only useful for development and will only take effect on Windows, Mac OS X and Linux/X11.
-I
ui/importPaths
array<string>Adds additional QML import paths to the System-UI.
-
ui/style
stringIf set, the given style will be used by QtQuickControls 2.
-
plugins
map<array<string>>A string-to-string-list map that defines plugins that the application-manager should load. The value must be a list of plugin library file path names. A single plugin will also be accepted. Currently the only valid key is startup. The plugin itself must implement the StartupInterface. The application-manager will call the function hooks during startup of the System-UI.
-
systemProperties
objectExports user-defined properties (key/value pairs) to the System-UI and applications. This field can only have the following children, that control access to the actual properties: private, protected and public (other children will be ignored). Properties under one of the access tags can be freely chosen and can also be nested. The properties are exposed as ApplicationManager::systemProperties to the System-UI and as ApplicationInterface::systemProperties to all QML applications:
  • The System-UI has access to public, protected and private properties.
  • Built-in applilcations have access to public and protected properties.
  • Installed (third party) applications have access to public properties only.

Private keys will overwrite identical protected and public ones and protected keys will overwrite identical public ones. The properties will just be converted to QVariantMaps, but the application-manager will not interpret them in any way. Non-QML applications can access this data via the environment variable $AM_RUNTIME_SYSTEM_PROPERTIES as a YAML snippet.

--verbose
-
boolEnable verbose output. All logging categories and message types will be enabled with the exception of some Qt internal debug messages (logging-rules will be ignored). Note that logging rules provided via the QT_LOGGING_RULES environment variable will still prevail. For more control over the logging output, see logging-rules below.
--slow-animations
-
boolRun all animations in slow motion. (default: false)
--load-dummydata
ui/loadDummyData
boolLoads QML dummy-data into the System-UI (just like qmlscene would).
--no-security
flags/noSecurity
boolDisables all security related checks. Use this in a development setup only! (default: false)
--no-ui-watchdog
flags/noUiWatchdog
boolDisables detecting hung UI applications (e.g. via Wayland's ping/pong). (default: false)
--force-single-process
flags/forceSingleProcess
boolForces single-process mode even on a Wayland enabled build. (default: false)
--force-multi-process
flags/forceMultiProcess
boolForces multi-process mode. Will exit immediately if this is not possible. (default: false)
--single-app
-
stringRuns the application-manager with a single application only (ignoring the database). In this mode, the application-manager can act as a qmlscene replacement. The argument is the path to info.yaml. Aliases (info-*.yaml) will also be loaded from the given path.
--logging-rule
logging/rules
array<string>Adds standard Qt logging rules - see the QLoggingCategory documentation for the required format. Application-manager specific logging categories are listed in Logging and Debugging.
--qml-debug
-
boolEnables QML Debugging/Profiling. See Logging and Debugging for more information.
--no-dlt-logging
-
boolDisables logging using automotive DLT. This is especially useful when currently no dlt-daemon is running as otherwise the processes will hang at exit for some time to send the logs.
-
installationLocations
array<object>Definition of available installation locations on the system. This is an array of Installation Locations objects.
-
runtimes
map<object>This can be used to specify options for runtimes - the key in this map is the runtime's name and the value is interpreted by the respective runtime implementation. See below for specific information.
-
containers
map<object>This can be used to specify options for containers - the key in this map is the container's name and the value is interpreted by the respective container implementation. Containers for specific information.
-
quicklaunch/idleLoad
realThis is a system-load value between 0 and 1. The application-manager will not start a new quick-launcher, as long as the idle-load of the system is higher than this value. (default: 0)
-
quicklaunch/runtimesPerContainer
intSpecifies how many quick-launchers should always be ready for all active container/runtime combinations. (default: 0)

Note: Values bigger than 10 will be ignored, since this does not make sense and could also potentially freeze your device if you have a container plugin were instantiation is expensive resource-wise.

--wayland-socket-name
-
stringA filesystem name for the Wayland socket that should be used when creating the compositor component. (default: auto-detected by libwayland-server, most likely wayland-0)

Note: You can only specify the name here, but not a path: Wayland will always create this socket in $XDG_RUNTIME_DIR and will fail to start the compositor, if this directory is not writable or if the environment variable is not even set in the first place.

-
installer/caCertificates
list<string>A list of file-paths to CA-certifcates that are used to verify packages. For more details, see the Installer documentation.
-
crashAction
objectSpecifies which actions to take, if the application-manager is crashing. See below for more information.
-
ui/opengl
objectGives you the possibility to specify the required OpenGL version and/or profile. See below for more information.
-
ui/iconThemeName
stringSpecifies which icon theme is used. See ui/iconThemeSearchPaths for how to add a path to a custom theme.
-
ui/iconThemeSearchPaths
list<string>Adds additional icon theme search paths to the System-UI and all apps. This can be used to add a custom icon theme to the search path and load it by specifying ui/iconThemeName.

D-Bus Specification

These YAML objects describe both which D-Bus interfaces are registered on as well as access policies.

NameTypeDescription
registerstringRegister the interface on the specified D-Bus: can be either session, system, none or ~ (for no registration at all) or a full D-Bus bus specification string.
policymap<object>These optional access policies can be used either instead of or in addition to the standard D-Bus policy configuration. The keys into this map are the (undecorated) D-Bus function names (e.g. startApplication). As soon as a key is specified, the corresponding function's access policy is deny, until you add allow criterias (all of them are and-ed):

A simple example, that would only allow applications with the capability appstore, running with user-id 1000 to call the installer's startPackageInstallation function, while preventing anyone to remotely call acknowledgePackageInstallation:

...
dbus:
  io.qt.ApplicationInstaller:
    register: 'session'
    policy:
      startPackageInstallation:
        uids: [ 1000 ]
        capabilities: [ 'appstore' ]
      acknowledgePackageInstallation: ~
...

Installation Locations

The installationLocations YAML field is a list of YAML objects, very similar to ApplicationInstaller::getInstallationLocation

NameTypeDescription
idstringThe installation location id that is used as the handle for all other ApplicationInstaller function calls. The id consists of the type and index field, concatenated by a single dash (for example, removable-0).

Valid values for type are internal and removable.

In case there is more than one installation location for the same type of device, this zero-based index is used for disambiguation. For example, two SD card slots will result in the ids removable-0 and removable-1. Otherwise, the index is always 0.

isDefaultboolExactly one installation location can be the default location which must be mounted and accessible at all times. This can be used by an UI application to get a sensible default for the installation location that it needs to pass to startPackageInstallation().
installationPathstringThe absolute file-system path to the base directory under which applications are installed.
documentPathstringThe absolute file-system path to the base directory under which per-user document directories are created. This entry can either be located on this device, or it can be the same as the documentPath of the master installation location.
mountPointstringOnly required for removable installation location: The absolute file-system path to the mount-point of the device where installationPath is located.

Runtime Configuration

The runtime configuration sub-objects are specific to the actual runtimes, so the table below has an additional column specifying which runtime a configuration option applies to:

NameRuntimesTypeDescription
environmentVariablesnative, qmlmap<string>A simple string-to-string map, describing the environment variables that should be set when spawning the runtime process. You can remove a variable from the default environment by giving it a null value.
importPathsqmlarray<string>Add an additional QML import path for apps started via this runtime.
pluginsqmlmap<array<string>>A string-to-string-list map that defines plugins that the QML runtime should load. The value must be a list of plugin library file path names. A single plugin will also be accepted. Currently the only valid keys are startup and container:
quicklaunchQmlqmlstringA QML source file that is loaded when a quick-launcher is started. It will not be loaded when an application is started directly. Providing this file is only useful, if quicklaunch/runtimesPerContainer > 0. It can be used to improve subsequent start-up performance of the actual application, e.g. by importing and hence preloading common application plugins and instantiating costly singletons. Creating other objects is generally useless as the created component will immediately be deleted again. For the same reason visual items should not be created. Always keep in mind that everything included in this file will be loaded into all applications that use the QML runtime.
loadDummyDataqmlboolLoads QML dummy-data into the app (just like qmlscene would). Defaults to false.
backgroundColorqmlstringIf set, the main window of the app will get this color set as the default clear color. This will also give the surface an 8-bit alpha buffer.
quitTimeqmlintDefines the grace period in milliseconds an application is given for shutting down. This is the time limit between receiving the quit() signal and responding with acknowledgeQuit(). (default: 250).
crashActionqmlobjectSpecifies which actions to take, if a QML client application is crashing. See below for more information.

Crash Action Specification

These sub-objects specify which actions to take, if the application-manager or QML runtimes are crashing.

Note: All of these actions only work on Linux.

The following conditions will be handled:

  • Uncaught exceptions. Exceptions derived from std::exception will also show the what() information.
  • SIGSEGV
  • SIGABRT
  • SIGBUS
  • SIGILL
  • SIGFPE
  • SIGPIPE
NameTypeDescription
printBacktraceboolTry to print a readable backtrace. Will use the primitive backtrace functionality from glibc, unless libbacktrace was enabled at configure time (default: true).
dumpCoreboolWill end the process via abort instead of _exit. This will dump a core file, depending on your kernel configuration (default: true).
waitForGdbAttachintSpecifies a timeout in seconds while the crashed program is being held in the stopped state, waiting for a debugger to attach. Any value <= 0 will skip this step (default: 0).

OpenGL Specification

The opengl sub-object gives you the possibility to specify the required OpenGL version and/or profile.

NameTypeDescription
desktopProfilestringWhen running on a desktop, you can request a non-default OpenGL profile by setting this value to either core or compatibility. Not specifying anything here will lead to Qt using the default settings for this platform. OpenGL ES has no support for profiles, so this setting is ignored on platforms using OpenGL ES.

Note: Be aware that this is just a request. The application-manager will output a warning, if the requested profile does not match the actual profile.

esMajorVersionintWhen set, the application-manager will request the specified OpenGL ES major version. On the desktop, the given GLES version is transparently mapped to the corresponding desktop GL version. The current mapping table is as follows:
  • 2.0 → 2.1
  • 3.0 → 4.3
  • 3.1 → 4.5
  • 3.2 → 4.6

Note: Be aware that this is just a request. The application-manager will output a warning, if the requested version does not match the actual version.

Note: Also make sure to either specify both esMajorVersion and esMinorVersion options or none at all.

esMinorVersionintWhen set, the application-manager will request the specified OpenGL ES minor version. See esMajorVersion above for more information.

© 2018 Pelagicore AG. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.