Snaps not showing meaningful icons on the desktop (just white boxes)

I don't know if the problem is this side of the keyboard - so please be nice :slight_smile:

When I install a snap and it drops an icon on the desktop, that icon is just a generic white box.

Is this normal behaviour? Am i then supposed to select my own icon?

The white icon does start the application so i think it's installed correctly.

(running Redmond theme with NVIDIA 418 driver in case that helps, on Disco dingo)

Thanks in advance.

It might depend on the snaps. I'm a bit surprised they put a launcher on your desktop, though (but again, that might depend). Try the following to get a bit more infos:

  1. Open a terminal.
  2. Type "cat " (without the quotes) and drag a launcher without an icon from your desktop to the terminal so that it'll complete the command, then press enter to execute it. It'll show the content of the desktop file.
  3. Paste the output here (it'll start with "[Desktop Entry]") or just the line starting by "Icon=" if there's one. If there isn't one, it would explain why it doesn't display an icon; if there is one, it'll show what it's looking for for the icon.

Also, tell us which snaps do this, it'll be easier to check.


Didn't know about the cat drop icon thingy. I'm constantly amazed at the cool things you can do with Linux.

looking at the paths now I can see the problem, they point to a specific version. If they pointed to "..../current/...." then they would find an icon. Problem now is when you click the icon I cant seem to get deeper than the (linked) current directory. Perhaps something more fundamental is broken?

Telegram desktop :-

[Desktop Entry]
Name=Telegram Desktop
Comment=Official desktop version of Telegram messaging app
Exec=env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/telegram-desktop_telegramdesktop.desktop /snap/bin/telegram-desktop -- %u

Pycharm-community :-
[Desktop Entry]
Name=PyCharm Community Edition
Exec=env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/pycharm-community_pycharm-community.desktop /snap/bin/pycharm-community %f
Comment=Python IDE for Professional Developers

other broken icons include remina (1.3.4), notepad++ (7.7.1) and a handful of others

Ok, so, if you check the paths, like /snap/telegram-desktop and /snap/pycharm-community, do you have the same versions (490 and 123 respectively)? If so, if you go deeper, do you find the icons or are they completely missing?
If the versions are different, did you, at some point, update the snaps? If so, did you already have the icons on your desktop and they lost their icons (which would be expected) or did they already get missing icons (blank file one) when you put them on your desktop in the first place.

Problem now is when you click the icon I cant seem to get deeper than the (linked) current directory.

I'm not sure to understand what you mean by that.

Thanks for the info. Short answer is no, I don't have those versions.

Under /snap/Telegram-desktop/ there are 4 directories 818, 836, 'common' and 'current' (current is just a link to 836).

same sort of deal with /snap/pycharm-community - 128, 132, common, current (links to 132)

My comment was (a poorly worded explantation) of when you "properties" of the desktop icon - basic tab, select the icon button on the top left and try to navigate to /snap/telegram-desktop/current I cannot navigate any deeper (none of the sub directories are visible {eg: bin, etc, meta...). This is the case for BOTH the snap directory off root and the snap directory of my home directory. I know sub directories are off the root path as i can see them (and the png and svg icons in the case of pycharm) when browsing in caja.

That's weird. I guess this would imply that you don't have the right permissions to enter these subdirectories (i.e. only root have the r and x flags for them) but it's quite unexpected. That might be specific to some snaps but I can't reproduce the issue on my side with Telegram.

Now, about your issue, try the following:

  1. Open the launchers on your desktop with Pluma, the text editor. As before, you can simply type "pluma " in a terminal and drag the launcher in to complete the file name.
  2. Try to update the Icon path so that it points to current and save. See it that changes anything. If that doesn't, try to edit the file again and change current to the latest version (currently 836).

Small side question: did Telegram (and eventually others snaps) put a launcher on your desktop by itself during installation or did you put it yourself? If so, how? drag'n drop from the Applications menu?

I've edited the launcher (replacing the version number with 'current') and I have icons back. YAY

Thanks heaps.

I'm sure when the snap was originally installed it put the icons on my desktop (I vaguely recall it being 'correct' back in the day) but subsequent snap refresh-es broke them.

At the time of breakage I was not concerned, but eventually reached the point of too many little grey boxy icons.

Thanks again.

And again, how cool is it to edit an 'icon' file in a simple text editor to make it work.. Marvellous

What you see in the Applications menu or your desktop are what we call launchers. Unlike Windows or MacOS where an application is a "bundle" of the app itself, the icon to display and can be renamed to anything, Linux just places the binaries themselves where appropriate and they contain nothing besides executable code, so we use launchers to organize them. They're text files (with .desktop extension) that define a name to display, the path of the command/app to run, the icon to display, the category and so on.

There are default directories that are used to store launchers: /usr/share/applications (system level) and ~/.local/share/applications (user level). The Applications menu lists and sorts the ones it finds in these dirs to show you an organized list of the apps that have been installed on your system (well, the ones that actually have launchers). You can easily add your own launchers to the menu simply by creating .desktop files and adding them to one of these dirs (system or user, depending on who needs to have access to the app).

To come back to your initial issue, I'm not very familiar with snaps but I would assume that at least some of them delete the content of old versions when updating them, so the personal launcher that you have on your desktop references content like icons that don't exist anymore in their old dir.