Flatpak-1.18.0

Introduction to Flatpak

Flatpak allows you to download apps and run them in a sandbox. It downloads all of the dependencies of a given package in a sandbox and allows you to run the package as if it was not in a sandbox. Some packages only exist as a Flatpak, and some packages have so many dependencies that it might be better to install the Flatpak version instead.

Flatpak Dependencies

Required

AppStream, D-Bus, Fuse3, GLib, gpgme, JSON-GLib, Systemd, OSTree-2026.2 (with cURL and gpgme), p11-kit, and pyparsing

Recommended

Recommended Runtime

Drivers for your GPU(s) for graphics APIs like OpenGL and Vulkan (NVIDIA (NVIDIA or NVIDIA-r580) or Mesa)

Optional

DConf (wanted if using a GNOME app via Flatpak), Git, GTK-Doc, libxslt, malcontent (for parental features), socat-1.8.1.3 (for tests), Valgrind, and xmlto

Installation of Flatpak

If you will be running the tests, prevent the test generation from copying locale files that LFS doesn't install. On LFS systems, all of the locales are put in one archive file.

sed -i '92,99d' tests/make-test-runtime.sh

Install Flatpak by running the following commands:

mkdir build &&
cd    build &&

meson setup --prefix=/usr                       \
            --buildtype=release                 \
            -D system_bubblewrap=bwrap          \
            -D system_dbus_proxy=xdg-dbus-proxy \
            -D gtkdoc=disabled                  \
            -D tests=false                      \
            .. &&

ninja

If you removed the -D tests=false and want to run the tests, issue: ninja test.

Now, as the root user:

ninja install

Command Explanations

--buildtype=release: Specify a buildtype suitable for stable releases of the package, as the default may produce unoptimized binaries.

-D system_bubblewrap=bwrap: Ensures the build system doesn't download Bubblewrap.

-D system_dbus_proxy=xdg-dbus-proxy: Ensures the build system doesn't download xdg-dbus-proxy.

-D gtkdoc=disabled: This parameter disables building the GTK-Doc API documentation. This is currently broken with gtk-doc-1.36.0, and causes the build to fail as a result.

-D tests=false: This parameter disables tests. Remove this parameter if you have socat installed.

Configuring Flatpak

Now that Flatpak is installed, you should add a repository/remote to install flatpaks from. Flathub is the most popular choice. You can do that with:

flatpak remote-add flathub https://dl.flathub.org/repo/flathub.flatpakrepo

You can run it as a regular user or as root. If you run it as a regular user, polkit will ask for authentication. In this case, you should ensure polkit works first. If all went well, no error should be output. Then you will be able to install flatpaks from Flathub. All installed applications will be in /var/lib/flatpak/exports/bin. You can add that directory to your $PATH if you wish.

Contents

Installed Programs: flatpak, flatpak-bisect, and flatpak-coredumpctl
Installed Libraries: libflatpak
Installed Directories: /usr/include/flatpak and /usr/share/flatpak

Short Descriptions

flatpak

can install and run sandboxed applications via multiple repos

libflatpak

contains functions used by Flatpak and other projects