You are not logged in.

#1 2022-04-14 14:23:03

random0
Member
Registered: 2022-04-07
Posts: 10

Kind of confused with flatpak permissions

Ok, so the purpose is this: I want to give apps access to the entire filesystem, but for them to still use their folders in ~/.var/app... to store cache, configs etc.

Some apps such as VLC still store settings in ~/.var/app... even after giving them access to all the files on the system.
Other apps like Firefox begin storing data directly in my home directory, upon giving them permission to all files. I was able to fix firefox though.
Then, there is a third kind of app that can't be fixed, such as VSCodium and XnViewMP

With VLC the permission command I used was simple. Like I said, it still stores data in ~/.var

sudo flatpak override org.videolan.VLC --filesystem=home --filesystem=host --unshare=network

With Firefox, I had to use a "--persist" property, which basically remaps ~/.mozilla to ~/.var/app/.../.mozilla (as well as the folder in ~/.cache)

sudo flatpak override org.mozilla.Firefox --filesystem=home --filesystem=host --persist=~/.mozilla

But then with VSCodium, even with "--persist", it still created the "vscode-oss" folder in ~/:

sudo flatpak override com.vscodium.codium --filesystem=home --filesystem=host --persist=~/.vscode-oss --unshare=network

And no matter what I try, the only thing that works is revoking the --filesystem permissions. Vscodium has "--filesystem=host" by default, so by revoking it, it finally puts the .vscode-oss folder in ~/.var, But obviously, with that, it no longer has direct access to all files on the system, which is what I want.

sudo flatpak override com.vscodium.codium --nofilesystem=host --unshare=network

The above does show that codium is capable of using ~/.var. What I believe truly prevents it from doing so (while it has access to all files), is the app has "--persist=.vscode-oss" by default, which renders the custom one from the command earlier useless.

Then things get even worse when we go to an app called XnViewMP. That app, is simply incapable of using ~/.var to store data. It comes with " --filesystem=home" permission by default, and if that is revoked, then it simply stops storing data, settings etc. all together.


Can someone help me understand this. Like is there a trick of some sort to at least undo the default --persist in vscodium? Aside from being able to control all my apps' permissions, the other reason for going all flatpak is to get rid of all the bs in the home directory, despite of having many many apps installed.

Last edited by random0 (2022-04-14 19:06:35)

Offline

Board footer

Powered by FluxBB