Is it possible to install or run multiple copies of a flatpack package (example: Teams), each with its own isolated copy?
Asked
Active
Viewed 3,149 times
2 Answers
3
- Create a new home directory for the second flatpak app instance
sudo mkdir -p /home/flatpak2
- Ensure that you are the owner of the new dir
sudo chown -R $USER:$USER /home/flatpak2
- Run the second app instance with this home dir
env HOME=/home/flatpak2 flatpak run com.microsoft.Teams

TomDotTom
- 269
- 2
- 4
-
no longer works
Note that the directory
'/home/flatpak2/.local/share/flatpak/exports/share'
is not in the search path set by the XDG_DATA_DIRS environment variable, so applications installed by Flatpak may not appear on your desktop until the session is restarted.
– Joshua Robison Oct 01 '23 at 01:24
1
You can use a different flatpak HOME
for each isolated copy you want, like so:
env HOME=/path/to/your/custom/flatpak/home flatpak run your-app
For example, you can have a couple of scripts to run Zoom and Flatseal isolated from the rest, like so:
$ cat zoom.sh
#!/bin/sh
env HOME=$(pwd)/custom-flatpak-home flatpak run us.zoom.Zoom
$ cat flatseal.sh
#!/bin/sh
env HOME=$(pwd)/custom-flatpak-home flatpak run com.github.tchx84.Flatseal
Since it took me a while to figure out how to go about doing this I wrote a small blog post about it, feel free to check it out: https://ivanalejandro0.com/blog/flatpak-custom-data-folder/

ivanalejandro0
- 111
-
this no longer works.
– Joshua Robison Oct 01 '23 at 01:24Note that the directory '/home/flatpak2/.local/share/flatpak/exports/share' is not in the search path set by the XDG_DATA_DIRS environment variable, so applications installed by Flatpak may not appear on your desktop until the session is restarted.