With GNOME 49 there are now multiple thumbnailers for the same file types:
- GNOME 49 introduced glycin for safer thumbnailing, and much appreciated !, but libavif, libheif, libjxl, librsvg and evince (for tiff) for example on my system also provide a thumbnailer for AVIF, HEIF, JXL, SVG and TIFF image file types which glycin can also thumbnail.
- GNOME 49 added Papers as the new document viewer but Evince can’t be removed as Sushi still depends on it. So, Papers and Evince both provide thumbnailers for document file types.
Is there any logic to prefer certain thumbnailers, or are there plans for such?
As I read it, gnome_desktop_thumbnail_factory_load_thumbnailers_for_dir () in gnome-desktop uses g_dir_read_name () to find the thumbnailers files, which doesn’t guarantee any order. Indeed, using a simple test script on my system:
#!/usr/bin/python3
import gi
from gi.repository import GLib
gdir = GLib.Dir.open('/usr/share/thumbnailers/', 0)
while (name := gdir.read_name()) is not None:
print(name)
returns this jumble of files:
avif.thumbnailer
gnome-mobi-thumbnailer.thumbnailer
totem.thumbnailer
evince.thumbnailer
gsf-office.thumbnailer
glycin-image-rs.thumbnailer
heif.thumbnailer
gnome-epub-thumbnailer.thumbnailer
librsvg.thumbnailer
glycin-jxl.thumbnailer
papers.thumbnailer
gnome-font-viewer.thumbnailer
jxl.thumbnailer
glycin-heif.thumbnailer
glycin-svg.thumbnailer
Is this the order in which thumbnailers are tried for files? If so that would mean for AVIF, TIFF (evince), HEIF and SVG image types GNOME doesn’t use the glycin thumbnailer!
And same for document types, that would mean GNOME doesn’t use the Papers thumbnailer at all as Evince is higher up in the list.
And looking at init_thumbnailers_dirs () in gnome-desktop it adds more complexity as it looks for thumbnailers in XDG_DATA_HOME and XDG_DATA_DIRS, which on my system means it looks for thumbnailers in this order:
/home/jake/.local/share/thumbnailers
/home/jake/.local/share/flatpak/exports/share/thumbnailers
/var/lib/flatpak/exports/share/thumbnailers
/usr/local/share/thumbnailers
/usr/share/thumbnailers
So that would mean if there are user or flatpak thumbnailers for image types those would be prioritized over the safer glycin, even if glycin can thumbnail the same image type. That can’t be the intention of having the safer glycin thumbnailer added in GNOME 49
I’d suggest it’s processing thumbnailer directories the wrong way around — it should prefer system thumbnailers and only use user or flatpak thumbnailers for file types not provided by system thumbnailers. (Or actually I think it should never use user thumbnailers as that’s a security risk.)
Am I reading all this wrong?
