Flatpak-1.16.3

#### Supplemental Linux® From Scratch - Version 13.0

### Chapter 3. General Utilities

- Prev

  cldr-emoji-annotation-38

- Next

  FluidSynth-2.5.2

- Up
- Home

# Flatpak-1.16.3

## 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 a lot of dependencies that it might be worth it to install the Flatpak version instead.

- Download: https://github.com/flatpak/flatpak/releases/download/1.16.3/flatpak-1.16.3.tar.xz

### Flatpak Dependencies

#### Required

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

#### Recommended

appsteam-glib, Avahi, Bubblewrap, cURL, libarchive, libseccomp, libsoup3, libXau, xdg-dbus-proxy, and xdg-desktop-portal (with libportal)

#### Recommended Runtime

OpenGL (libglvnd or Mesa; Mesa's GL is not supported) [3] and drivers for your GPU(s) for graphics APIs like OpenGL and Vulkan

#### Optional

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

## Installation of Flatpak

If you will be running tests, prevent test generation from copying locale files LFS doesn't install as they all get put in one archive file:

    sed -i '92,97d' 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 tests=false                      \
                .. &&

    ninja

If you removed the `-D tests=false`, 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 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 such case, ensure polkit works first. If all went well, no error should be outputted. Then you will be able to install flatpaks from Flathub. All installed applications will be in `/var/lib/flatpak/exports/bin`. Add that directory to your `$PATH` if you wish.

## Contents

Installed Programs: flatpak, flatpak-bisect, flatpak-bwrap, flatpak-coredumpctl, flatpak-dbus-proxy, flatpak-oci-authenticator, flatpak-portal, flatpak-session-helper, flatpak-system-helper, flatpak-validate-icon, and revokefs-fuse
Installed Shell Script Triggers: desktop-database.trigger, gtk-icon-cache.trigger, and mime-database.trigger
Installed Libraries: libflatpak
Installed Directories: /usr/include/flatpak, /usr/lib/sysusers.d, and /usr/share/flatpak/triggers

### Short Descriptions

desktop-database.trigger | is a trigger that updates a flatpak's application cache
flatpak | can run containerized and sandboxed applications
flatpak-bisect | can do a git-style bisect of a flatpak application
flatpak-bwrap | is used by flatpak to utilize Bubblewrap features
flatpak-coredumpctl | can debug an application in gdb that crashed inside flatpak.
flatpak-dbus-proxy | is used by flatpak to utilize xdg-dbus-proxy features
flatpak-oci-authenticator | is used by flatpak to athenticate with the Oracle OCI SDK
flatpak-portal | is used by flatpak to access the xdg-desktop-portal
flatpak-session-helper | is used by flatpak to help with session management
flatpak-system-helper | is used by flatpak to help with the flatpak system.
flatpak-validate-icon | is used by flatpak to validate icons
gtk-icon-cache.trigger | is a trigger that updates a flatpak's GTK icon cache
mime-database.trigger | is a trigger that updates a flatpak's MIME database cache
revokefs-fuse | makes a basepath visible at a given mountpoint
`libflatpak` | contains functions used by the Flatpak utilities

[3] While neither Flatpak or apps installed by it link to OpenGL on the system, each app will link against its own runtime/SDK of choice. Most of them use libglvnd. Running a libglvnd linked application on a Mesa OpenGL system is known to fail by failing to create an instance or context. If you haven't already, it's a good idea to switch to libglvnd to ensure compatibility.

- Prev

  cldr-emoji-annotation-38

- Next

  FluidSynth-2.5.2

- Up
- Home