Today I Learned: GNOME Thumbnailers

While tooling around the web I stumbled across a tidbit with regards to one of the minor workings of Nautilus... which is really to say what appears as a core component of the GNOME desktop environment.

Dave Jansen wrote up an interesting note on enabling webp image thumbnails in Nautilus. TL; DR, there's an RPM which it seams the team working on the Workstation flavor neglected to install - webp-pixbuf-loader. Install that and restart Nautilus (nautilus -q) and you're off to the races.

But... it got me curious.

Obviously there is some binary and or library which is being shipped dynamically which will extend the functionality of Nautilus. I've been mildly curious about this in the past. After all, Dropbox chose to invest the engineering effort into integrating with Nautilus.

Since we have a package name to start from, let's take a look at what's happening with it:

[~]$ rpm -ql webp-pixbuf-loader
/usr/lib/.build-id
/usr/lib/.build-id/51
/usr/lib/.build-id/51/8bc2448b396f5bcfe3a837613f45b5e66c2b3b
/usr/lib64/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-webp.so
/usr/share/licenses/webp-pixbuf-loader
/usr/share/licenses/webp-pixbuf-loader/LICENSE.LGPL-2
/usr/share/thumbnailers/webp-pixbuf.thumbnailer

Hmpf. Not much. At the end of the day, there's really two files (with the exception of the license): webp-pixbuf.thumbnailer and libpixbufloader-webp.so. Based on those file names I'm going to make an educated guess that the latter is the brains of the operation doing the heavy lifting and the former is the shim layer used by GNOME to interface with the library.

It seems that the SUMMARY field of the RPM is in alignment with that:

[~]$ rpm -q --qf '%{SUMMARY}\n' webp-pixbuf-loader
WebP image loader for GTK+ applications

And it also seems like they aren't doing any type of monkey business like some
RPMs do (you know installing GPG keys behind your back ::cough cough:: Chrome,
Slack, etc).  We didn't see any cron jobs in the file listing and as to scripts
being run by the RPM itself, there's nothing:

```bash
[~]$ rpm -q --scripts  webp-pixbuf-loader

To be clear, I didn't expect anything funny out of the Fedora packagers. This, like the rest of the blog post, is just externalizing some of the muscle memory I have with regards to exploration.

That then got me thinking though... What other thumbnail type mechanisms have I been unaware of?

[~]$ dnf whatprovides "/usr/share/thumbnailers/*"
Last metadata expiration check: 1:58:42 ago on Fri 01 Jul 2022 07:53:34 PM PDT.
atril-thumbnailer-1.26.0-2.fc36.x86_64 : Atril thumbnailer extension for caja
Repo        : fedora
Matched from:
Filename    : /usr/share/thumbnailers/atril.thumbnailer

eom-1.26.0-5.fc36.i686 : Eye of MATE image viewer
Repo        : fedora
Matched from:
Filename    : /usr/share/thumbnailers/eom-thumbnailer.thumbnailer

eom-1.26.0-5.fc36.x86_64 : Eye of MATE image viewer
Repo        : fedora
Matched from:
Filename    : /usr/share/thumbnailers/eom-thumbnailer.thumbnailer

evince-thumbnailer-42.1-1.fc36.x86_64 : Evince thumbnailer
Repo        : fedora
Matched from:
Filename    : /usr/share/thumbnailers/evince.thumbnailer

evince-thumbnailer-42.2-2.fc36.x86_64 : Evince thumbnailer
Repo        : @System
Matched from:
Filename    : /usr/share/thumbnailers/evince.thumbnailer

evince-thumbnailer-42.2-2.fc36.x86_64 : Evince thumbnailer
Repo        : updates
Matched from:
Filename    : /usr/share/thumbnailers/evince.thumbnailer

ffmpegthumbnailer-2.2.3-0.2.20210902gitd92e191.fc36.x86_64 : Lightweight video thumbnailer that can be used by file managers
Repo        : rpmfusion-free
Matched from:
Filename    : /usr/share/thumbnailers/ffmpegthumbnailer.thumbnailer

freecad-1:0.19.4-1.fc36.x86_64 : A general purpose 3D CAD modeler
Repo        : fedora
Matched from:
Filename    : /usr/share/thumbnailers/FreeCAD.thumbnailer

gdk-pixbuf2-2.42.8-1.fc36.i686 : An image loading library
Repo        : fedora
Matched from:
Filename    : /usr/share/thumbnailers/gdk-pixbuf-thumbnailer.thumbnailer

gdk-pixbuf2-2.42.8-1.fc36.x86_64 : An image loading library
Repo        : @System
Matched from:
Filename    : /usr/share/thumbnailers/gdk-pixbuf-thumbnailer.thumbnailer

gdk-pixbuf2-2.42.8-1.fc36.x86_64 : An image loading library
Repo        : fedora
Matched from:
Filename    : /usr/share/thumbnailers/gdk-pixbuf-thumbnailer.thumbnailer

gnome-directory-thumbnailer-0.1.11-8.fc36.x86_64 : Thumbnailer for directories
Repo        : fedora
Matched from:
Filename    : /usr/share/thumbnailers/gnome-directory-thumbnailer.thumbnailer

gnome-epub-thumbnailer-1.6-7.fc36.x86_64 : Thumbnailers for EPub and MOBI books
Repo        : fedora
Matched from:
Filename    : /usr/share/thumbnailers/gnome-epub-thumbnailer.thumbnailer
Filename    : /usr/share/thumbnailers/gnome-mobi-thumbnailer.thumbnailer

gnome-font-viewer-42.0-1.fc36.x86_64 : Utility for previewing fonts for GNOME
Repo        : @System
Matched from:
Filename    : /usr/share/thumbnailers/gnome-font-viewer.thumbnailer

gnome-font-viewer-42.0-1.fc36.x86_64 : Utility for previewing fonts for GNOME
Repo        : fedora
Matched from:
Filename    : /usr/share/thumbnailers/gnome-font-viewer.thumbnailer

gnome-kra-ora-thumbnailer-1.4-8.fc36.x86_64 : Thumbnailer for Krita and MyPaint images
Repo        : fedora
Matched from:
Filename    : /usr/share/thumbnailers/gnome-kra-thumbnailer.thumbnailer
Filename    : /usr/share/thumbnailers/gnome-openraster-thumbnailer.thumbnailer

gnome-nds-thumbnailer-3.0.0-19.fc36.x86_64 : Thumbnailer for Nintendo DS ROM files
Repo        : fedora
Matched from:
Filename    : /usr/share/thumbnailers/gnome-nds-thumbnailer.thumbnailer

libgsf-1.14.47-5.fc36.i686 : GNOME Structured File library
Repo        : fedora
Matched from:
Filename    : /usr/share/thumbnailers/gsf-office.thumbnailer

libgsf-1.14.47-5.fc36.x86_64 : GNOME Structured File library
Repo        : @System
Matched from:
Filename    : /usr/share/thumbnailers/gsf-office.thumbnailer

libgsf-1.14.47-5.fc36.x86_64 : GNOME Structured File library
Repo        : fedora
Matched from:
Filename    : /usr/share/thumbnailers/gsf-office.thumbnailer

libheif-1.12.0-4.fc36.x86_64 : HEIF file format decoder and encoder
Repo        : rpmfusion-free
Matched from:
Filename    : /usr/share/thumbnailers/heif.thumbnailer

libjxl-0.6.1-9.fc36.i686 : Library files for JPEG-XL
Repo        : fedora
Matched from:
Filename    : /usr/share/thumbnailers/jxl.thumbnailer

libjxl-0.6.1-9.fc36.x86_64 : Library files for JPEG-XL
Repo        : @System
Matched from:
Filename    : /usr/share/thumbnailers/jxl.thumbnailer

libjxl-0.6.1-9.fc36.x86_64 : Library files for JPEG-XL
Repo        : fedora
Matched from:
Filename    : /usr/share/thumbnailers/jxl.thumbnailer

librsvg2-2.54.0-1.fc36.i686 : An SVG library based on cairo
Repo        : fedora
Matched from:
Filename    : /usr/share/thumbnailers/librsvg.thumbnailer

librsvg2-2.54.0-1.fc36.x86_64 : An SVG library based on cairo
Repo        : fedora
Matched from:
Filename    : /usr/share/thumbnailers/librsvg.thumbnailer

librsvg2-2.54.4-1.fc36.i686 : An SVG library based on cairo
Repo        : updates
Matched from:
Filename    : /usr/share/thumbnailers/librsvg.thumbnailer

librsvg2-2.54.4-1.fc36.x86_64 : An SVG library based on cairo
Repo        : @System
Matched from:
Filename    : /usr/share/thumbnailers/librsvg.thumbnailer

librsvg2-2.54.4-1.fc36.x86_64 : An SVG library based on cairo
Repo        : updates
Matched from:
Filename    : /usr/share/thumbnailers/librsvg.thumbnailer

mate-control-center-1.26.0-3.fc36.i686 : MATE Desktop control-center
Repo        : fedora
Matched from:
Filename    : /usr/share/thumbnailers/mate-font-viewer.thumbnailer

mate-control-center-1.26.0-3.fc36.x86_64 : MATE Desktop control-center
Repo        : fedora
Matched from:
Filename    : /usr/share/thumbnailers/mate-font-viewer.thumbnailer

mcomix3-thumbnailer-0-0.24.D20211016git483f4b3.fc36.noarch : Thumbnailer for mcomix3
Repo        : fedora
Matched from:
Filename    : /usr/share/thumbnailers/comicthumb.thumbnailer

mypaint-2.0.1-5.fc36.x86_64 : A fast and easy graphics application for digital painters
Repo        : fedora
Matched from:
Filename    : /usr/share/thumbnailers/mypaint-ora.thumbnailer

raw-thumbnailer-3.0.0-22.fc36.x86_64 : Nautilus file manager thumbnailer for RAW images
Repo        : fedora
Matched from:
Filename    : /usr/share/thumbnailers/raw.thumbnailer

renderdoc-1.17-2.fc36.x86_64 : A stand-alone graphics debugging tool
Repo        : fedora
Matched from:
Filename    : /usr/share/thumbnailers/renderdoc.thumbnailer

tiled-1.8.2-1.fc36.i686 : Tiled Map Editor
Repo        : fedora
Matched from:
Filename    : /usr/share/thumbnailers/tiled.thumbnailer

tiled-1.8.2-1.fc36.x86_64 : Tiled Map Editor
Repo        : fedora
Matched from:
Filename    : /usr/share/thumbnailers/tiled.thumbnailer

totem-video-thumbnailer-1:42.0-1.fc36.i686 : Totem video thumbnailer
Repo        : fedora
Matched from:
Filename    : /usr/share/thumbnailers/totem.thumbnailer

totem-video-thumbnailer-1:42.0-1.fc36.x86_64 : Totem video thumbnailer
Repo        : @System
Matched from:
Filename    : /usr/share/thumbnailers/totem.thumbnailer

totem-video-thumbnailer-1:42.0-1.fc36.x86_64 : Totem video thumbnailer
Repo        : fedora
Matched from:
Filename    : /usr/share/thumbnailers/totem.thumbnailer

webp-pixbuf-loader-0.0.4-1.fc36.i686 : WebP image loader for GTK+ applications
Repo        : fedora
Matched from:
Filename    : /usr/share/thumbnailers/webp-pixbuf.thumbnailer

webp-pixbuf-loader-0.0.4-1.fc36.x86_64 : WebP image loader for GTK+ applications
Repo        : fedora
Matched from:
Filename    : /usr/share/thumbnailers/webp-pixbuf.thumbnailer

webp-pixbuf-loader-0.0.5-1.fc36.i686 : WebP image loader for GTK+ applications
Repo        : updates
Matched from:
Filename    : /usr/share/thumbnailers/webp-pixbuf.thumbnailer

webp-pixbuf-loader-0.0.5-1.fc36.x86_64 : WebP image loader for GTK+ applications
Repo        : @System
Matched from:
Filename    : /usr/share/thumbnailers/webp-pixbuf.thumbnailer

webp-pixbuf-loader-0.0.5-1.fc36.x86_64 : WebP image loader for GTK+ applications
Repo        : updates
Matched from:
Filename    : /usr/share/thumbnailers/webp-pixbuf.thumbnailer

xournalpp-1.1.1-1.fc36.x86_64 : Handwriting note-taking software
Repo        : fedora
Matched from:
Filename    : /usr/share/thumbnailers/com.github.xournalpp.xournalpp.thumbnailer

xreader-thumbnailer-3.2.2-2.fc36.x86_64 : System thumbnailer using xreader libraries
Repo        : fedora
Matched from:
Filename    : /usr/share/thumbnailers/xreader.thumbnailer

Holy cow! While I understand that some of those are duplicates there's also quite a few I hadn't even considered before... Nintendo DS ROMs, Comics (mcomix3) as well as some other nits of mine (RAW Images - raw-thumbnailer).

But also that second package from the bottom caught my eye and down another rabbit hole I went:

[~]$ dnf info xournalpp
Last metadata expiration check: 2:06:09 ago on Fri 01 Jul 2022 07:53:34 PM PDT.
Available Packages
Name         : xournalpp
Version      : 1.1.1
Release      : 1.fc36
Architecture : x86_64
Size         : 1.1 M
Source       : xournalpp-1.1.1-1.fc36.src.rpm
Repository   : fedora
Summary      : Handwriting note-taking software
URL          : https://github.com/xournalpp/xournalpp
License      : GPLv2+
Description  : Xournal++ is a handwriting note-taking software with PDF annotation support.
             : Supports Pen input like Wacom Tablets

Just from the description I was already drooling a bit dreaming of making my Remarkable even better... Go check out Xournal++. Looks pretty interesting.