I’m a F3D dev, a simple opensource 3D viewer which also provide thumbnails for many file formats.
It came to my attention that thumbnails were not working with nautilus.
After some investigation, it seems to be caused by the use of bwrap in nautilus thumbnailer code.
While it make sense to sandbox such mechanism, I’m trying to find solutions for our users.
First a few questions.
Is there way to let application use Xorg server while still using bwrap in your code ? Is this supported or planned ?
Is there a way to disable bwrap cleanly in nautilus for users that do not want to use it ?
If I build my app to support rendering with EGL or OSMESA, will it work (I assume it will) ?
Any other work around I should have thinked of ?
Right now, I suggest our users to use Xvfb in the .thumbnailer file. It works but it is very slow to start Xvfb for each thumbnail, this is merely a expansive work around and not a long term solution.
For question 1 & 2: the sandbox doesn’t have access to the Xserver (that would be insecure) and it can’t be disabled. The open feature request for configurable sandboxing looks related to these questions and also answers to the “why” of the sandbox.
I don’t know for question 3 & 4. If you’re familiar with bwrap and what would be needed to allow rendering with EGL or OSMESA you could browse the code here where bwrap is set up.
EGL is the best solution if you need off-screen OpenGL. Xvfb is unnecessary. OSMesa is not very useful now as its functionality can be done with surfaceless EGL or headless Vulkan.
You can have your application generate the thumbnails of files when opening them and/or saving them. You don’t need to wait for Nautilus to generate them, especially if your application has very specific requirements.
As long as you follow the thumbnailing specification, you can generate the thumbnails from your application whenever you need them.
Not supported by VTK yet, but maybe in the future.
You can have your application generate the thumbnails of files when opening them and/or saving them
This is not at all how F3D has been designed. This is a lightweight viewer, you dont want to open every single file to generate a thumbnail. Moreover, there is no crossplatform/cross-de way to find out the location to write a thumbnail into.