linux nautilus stl thumbnailer :)

by yoyoek1, published

linux nautilus stl thumbnailer :) by yoyoek1 Feb 26, 2014



linux nautilus stl thumbnailer :) by yoyoek1 is licensed under the GNU - GPL license.

Liked By

View All

Give a Shout Out

If you print this Thing and display it in public proudly give attribution by printing and displaying this tag.

Print Thing Tag

Thing Statistics

3053Views 723Downloads Found in Computer


oo jee :)
Base on openscad and little python script


  • extract tar.bz2 copy past files from it
  • run
    update-mime-database ~/.local/share/mime/
    if you past mime to that directory
  • restart nautilus :)

you need to have openscad !!

More from Computer

view more

All Apps

Upgrade this Thing with Thingiverse Apps

No results.

Nice work! I'd recommend to put these files in
and then
$ sudo update-mime-database /usr/local/share/mime/

edited stl.thumbnailer to have my username
all files have permissions
openscad installed
but no thumbnails show

Never mind, works for new files, but for files i already had it didn't create a new thumbnail

Dec 19, 2016 - Modified Dec 19, 2016

You should add in the description, that the path in stl.thumbnailer has to be edited accordingly to the own user. Took me some time to realize this.

But thanks, it is working perfectly now. It's really a great help.

I know it's been out a while, but it seems like you're actually replacing the stl file with a png in the scritpt, is this true or is there some magic going on that I am unware of?

Works like a charm it was just what I needed!!! thanks a lot!

Hi, thank you very much for your thumbnailer. A minor correction, though: on your mimetype xml you say stl comes from "stereolithography", which is not true. It means "Surface Tesselation Language".

I've always heard stereolithography so I looked at Wikipedia and it agrees https://en.wikipedia.org/wiki/STL_(file_format). The source they cite says there are several backronyms for it like "Standard Tessellation Language" and others.

Sep 20, 2014 - Modified Sep 20, 2014

Don't know if you updated this lately, but right now there are only two files in the attached bzip, not three as in your instructions.
When I open a folder with stls inside with nautilus now, the icon shows a small clock for a second then goes back to displaying the standard text icon for unknown filetypes.
Which version of openscad is needed for this to work? Running 2013.06.09 right now.

To clarify the installation, there are three files:

(1) home/yoyo/Apps/http://stl_thumb.pystl_thumb.py (intended to go in ~/Apps/http://stl_thumb.pystl_thumb.py)
(2) home/yoyo/.local/share/mime/packages/stl.xml ( -> ~/.local/share/mime/packages/stl.xml)
(3) usr/share/thumbnailers/stl.thumbnailer

... the last one you install in /usr/share/thumbnailers/stl.thumbnailer but first edit the Exec= line to point to the full path of where you put the http://stl_thumb.pystl_thumb.py in step (1). Also, make sure that the http://stl_thumb.pystl_thumb.py file is executable (use chmod a+x http://stl_thumb.pystl_thumb.py if not).

Hmm. The openscad doc says that the --imgsize option (which supports your script) is available in version 2013.05+; the version I have (ubuntu 13.10 provided) says it's 2013.05.28 but it doesn't have that option. The ubuntu installer says it's 2013.01 ... I'll have to get a new openscad since this is a very useful thing to have working.

you can miss image size argument :)
check only if openscad generate thumbnaler.
nautilus will handle different image size then it expected

I was too brief - the older versions which don't have --imgsize will not generate an image from the command line, they will only do mesh generation (in the newer versions, it is the --imgsize option which selects the generation of an image, in addition to specifying the size). So I need a newer one.

Update - the instructions for installing from PPA (at openscad dot org slash downloads dot html) don't work for ubuntu 13.10 since (as far as I can tell from the error) chrysn hasn't installed a package index for 'saucy'. Will try the generic binary package.

:| sorry Im gentoo user I have different problem :P from time to time :P
I have openscad in version 2013.08.04 and it work fine.
I wish you success with compilation or ppa instalation

New openscad installed fine from the generic binaries, working now! Good to have the newer version of openscad.
I've modified the python script, with the original version I think it may not work well when there are strange characters in the .stl filename (or any directories containing it). I'll put the modified version up once I've had a chance to run it some more.