Skip to content

Added StartupWMClass=snap-store to the .desktop file.#2009

Open
Kyuyrii wants to merge 1 commit intoubuntu:mainfrom
Kyuyrii:main
Open

Added StartupWMClass=snap-store to the .desktop file.#2009
Kyuyrii wants to merge 1 commit intoubuntu:mainfrom
Kyuyrii:main

Conversation

@Kyuyrii
Copy link
Copy Markdown

@Kyuyrii Kyuyrii commented Jan 18, 2026

Currently, when pinning the Snap Store to the KDE panel and opening it, it is not considered the same app that is pinned and uses the yellow icon that symbolizes Wayland.
Captura de imagem_20260118_131719

By modifying the .desktop file to add StartupWMClass=snap-store, the problem was resolved:
Captura de imagem_20260118_142802

@Kyuyrii
Copy link
Copy Markdown
Author

Kyuyrii commented Jan 18, 2026

I noticed that I didn't communicate very well; the problem isn't just when the Snap Store is pinned to the panel. In the video below, I demonstrate the situation and then use the modified .desktop file to resolve it.

2026-01-18.14-35-14.mp4

Copy link
Copy Markdown
Contributor

@aleasto aleasto left a comment

Choose a reason for hiding this comment

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

LGTM. As for why this is necessary:

The traditional logic for matching a window with an application is for the client to identify itself with an app-id that must match either the .desktop filename (here mangled by snapd into snap-store_snap-store) or the StartupWMClass entry of the desktop file. Unless instructed otherwise, a GTK3 window will identify itself using the filename of the binary executable (here snap-store).

On top of that some desktops like GNOME Shell can recognize that the application is sandboxed, and will ignore the application-provided identifier (could be maliciously impersonating a different app) and always match it against its sandboxed identifier (always trusted, provided by the system): this is why GNOME can show an icon even without this change.

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.

2 participants