Skip to content

Tray icon missing for flatpak #1950

Description

@Kooper16

Describe the bug

The tray icon is blank when launching sable as a flatpak. I was able to fix this by adding the file access permission "xdg-run/tray-icon:create" (Check additional context below for 2 possible fixes)

Reproduction

  1. Install Sable via flathub
  2. Launch Sable
  3. No tray icon

Expected behavior

The Sable tray icon should show up instead of a blank space.

Platform and versions

1. OS: Bazzite (Linux)
2. Version: 1.21.0 (Flatpak)

Additional context

More infos can be found in the Tauri documentation. This seems to be a tauri specific issue: https://github.com/charlesschaefer/tauri-docs/blob/1eeb91c9d85d0ccd2b37bcce6356f85226f0d7b7/src/content/docs/distribute/flatpak.mdx

  - --talk-name=org.kde.StatusNotifierWatcher # Optional: needed only if your app uses the tray icon
  - --filesystem=xdg-run/tray-icon:create # Optional: needed only if your app uses the tray icon - see an alternative way below

I did not add the talk option.

Further down is a suggestion for an alternative method to fix the tray icon without granting additional permissions:

If you prefer not opening access from your app to $XDG_RUNTIME_DIR (where tray-icon is saved on linux), you can change the path tauri saves the tray image:

TrayIconBuilder::new()
  .icon(app.default_window_icon().unwrap().clone())
  .temp_dir_path(app.path().app_cache_dir().unwrap()) // will save to the cache folder ($XDG_CACHE_HOME) where the app already has permission
  .build()
  .unwrap();

Metadata

Metadata

Assignees

No one assigned

    Labels

    TauriIssue related to Desktop and Mobile buildsbugSomething isn't workingbug/behaviourbehaviour bug

    Type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions