Bug 452248

Summary: Some autostarted applications do not have their icon and proper name shown in the Applications table/view (instead just the .desktop file name is used)
Product: [Plasma] plasma-systemmonitor Reporter: Prajna Sariputra <putr4.s>
Component: generalAssignee: KSysGuard Developers <ksysguard-bugs>
Severity: normal CC: ahiemstra, nate, nicolas.fella, plasma-bugs
Priority: NOR    
Version: 5.24.4   
Target Milestone: ---   
Platform: Archlinux   
OS: Linux   
Latest Commit: Version Fixed In: 5.25

Description Prajna Sariputra 2022-04-04 01:40:43 UTC
On my system I noticed that Kalendar's reminder daemon is shown as "org.kde.kalendarac" despite `/etc/xdg/autostart/org.kde.kalendarac.desktop` having a proper name and icon. EasyEffects is similarly affected if its autostart option is enabled within the app, with it showing as "easyeffects-service", again despite `~/.config/autostart/easyeffects-service.service` having a proper name and icon.

I noticed that the key difference between those two and other autostarted apps on my system that look fine is that those two do not have a corresponding .desktop file in either `/usr/share/applications` or `~/.local/share/applications`, so I tried copying the problematic autostart .desktop files to `~/.local/share/applications` and adding `NoDisplay=true` to them as a workaround, and restarting System Monitor afterwards made them appear correctly, with the right name and icon.

I do have systemd startup enabled, not sure if that's relevant or not.

1. Install Kalendar (which on Arch at least includes the `/etc/xdg/autostart/org.kde.kalendarac.desktop` file)
2. Reboot
3. Open System Monitor and look at the Applications table

"org.kde.kalendarac" is present in the table with no icon.

"Kalendar Reminder Client" (or the translated name I guess) should be present instead, with the Kalendar icon.

Operating System: Arch Linux
KDE Plasma Version: 5.24.4
KDE Frameworks Version: 5.92.0
Qt Version: 5.15.3
Kernel Version: 5.17.1-arch1-1 (64-bit)
Graphics Platform: Wayland
Comment 1 Nicolas Fella 2022-04-04 23:37:55 UTC
Your analysis is correct.

The app information is taken from the cgroup name (e.g. app-org.kde.kalendarac@autostart.service) and the application id is extracted and looked up in /usr/share/applications. I guess we could also consider the desktop files in the autostart dirs for autostart units (we know which ones are because they end in @autostart.service)
Comment 2 David Redondo 2022-05-06 06:59:18 UTC
Git commit 5d1d0e9287d68fe1dd14a2157fcccb5428162335 by David Redondo.
Committed on 06/05/2022 at 06:56.
Pushed by davidre into branch 'master'.

Search for desktop files in autostart dir if service was autostarted

M  +9    -0    autotests/cgrouptest.cpp
A  +16   -0    autotests/data/autostart/org.kde.korgac.desktop
M  +7    -0    processcore/cgroup.cpp