Bug 452248 - 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)
Summary: Some autostarted applications do not have their icon and proper name shown in...
Status: RESOLVED FIXED
Alias: None
Product: plasma-systemmonitor
Classification: Applications
Component: general (show other bugs)
Version: 5.24.4
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KSysGuard Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-04-04 01:40 UTC by Prajna Sariputra
Modified: 2022-05-06 21:16 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.25


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Prajna Sariputra 2022-04-04 01:40:43 UTC
SUMMARY
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.


STEPS TO REPRODUCE
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

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

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

SOFTWARE/OS VERSIONS
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

https://invent.kde.org/plasma/libksysguard/commit/5d1d0e9287d68fe1dd14a2157fcccb5428162335