LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

flatpak-override

Override runtime permissions of Flatpak applications

TLDR

Show the overrides of one application
$ flatpak override --show [com.example.app]
copy
Grant access to a filesystem location
$ flatpak override --filesystem [home] [com.example.app]
copy
Grant read-only access to a directory
$ flatpak override --filesystem [path/to/directory]:ro [com.example.app]
copy
Stop sharing the network
$ flatpak override --unshare network [com.example.app]
copy
Set an environment variable for one application
$ flatpak override --env [NAME]=[value] [com.example.app]
copy
Override for the current user only, and drop a socket
$ flatpak override -u --nosocket [wayland] [com.example.app]
copy
Remove every override of one application
$ flatpak override --reset [com.example.app]
copy

SYNOPSIS

flatpak override [OPTIONS] [APP]

DESCRIPTION

flatpak override stores permission changes on top of the finish-args that an application shipped with. It is a subcommand of flatpak, not a separate program.Without an application id, the override applies to every application. Without --user, the default system-wide installation is changed.

PARAMETERS

--show

Print the overrides instead of changing them.
--filesystem=PATH
Grant filesystem access. Well-known values include home, host, and xdg-download. Append :ro for read-only access.
--unshare=SUBSYSTEM
Remove a share granted by the runtime. network is one subsystem.
--env=VAR=VALUE
Set an environment variable inside the sandbox.
--nosocket=SOCKET
Remove access to a socket such as wayland or x11.
--reset
Delete overrides. With an application id, only that application. Without one, the global overrides.
-u, --user
Change the per-user installation. Without this option the system installation is changed.
-h, --help
Show help and exit.

INSTALL

sudo apt install flatpak
copy
sudo dnf install flatpak
copy
sudo pacman -S flatpak
copy
sudo apk add flatpak
copy
sudo zypper install flatpak
copy
nix profile install nixpkgs#flatpak
copy

CAVEATS

A filesystem override of host or a home directory gives the application access outside the sandbox. Reset with --reset when the extra permission is no longer wanted.

SEE ALSO

RESOURCES

Copied to clipboard
Kai