[systemd-devel] XDG standardization for applications – allow using dash delimited names in application's unit name
Lennart Poettering
lennart at poettering.net
Tue Mar 4 15:12:52 UTC 2025
On Mo, 03.03.25 15:43, Piotr Dobrogost (2025 at p.dobrogost.net) wrote:
> Hi,
>
> At https://systemd.io/DESKTOP_ENVIRONMENTS/ there's suggested scheme
> for automatically generated unit's name:
> app[-<launcher>]-<ApplicationID>[@<RANDOM>].service
>
> I have the following .desktop files:
> piotr at demon:~/.local/share/applications$ ls
> jetbrains-pycharm-2024.2.desktop
> jetbrains-pycharm-2024.3.desktop
>
> When I start application using the first one above KDE creates the
> following transient unit:
> app-jetbrains\x2dpycharm\x2d2024.2 at a99c48aaf53a4b4f9f395db78cca4b5a.service
> ,where dashes ("-") in the name of .desktop file have been escaped with "\x2d".
>
> The problem with this is that I can't create convenient drop-in directories like
> app-jetbrains-.service.d
> or
> app-jetbrains-pycharm-.service.d
> to have custom settings for all jetbrains applications and/or custom
> settings for all pycharm instances.
>
> Is the escaping performed by KDE here mandated by the specification at
> https://systemd.io/DESKTOP_ENVIRONMENTS/ (specifically, by fragment
> "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 contain a - character.")?
> Could the specification be amended to explicitly allow any number of
> dash delimited names between <launcher> (or "app" when there's no
> <launcher> used) and <ApplicationID> segments that Desktop Environment
> deems necessary to facilitate fine-grained control of launched
> applications based on dashes used in .desktop filenames?
>
> I first observed this usability problem in my comment at
> https://discuss.kde.org/t/limit-application-memory-usage-with-systemd-kde-blogs/23804/11?u=piotr_dobrogost
> in the discussion pertaining to "Limit Application Memory Usage with
> systemd" blog post at
> https://blogs.kde.org/2024/10/18/limit-application-memory-usage-with-systemd/
Please file this as an issue in github (even better as a PR with your
suggested changes, and try to CC the right people from the two big
desktops.
Lennart
--
Lennart Poettering, Berlin
More information about the systemd-devel
mailing list