Libreoffice snap for Writer and Calc icons have disappear

Few weeks ago I have installed LibreOffice from as snap package. Currently I have LibreOffice version.

LibreOffice was working fine. But today I turned on my computer and now for Writer and Calc there are no icons. I pressed the Super key and typed in “libreoffice”. Also this two icons disappeared from dash.

Any idea what has happened or how to fix a problem?

I have solved the problem.

This problem is related to desktop shortcuts I requested for help in another thread and in files:


I have now notices that I have had “fixed” paths for Icons parameter in them:


and now when LibreOffice updated to new snap release, new path was created:


It looks to me that 208 and 213 are snap revision numbers and this revision numbers are not smart to have in any paths, because when new snap revision is released this number changes. Now in first two flies in this post, I have changed the path of Icon parameter to:


and this solved my problem.

1 Like

It’s a problem with any .desktop file for snap : they tend to use
instead of
which leads to lose icons every now and then ( ± each time there’s an update for a snap app’ ).

have you filed a bug for this, i don’t think anyone has reported this before (and i can surely not observe it anywhere)

django@ASGARD:~$ grep ^Icon /var/lib/snapd/desktop/applications/*

So it may not concern all snap but some target number_version instead of current

Therefore where to report ?

Those .desktop files are ( I guess ) automatically rebuild at each update, to the latest snap number version.
BUT if you are used to copy some .desktop files inside ~/.local/share/applications those won’t be updated, as expected.

What’s not normal is : .desktop files should be « path neutral » by using the provided current symlink.

they hopefully should all target the version number and not current … since the .desktop file is tied to this exact version and is replaced on update/rollback along with the snap so that options in the file as well as the icon, do exactly apply to the running version … this is part of snapds update, install and revert handling since a long time …

using /current is only relevant at all if you manually copy the .desktop file (at your own risk) to ~/.local/share/applications/

Yep. That’s why I amended my bitter comment.

But still I can’t see the interest of targeting number_version since current link exists for the newer version.

That may be a problem for app’s that need data ( things like personal profiles, passwords ) which are not stored under number_version ( maybe this ? )

And that’s not optimal in multi-users context - where all users won’t make use of same app’s / same snap-app’s / same snap-app’s-version. In such a context you need to « tailor » .desktop files at each user’s level.

these .desktop files are generated for every update/rollback, things in the environment stanzas in snapcraft.yaml (or snap/gui or other metadata they get generated from) might have changed, snapd might want/need to add new bits or pieces to the file etc etc … if they were just static files pointing somewhere they could perhaps just use /current … but even then, there are moments where /current does not exist (while being pointed to the new place during upgrade) where you then might hit race conditions …

PS i’m not sure what you mean in the multi user context … if you have multiple versions of the same snap app installed in parallel it will be namespaced …

Mmm. current should always exist then.

Let’s go back to the beginning : icon. Can’t there be a fallback path in the .desktop file : first path is the full absolute « snap » path, second one is just a generic name for the icon ?

i’m not sure what you mean in the multi user context

I mean having on one machine many sessions with very different needs. While trying to keep things clean and organized in each. Snap also adds corner cases here.

its a symlink … you’d have to change the kernels filesystem handling here :slight_smile:

that would be something to ask about since it would be a change to the XDG spec …

i still dont understand … if you want to use per-user .desktop files because one of your users needs an extra option added for launching, you’d copy the file to ~/.local/share/applications and edit it to have current in there while you add the option …

if you actually mean multiple parallel instances of a snap, you already have to define a namespace when installing the second (or N’th) parallel instance:

Ok I think my limitations in English prevent us from understanding each other, my bad.

I don’t understand why the .desktop files have to target number version ( which is by default the most recent ) since there is already a symlink current which does the same ? What is the risk ? Does not snapd always build that current symlink for each installed and later updated snap ?

If paths inside .desktop files used current instead of number_version it’d be easier to copy those desktop files anywhere needed and…

…then no more need for that editing. Just a little detail. But details matter, and snap already add many details to care about when compared to « legacy » .deb

Parallel installs are another ( interesting ) topic.

Icon= in .desktop file handles one and only one path ? so restrictive, lol.

anyway, to get back on topic, if you actually see icons dissapear for non-hacked (i.e. not manually edited in ~/local/share/applications) .desktop files, there might be a bug in snapd’s generator/snap-install code and you should file it on launchpad …

Problem with icons reappeared after 4 months of displaying fine. Now I see LibreOffice snap was upgraded from 7.1 to 7.2 version and picture file names changed there names. Now I solved the problem by changing Icon parameter path from:




for Calc and similar for Writer and now icons works again.

I don’t understand why there is a need for having version number in pictures file names if there are only one version of pictures in directory. :thinking:

this is really something you have to complain to libreoffice upstream about, not the snaps fault :slight_smile:

1 Like