PDA

View Full Version : [Solved] Flatpak application unable to save/read/access directories outside user home folder



Fli
03-22-2022, 02:42 PM
I have an application installed on Linux Debian using "flatpak install appname" command.

ISSUE: Inside application i am unable to see directories outside of my user home directory. Including symbolic links to different drives/mount points.

CAUSE: https://docs.flatpak.org/en/latest/sandbox-permissions.html#filesystem-access

SOLUTION:
Edit app launcher file so it launches with parameter --filesystem=host

A) sudo flatpak override ApplicationIDHere --filesystem=host
ApplicationID show using command: flatpak list

B) edit just app launcher:

In kick-off menu (start menu where you search and launch apps) i have found my application name, right click it, "Edit application", and i see:
it points to certain .desktop file, i copy the full path and use it in the command to tweak the file:
sudo sed -i "s|flatpak run|flatpak run --filesystem=host|g" desktopfilepath

C) manual method:
In kick-off menu (start menu where you search and launch apps) i have found my application name, right click it, "Edit application", and i see:
it points to: /var/lib/flatpak/app/org.jdownloader.JDownloader/current/active/export/share/applications/org.jdownloader.JDownloader.desktop

I open the file for editing:
sudo nano /var/lib/flatpak/app/org.jdownloader.JDownloader/current/active/export/share/applications/org.jdownloader.JDownloader.desktop

and replace "flatpak run" by "flatpak run --filesystem=host"

Save and after launching the Flatpak app now, it can access all directories.

D) Use application made to modify apps permissions including filesystem one, but this app downloads more than 200MB of data which seem alot:
https://flathub.org/apps/details/com.github.tchx84.Flatseal