You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.
Currently, in order to add an override, you have to manually use Flatseal, or run sudo. This, in my opinion, is a bad UX. There's a way to automatically add overrides to Flatpak by modifying a few files.
Adding Overrides to the User
The file located in ~/.local/share/flatpak/overrides/global is how Flatpak reads it's overrides.
If this file is blank or non-existent, it can be replaced by a file containing two lines:
If the file exists with data, appending either the existing filesystems line (a semicolon-delimited list) or adding it will achieve the same effect
Adding Overrides to the Global
The procedure is the same as above, except the file is located at /var/lib/flatpak/overrides/global. This, of course, requires root permissions and changes settings for all users, and probably should not be used as much.
Proposal
During first start, Gradience could ask the user if they would like to automatically enable Flatpak support, adding these lines. Of course, Gradience should also have some way to remove these lines and "disable" Flatpak support.
Additional Context
If you're interested, Flatseal itself does this by checking the values of some environment variables. If these variables do not exist, Flatseal uses the paths I explained above.
Another important thing is that the format of the global file is a GLib KeyFile (https://docs.gtk.org/glib/struct.KeyFile.html, https://lazka.github.io/pgi-docs/#GLib-2.0/classes/KeyFile.html), and instead of parsing this file manually, you can use KeyFile functions instead. For example, GLib.KeyFile.get_string_list would return a List of all the values, instead of parsing manually and splitting the file. This is what Flatpak does in their source code
This PR adds a preferences window with options for setting overrides in Flatpak aplications.
These changes have, to some extent, features requested in issue #276.
### Changes
- Create new .blp file for preferences window,
- Make `self.settings` object accessible to other files,
- Create new item in `main-menu` menu: `Preferences`
~~I'm setting this PR as a draft for now, to check if everything works as expected~~
Ps. This time, I didn't forget to update `POTFILES` :P
Feature description
Currently, in order to add an override, you have to manually use Flatseal, or run
sudo
. This, in my opinion, is a bad UX. There's a way to automatically add overrides to Flatpak by modifying a few files.Adding Overrides to the User
The file located in
~/.local/share/flatpak/overrides/global
is how Flatpak reads it's overrides.If this file is blank or non-existent, it can be replaced by a file containing two lines:
If the file exists with data, appending either the existing
filesystems
line (a semicolon-delimited list) or adding it will achieve the same effectAdding Overrides to the Global
The procedure is the same as above, except the file is located at
/var/lib/flatpak/overrides/global
. This, of course, requires root permissions and changes settings for all users, and probably should not be used as much.Proposal
During first start, Gradience could ask the user if they would like to automatically enable Flatpak support, adding these lines. Of course, Gradience should also have some way to remove these lines and "disable" Flatpak support.
Additional Context
If you're interested, Flatseal itself does this by checking the values of some environment variables. If these variables do not exist, Flatseal uses the paths I explained above.
You may view these functions at https://github.com/tchx84/Flatseal/blob/master/src/models/applications.js#L34-L60
Another important thing is that the format of the
global
file is a GLib KeyFile (https://docs.gtk.org/glib/struct.KeyFile.html, https://lazka.github.io/pgi-docs/#GLib-2.0/classes/KeyFile.html), and instead of parsing this file manually, you can use KeyFile functions instead. For example, GLib.KeyFile.get_string_list would return a List of all the values, instead of parsing manually and splitting the file. This is what Flatpak does in their source codeDid you read the Code of Conduct?
The text was updated successfully, but these errors were encountered: