Dit deel is nog niet vertaald. Je ziet de Engelse tekst.
$ als gewone gebruiker# als root (of met sudo)
Vaardigheden in dit hoofdstuk
- Desktop-apps installeren met Flatpak
Know when to use Flatpak
Use DNF for the system and server software. Use Flatpak for desktop apps that users need in a newer version or without touching the base system.
| RPM / DNF | Flatpak | |
|---|---|---|
| For | System tools, services, libraries | Desktop applications |
| Libraries | Shared with the system | Own runtime, kept apart |
| Rights | Full access to the system | Sandbox: only the rights the app asks for |
| Updates | With the system (dnf update) | Per app (flatpak update) |
| Install as user | No, needs root | Yes, with --user |
Add the Red Hat Flatpak remote
A remote is a Flatpak repository. Add the Red Hat remote once, then log in to the Red Hat registry.
dnf install flatpak
flatpak remotes
flatpak remote-add --if-not-exists rhel https://flatpaks.redhat.io/rhel.flatpakrepo
podman login registry.redhat.io
Username: anna.admin
Password:
Login Succeeded!
flatpak remotes --show-details- The Red Hat apps are stored as container images in
registry.redhat.io, so you log in with your Red Hat account (or a registry service account token for many machines). - The login of
podman loginis kept only until you log out. To keep it, copy$XDG_RUNTIME_DIR/containers/auth.jsonto~/.config/flatpak/oci-auth.json. For all users the file is/etc/flatpak/oci-auth.json.
Optional: add Flathub, the big community remote.
flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepoLet op
Apps from Flathub are not built or supported by Red Hat. In a company, check the policy before you add other remotes.
Find and install an app
Search the remotes, then install the app by its application ID (a reverse domain name like org.mozilla.firefox).
flatpak search firefox
Name Description Application ID Version Branch Remotes
Firefox Fast, Private & Safe org.mozilla.firefox 140.4.0 stable rhel
flatpak install rhel org.mozilla.firefox
flatpak install --user flathub org.gnome.Calculator
flatpak list
flatpak list --app
flatpak info org.mozilla.firefox| Install | Where | Who can use it |
|---|---|---|
| system (default) | /var/lib/flatpak | All users; needs root (or a polkit password prompt) |
--user | ~/.local/share/flatpak | Only you; no root needed |
The first install of an app also installs its runtime (for example the RHEL Flatpak runtime). Later apps with the same runtime install faster.
Run, update and remove apps
Start apps from the desktop menu or with flatpak run. Update all apps with one command.
flatpak run org.mozilla.firefox
flatpak ps
flatpak kill org.mozilla.firefox
flatpak update
flatpak update org.mozilla.firefox
flatpak uninstall org.mozilla.firefox
flatpak uninstall --unused
flatpak historyOp het werk
flatpak uninstall --unused removes runtimes that no app needs any more — often several hundred MiB.
Check the rights of an app
Every Flatpak app lists the rights it needs (files, network, devices). You can see and change them.
flatpak info --show-permissions org.mozilla.firefox
[Context]
shared=network;ipc;
sockets=x11;wayland;pulseaudio;
devices=all;
filesystems=xdg-download;
flatpak override --user --nofilesystem=home org.gnome.Calculator
flatpak override --user --show org.gnome.Calculator
flatpak override --user --reset org.gnome.CalculatorOnthoud
filesystems=xdg-download means the app may use only your Downloads folder — not your whole home folder. Fewer rights = less damage if the app has a security hole.
Use the graphical tool
In the GNOME desktop, the Software app shows Flatpak apps from all remotes, with buttons to install, update and remove.
- Open Activities → Software.
- Search for the app, click it, and check the Source (for example
rhel). - Click Install. Updates appear in the Updates tab.
gnome-software