FreeCAD document icon
Forum rules
and Helpful information
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help
Also, be nice to others! Read the FreeCAD code of conduct!
Also, be nice to others! Read the FreeCAD code of conduct!
Re: FreeCAD document icon
On linux it works more or less the same way, a little program (that Werner also programmed ) called freecad-thumbnailer extracts the .png thumbnail stored in the .fcstd file. That thumbnailer is registered somewhere so the file managers know when to use it.
Indeed there are a lot of distros, desktops and file managers around, but there is also a *kind of* standard called freedesktop.org, which at least all the major desktop systems such as gnome, kde and lxde follow (more or less). For example, it defines the arguments that the thumbnailer program must take. As far as I saw, Werner's thumbnailer follows all the freedesktop standards.
The problem most probably lies in the way that thumbnailer is registered... For gnome/nautilus, it's an entry in gconf (the gnome's "registry" (never understood how/why a linux desktop must have a registry, but...)), for thunar it's a .desktop file in /usr/share/thumbnailers, and for kde I don't know.
That "registration" simply specifies a thumbnailer program to be called on certain MIME types. So for nautilus, the best way to check is to open gconf-editor and navigate to Desktop>Gnome>Thumbnailers and see if the freecad one is there. AFAIK freecad correctly registers its thumbnailer there on installation (but I don't use gnome so I cannot check here)
For Thunar, it seems something changed recently and several of my thumbnailers don't work anymore, so probably nothing to do with freecad itself...
Indeed there are a lot of distros, desktops and file managers around, but there is also a *kind of* standard called freedesktop.org, which at least all the major desktop systems such as gnome, kde and lxde follow (more or less). For example, it defines the arguments that the thumbnailer program must take. As far as I saw, Werner's thumbnailer follows all the freedesktop standards.
The problem most probably lies in the way that thumbnailer is registered... For gnome/nautilus, it's an entry in gconf (the gnome's "registry" (never understood how/why a linux desktop must have a registry, but...)), for thunar it's a .desktop file in /usr/share/thumbnailers, and for kde I don't know.
That "registration" simply specifies a thumbnailer program to be called on certain MIME types. So for nautilus, the best way to check is to open gconf-editor and navigate to Desktop>Gnome>Thumbnailers and see if the freecad one is there. AFAIK freecad correctly registers its thumbnailer there on installation (but I don't use gnome so I cannot check here)
For Thunar, it seems something changed recently and several of my thumbnailers don't work anymore, so probably nothing to do with freecad itself...
Re: FreeCAD document icon
Thanks for the info,yorikvanhavre wrote:That "registration" simply specifies a thumbnailer program to be called on certain MIME types. So for nautilus, the best way to check is to open gconf-editor and navigate to Desktop>Gnome>Thumbnailers and see if the freecad one is there. AFAIK freecad correctly registers its thumbnailer there on installation (but I don't use gnome so I cannot check here)
I just checked in gconf-editor, there is no entry for freecad. From what I understand the entry should be named application@x-enxtension-fcstd. Out of curiosity I'd like to create one, but what would be the required command? For a few entries, like pdf, the command is "evince-thumbnailer -s %s %u %o".
Re: FreeCAD document icon
check that you have freecad-thumbnailer in /usr/bin (if needed put it there, it's a simple python script that lies somewhere in the freecad source tree)
then the command would be freecad-thumbnailer %u %o %s (not sure about the order...)
then the command would be freecad-thumbnailer %u %o %s (not sure about the order...)
Re: FreeCAD document icon
I'll fix this issue shortly. AFAIR there must be some special files in the debian folder and the rules file must contain some instructions to add these files to the .deb package. In the past this worked pretty well but was broken when I did a merge with the official Debian packaging files.
Re: FreeCAD document icon
So, I have just fixed the thumbnailer. On Lucid it works for me pretty well again. As a next step I'll show the icon Normand provided as fallback if inside a FreeCAD project no thumbnail was stored.
Can anybody test it on Natty and maybe on other desktops than GNOME?
Can anybody test it on Natty and maybe on other desktops than GNOME?
Re: FreeCAD document icon
Cool!
I made a .svg as well, here it is. (remove .zip extension)
I made a .svg as well, here it is. (remove .zip extension)
- Attachments
-
- application-x-extension-fcstd.svg.zip
- Remove .zip extension
- (12.54 KiB) Downloaded 86 times
Re: FreeCAD document icon
The PNG is OK because in the specs (I can't remember where exactly) it is required to offer png files as thumbnails.
Re: FreeCAD document icon
Sweet! I requested a build of the latest revision from the Daily Builds PPA, then installed it. Not only do my FreeCAD files have thumbnails now, but my SpaceNavigator is working too!
Thanks Werner!
There was no changes after install, but a system restart did the trick.
Thanks Werner!
There was no changes after install, but a system restart did the trick.
Re: FreeCAD document icon
Ah good to know! When I tried it mid of last week it didn't work for me either. When checking it again on Saturday it suddenly worked.There was no changes after install, but a system restart did the trick.
Re: FreeCAD document icon
Hm i still can't make it work but definitely there is something broken with my thunar file manager here, many other thumbnailers stopped working. I'll keep investigating...