Portable mod with Appimage on Linux

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
procobain
Posts: 4
Joined: Sun Jul 03, 2022 1:03 am

Portable mod with Appimage on Linux

Post by procobain »

Hello, I have my freecad for studies, but I also like to test new appearances, even the @realthunder version. But it's a bit annoying having to backup my configs to be able to test some new interface/config. Searching for this information, I found in the appimage docs that it would work like portable (recording the configs in a local folder), but I tested it here and it didn't work.

"Using portable mode

This page describes a mode some newer AppImages (i.e., built in 2017 or later) provide, the portable mode. This mode allows for bundling an application’s data next to the application’s AppImage."

https://docs.appimage.org/user-guide/portable-mode.html
chrisb
Veteran
Posts: 54179
Joined: Tue Mar 17, 2015 9:14 am

Re: Portable mod with Appimage on Linux

Post by chrisb »

Hi and welcome to the forum!

Here is a discussion how to do it for FreeCAD: viewtopic.php?f=4&t=49028.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
procobain
Posts: 4
Joined: Sun Jul 03, 2022 1:03 am

Re: Portable mod with Appimage on Linux

Post by procobain »

I've read it but haven't tried it yet.

But I still think my suggestion is valid, according to appimage, this is a possibility. If solved it would be much easier than the tutorial shown in this other topic ...

But I know you're full of more important work, here's my request for when I have some time left, thanks for your help and a hug.
User avatar
adrianinsaval
Veteran
Posts: 5548
Joined: Thu Apr 05, 2018 5:15 pm

Re: Portable mod with Appimage on Linux

Post by adrianinsaval »

what version of the appimage are you using?
User avatar
onekk
Veteran
Posts: 6205
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: Portable mod with Appimage on Linux

Post by onekk »

It will suffice to make a script in the usb key:

Code: Select all

#!/bin/bash

export FREECAD_USER_HOME="position of the user data directory" 

urxvt -T "FreeCAD-launcher" -e "/home/common/FreeCAD/FreeCAD_0.20.2-2022-12-27-conda-Linux-x86_64-py310.AppImage"
Probably even relative paths will work, so if you place it on an USB key it will work with ./ prefix for the AppImage launcher and the datadir

Note that is copied and is launched using a terminal (in my case urxvt) so your mileage may vary, however the important part is to launch AppImage with the script that set

FREECAD_USER_HOME all the user data will finish here, even addons loade with addonManager

Hope it helps

Regards

Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.

Blog: https://okkmkblog.wordpress.com/
User avatar
adrianinsaval
Veteran
Posts: 5548
Joined: Thu Apr 05, 2018 5:15 pm

Re: Portable mod with Appimage on Linux

Post by adrianinsaval »

what's the point of using a terminal there? to get warnign/error output there? Normally I think people would want to directly launch the appimage in the script.
procobain
Posts: 4
Joined: Sun Jul 03, 2022 1:03 am

Re: Portable mod with Appimage on Linux

Post by procobain »

I learned the minimum of Shell Script today, lol.

If you are going to use more than one version of freecad appimage, just copy the scripts with different names, the name of the script does not change anything, just its internal content..

Code: Select all

#!/bin/bash

#Paste the name of your freecad.AppImage here, like this.......
FREECADNAME=FreeCAD_weekly-builds-31917-2023-03-12-conda-Linux-x86_64-py310

mkdir -p $FREECADNAME'_USER_HOME'

export FREECAD_USER_HOME="$FREECADNAME"_USER_HOME""

"./$FREECADNAME.AppImage"

#If you have more portable versions, copy and rename this script.
Thank you all for your help, hugs..
Post Reply