Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

On computers managed by Technology Services - Engineering IT, Flatpaks offer users a way to install some desktop applications without the need for root access to the machine. Some popular applications available as Flatpak applications include Visual Studio Code, Spotify, Slack, and VLC.

Table of Contents
minLevel1
maxLevel7

What are Flatpaks?

Flatpaks are prebuilt applications for Linux distributions that come bundled with the necessary libraries that allow them to run. Flatpak applications are built upon various runtimes that can coexist without causing library conflicts. Some Flatpaks are sandboxed so that they run isolated from the rest of your system. Permissions required by Flatpak applications are presented to the user at the time of installation, so if an application requires permission the user does not want to grant it, they can choose to abort the installation before the application is installed. 

Security Considerations for Flatpaks

Not all Flatpak applications are sandboxed, and even some that are sandboxed still request permission to write to your home directory. As a result, you should take care when installing a Flatpak application to ensure that you fully trust the developer of the program itself, and the maintainer of the Flatpak application. 

While the Flathub administrators prefer that Flatpak applications distributed through their repository be authored by the program’s original author(s), that is not always the case. Some Flatpak applications are community-maintained. Before installing a Flatpak from Flathub, you can check who has contributed to it from the applications page of Flathub. Near the bottom of the page for every application page on the Flathub website is an “Additional Information” section.

...

Click Clicking on the “See details” link (under Publisher) will take you to the GitHub repository that Flathub uses to build Flatpak applications before distributing. The page the link takes you to will list all contributors to the Flatpak build of the program.

Before installing a Flatpak, be mindful of who created it and whether or not it is likely to be safe.

Setting Up Flathub

Most Flatpak applications are installed from Flathub. To get started with Flatpaks, you’ll need to add the Flathub repository.

Code Block
languagenone
flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

Searching for Applications

Once the Flathub repository is added, you can search for Flatpak applications in one of two ways. 

Using flatpak search

Using the Flatpak command in the terminal you can search for applications by name. 

...

The command will return a list of application IDs (which are necessary when specifying a package to install), as well as the remote repository they are from and a description of the application. Below is an example output when searching for Slack. 

...

Flathub Website

The Flathub repository maintains a website at flathub.org which includes a full, searchable interface for all applications available from Flathub.

...

After clicking on an application to go to its page, there will be instructions at the bottom for the command to run to install the application. Below is an example from the bottom of the Slack webpage on Flathub.

...

Installing Flatpak Applications

When installing a Flatpak application, you will need to know the “Application ID” to tell Flatpak which application to install. Installations will follow the format:

...

Code Block
flatpak install flathub com.slack.Slack

Updating Flatpak Applications

Flatpak applications can be updated with the flatpak command. Running the following command will check for updates and install any if they are found:

Code Block
flatpak update

Running Flatpak Applications

Flatpak applications should appear in the regular application menus of your desktop once they are installed. If you are unable to find them, or would rather run them from the command line, you can run them with the command:

...

Code Block
flatpak run com.slack.Slack

Uninstalling Flatpak Applications

To uninstall a Flatpak application you first need to know the application ID of the application. You can find this by running the command: 

...