Thumbnails with Appimage?

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
drmacro
Veteran
Posts: 8865
Joined: Sun Mar 02, 2014 4:35 pm

Thumbnails with Appimage?

Post by drmacro »

There is a rather long thread about getting thumbnails to work here:
viewtopic.php?p=451872#p451872

With those notes I have gotten thumbnails to work on more than one machine where I only have a local build and thus the full source.

I have one machine with Ubuntu and only appimage available.

Do it need to start the appimage, then copy the freecad-thumbnailer from the tmp mount of the appimage?

Or is there some other trick to get thumbnails to work when only appimage is available?
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
drmacro
Veteran
Posts: 8865
Joined: Sun Mar 02, 2014 4:35 pm

Re: Thumbnails with Appimage?

Post by drmacro »

The thread I reference in the first post here is in the archived pull requests.

I'm not completely sure this belongs in this subforum. It is a question about the appimage.

@chrisb Thoughts? should it be moved.

@pachiburke hasn't been active for some time, but was in the other thread.

@wmayer you contributed to the other thread as well.

Does the thumbnail system work with an appimage? Can it?
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Thumbnails with Appimage?

Post by wmayer »

Does the thumbnail system work with an appimage? Can it?
Yes, because the application you use is irrelevant. Using a self-compiled FreeCAD, an AppImage or installed from the system's repository doesn't make any difference. This is because the thumbnail preview is completely independent from the application that has created a FCStd file. Theoretically you can also create a FCStd file manually with gzip which however is a bit tricky to do it right.

FYI, the thumbnail is not created by running FreeCAD in the background but a PNG file is added to the FCStd file when creating it. Then a script or plugin or whatever is used to extract that PNG file and copy it to a specified location.

The thumbnail only depends on your OS and on Linux additionally on the DE because as far I can see every desktop does it differently to create the thumbnails. In the linked thread this is the way how to get it working on XFCE. On KDE you need a special plugin (an .so file) and at the time when I was using Gnome I got it also working by running a Python script similar to XFCE.

If you neither use XFCE nor KDE I think it's best to ask the developers of the DE you use how to create an own thumbnailer.
drmacro
Veteran
Posts: 8865
Joined: Sun Mar 02, 2014 4:35 pm

Re: Thumbnails with Appimage?

Post by drmacro »

wmayer wrote: Thu Feb 09, 2023 4:45 pm ...
Thanks.

I understand FreeCAD does not need to be running. I was under the mistaken idea that the additions to the local thumbnail system that allowed it to get the png from the FCStd files were added, to the system, by the FC install process.

Since the XML for the is in the appimage (but, not the Python) and can only be seen when the appimage is mounted, I wondered if there was some ancillary steps that could be used to set it up.

I will look into the current GNOME process. Do have any recollection of what you changed in the Python script for GNOME?
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Thumbnails with Appimage?

Post by wmayer »

I was under the mistaken idea that the additions to the local thumbnail system that allowed it to get the png from the FCStd files were added, to the system, by the FC install process.
Installing the thumbnailer and the various config files must all be done manually. Neither a compiled FreeCAD nor an AppImage can do this and I don't think that any of the packages (.deb, .rpm, ...) will do this.
Post Reply