protonscr

Adding icon for shortcut in .desktop for Proton games

steamclosed Steam client
ValveSoftware/steam-for-linux#10630 · opened 2024-03-18 by hifron · updated 2025-02-01 · 2 comments · github
Hhifron 2024-03-18 github

In today steam fresh with (Proton 9 Beta) I install if I install some games there is missing icon in .desktop files(in application menu) in some Proton games. Game runs but its shortcut is missing icon description. Example:

Exec: steam steam://rungameid/number
Icon: steam

but other .desktop files showing the icon also from Steam(installed in the same time) have:

Exec: steam steam://rungameid/number
Icon: steam_icon_number
Mmirao 2024-11-03 github

Got the same issue with the game "Titan Quest Anniversary Edition" running in "Proton Experimental" when using Steam installed over APT in Ubuntu 24.04.

Steam created Titan Quest Anniversary Edition.desktop in my Ubuntu desktop folder.

[Desktop Entry]
Name=Titan Quest Anniversary Edition
Comment=Play this game on Steam
Exec=steam steam://rungameid/475150
Icon=steam
Terminal=false
Type=Application
Categories=Game;

At the same time I noticed that an icon for the game exists in the ICO format here: ~/.steam/steam/steam/games/b108aac82663a01d99a5da1c058d54aed0c57590.ico.

So I converted the ICO to PNG

$ convert ~/.steam/steam/steam/games/b108aac82663a01d99a5da1c058d54aed0c57590.ico ~/.local/share/icons/Titan.png # It's an ImageMagick's tool

and replaced Icon=steam by Icon=Titan in the desktop shortcut to get the correct icon.
Of course it's also possible to copy the desktop shortcut to ~/.local/share/applications and then you can pin the application to Ubuntu dock (which would be great if Steam did automatically IMHO).

Hhifron 2025-02-01 github

there should be valid .local/share/applications symlink from steam dir to .local/share/applications and if not, problem occurs and in that directory there is also icons dir, so maybe setup on install is problem or some refresh.

Closing this now, work for me.

Proton versions