Bug 493899

Summary: Autostarted applications can load before the system tray is ready, resulting in missing entries.
Product: [Plasma] plasmashell Reporter: Steve Vialle <steve_v>
Component: Startup processAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED DUPLICATE    
Severity: normal CC: kde, nate
Priority: NOR    
Version: 6.1.5   
Target Milestone: 1.0   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Steve Vialle 2024-10-01 06:31:46 UTC
SUMMARY
Some applications which include a systray icon load before the system tray is ready if added to "Autostart" (plain xdg-autostart, no systemd).
Most reliable reproducer here is 'opensnitch-ui' (go, QT5). This one is especially annoying since it becomes impossible to open the UI without manually killing the 'opensnitch-ui' process first, because it has an "already running" check and the only way to raise the running instance is via the missing systray icon.
Starting the application manually after plasma has fully loaded works as expected, and the systray icon appears.
If added to autostart as a script, a 'sleep 2' before calling the application also results in the systray icon appearing correctly.

STEPS TO REPRODUCE
1. Add opensnitch-ui to autostart
2. relog
3. check for running process and systray icon

OBSERVED RESULT
'opensnitch-ui' is running, but has no systray icon and can't be raised.

EXPECTED RESULT
Autostarted applications with a systray icon get a systray icon.

SOFTWARE/OS VERSIONS
Operating System: Gentoo Linux 2.15
KDE Plasma Version: 6.1.5
KDE Frameworks Version: 6.5.0
Qt Version: 6.7.2
Kernel Version: 6.6.51-gentoo-dist (64-bit)
Graphics Platform: Wayland

ADDITIONAL INFORMATION
I have only observed this in a wayland session, and can't reproduce it under X11. Hesitant to tag it as such though, as I can't prove it's wayland specific and not just a race whose timing is influenced by more general differences in wayland vs. x11 startup.

This might be a regression of 425315 ("fixed") and it's many duplicates, though that bug is rather old and pertains to QT5. Please mark it as such and reopen that one if this is the case.
Comment 1 Nate Graham 2024-10-01 17:24:50 UTC

*** This bug has been marked as a duplicate of bug 473860 ***