Red Hat System Administration I · RH124

Chapter 13

Installing and Updating Applications by Using Flatpak
Sandboxed apps · Remotes · flatpak CLI · GNOME Software
CIS126RH — Mesa Community College

Chapter Objective

Install, run, update, and remove sandboxed desktop applications on RHEL using Flatpak, from both the command line and GNOME Software.

Key Commands

  • flatpak remote-add
  • flatpak search
  • flatpak install
  • flatpak run
  • flatpak update
  • flatpak uninstall

What Is Flatpak?

Flatpak is a framework for distributing desktop applications in an isolated sandbox, separate from the libraries and packages installed on the host system. Each Flatpak application bundles its own runtime dependencies, so it works consistently regardless of what versions of shared libraries RHEL itself ships.

Why It Matters — RHEL favors a small, stable, long-supported base system — which historically made it hard to run the newest version of a desktop application like a web browser or email client. Flatpak solves this: the sandboxed app can update independently of the underlying RHEL release.

Key Concepts

TermMeaning
SandboxIsolated environment an application runs in, with limited access to the host system
RuntimeShared platform libraries a Flatpak application depends on to run
RemoteA repository Flatpak applications and runtimes are published from
Application IDA unique reverse-DNS-style identifier for a Flatpak app, e.g. org.mozilla.Thunderbird

Remotes: Where Flatpaks Come From

Flatpak applications are distributed from repositories called remotes, similar in concept to a dnf repository. Red Hat publishes its own remote of RHEL applications; third-party remotes such as Flathub also exist.

# List remotes currently configured on this system
flatpak remotes
Warning — Red Hat Only Supports Its Own Remote — Red Hat provides and supports applications from the official Red Hat Flatpak remote. Applications installed from third-party remotes like Flathub are not supported by Red Hat, even though the Flatpak tooling itself works the same way regardless of source.

Enabling the Red Hat Remote

# Install Flatpak itself, if not already present
sudo dnf install flatpak

# Add the Red Hat Flatpak remote (safe to re-run — won't error if it exists)
flatpak remote-add --if-not-exists rhel https://flatpaks.redhat.io/rhel.flatpakrepo
Note — Subscription and Credentials — On a system already registered with an active RHEL subscription, accessing the Red Hat Flatpak remote generally doesn't require separately re-entering credentials. Unregistered or unsubscribed systems may need to authenticate to the Red Hat Container Catalog before the remote will serve content.

Searching for Applications

# Search all configured remotes by name or description
flatpak search thunderbird

# Example output columns:
# Name    Description    Application ID    Version    Branch    Remotes
Tip — Note the Remote Column — If the same application appears from more than one remote, check the Remotes column before installing — you generally want the Red Hat-supported build (rhel) on a production RHEL desktop rather than an unsupported third-party build.

Installing and Running

# Install an application by its application ID
flatpak install rhel org.mozilla.Thunderbird

# List installed Flatpak applications
flatpak list --app

# Run an installed application from the command line
flatpak run org.mozilla.Thunderbird
Note — Per-User vs. System-Wide — Adding --user to a Flatpak command installs it only for the current user rather than system-wide. This is useful for testing, but most classroom and production installs use the system-wide default.

Updating and Removing

# Update every installed Flatpak application and runtime
flatpak update

# Update a specific application only
flatpak update org.mozilla.Thunderbird

# Remove an installed application
flatpak uninstall org.mozilla.Thunderbird

# Clean up runtimes no longer used by any installed app
flatpak uninstall --unused
Tip — Flatpak Updates Are Independent of dnf — Running dnf update does not update your Flatpak applications, and flatpak update does not touch RPM-installed software. The two systems track completely separate sets of packages — remember to check both.

Using GNOME Software

On a system with a graphical desktop, the GNOME Software application provides a graphical front end for browsing, installing, and updating Flatpak applications without touching the command line.

  1. Open the Software application and make sure the Explore tab is active.
  2. Click the search icon and type the application's name.
  3. If the application appears more than once, check the Source field in its details — choose the one sourced from flatpaks.redhat.io for the Red Hat-supported build.
  4. Click Install.
Note — GNOME Software and the flatpak command manage the exact same underlying installations — applications installed graphically show up in flatpak list, and vice versa.

Key Terms for Chapter 13

Flatpak
A framework for distributing and running desktop applications in an isolated sandbox
sandbox
The isolated environment a Flatpak application runs in, with limited host system access
runtime
The shared platform libraries a Flatpak application depends on
remote
A repository that Flatpak applications and runtimes are published and installed from
application ID
The unique reverse-DNS identifier for a Flatpak application, e.g. org.mozilla.Thunderbird
rhel remote
Red Hat's official, supported Flatpak remote, added via https://flatpaks.redhat.io/rhel.flatpakrepo
Flathub
A popular third-party Flatpak remote; applications from it are not supported by Red Hat
GNOME Software
The graphical application for browsing, installing, and updating software including Flatpaks

Review Questions

  1. What problem does Flatpak's sandboxing model solve for desktop applications on a stable, long-supported base like RHEL?
  2. What is the URL used to add Red Hat's official Flatpak remote, and what command adds it?
  3. Why does Red Hat not support applications installed from the Flathub remote?
  4. Write a command that searches all configured remotes for an application related to "gimp".
  5. If the same application shows up from two different remotes in GNOME Software, what field should you check before installing, and what value would indicate the Red Hat-supported build?
  6. Does running dnf update also update your installed Flatpak applications? Why or why not?
  7. What command removes an installed Flatpak application named org.mozilla.Thunderbird?
1 / 12