flathub / io.gitlab.librewolf-community

https://flathub.org/apps/details/io.gitlab.librewolf-community
15 stars 11 forks source link

Flatpak permission "host folders" missing, but profile stored in host folder #34

Open secretmango opened 1 year ago

secretmango commented 1 year ago

The flathub firefox stores its profile under ~/.var/app/org.mozilla.firefox/.mozilla/. This works perfectly even without any /home access.

Librewolf stores all profiles temporarily and is not able to save them permanently, as the permission is missing.

This is extremely confusing.

Solution 1

Just grant access to /home folder. This increases some attack surface though

Solution 2

Move the profile to the flatpaks ~/.var/app/ location. This works out of the box with no permissions.

Solution 3

Some mount-bind manual stuff

Solution 4

Implement a dialog on startup, to request the user to open that location through a portal and bind it to the flatpak folder. This is not easy to implement I guess.


On Linux you can just create symlinks for folders with strange locations. Also Librewolf has the really awesome GUI settings to access that.

lsfxz commented 1 year ago

Have you actually observed the described behavior? (ie. LibreWolf storing all profiles temporarily and not being able to save them permanently)

I'm asking (hopefully not in a provocative sounding way – please don't get me wrong!), because I could not reproduce that behavior (and never had any report of such a behavior).

There is a well known bug (which is mostly cosmetical in nature though) though, where the profile directory is displayed incorrectly in about:profiles, for example – there, the profile's "local directory" will be reported correctly (eg. as ~/.var/app/io.gitlab.librewolf-community/cache/librewolf/49i5nj6m.default-release) while the profile's "root directory" will incorrectly be reported (eg. as ~/.librewolf/49i5nj6m.default-release), while the actual directory (and the one indeed used by LibreWolf to store profile data) follows the flatpak conventions and can, in the above example, be found at ~/.var/app/io.gitlab.librewolf-community/.librewolf/49i5nj6m.default-release. This is enabled by the --persist option in the io.gitlab.librewolf-community.json.

While we haven't found a fix for that specific bug yet, it's not high in priority to be fixed because, well, it does not really impact the functionality of LibreWolf in any relevant way.

secretmango commented 1 year ago

I observed this exact behavior. Yes also the display bug, but it was actually not storing the files somewhere else.

When granting access to /home/$USERNAME and creating a new profile, this profile was created in ~/.librewolf/

This seems like wanted behaviour, with the renamed Firefox folder and all.

There is only the Librewolf flathub version, so no Fedora Flatpak either.

Using Fedora Kinoite, where /home is in /var/home.

Glesas commented 1 month ago

I've briefly read the lsfxz comment, but I might got similar thing happened on Flatpak version of Zen-browser. in "about:support", i do see it indicates as "~/.zen/6ymsifdgfdg.Default (alpha)", and yeah, my actual profile is in "~/.var/app/io.github.zen_browser.zen/cache/zen". If not that issue, i wouldn't have idea to look inside of var. Atleast now i'm able to move my files to app image version of zen browser, thanks guys