Recently I had a bunch of my own scripts for the thumbnails in Nautilus: WebP previews, sound waveforms, office documents and so on.
Seems like either I’m doing something wrong (thumbnail generation behavior changed), or custom thumbnailes don’t work in latest GNOME at all, even my previous scripts, which worked smoothly on previous versions of Ubuntu.
I’ve done some research, tried to run a simple script (see below) and it didn’t work out.
My test thumbnailer in /usr/share/thumbnailers/z.thumbnailer
:
[Thumbnailer Entry]
Exec=/home/maximal/thumb.sh %s %i %u %o
MimeType=image/webp;image/x-webp
Where /home/maximal/thumb.sh
is:
#!/bin/bash
echo $0 >> /home/maximal/thumb.log
echo $1 >> /home/maximal/thumb.log
echo $2 >> /home/maximal/thumb.log
echo $3 >> /home/maximal/thumb.log
echo $4 >> /home/maximal/thumb.log
Then, when I remove thumbnail cache rm -rf ~/.cache/thumbnails
and restart Nautilus nautilus -q
, my log file doesn’t contain anything and ~/.cache/thumbnails/fail/gnome-thumbnail-factory
contains all the failed thumbs (looks like corrupted/empty PNGs):
So, apparently, Nautilus even didn’t try to execute my thumbnailer script.
When I try to run thumb command itself, it works perfectly. For example convert
through cwebp|dwebp
package:
convert -thumbnail 256x256 file.webp png:file.webp.png
When I wrap this command to a thumbnailer, it looks like it wasn’t even requested to run by Nautilus.
[Thumbnailer Entry]
Exec=convert -thumbnail %sx%s %i png:%o
MimeType=image/webp;image/x-webp;
Exactly the same situation occurs with other my thumbnailers: audio waveforms, office documents, photoshop files and so on.
Could anyone help?