1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-11 09:18:07 +03:00

docs/DESKTOP_ENVIRONMENT: clarify <RANDOM> usage

The <RANDOM> part is optional in the naming scheme of application units.
However, this is only true for service files. Scope units must include
the <RANDOM> part, otherwise it would be impossible to parse:

The schema would be:

    `app[-<launcher>]-<ApplicationID>[-<RANDOM>].scope`

in which case a two-part name would be impossible to parse, since it is
unclear whether the launcher of the random bit where omitted.

(cherry picked from commit cbaebf811e)
This commit is contained in:
David Rheinsberg 2024-10-11 10:07:40 +02:00 committed by Luca Boccassi
parent c14a47547d
commit 361021a522

View File

@ -65,11 +65,11 @@ desktop environments should adhere to the following conventions:
instead of the caller starting the process and letting systemd know about it,
is encouraged.
* The RANDOM should be a string of random characters to ensure that multiple instances
of the application can be launched.
It can be omitted in the case of a non-transient application services which can ensure
multiple instances are not spawned, such as a DBus activated application.
* `<RANDOM>` should be a string of random characters to ensure that multiple instances
of the application can be launched. This can be omitted for service files of
non-transient applications, which ensure multiple instances cannot be
spawned. For scope files `<RANDOM>` is mandatory, as the format would be
ambiguous otherwise.
* If no application ID is available, the launcher should generate a reasonable
name when possible (e.g. using `basename(argv[0])`). This name must not