diff --git a/docs/desktop/gnome/flatpak.md b/docs/desktop/gnome/flatpak.md new file mode 100644 index 0000000000..380364aa71 --- /dev/null +++ b/docs/desktop/gnome/flatpak.md @@ -0,0 +1,263 @@ +--- +title: Flatpak +author: Steven Spencer +contributors: +--- + +## Introduction + +From the project's webpage: + +> Flatpak is a framework for distributing desktop applications across various Linux distributions. It has been created by developers who have a long history of working on the Linux desktop, and is run as an independent open source project. + +Flatpak comes installed by default when installing Rocky Linux with software selections that include GNOME ("Server with GUI" or "Workstation"). Manual installation is also possible. (see included procedure) It is an excellent way to populate your desktop environment with tools that you want to use. + +## Manual installation + +!!! note + + If you are already running the full GNOME Desktop environment described in the introduction, you can skip this step. + +Install Flatpak with: + +```bash +sudo dnf install flatpak +``` + +Add the Flatpak repository: + +```bash +flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo +``` + +Restart your system: + +```bash +sudo shutdown -r now +``` + +## Flatpak commands + +To see a list of all available Flatpak commands: + +```bash +flatpak --help +``` + +This outputs the following: + +```text +Usage: + flatpak [OPTION…] COMMAND + +Builtin Commands: + Manage installed applications and runtimes + install Install an application or runtime + update Update an installed application or runtime + uninstall Uninstall an installed application or runtime + mask Mask out updates and automatic installation + pin Pin a runtime to prevent automatic removal + list List installed apps and/or runtimes + info Show info for installed app or runtime + history Show history + config Configure flatpak + repair Repair flatpak installation + create-usb Put applications or runtimes onto removable media + + Find applications and runtimes + search Search for remote apps/runtimes + + Manage running applications + run Run an application + override Override permissions for an application + make-current Specify default version to run + enter Enter the namespace of a running application + ps Enumerate running applications + kill Stop a running application + + Manage file access + documents List exported files + document-export Grant an application access to a specific file + document-unexport Revoke access to a specific file + document-info Show information about a specific file + + Manage dynamic permissions + permissions List permissions + permission-remove Remove item from permission store + permission-set Set permissions + permission-show Show app permissions + permission-reset Reset app permissions + + Manage remote repositories + remotes List all configured remotes + remote-add Add a new remote repository (by URL) + remote-modify Modify properties of a configured remote + remote-delete Delete a configured remote + remote-ls List contents of a configured remote + remote-info Show information about a remote app or runtime + + Build applications + build-init Initialize a directory for building + build Run a build command inside the build dir + build-finish Finish a build dir for export + build-export Export a build dir to a repository + build-bundle Create a bundle file from a ref in a local repository + build-import-bundle Import a bundle file + build-sign Sign an application or runtime + build-update-repo Update the summary file in a repository + build-commit-from Create new commit based on existing ref + repo Show information about a repo + +Help Options: + -h, --help Show help options + +Application Options: + --version Print version information and exit + --default-arch Print default arch and exit + --supported-arches Print supported arches and exit + --gl-drivers Print active gl drivers and exit + --installations Print paths for system installations and exit + --print-updated-env Print the updated environment needed to run flatpaks + --print-system-only Only include the system installation with --print-updated-env + -v, --verbose Show debug information, -vv for more detail + --ostree-verbose Show OSTree debug information +``` + +Memorizing the list of commands is not necessary, but knowing how to get to the list, using the option `--help`, is a good idea. + +!!! warning + + If you are on a version of Rocky Linux 9.x, you will experience this bug. When running the command: + + ```bash + flatpak search [packagename] + ``` + + Where [packagename] is the package you are looking for, you will get: + + ```text + F: Failed to parse /var/lib/flatpak/appstream/flathub/x86_64/active/appstream.xml.gz file: Error on line 4065 char 29:
already set '
+ Organic Maps is a free Android & iOS offline maps app for travelers,
+ tourists, hikers, drivers and cyclists.
+ It uses crowd-sourced OpenStreetMap data and is developed with love by
+ ' and tried to replace with ' ('
+ No matches found
+ ```
+
+ There is no workaround for this. To avoid the error, use the Flathub resource in this document to obtain and install the desired package.
+
+## Flathub
+
+Flathub is a web resource for obtaining or submitting desktop packages.
+
+To browse the Flathub, visit