GNOME dock doesn't show app icon from custom .desktop file

Hi everyone, I’m experiencing a problem with the GNOME taskbar on Fedora Silverblue.

When I create a .desktop file to launch an app using toolbox run, everything works correctly and the icon is properly displayed in the app drawer: the app launches, but the icon is not shown correctly in the taskbar at the bottom, nor in the center-bottom of the app window itself (where GNOME normally displays the icon of the running app).

The icon is located at:

/home/strin/.local/share/icons/Brave.png

The .desktop file is located at:

/home/strin/.local/share/applications/Brave.desktop

In the .desktop file, I set the option:

Icon=/home/strin/.local/share/icons/Brave.png

And I also tried adding:

StartupWMClass=

using the value obtained from:

xprop | grep WM_CLASS

But that had no effect: the app icon still defaults to the generic GNOME executable icon.

The app in question is Brave, installed inside the Browsers container using toolbox, and if possible I’d prefer to stick with toolbox also because I tried with distrobox and it didn’t work either.

Does anyone have any idea how to fix this issue?
Thanks in advance! :slightly_smiling_face:

Hi and welcome to :fedora: !

Does it change if you don’t provide the absolute (or relative) path of the icon in the desktop file, but only the icon name (i.e. Icon=Brave), and let GNOME search it in the default paths?

I tried removing the absolute path and letting GNOME handle it on its own, but I still have the same issue: the icon only works in the app drawer, and the icon is not shown correctly in the taskbar at the bottom, nor in the center-bottom of the app window itself, just like before. I also copied the entire icon directory from the container, in case GNOME needed the icons at different resolutions, but nothing changed.

Can you post a screenshot?

It might be size-related (given that in the dock and under the app window there’s one size of the icon, and another size in the app drawer), so I would try using an SVG icon, or use both 64x64 and 128x128 PNGs.

Sure


I tried doing it using the .svg file, but it just doesn’t seem to work. I had already tried with PNGs in two different sizes, but those didn’t work either. When I get home, I’ll try to look for a way to export them using a script—maybe there’s something on GitHub.

1 Like

I am having the same issue, but with Cursor IDE app image. If I edit the .desktop file to run the .appimage directly in host, the icons show up fine. But if I run the same .appimage through toolbox run, the dock+window icon doesnt show up. I tried placing the icon in .local/share/icons too and just provide the filename. Same effect. Icon shows in app drawer and if I pin it in the dock, but when I run it, the instance opens as a separate window without icon. Tried setting the startupwmclass based on xprop - didnt help.

I use /usr/share/icons/hicolor/scalable, if it’s not present you would have to pull all the images named after the app icon from all the folders..