Gimp as a snap ⋅ no thumbnails for .xcf files in Nemo, gThumb…

Hi,

references :
https://forum.ubuntu-fr.org/viewtopic.php?id=2053949 [ french ]
https://forum.snapcraft.io/t/gimp-and-thumbnails-for-xcf-files/18131 [ english, more or less ]

tl;dr

when using Gimp as a snap, you’ll see thumbnails for .xcf files only « inside » Gimp and nowhere else ( Nemo, Nautilus, gThumb… )

I did a messy workaround for .xcf thumbnails to appear anywhere expected : I put all of my user’s thumbnails into ~/snap/gimp/common/.cache/thumbnails/ and now ~/.cache/thumbnails/ is a symlink targeting the first.

You’d agree it’s absolutely a bad idea to store all of an user’s thumbnails into a particular subfolder of a particular snap.

So any suggestion to achieve that in a better way is welcome :wink:
⋅ how tell my session to look for thumbnails not only in ~/.cache/thumbnails/ but also in any thumbnails folder inside ~/snap/ ?

Snap… see, I try to use them but it’s not painless.


later :

django@ASGARD:~$ sudo snap connect gimp:thumbnailer-service
erreur : snap "gimp" has no plug named "thumbnailer-service"
django@ASGARD:~$

@bashfulrobot ⋅ is personal-files interface of any help in this situation ?
I just don’t understand if I can set it myself, and how, or if it needs first be enabled package’s side ?


…then gimp-snap may use ~/.cache/thumbnails instead of ~/snap/gimp/… for storing the thumbnails it generates ?

This is something that the snap author has to define. Then you actually apply to use the interface (post on the forum) due to the security implications. And testing, etc.

Ok now I understand, thanks.

So best way would be an answer to :
⋅ how tell my session to look for thumbnails not only in ~/.cache/thumbnails/ but also in any thumbnails folder inside ~/snap/ ?
Then it would solve this issue, and for any snap generating thumbnails.

If I follow you correctly, any location or file that you want to access needs to be defined within the interface. And they can be defined as read only or read and write.

Errr… I was meaning without modifying anything snap side. Some system settings regarding how thumbnails are searched.

Isn’t it surprising that any app looks only in ~/.cache/thumbnails ?

Is there a way to « expand » that search to either :
⋅ any folder named thumbnails inside ~/ including therefore those in ~/snap
⋅ or defining many paths like ~/.cache/thumbnails + ~/snap/gimp/common/.cache/thumbnails/ + others if needed ?

Where does Ubuntu define paths for thumbnails folders ? And how « aggregate » those ?

Another trick maybe… automatically add to ~/.cache/thumbnails the files found in ~/snap/gimp/common/.cache/thumbnails/ as soon as they’re created or modified ?
I can’t do that with a symlink… The fusion of 2 folders, sort of.

Ah - if the behaviour of the application (search paths, functionality, etc) needs to be changed - that would be outside the packaging and in the source code itself upstream.

If an app does only look in ~/.cache/thumbnails, there could be a reason the author decided to do that - be it a standard or anything else…

Well I think the reason is any lib-thumbnailer sends its .png to ~/.cache/thumbnails which is good.

Now can’t it be a kind of $PATH to « concatenate » many thumbnails folders ?

This only because some snap app’s will never send their .png thumbnails to ~/.cache/thumbnails
it’s Gimp here but maybe there could be others… Gimp as deb sends its thumbnails to the ↑ usual place.