0

I recently installed 'stl-thumb' as a thumbnailer plugin to the file managers, but I notice that it isn't converting all files with the .stl extension. Upon closer inspection using the shell 'file --mime, the files that are "working" are binary encoded STL files but the ones that are not are ascii encoded STL files. Testing the script from the command line, however, shows that it works on both types of files.

Building a wrapper around the stl-thumb binary script archive so I can drop a log, I can see that it is not even attempting to do anything with the ascii encoded files. So I'm assuming it's something at the OS/file-manager level seeing those files as different.

The thumbnailer definition file is:

[Thumbnailer Entry]
TryExec=stlthumbnailer
Exec=stlthumbnailer -f png -s %s %i %o 
MimeType=model/stl;model/x.stl-ascii;model/x.stl-binary;application/sla;

When I pull up properties for both types of files in the file-manager, the mime types listed for both show up as:

Unknown (model/x.stl-binary)

Checking from the command line with file however shows:

$ file --mime *.stl
binary_test.stl:   application/octet-stream; charset=binary
ascii_test.stl: text/plain; charset=us-ascii

$ file -b --mime *.stl
application/octet-stream; charset=binary
text/plain; charset=us-ascii

Again, the thumbnailer script runs on teh binary encoded file, but doesn't appear to be run at all on the ascii encoded one. So I'm assuming it has either something to do with the mime types or the difference in content. Running the script manually on the ascii encoded file does work fine.

I'm not sure what to tweak to get it working properly.

EDIT: I got curious and tried a different file manager and it seems the nautilus works but nemo doesn't. If I view the contents of a folder in nautilus, it fills in the missing icons and then refreshing in nemo will show them there as well.

0

Use the mimetype command; ideally on a known filename.

But mimetype *.stl seems OK and responds with *.stl: model/stl

So the only known mimetype is 'model/stl'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.