Configuration
Main Configuration
You can configure the application manager through configuration (config) files and the command line. To display the currently supported command line options, run appman --help
. Some of these options can also be set via config files that are referenced on the command line with the --config-file <filename>
option.
The config file is a YAML file that follows the same rules as all the other YAML files used in the application manager.
Before parsing the YAML document, the application manager substitutes variables denoted by a syntax similar to bash
: ${VariableName}
. There are different types of variables that can be substituted this way:
Type | Description |
---|---|
${CONFIG_PWD} | Is substituted with the absolute path to the config file being parsed. This feature makes it possible to have all your import paths and file references relative to your main config file. |
${env:ENV_VAR_NAME} | Is substituted with the value of the $ENV_VAR_NAME environment variable. For example ${env:USER} is replaced by your Unix user name. |
${stdpath:Location} | Is substituted with the platform's value of the corresponding standard location for Location . For example, ${stdpath:TempLocation} is replaced by /tmp on Unix; unless configured otherwise by your system administrator. |
If an option is specified in more than one place: either on the command line and the config files, or across multiple config files, the final value is resolved based on these rules:
- Options are parsed from all the config files available, in the order in which they appear on the command line. Values are overridden by config files, as they are loaded.
- Options that are specified directly via the command line always override values in any config file.
Note: There is one exception: options that expect a list of values, such as -I
or ui/importPaths
. In this case, all values, regardless of where they are specified, are merged into one single, final list.
Command Line [ Config Key ] | Type | Description |
---|---|---|
(first non-option) [ ui/mainQml ] | string | The main QML file. |
--help | bool | Prints the supported options and exits. |
--version | bool | Prints the current version of the application manager and exits. |
--build-config | bool | Prints 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. You can use more than one config file, for example, to split the configuration cleanly, into a device specific and a UI specific part. All the config files' content are merged in the order in which they appear on the command line: keys that didn't appear in an earlier config value are taken as is; duplicate keys are merged according to the following rules:
The application manager saves the result of parsing and evaluating all the configuration files into a cache. This cache is loaded on subsequent starts, if the exact set of config files is used, unchanged. |
--no-cache | bool | Disables the caching functionality for the configuration files and the application database : the caches are neither read from or written to. (default: false) |
--clear-cache | bool | Although the application manager should detect if the configuration file and application database caches are out of sync, you can force-clear the caches on startup with this option. The old options (default: false) |
--option or -o | YAML | Use this option to set or overwrite parts of your config files from the command line. This option can be specified multiple times and its values are evaluated the same way as the content of config files specified via -c . The evaluation order is after the configuration files, but before more specific, direct options such as --fullscreen (which can be rewritten as -o 'ui: { fullscreen: no }' ). |
--database [ applications/database ] | string | Deprecated and ignored. The application database will transparently be cached - see also the --clear-cache and --no-cache options. |
--recreate-database or -r | bool | Deprecated. These options were necessary for the application manager to react on changes to the application manifest files, but this is not needed anymore. For backward compatibility these options do map to the --clear-cache option, which will clear both the configuration and application database cache. (default: false) |
--builtin-apps-manifest-dir [ applications/builtinAppsManifestDir ] | string | The base directory for built-in application manifests; you can also specify multiple directories as a list. |
--installation-dir [ applications/installationDir ] | string | The base directory for package installations. This option must be specified if you want to install new package; otherwise only the built-in ones are available. (default: empty/disabled) |
--document-dir [ applications/documentDir ] | string | The base directory for per-package document storage directories. (default: empty/disabled) |
--dbus | string | Registers the ApplicationManager, ApplicationInstaller, NotificationManager, and WindowManager on the specified D-Bus. This can be a full D-Bus bus specification string, session , system , auto (default), or none (for no registration at all).Use the On production systems, you may want to put the application manager on the |
[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 , io.qt.WindowManager , and org.freedesktop.Notifications ). If such a key is present, it takes precedence over the dbus command line option. Each key's value is a D-Bus specification object. |
--fullscreen [ ui/fullscreen ] | bool | Display in full-screen. (default: false) |
--no-fullscreen | bool | Override full-screen setting in the System UI's config file. Useful for development on the desktop. (default: false) |
[ui/windowIcon ] | string | If set, the given image file is used as a window icon for all application manager windows. This option is only useful for development and takes effect on Windows, macOS, and Linux/X11. |
-I [ ui/importPaths ] | array<string> | Adds additional QML import paths to the System UI. |
[ui/pluginPaths ] | array<string> | Adds additional Qt plugin paths to the System UI. |
[ui/style ] | string | If set, the given style is used by QtQuickControls 2. |
[ui/resources ] | array<string> | Takes a list of Qt resource files (.rcc) or libraries that have resources compiled-in and registers them within the System UI process. Resources can be accessed with the ":" or "qrc://" file path prefix. |
[plugins ] | map<array<string>> | A string-to-string-list map that defines plugins that the application manager should load. The value must be a single plugin or a list of plugin library file path names. Currently the only valid keys are startup and container :
|
[systemProperties ] | object | Exports 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 are ignored. Properties under one of these access tags can be freely chosen and can also be nested. These properties are exposed as ApplicationManager::systemProperties to the System UI and as ApplicationInterface::systemProperties to all QML applications:
Private keys overwrite identical protected and public keys; protected keys overwrite identical public keys. The properties are converted to QVariantMaps, but the application manager won't interpret them in any way. Non-QML applications can access this data via the |
--verbose | bool | Enables verbose output. All logging categories and message types are enabled with the exception of some Qt internal debug messages; logging-rules is ignored.Note: Logging rules provided via the QT_LOGGING_RULES environment variable still prevails. For more control over the logging output, see |
--slow-animations | bool | Runs all animations in slow motion. (default: false) |
--load-dummydata [ ui/loadDummyData ] | bool | Loads QML dummy data into the System UI, similar to qmlscene and qml . |
--no-security [ flags/noSecurity ] | bool | Disables all security related checks. Use this option in a development setup only; never in production. (default: false) |
--development-mode [ flags/developmentMode ] | bool | Allows the installation of packages that only come with a valid developer signature. (default: false) |
[flags/allowUnsignedPackages ] | bool | Allows the installation of packages that have no signature at all. Only use this in production, if you are verifying packages by other means, while also limiting the access to the installer API. (default: false) |
--no-ui-watchdog [ flags/noUiWatchdog ] | bool | Disables detecting UI applications that have hung (for example, via Wayland's ping/pong mechanism). (default: false) |
--force-single-process [ flags/forceSingleProcess ] | bool | Forces single-process mode even on a Wayland-enabled build. (default: false) |
--force-multi-process [ flags/forceMultiProcess ] | bool | Forces multi-process mode; exits immediately if this is not possible. (default: false) |
--single-app | string | Runs the application manager with a single application only (ignoring the database). In this mode, the application manager can act as a qmlscene or qml replacement. The argument is the path to info.yaml . Aliases (info-*.yaml ) are also loaded from the given path. |
--log-instant | bool | Causes all logging messages to be printed right away at start-up. Usually, the logging output is deferred until the logging configuration (e.g. logging rules) is known. Expect different output and format at start-up. |
--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 described in Logging and Debugging. |
[logging/messagePattern ] | string | If provided, used as the Qt message pattern. For more information about the format, see qSetMessagePattern(). |
[logging/useAMConsoleLogger ] | bool | Always use the application manager specific logging function, which enables colored console output. If no value or an invalid value is provided, the logging function is only used when messagePattern isn't set. |
[logging/dlt/id ] | string | If provided, it is used as the automotive DLT application ID. The size is limited to four characters, additional characters are discarded. Note: The default ID, "PCAM", is used until this configuration option has been applied. |
[logging/dlt/description ] | string | If provided, it is used as the automotive DLT application description. This allows to augment the short DLT application ID with a more verbose definition. Note: A default description is used until this configuration option has been applied. |
--no-dlt-logging | bool | Disables logging using automotive DLT. This option is especially useful when no dlt-daemon is running currently; otherwise the processes hang on exit for a while to send the logs. |
--qml-debug | bool | Enables QML Debugging/Profiling. For more information, see Logging and Debugging. |
[installationLocations ] | array<object> | The definition of installation locations available on the system. This is deprecated, since only a single installation location is supported now, defined by --installationDir or applications/installationDir . |
[runtimes ] | map<object> | This option can be used to specify options for runtimes, as a map of key-value pairs. The key is the runtime's name; the value is interpreted by the respective runtime implementation. For more information, see Runtime Configuration. |
[containers ] | map<object> | This option can be used to specify options for containers, as a map of key-value pairs. The key is the container's name; the value is interpreted by the respective container implementation. For more information, see Containers. |
[quicklaunch/idleLoad ] | real | This is a system load value between 0 and 1 . The application manager does not start a new quick launcher, as long as the system's idle load is higher than this value. (default: 0) |
[quicklaunch/runtimesPerContainer ] | int | Specifies how many quick launchers should always be ready for all active container/ runtime combinations. (default: 0) Note: Values bigger than 10 are ignored, since this does not make sense and could also potentially freeze your device if you have a container plugin where instantiation is expensive, resource-wise. |
--wayland-socket-name [ wayland/socketName ] | string | A 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 |
[wayland/extraSockets ] | list<object> | A list of additional sockets that are added to the Wayland server. Each object in the list consists of the following fields
Only If the application manager is runing under |
--disable-installer [ installer/disable ] | bool | Disables the installer sub-system at runtime completely. Another option would be to not even compile it in the first place, in the qmake step. |
[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 ] | object | Specifies which actions to take, if the application manager is crashing. For more details, see Crash Action Specification. |
[ui/opengl ] | object | Lets you specify the required OpenGL version and/or profile. For more details, see OpenGL Specification. |
[ui/iconThemeName ] | string | Specifies which icon theme to use. See ui/iconThemeSearchPaths for details on 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 option can be used to add a custom icon theme to the search path and load it by specifying ui/iconThemeName. |
[intents/disable ] | bool | Disables the intent sub-system at runtime completely. |
[intents/timeouts ] | object | Lets you specify the processing timeouts used in the intent sub-system. For more details, see Intent Timeout Specification. |
D-Bus Specification
These YAML objects describe both, which D-Bus interfaces are registered on, as well as access policies.
Config Key | Type | Description |
---|---|---|
register | string | Registers the interface on the specified D-Bus: can be either session , system , none , ~ (for no registration at all), or a full D-Bus bus specification string. |
policy | map<object> | These optional access policies can be used instead of or in addition to the standard D-Bus policy configuration. The keys into this map are the undecorated D-Bus function names, such as startApplication . When a key is specified, the corresponding function's access policy is deny , until you add allow criterias -- all of which are AND-ed together. |
The code snippet below shows a simple example, that only allows applications with the appstore
capability, 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: null ...
Only the public D-Bus interfaces of the application manager can be configured this way. The names of these available interfaces are as follows:
Interface | Corresponding QML class |
---|---|
io.qt.ApplicationManager | ApplicationManager |
io.qt.ApplicationInstaller | ApplicationInstaller |
io.qt.WindowManager | WindowManager |
org.freedesktop.Notifications | Not application manager specific - this interface adheres to the freedesktop.org specification |
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:
Config Key | Runtimes | Type | Description |
---|---|---|---|
environmentVariables | native, qml | map<string> | A simple string-to-string map that describes the environment variables that should be set when spawning the runtime process. To remove a variable from the default environment, give it a null value. |
importPaths | qml | array<string> | Adds additional QML import paths for apps started via this runtime. |
pluginPaths | qml | array<string> | Adds additional Qt plugin paths for apps started via this runtime. |
plugins | qml | map<array<string>> | A string-to-string-list map that defines plugins that the QML runtime should load. The value must be a single plugin or a list of plugin library file path names. Currently the only valid key is startup :
|
resources | qml | array<string> | Takes a list of Qt resource files (.rcc) or libraries that have resources compiled-in and registers them within each QML runtime. Consequently, all running QML applications will include these resources. The resources can be accessed with the ":" or "qrc://" file path prefix. |
quicklaunchQml | qml | string | A QML source file that is loaded when a quick launcher is started; but not when an application is started directly. Providing this file is only useful, if quicklaunch/runtimesPerContainer > 0. This option can be used to improve subsequent startup performance of the actual application, such as by importing and hence preloading common application plugins and instantiating costly singletons. Generally, creating other objects is not useful as the created component is immediately deleted again. For the same reason, visual items should not be created. Always keep in mind that everything included in this file is loaded into all applications that use the QML runtime. |
loadDummyData | qml | bool | Loads QML dummy-data into the app, just like qmlscene and qml would. (default: false) |
backgroundColor | qml | string | If set, the main window of the app gets this color set as the default clear color. This option also gives the surface an 8-bit alpha buffer. |
quitTime | qml | int | Defines the grace period in milliseconds, that an application is given for shutting down. This is the time limit between receiving the quit() signal and responding with acknowledgeQuit(). (default: 250) |
crashAction | qml | object | Specifies which actions to take, if a QML client application is crashing. See Crash Action Specification 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 are handled:
- Uncaught exceptions. Exceptions derived from
std::exception
also show details onwhat()
occurred. SIGSEGV
SIGABRT
SIGBUS
SIGILL
SIGFPE
SIGPIPE
SIGQUIT
SIGSYS
Config Key | Type | Description |
---|---|---|
printBacktrace | bool | Tries to print a readable backtrace. On Linux, it uses the primitive backtrace functionality from glibc, unless libbacktrace was enabled at configure time. On Windows, backtraces are only printed if stackwalker was enabled at configure time. (default: true). |
printQmlStack | bool | Tries to print a readable QML stack trace. Similar to printBacktrace above, but prints the current QML function stack when the crash occurred. (default: true) |
dumpCore | bool | Ends the process via abort instead of _exit . Dumps a core file, depending on your kernel configuration. (default: true) |
waitForGdbAttach | int | Specifies a timeout in seconds while the crashed program is being held in the stopped state, waiting for a debugger to attach. Any value <= 0 skips this step. (default: 0) |
Intent Timeout Specification
The intents/timeouts
sub-object lets you specify the exact timeouts in milli-seconds for the asynchronous IPC used to implement the intents mechanism. Any intent whose lifetime exceeds a timeout for the stages shown below is canceled by the system and an error reply is sent back to the original sender. Setting any of the timeout values to 0
or a negative number disables the timeout handling for that specific stage.
Config Key | Type | Description |
---|---|---|
disambiguation | int | The time interval in milli-seconds, in which a disambiguation decision for an intent has to be made in the System UI. (default: 10000) |
startApplication | int | The time interval in milli-seconds, in which an application that should handle an intent request is supposed to be started - of course, only if it is not already running. (default: 3000) |
replyFromApplication | int | The time interval in milli-seconds, in which the handling application needs to acknowledge the receipt of an intent request. For QML applications, this is done in IntentHandler::requestReceived. (default: 5000) |
replyFromSystem | int | The time interval in milli-seconds, after which the complete handling of a single intent needs to be finished: this starts when actually creating the intent in the requesting application, going through the server to the handling application and then returning the (error) result back from the handling to the requesting application. Note: It makes sense that this timeout value is slightly bigger than the sum of the previous three timeout values described above: all the other timeouts are sub-steps towards the completion of an intent request, while this timeout represents the whole process. Making it slightly bigger than the sum accounts for processing and communication overhead that is not part of the individual sub timeouts. (default: 20000) |
Please be aware that due to the asynchronous nature of the intent delivery, an intent might be canceled by the system because it ran into either a replyFromApplication
or replyFromSystem
timeout, although the receiver still received and processed it.
OpenGL Specification
The opengl
sub-object lets you specify the required OpenGL version and/or profile.
Config Key | Type | Description |
---|---|---|
desktopProfile | string | When running on a desktop, set this value to either core or compatibility to request a non-default OpenGL profile. If you do not specify anything here, Qt uses 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 outputs a warning, if the requested profile doesn't match the actual profile. |
esMajorVersion | int | When set, the application manager requests 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:
Make sure to specify either both options: Note: Be aware that this is just a request. The application manager outputs a warning, if the requested version doesn't match the actual version. |
esMinorVersion | int | When set, the application manager requests the specified OpenGL ES minor version. For more information, see esMajorVersion above. |
© 2021 The Qt Company Ltd. 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.