Limit Application Memory Usage with systemd - KDE Blogs

There’s a usability problem here caused by KDE escaping dash (“-”) character in .desktop file name when creating transient systemd units.
For example, I have a file ~/.local/share/applications/jetbrains-pycharm-2024.3.desktop for which KDE creates systemd transient unit named
app-jetbrains\x2dpycharm\x2d2024.3@<some-id>.service. This prevents using directories named ~/.config/systemd/user/app-jetbrains-.service.d or ~/.config/systemd/user/app-jetbrains-pycharm-.service.d for overriding unit’s settings. Only directory with full .dektop’s file name works which is inconvenient as it makes it necessary to change overriding directory name when any of the .desktop file name changes (for instance version).

I discovered this trying to create overriding directory for PyCharm which would not depend on application’s version.

For this reason I think KDE should not escape dash characters when creating transient systemd units.