Word size of FreeCAD: 64-bit
Version: 0.20.26202 (Git) AppImage
Build type: Release
Branch: master
Hash: ca6d49d080dea0abc23d954743eca7c46f33469b
Python version: 3.9.7
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.3
Locale: English/Canada (en_CA)
I use Freecad appimages on Linux Ubuntu so that I can get a more up-to-date version than stable, and I also so I can update my other computer using a file on a stick since it does not have an adequate internet connection. I found out the hard way that it is very important to be using the same Freecad version if you are going to transfer work between computers.
One of the inconveniences of using appimages is that the files are not integrated into the system – the system considers them generic compressed files and tries to open them with a file archive application. Setting the “open with” property is not an adequate solution because it will then try to open all compressed files in Freecad.
There are “appimage integration” programs which will set them up as a distinct filetype and assign an appropriate icon to them. These will also automatically update to a new appimage version when it is installed.
I tried one.
However, I also have a custom application launcher on the menu bar, and the integration app did not upgrade that, which caused some serious problems and trashed a bunch of files. If the file was opened by clicking on the filename, it opened in the newest version, however, if it was opened by using the custom application launcher, it opened in an older, incompatible, version.
The result was a trashed file.
Therefore I came up with the following method of manually integrating Freecad files into the system. I am not a Linux expert by any means and this took quite a bit of searching so I am sharing it here in case anyone else finds it useful.
Note that the following is for Ubuntu 20. Other Linux systems will be similar but the commands may differ slightly.
Preparation: Because the launcher files must point to a specific file, a consistent filename is needed for the target Freecad appimage file. I use "FreeCAD_LatestAppImage" and it is always in the "Appimages" folder on my home directory.
So, the first step is to rename your newly downloaded appimage to "FreeCAD_Latest.AppImage" (or whatever name you choose), change permissions to "allow executing as a program", and move it you your chosen location. You will, of course, have to remove or rename any existing files of that name first.
The files needed to integrate it into the system are:
freecad.xml
freecad.desktop
scalablefreecad.svg
Copies are attached. Make a new folder and copy all the files into it. Then open a terminal and cd to that folder.
Notice that the "freecad.desktop" file is posted here as "freecad.txt". Either my system or this forum got silly about copying files of the type ".desktop" and would not upload them.
First, register Freecad files as a distinct filetype:
Code: Select all
sudo cp freecad.xml /usr/share/mime/packages/freecad.xml
Code: Select all
sudo cp freecad.txt /usr/share/applications/freecad.desktop
Code: Select all
sudo update-mime-database /usr/share/mime
Code: Select all
sudo update-desktop-database /usr/share/applications
Select a Freecad .FCStd file, click on permissions -> open with. It should now say "files of type Freecad document files" instead of "files of type Zip archive".
Click on "add" then "custom command".
Navigate to your appimage file and select it. Clicking on the file should now open it in Freecad.
Now we want to associate the freecad icon with the file, so copy the icon:
Code: Select all
sudo cp scalablefreecad.svg /usr/share/icons/hicolor/scalable/apps/freecad.svg
Code: Select all
sudo update-icon-caches /usr/share/icons/*
If you prefer, you could use a freecad.desktop file on your Desktop instead.
Done.