Kn0wn1
Images not properly loading
I'm just going to link what i posted in the other thread for what works for me:
https://discord.com/channels/1143819637897834571/1360261258980622656/1362131336789229888
It may not be what you're trying to do.
109 replies
Multiple Top Bar Icons
Possible Causes:
Multiple Tray Icon Instances: Tauri v2 can create multiple tray icons if the TrayIconBuilder instance isn't managed properly.
Fix: Ensure that only one instance of the TrayIconBuilder is used, or manage tray icons carefully to prevent duplicates.
Reference: https://github.com/tauri-apps/tauri/issues/10912
Improper Tray Icon Cleanup: Failing to remove tray icons before the app exits can lead to orphaned icons after the app restarts.
Fix: Call TrayIcon.close() in your exit routine to prevent residual icons.
Reference: https://github.com/tauri-apps/tauri/discussions/4668
Changes in Tauri v2: Tauri v2 changes tray icon handling, and the trayIcon setting in tauri.conf.json is no longer used.
Fix: Remove the trayIcon configuration and handle tray icon creation programmatically.
Reference: https://github.com/tauri-apps/tauri/issues/10012
Recommendation: Ensure the app checks for an existing tray icon before creating a new one and implement proper cleanup using TrayIcon.close() before exit.
24 replies
Multiple Top Bar Icons
🐛 Bug Report: Duplicate Top Bar Icons for Opendeck After Lock/Unlock on GNOME (Pop!_OS)
Environment:
OS: Pop!_OS 22.04 (GNOME-based)
App: Opendeck
Trigger: loginctl lock-session followed by unlocking the session
Desktop: GNOME Shell (Wayland)
Issue:
Each time the session is locked and unlocked, a new Dock/top bar icon appears for the same running instance of Opendeck. This leads to multiple duplicate icons in the GNOME top bar or Dock.
Steps to Reproduce:
Launch Opendeck normally.
Run loginctl lock-session in a terminal.
Unlock the session.
Observe: a new top bar icon for Opendeck appears alongside the existing one.
Repeat the lock/unlock cycle to see more duplicates.
Expected Behavior:
Only one icon should represent the running Opendeck instance, regardless of session locking/unlocking.
Workaround:
Creating a custom .desktop file with the correct StartupWMClass matching the app's WM_CLASS value (from xprop) stops the duplicate icons, but only if the app is launched through that desktop entry. This suggests a window-to-launcher association issue.
WM_CLASS Output:
xprop | grep WM_CLASS
Example output:
WM_CLASS(STRING) = "opendeck", "Opendeck"
Possible Cause:
Opendeck may be:
Not setting a stable or expected WM_CLASS, or
Not matching its runtime window identity to a .desktop launcher GNOME can recognize, or
Re-adding a tray component in a way GNOME misinterprets as a new app window
This is a common issue with Electron/JavaScript-based apps that don’t fully register or persist their session state properly.
Suggested Fix:
Ensure that:
The app sets a consistent WM_CLASS that matches the .desktop entry.
The app launches itself in a way GNOME can tie to its launcher entry, even after session unlocks.
Avoid re-registering the app indicator/tray icon as a new instance on unlock, if applicable.
24 replies