Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 6, 2025

Conversation

martpie
Copy link
Contributor

@martpie martpie commented Jun 6, 2025

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.

@github-project-automation github-project-automation bot moved this to 📬Proposal in Roadmap Jun 6, 2025
@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
Copy link
Contributor Author

martpie commented Jun 6, 2025

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
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.

Copy link
Contributor

github-actions bot commented Jun 6, 2025

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

Copy link
Member

@FabianLars FabianLars left a comment

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!

@FabianLars FabianLars merged commit bd8a7cf into tauri-apps:dev Jun 6, 2025
14 checks passed
@github-project-automation github-project-automation bot moved this from 📬Proposal to 🔎 In audit in Roadmap Jun 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🔎 In audit
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