Skip to content

Instantly share code, notes, and snippets.

@garrett
Created April 7, 2017 17:59
Show Gist options
  • Save garrett/152cb8fe299bef41f7249ebec9e9f9f9 to your computer and use it in GitHub Desktop.
Save garrett/152cb8fe299bef41f7249ebec9e9f9f9 to your computer and use it in GitHub Desktop.
SVG thumbnails in GNOME 3.24.0
[Thumbnailer Entry]
TryExec=/usr/bin/gdk-pixbuf-thumbnailer
Exec=/usr/bin/gdk-pixbuf-thumbnailer -s %s %u %o
MimeType=image/svg+xml;image/svg+xml-compressed;
@garrett
Copy link
Author

garrett commented Apr 7, 2017

Download the above file (librsvg.thumbnailer) and copy it to /usr/share/thumbnailers/ as root (this means run sudo -s or just su to get a root shell before coping it over with cp librsvg.thumbnailer /usr/share/thumbnailers/).

(Note: If your prefix is not /usr/, be sure to change /usr/bin/ and /usr/local/ where appropriate. In most cases, this will be your prefix.)

Source for this file is from https://bugzilla.gnome.org/show_bug.cgi?id=778666 — it looks like the small patch hasn't made it into librsvg 2.40.16 in Fedora 26 alpha. Hopefully it will be included in a near-future release.

@garrett
Copy link
Author

garrett commented Apr 10, 2017

Bonus points!

For GIMP thumbnails, install the xcf-pixbuf-loader (in Fedora, it's dnf install xcf-pixbuf-loader) and copy the following into /usr/share/thumbnailers/gimp-xcf.thumbnailer:

[Thumbnailer Entry]
TryExec=/usr/bin/gdk-pixbuf-thumbnailer
Exec=/usr/bin/gdk-pixbuf-thumbnailer -s %s %u %o
MimeType=image/x-xcf;image/x-compressed-xcf;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment