1

If a specific app does not store the thumbnails it generates for its type of files into the usual ~/.cache/thumbnails then those thumbnails are only shown inside that specific app and not in default file explorer, or picture-viewers and the likes.

Is there a way to tell Ubuntu to retrieve thumbnails from other folders ? The usual one + any folder named thumbnails in my ~/ ?

for reference : GiMP ( snap ) and thumbnails for .xcf files

2 Answers 2

0

For such questions, you try to locate the specification, if it exists. In this case, the thumbnails do have a specification, https://specifications.freedesktop.org/thumbnail-spec/thumbnail-spec-latest.html

And in there it says,

Thumbnail Directory

For every user, there must be exactly one place where all generated thumbnails are stored. This thumbnails directory is located in the user's XDG Cache Home, as defined by the XDG Base Directory Specification. Namely, if the environment variable $XDG_CACHE_HOME is set and not blank then the directory $XDG_CACHE_HOME/thumbnails will be used, otherwise $HOME/.cache/thumbnails will be used.

3
  • So here the problem is GiMP-as-a-snap who can't follow these specifications, as snap can't access hidden files or folders. Or. Specifications regarding thumbnails should include some new paths ? Thanks for your enlightening comment.
    – Coeur Noir
    Jun 27, 2020 at 2:31
  • Snaps are alright. If you are affected by all the anti-snap paranoia, then you will be finding issues where none exist. Snap packages can request this interface, snapcraft.io/docs/thumbnailer-service-interface so that they reuse the host's common thumbnailer service. The GIMP snap packagers either decided to protect your privacy, or have not requested yet the interface (has to be done manually). You should talk to them.
    – user4124
    Jun 28, 2020 at 13:39
  • When I say the problem here is GiMP-as-a-snap, it's because this problem does not occur with GiMP as a .deb yet it's not against snap in general speaking. There's actually no thumbnailer for xcf files in 20.04. So thumbnailer-service-interface is of no help here. It's GiMP itself that generates those thumbnails. If done through GiMP-as-a-snap they are not stored in the expected place. If done through GiMP-as-a-deb, they are. See askubuntu.com/questions/1250031/… for the long story.
    – Coeur Noir
    Jun 30, 2020 at 0:56
0

I have finally ended up with binding both « thumbnails » folders through fstab adding those lines :

# .xcf thumbnails from gimp snap for any app
/home/user_1/.cache/thumbnails/ /home/user_1/snap/gimp/common/.cache/thumbnails/    none    bind    0   0
/home/user_2/.cache/thumbnails/ /home/user_2/snap/gimp/common/.cache/thumbnails/    none    bind    0   0
/home/user_3/.cache/thumbnails/ /home/user_3/snap/gimp/common/.cache/thumbnails/    none    bind    0   0

This way, Gimp-snap actually writes its thumbnails there and then Nemo and Nautilus accordingly displays thumbnails for .xcf files.

gThumb though still shows empty frames for .xcf files - but my main concern was the file explorer.

Thanks to https://forum.ubuntu-fr.org/viewtopic.php?pid=22362050#p22362050

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.