Hello.
I would like to ask about 3d modeling program’s “Blender” thumbnails and all the RAW image formats - they do not show up. What needs to be done for them to show in Gnome? When they will be built in the system like in KDE?
Thank you.
P.S. I use Silverblue 39
ebassi
(Emmanuele Bassi)
January 19, 2024, 12:40pm
4
Either Blender saves the thumbnail of a project when saving the project, following the thumbnail specification on freedesktop.org ; or somebody writes a thumbnailer process that can read Blender files and generate PNG images.
Same thing applies for RAW images, or any other file format.
Thank you for an interesting link.
I wonder what gnome team think about thumbnails? Is it good as its?
Or it would be better if an external app would be doing this? Like in this post:
opened 08:28PM - 01 Jun 22 UTC
enhancement
### Checklist
- [X] I agree to follow the [Code of Conduct](https://github.com/… flatpak/flatpak/blob/main/CODE_OF_CONDUCT.md) that this project adheres to.
- [X] I have searched the [issue tracker](https://www.github.com/flatpak/flatpak/issues) for a feature request that matches the one I want to file, without success.
### Suggestion
Allow apps to export GNOME thumbnailers, aggressively sandboxed, so that when (e.g.) Totem is installed with Flatpak, video files can be thumbnailed by Nautilus on the host system.
## Background
Nautilus (and miscellaneous other apps) generates thumbnails by using the [API provided by libgnome-desktop](https://developer-old.gnome.org/gnome-desktop/stable/GnomeDesktopThumbnailFactory.html). Behind the scenes this looks in `$XDG_DATA_DIRS`/thumbnailers for a `.thumbnailer` file matching the MIME type; if found, it runs the given command to generate the thumbnail. [Philip Withnall's 2013 blog post “Writing a GNOME thumbnailer”](https://tecnocode.co.uk/2013/10/21/writing-a-gnome-thumbnailer/) is the best summary I have found.
Some thumbnailers are provided by libraries or components that can be expected to be part of any GNOME-based system:
- gdk-pixbuf provides a thumbnailer for all image formats supported by gdk-pixbuf
- librsvg2 provides a thumbnailer for SVG files
Others are provided by applications:
- Totem provides a thumbnailer for a myriad of video formats
- Evince thumbnails PDFs
- gnome-font-viewer… you get the picture
When these apps are installed with Flatpak, not as part of the OS, the thumbnailers are lost. Endless OS switched to the Totem and font-viewer Flatpaks and lost video and font thumbnailing in the process.
(Aren't these thumbnailers GNOME-specific and woefully underspecified? Yes and maybe – but Flatpak already exports GNOME Shell search providers so we have already crossed that particular bridge.)
## Suggested implementation
gnome-desktop already invokes thumbnailers in a very restrictive environment, using bubblewrap. (If running **inside** a Flatpak, it uses the Flatpak subsandbox API to the same end.) Roughly, the thumbnailer gets:
- read-only access to `/usr`
- miscellaneous stuff like `/dev` and `/proc`
- read-only access to the input file
- write access to a temporary directory where the thumbnail should be written
So you could imagine making the following changes:
- At export time, make Flatpak mangle the `Exec=` line of `/app/share/thumbnailers/*.thumbnailer` in the same way it does for `.desktop` files, adding additional arguments like `--nofilesystem=host:reset` (which removes all filesystem access from the app's `build-finish` or from `flatpak-override`, an additional arg that also prevents mounting `~/.var/app/$APP_ID`, some similar arg that closes all socket/share/etc. holes, and finally, `--filesystem=%i:ro` `--filesystem=%o` to grant access to the input and output files.
- In gnome-desktop, recognise that Flatpak is being invoked and avoid attempting to wrap the command with `bwrap`
Seems doable. (Regular readers might recognise elements of this idea from #3698 - maybe I only have one idea.)
## Extra credit but probably out of scope
Make the thumbnailers available to apps. While writing this ticket I noticed that Cheese bundles the totem thumbnailer, presumably so it can thumbnail the photos & videos it has just recorded.
system
(system)
Closed
March 6, 2024, 12:06pm
6
This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.