Flatpak applications are sandboxed by default, and they do not have access to any other resources which it does not need to use. By default, even all the Flatpak applications do not have the permission to access your system theme if you have customized them (because themes are stored in
~/.themes directory), so they often look out-of-place.
You can change the permission, of course, but that will require you to use the command line interface, which is not ideal for beginner users. Latest versions of Android, which also uses the Linux kernel, gives you more control over the stuff which can be accessed by each application. Your file manager should not have your location access, and therefore you can restrict that permission.
Flatseal is an open source flatpak application which can be used to grant or take permissions from individual or all Flatpak applications, thus eliminating the use of Command Line.
In this tutorial, I will show the features of this Flatpak applications as well as show you how can you manage different permission for applications installed via the Flatpak package manager.
Installation of Flatseal
Flatseal is an open-source Flatpak application used to manage permissions for Flatpak apps installed on your system. It provides a simple and easy-to-use GUI eliminating the need for using the command line. With Flatseal, you can control application access to system resources and customize themes for individual or all installed applications. Flatseal streamlines the process of managing app permissions, whether you’re a beginner or advanced user.
It is only available as a Flatpak package, so you can install it directly from the command line interface if you have enabled Flatpak and Flathub on your distribution by typing the following commands:
flatpak install flathub com.github.tchx84.Flatseal flatpak run com.github.tchx84.Flatseal
You can also install the application directly from your GUI software manager If you have enabled Flatpaks and Flathub on your system. Just open Discover or Software Store and search for ‘Flatseal’.
Once installed, you can launch it from the Application Grid/Menu.
Managing Application Permissions with Flatseal
I will only recommend you to change the default theme of your Flatpak application, otherwise they will default to LibAdwaita light or dark theme and does not look great on your desktop at all if you have customized everything.
To do that, just open Flatseal and click on the application whose permission you want to modify.
Scroll down for a bit and then add
~/.icons in the ‘Other Files’ field.
From here, you can also give it access to other directories (such as your media or song directories).
Now, scroll down a bit and then add the following environment variables to change the Icon and GTK theme (replace the theme names with your installed themes):
You can also customize various options in Flatseal settings such as notifications, internet access, shared memory, webcam access etc.
To automatically apply these settings to all your Flatpak applications, you can add the same environment variable in the ‘All Applications’ tab in the Flatseal settings.
Flatseal is a really simple and easy to use GUI application which can be used to manage permission for Flatpak application, but you do not have to keep it installed after configuring a setting. Just install it, configure the things you want to modify, and then simply uninstall it.
The global application setting really improves the functionality of Flatseal a lot and in that way, you do not have to change themes or internet access for any application on an individual basis. The Individual app permission will obviously override your Global settings. So technically, you can have different themes selected for each application if you have multiple themes installed on your system.
You can of course use the Command Line Interface to change every permission for an application if you are an advanced user, check out this article if you are more of a command line person.