protonscr

Game window names do not match desktop entry file names

steamopen Window manager
ValveSoftware/steam-for-linux#11012 · opened 2024-06-23 by Dannflower · updated 2025-12-02 · 2 comments · github
DDannflower 2024-06-23 github

Your system information

  • Steam client version (build number or date): 1718904662
  • Distribution (e.g. Ubuntu): Ubuntu 24.04
  • Opted into Steam client beta?: No
  • Have you checked for system updates?: Yes
  • GPU: Nvidia GTX 1080

Please describe your issue in as much detail as possible:

When installing a game via Steam, a new desktop entry (.desktop file) gets created in ~/.local/share/applications that is named the same as the game that was just installed. However, when running a game via Steam the window appears to be named using the app's Steam ID, i.e. steam_app_<game_id>. This causes the game's window icon in the Gnome dock to show the generic gear icon.

The desktop entry is configured correctly to show the game's icon as this is how it shows up in Gnome's "Show Apps" view:

Screenshot from 2024-06-23 15-51-38

For ZeroRanger, the .desktop file is named ZeroRanger.desktop and the contents of the desktop entry are as follows:

[Desktop Entry]
Name=ZeroRanger
Comment=Play this game on Steam
Exec=steam steam://rungameid/809020
Icon=steam_icon_809020
Terminal=false
Type=Application
Categories=Game;

When the game is running, it's window shows up in the Gnome dock like this:

Screenshot from 2024-06-23 15-39-02

As a workaround, you can either:

  • Add the StartupWMClass=steam_app_<app_id> property to the end of the .desktop file (for ZeroRanger it would be StartupWMClass=steam_app_809020).

  • Rename the .desktop file itself to match the name of the window (for ZeroRanger it becomes steam_app_809020.desktop).

Either of these then cause the window to show the correct icon/name in the dock.

Screenshot from 2024-06-23 15-56-46

Hopefully there's a way for Steam to handle this itself when creating the desktop icons.

Steps for reproducing this issue:

  1. Install a game via Steam.
  2. Launch the installed game.
  3. Notice it uses the default gear icon for its window in the Gnome dock.
PPhilipHakans 2025-11-30 github

I can add that for me the only thing that worked was adding StartupWMClass AND renaming the .desktop file of the game to match the name of the "unknown" icon in the Dash on GNOME 49.2.

For example starting Overwatch 2 on Steam launched "overwatch.exe" and showed "overwatch.exe" in the Dash with the standard "unknown" icon. Renaming my .desktop file from "Overwatch 2.desktop" to "overwatch.exe.desktop" solved the issue for me.

So, adding "StartupWMClass=steam_app_2357570" (appid for Overwatch 2) to the end of the .desktop file did not work.
Adding "StartupWMClass=steam_app_2357570" AND renaming the file to "overwatch.exe.desktop" solved the issue for me.

DE: GNOME 49.2

My system information:

  • Steam client version (build number or date): 1763795278
  • Distribution (e.g. Ubuntu): CachyOS
  • Opted into Steam client beta?: No
  • Have you checked for system updates?: Yes
  • GPU: AMD Radeon RX 9070 XT
DDannflower 2025-12-02 github

Adding "StartupWMClass=steam_app_2357570" AND renaming the file to "overwatch.exe.desktop" solved the issue for me.

Just to clarify, you should only need to do one or the other depending on the window name given to the launched application. That is, you can also just do StartupWMClass=overwatch.exe without having to also rename the file. In my case, Steam launches Overwatch 2 with a window named "steam_app_2357570" so that's why StartupWMClass=steam_app_2357570 worked for me.

GNOME uses both the name of the desktop entry file and StartupWMClass when determining if a window belongs to an application defined by a desktop entry, but it only needs one of them to match.

On a tangential note: I wonder why Steam sometimes uses the app ID and sometimes uses the executable file name for window names? The first time I noticed that with another game, I assumed maybe it had to do with the game running natively, but Overwatch certainly isn't native.

Nothing extracted yet.