Nautilus was not generating thumbnails for some xpm
files I had, so I tried to investigate who was responsible for generating thumbnails for xpm files (if any), or any image for that matter. And I stumbled into a wall of misinformation, obsolete specs and frustrated searches.
So, where is the thumbnailer for such "basic" images defined? I've checked /usr/share/thumbnailers
and it only mentions pdf, exe, and video files. No mention of png, jpg bmp, etc. Where are thumbnails of images defined? Wat are the official references about it?
Digging up further (and researching a LOT), I figured it out:
About image thumbnailers: It seems that Nautilus uses
libgnome-desktop
for thumbnail management, and the latter useslibgdk-pixbuf
to handle file types that have no external handler in/usr/share/thumbnailers
. So the "basic" image types are ultimately handled by GnomeDesktopThumbnailFactory and GdkPixbuf (references shown for versions shipped in Ubuntu 12.04). And the formats it handles can be inspected using thegdk-pixbuf-query-loaders
tool. In my system this means:So these are the "internal" thumbnailers. And it does include
xpm
files. So something was wrong with my particular files instead.And indeed the files were not standard, they had a copyright note prior to the
/* XPM *
header:Once comments were removed, thumbnails were generated just file.
It is curious that even with the "invalid" header the default Image Viewer in Gnome ("Eye of The Gnome", or
eog
) was able to display the files! So either files are not actually invalid, or kudos toeog
for being able to open them! Anyway, since it is possible to open, andeog
usesgdk-pixbuf
too, I've filled a bug inlibgnome-desktop
requesting that thumbnailers be generated for such non-standardxpm
files. Any help promoting the bug is appreciated!Also, some notes about my research:
ThumbnailerSpec is mentioned in several places as the specification for "external thumbnailers". But it has nothing to do with this! It talks about using D-Bus for thumbnailers management, and nothing indicates that such spec is actually implemented in Gnome.
Actually, I was unable to find any official spec on the implemented behavior of "saving a
.thumbnailer
file with[Thumbnailer Entry]
and .desktop-esque format to/usr/share/thumbnailers
". Bug 636819 is cited a lot as a source, but it only describes that behavior was changed in Gnome2->Gnome3 transition, and it no longer usesgconf
to store external thumbnailers.It looks like there is no spec at all. This obsolete documentation is still the only official reference, for example, on what
%i %o %u %s
means.And the only "official" place announcing the change from
gconf
to/usr/share/thumbnailers
, other than hunting down the source code commit that did it, is this seemingly ordinary bug report.