Core: Thumbnails for file browsers not created on Linux
#20,678 opened on 2025年4月7日
Repository metrics
- Stars
- (30,913 stars)
- PR merge metrics
- (平均マージ 24d 7h) (30d で 217 merged PRs)
説明
Is there an existing issue for this?
- I have searched the existing issues
Problem description
When using a file browser (e.g. Nautilus on GNOME-based OSs), .FCStd files used to be shown as the thumbnail of the contents of the file. It currently does not seem to work, and the file is shown as a generic blank icon.
This is the script that generates the thumbnails:
https://github.com/FreeCAD/FreeCAD/blob/main/src/Tools/freecad-thumbnailer.in
It says in a comment:
Register this thumbnailer Adding a file /usr/share/thumbnailers/FreeCAD.thumbnailer with the following content:
[Thumbnailer Entry] TryExec=freecad-thumbnailer Exec=freecad-thumbnailer -s %s %i %o MimeType=application/x-extension-fcstd;
However, taking the freecad-daily PPA's Debian package as an example, I noticed:
- The file to register a thumbnailer is shipped at
/usr/share/freecad-daily/share/thumbnailers/FreeCAD.thumbnailerinstead of/usr/share/thumbnailers/FreeCAD.thumbnailer - Listing the contents of
/usr/share/freecad-daily/share/thumbnailers/FreeCAD.thumbnailerpoints to abin/freecad-thumbnailerexecutable that is not installed by the Debian package[Thumbnailer Entry] TryExec=bin/freecad-thumbnailer Exec=bin/freecad-thumbnailer -s %s %i %o MimeType=application/x-extension-fcstd;
It also says:
- The application/x-extension-fcstd MIME type should be registered Check that a corresponding /usr/share/mime/packages/freecad.xml file exists
- I could not find any
freecad.xmlfile on my system, but there are:/usr/local/share/mime/packages/org.freecad.FreeCAD.xml /usr/share/freecad-daily/share/mime/packages/org.freecad.FreeCAD.xml
I'm not sure if point 1 makes a difference (can thumbnailers that are not in the /usr/share/thumbnailers location be registered?), but point 2 seems to be wrong. Point 3 is probably not an issue, other than needing to update the comment on the thumbnailer with the right location.
Full version info
OS: Ubuntu 22.04.5 LTS (ubuntu:GNOME/ubuntu/xcb)
Architecture: x86_64
Version: 1.1.0dev.40971 (Git)
Build date: 2025/03/24 18:02:34
Build type: Release
Branch: main
Hash: b33c2363226a5fc1e8222a02659118c95e1a5119
Python 3.10.12, Qt 5.15.3, Coin 4.0.0, Vtk 9.1.0, IfcOpenShell 0.8.1.post1, OCC 7.8.1
Stylesheet/Theme/QtStyle: FreeCAD Light.qss/FreeCAD Light/Fusion
Logical DPI/Physical DPI/Pixel Ratio: 96/159.34/1
Installed mods:
* OpenTheme 2024.9.1
* fasteners 0.5.37
Subproject(s) affected?
Core
Anything else?
https://github.com/FreeCAD/FreeCAD/blob/main/src/XDGData/FreeCAD.thumbnailer.in
Code of Conduct
- I agree to follow this project's Code of Conduct