Code Monkey home page Code Monkey logo

gnome-thumbnailers's Introduction

gnome-thumbnailers

This is a small set of custom thumbnailer scripts (mostly for 3D printing formats) that I crafted based on various samples floating about on the Internet, and which work in GNOME 42+.

In short, these will render pretty little file previews in your file manager (not just Nautilus, but that is what I tested with):

Supported Formats

  • .3mf (Cura, PrusaSlicer, SuperSlicer, etc.)
  • .gcode with embedded thumbnails
  • .scad (OpenSCAD, will blindly render the default object)
  • .stl (Actually uses OpenSCAD to render as well)
  • .blend (uses the built-in blender-thumbnailer that comes with Blender)

Installation

  • put .thumbnailer files in /usr/share/thumbnailers
  • put the other files in /usr/local/bin, marked as executable
  • remove all the cached thumbnails in ~/.cache/thumbnails
  • restart Nautilus with nautilus -q

The Makefile does that for you.

Dependencies

  • 3mf.thumbnailer and gcode.thumbnailer require nothing but Python 3 installed, because they cheat and use the thumbnail the slicer inserts into the file.
  • stlscad.thumbnailer requires Xvfb, openscad and ImageMagick installed to render and convert files.
  • blender.thumbnailer requires Blender to be installed.

FAQ

But isn't openscad prevented from accessing X because of bwrap thumbnail generation sandboxing in modern GNOME?

Yes. But it works perfectly with xvfb-run and software rendering, so I'd rather take the performance hit rather than spend hours trying to persuade bwrap to do weird stuff like --bind /tmp/.X11-unix/X0 /tmp/.X11-unix/X0 --setenv DISPLAY :0.

Sometimes brute force is the simplest, more maintainable (and more secure) approach.

I have a .3mf or .gcode file without thumbnail, is the thumbnailer broken?

No. It's quite likely that the slicer you used to create it did not include a thumbnail, or that it is in a weird format. There are limits to these things.

My OpenSCAD thumbnails are blank!

This usually happens when it's either a library file (that would render nothing on its own) or a customizer file that is missing some default (and hence renders nothing as well).

My Blender thumbnails are blank!

That usually happens when you either don't have a camera defined or it's pointing towards literally nothing.

gnome-thumbnailers's People

Contributors

rcarmo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

mojamuto darus90

gnome-thumbnailers's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.