protonscr

`.desktop` file tweak to make GNOME behave better

steamopen Window manager
ValveSoftware/steam-for-linux#12207 · opened 2025-07-15 by alexsch01 · updated 2025-08-03 · 1 comments · github
Aalexsch01 2025-07-15 github

https://github.com/ublue-os/bazzite/pull/2874
@EPOCHvoyager

Because GNOME has deprecated and removed icon hints, to my knowledge, all windows missing a matching StartupWMClass in a .desktop file will use this default icon and a generic app name.

While this is also the case with the shortcuts Steam creates by default (during installation or by right-clicking the game > Manage > Add desktop shortcut), it can be manually fixed. For native games, you can add a StartupWMClass=<executable-name> line to a .desktop. For Proton games, you can add StartupWMClass=steam_app_<appid>, due to Proton automatically setting this WM_CLASS with the game's native Steam appid.

would be nice if the Steam client would include above in the .desktop file when creating a new shortcut

Example Usage

Image showing an example .desktop file, with the StartupWMClass property highlighted

PPeppoDev 2025-08-03 github

Your link is private bro, but I agree with you. I create a cli to help to fix that but there is more problem than it looks like. While we are using proton games x11 its just fine, everything is just steam_app_{game_id} but natives and wayland proton its different. I am investigating this issue for a while and there is no pattern when we are talking about native games and even worst, wayland games (generally follow the name of the exe game but not always). And there is a problem even bigger that we can have the same game running natively, x11, wayland and all that is different from each other so there is not reliable way to know this value (as far as know).

On the worst scenario, the only way to fix that on gnome is a GUI to let the user say what is the version he/she is using and for sure we should hardcode every wmclass for each non x11 game possible, its not hard but its too tiring.

Nothing extracted yet.