الفلاتر
طريقة البحث
  • الكلمات العادية تجد الأسماء والنصوص والأمثلة.
  • "كلمتان" تجد العبارة بالضبط.
  • --name أو -x تجد خيارًا.
  • #كلمة تبحث داخل الأوامر فقط.
  • @grep تجد الدروس والمعامل التي تستخدم grep.
  • الفلاتر: cat:network · in:labs · level:rhcsa · ch:8 · root:yes. ضع ! قبل كلمة لاستبعادها. OR بين الكلمات تعني إحداها.
  • ↑ ↓ للتنقل · Enter للفتح · Esc للإغلاق · / للبحث

الفصل 13الاسم في الدورة: Installing and Updating Applications by Using Flatpak

Install desktop apps with Flatpak

Flatpak installs desktop applications in their own box (a sandbox), with their own libraries (a runtime). The app does not change the base system, and it can be updated on its own. On RHEL you get Flatpak apps from the Red Hat Flatpak repository (shown in the Red Hat Ecosystem Catalog) or from other remotes like Flathub.

  • 6 الدروس
  • 3 الأوامر

هذا الجزء لم يُترجم بعد. أنت ترى النص الإنجليزي.

$ مستخدم عادي# بصلاحية root (أو مع sudo)

المهارات في هذا الفصل

  • تثبيت تطبيقات سطح المكتب باستخدام Flatpak

13.1

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 / DNFFlatpak
ForSystem tools, services, librariesDesktop applications
LibrariesShared with the systemOwn runtime, kept apart
RightsFull access to the systemSandbox: only the rights the app asks for
UpdatesWith the system (dnf update)Per app (flatpak update)
Install as userNo, needs rootYes, with --user

13.2

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 login is kept only until you log out. To keep it, copy $XDG_RUNTIME_DIR/containers/auth.json to ~/.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.flatpakrepo

انتبه

Apps from Flathub are not built or supported by Red Hat. In a company, check the policy before you add other remotes.

13.3

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
InstallWhereWho can use it
system (default)/var/lib/flatpakAll users; needs root (or a polkit password prompt)
--user~/.local/share/flatpakOnly 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.

الأوامر في هذا الدرس

13.4

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 history

في العمل

flatpak uninstall --unused removes runtimes that no app needs any more — often several hundred MiB.

الأوامر في هذا الدرس

13.5

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.Calculator

تذكّر

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.

الأوامر في هذا الدرس

13.6

Use the graphical tool

In the GNOME desktop, the Software app shows Flatpak apps from all remotes, with buttons to install, update and remove.

  1. Open Activities → Software.
  2. Search for the app, click it, and check the Source (for example rhel).
  3. Click Install. Updates appear in the Updates tab.
gnome-software

كل الأوامر في هذا الفصل