Chapter 17. Installing applications using Flatpak

17.1. The Flatpak technology

Flatpak provides sandbox environment for application building, deployment, distribution, and installation. Applications you run using Flatpak have minimum access to the host system, which protects the system installation against third-party applications. Flatpak provides application stability regardless of your Linux kernel architecture, name, version, or release. Flatpak allows you to install and run multiple versions of the same application simultaneously.

The details of the application packaged with Flatpak are stored in the flatpakref file that uses the .flatpakref extension. Each flatpakref file contains information enabling it to add the remote and install the application. You can access flatpakref files remotely in a remote repository, or you can download and manage them locally on your computer.

Flatpak can be used in combination with third party centralized repositories for applications packaged with Flatpak. Note that Red Hat supports Flatpak as a method of installing applications. Applications from third-party repositories are not supported by Red Hat.

17.2. Setting up Flatpak

Procedure:

  • To install Flatpak, use:

    $ sudo yum install flatpak

17.3. Managing applications packaged with Flatpak in the graphical interface

The following section describes how to search for, install, launch, and update Flatpak applications in the graphical interface.

Prerequisites

  • Installed Flatpak.

17.3.1. Installing Flatpak applications in the graphical interface

The following section describes hoe to search for applications packaged with Flatpak.

Procedure

  1. Go to the remote repository that hosts applications packaged with Flatpak.
  2. Download the flatpakref file for the application.
  3. Open the flatpakref file with the Software Installer.
  4. Click the Install button and wait for the installation process to be complete.
  5. Click the Launch button to launch the application.

17.3.2. Updating Flatpak applications in the graphical interface

The following section describes how to make all applications update automatically.

Procedure

  1. Open the Software application.
  2. Click the icon in the top left corner.

    The pop-up menu appears.

  3. Click on Update Preferences.

    The pop-up menu appears.

  4. Enable Automatic Updates and Automatic Update Notifications.

17.4. Managing applications using Flatpak on the command-line

The following section describes how to search for, install, launch, and update Flatpak applications from the command-line.

Prerequisites

  • Installed Flatpak.

17.4.1. Adding a remote repository

If the flatpakref file is not stored locally on your computer, it is necessary to enable the remote repository.

Procedure

  • To enable the remote repository, use:

    $ flatpak remote-add --if-not-exists remote-repository path-to-the-remote-repository

    Replace remote-repository with the name of the remote repository that hosts applications packaged with Flatpak, and path-to-the-remote-repository with the path to the remote repository.

17.4.2. Searching for Flatpak applications

Prerequisites

  • Enabled remote repository.

Procedure

  • To search for an applications, use:

    $ flatpak search application-name

    The search returns the ID of the application and the remote repository that hosts the application.

17.4.3. Installing Flatpak applications

Prerequisites

  • Enabled remote repository.

Procedure

  • To install an application, use:

    $ flatpak install remote-repository application-id

    Replace remote-repository with the name of the remote that hosts the application, and replace application-id with the ID of the application.

17.4.4. Launching Flatpak applications

Procedure

  • To launch the application, use:

    $ flatpak run application-id

    Replace application-id with the ID of the application.

17.4.5. Updating Flatpak applications

Procedure

  • To update all applications installed with Flatpak, use:

    $ flatpak update