Skip to content

fix(linux): Fix app icon not showing on Gnome+Wayland (#5258) - #13581

Merged
FabianLars merged 1 commit into
tauri-apps:devfrom
martpie:dev
Jun 6, 2025
Merged

fix(linux): Fix app icon not showing on Gnome+Wayland (#5258)#13581
FabianLars merged 1 commit into
tauri-apps:devfrom
martpie:dev

Conversation

@martpie

@martpie martpie commented Jun 6, 2025

Copy link
Copy Markdown
Contributor

closes #5258

Spinned off a Fedora VM to test Museeks, and realized the icon would never show in dock, nor the installer. Modern Fedora uses Wayland. This also applied to Ubuntu. Forcing x11 shown the correct icon.

For whatever reasons, setting StartupWMClass to the name of the app fixes it. See the discussion linked above. I don't know if this is just Gnome, or Freedesktop or whatever, but this fixes it.

Before:

Screenshot 2025-06-06 at 14 58 21
Screenshot 2025-06-06 at 14 58 57

After:

Icon is still not showing on installer:
Screenshot 2025-06-06 at 14 59 57

but is showing correctly in dock + grid view:

Screenshot 2025-06-06 at 15 00 22

I tested that locally with a local template, I know, not perfect. If I can test it using the real tauri repo.

@martpie
martpie marked this pull request as ready for review June 6, 2025 13:14
@martpie
martpie requested a review from a team as a code owner June 6, 2025 13:14
@martpie

martpie commented Jun 6, 2025

Copy link
Copy Markdown
Contributor Author

mmmh I cannot reproduce the fix on the official repo with the hello world example:

cargo install --path . # from crates/tauri-bundler
cd ../..
cargo run --example helloworld

What am I doing wrong?

@FabianLars

Copy link
Copy Markdown
Member

cargo run --example helloworld doesn't use tauri's cli/bundler. To test what you installed with cargo install --path . you need to run cargo tauri build (if you want with the --debug flag). That doesn't work with the helloworld example though. The api example should work.

@github-actions

github-actions Bot commented Jun 6, 2025

Copy link
Copy Markdown
Contributor

Package Changes Through d306eff

There are 8 changes which include tauri-bundler with minor, tauri-cli with minor, tauri-codegen with minor, tauri-utils with minor, @tauri-apps/cli with minor, tauri with minor, @tauri-apps/api with minor, tauri-runtime-wry with patch

Planned Package Versions

The following package releases are the planned based on the context of changes in this pull request.

package current next
@tauri-apps/api 2.5.0 2.6.0
tauri-utils 2.4.0 2.5.0
tauri-bundler 2.4.0 2.5.0
tauri-runtime 2.6.0 2.6.1
tauri-runtime-wry 2.6.0 2.6.1
tauri-codegen 2.2.0 2.3.0
tauri-macros 2.2.0 2.2.1
tauri-plugin 2.2.0 2.2.1
tauri-build 2.2.0 2.2.1
tauri 2.5.1 2.6.0
@tauri-apps/cli 2.5.0 2.6.0
tauri-cli 2.5.0 2.6.0

Add another change file through the GitHub UI by following this link.


Read about change files or the docs at github.com/jbolda/covector

@FabianLars FabianLars left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this has a very slim chance that its side effect is unwanted but in that case the dev can provide a custom template. anyway, thanks for the PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug] Icons fail to work under Ubuntu 22.04.1 LTS & Tauri 1.1.1

2 participants