Flatpak

Install Apps

Flatpak is a package manager for Linux that works alongside other package managers like apt and Snap. It provides access to a wide range of applications, many of which are unavailable from the apt archives or Snap Store. Many projects use it as their preferred method of app distribution.

Flatpak packages are provided either by application vendors, or by community members who make unofficial packages. While Flatpak as a package manager is a part of Ubuntu and is supported, individual applications installed via Flatpak are supported by individual developers and packagers, NOT Canonical or the Ubuntu community. If a Flatpak is official, the application's developer usually provides support for it directly.

Install a wide range of applications with Flatpak.

Install a wide range of applications with Flatpak.

Please read the disclaimer before proceeding. We review and update guided solutions regularly. If you have suggestions or requests, please write support@kfocus.org.

Install Flatpak

The Flatpak package manager is available from Ubuntu's archives. To install it, run:

sudo apt update sudo apt install flatpak

This allows installing Flatpaks via the command line. To install and update Flatpaks using Discover, install the Discover Flatpak backend:

sudo apt install plasma-discover-backend-flatpak

To find and install apps, a Flatpak repository must be added to the system. The most popular repo is Flathub. To add the Flathub repo to the system system, run:

flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo

Once Flatpak is installed, log out and log back in. Newly installed apps do not show in the Start Menu until this is done.

Install Flatpaks using Flathub

If an application's developers officially support installing their app via Flatpak, they usually provide a link to the project's Flathub page. From here, the application can be installed with Discover, or via the command line.

Before installing an application, make sure the app's packager is trustworthy. If the application is "verified", a blue checkmark is shown underneath the application's title, with the identity of the app's developer shown beside it. This means that the app's developer is the owner of the Flatpak. If the app developer is trustworthy, the Flatpak should also be trustworthy.

Use Flathub to install a verified Flatpak app.

Use Flathub to install a verified Flatpak app.

If there is a yellow "Unverified" badge underneath the application's title instead of a blue checkmark, the application was NOT packaged by the application's developer, and is therefore unofficial and potentially dangerous. Such apps should be treated with caution. It's almost always a good idea to use an installation method supported by the application's developer instead.

Avoid unverified Flatpak apps.

Avoid unverified Flatpak apps.

To install the chosen application:

Besides making it easy to install specific apps, the Flathub website also doubles as an app store. You can search for specific apps, explore app categories, and find popular apps for various purposes. Verified apps are marked with a blue checkmark, while unverified apps have no checkmark.

Search for apps on Flathub.

Search for apps on Flathub.

Update Flatpaks

Flatpaks do not automatically update on their own. This helps prevent unexpected surprises, since Flatpaks generally ship recent versions of applications, and an update could come with substantial changes from the old version. However, it is generally a good idea to keep apps installed via Flatpak up-to-date, in order to stay secure and get bugfixes.

If the Discover Flatpak backend is installed, Flatpak updates are integrated into normal system updates. When the system packages are upgraded, any installed Flatpaks with updates are upgraded ad the same time.

Use Discover to update Flatpaks along with system updates.

Use Discover to update Flatpaks along with system updates.

It's also possible to update Flatpaks from the command line. Open Konsole, and run:

flatpak update

Flatpak prompt for confirmation before installing updates. Note that updating in this way only updates Flatpaks. The rest of the system has to be updated separately.

Use the command line to update Flatpaks.

Use the command line to update Flatpaks.

Change App Permissions

Apps installed via Flatpak are sandboxed, which can help prevent them from accessing resources that they don't need access to. This is useful for security, but sometimes a Flatpak is configured so that it can't access a resource it actually needs. This results in the app malfunctioning.

Fortunately, Flatpak permissions can be customized using the Flatseal app. Flatseal itself is distributed as a Flatpak, and can be installed from Flathub as described above. Once Flatseal is installed, it can be launched from Start Menu > Utilities > Flatseal.

Customize Flatpak permissions using Flatseal.

Customize Flatpak permissions using Flatseal.

The Flatseal UI provides access to a list of different permissions. Most of the permissions can be toggled on and off, while some of them (such as the "Other Files" permission for granting access to specific files) can have items added to or removed from them. This can be used to fix a broken app by granting a permission it needs. If you are worried about the security impact of an app, you can also disable permissions on an app, restricting its capabilities accordingly.

For more information on using Flatseal, see the official Flatseal documentation.

Install an Example App: MakeMKV

In this example, we install the MakeMKV app using Flatpak. MakeMKV is popular for creating backups of BlueRays and DVDs. Because the Flatpak for the app was created by a community member and not Flatpak, it is considered 'unverified', and one should be cautious about providing it system access. Thankfully, FlatPak uses a sandbox per app, and one can audit app permissions with Flatseal, as discussed above.

# Install MakeMKV sudo flatpak install flathub com.makemkv.MakeMKV; # Check permissions flatpak flatpak run com.github.tchx84.Flatseal # Run MakeMKV] flatpak run flathub com.makemkv.MakeMKV;

When you run the Flatseal app, you can inspect MakeMKV permissions. Some users have reported that allowing “D-Bus Session Bus” is required for success. We otherwise recommend keeping restrictive permissions to help protect your system and your data.

This nstallation is presented for illustrative purposes only. We do not endorse or audit MakeMKV, and have no affiliation with the authors. Alternatives apps include HandBrake, which is a well-respected, familiar, and more flexible app. However, Handbrake is also more complex. You can see more information on MakeMKV at their site and in this article.

Troubleshooting

Q: I installed a Flatpak, but I don't see an entry for the app in the application menu. How do I fix this?

A: If you installed Flatpak, and then immediately installed an application using Flatpak without logging out and back in first, the app does not appear in the Start Menu. To rectify this, log out and log back in. Any Start Menu entries for installed Flatpaks should now appear. Going forward, apps should also appear in the Start Menu as soon as they are installed.

Revisions

This is a partial revision history. See the git repository for all entries.

Disclaimer

We try hard to provide a useful solution validated by professionals. However, we cannot anticipate every situation, and therefore cannot guarantee this procedure will work for your needs. Always backup your data and test the solution to determine the correct procedure for you.

THIS SOLUTION IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOLUTION, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

HAVE QUESTIONS?Call 844-536-2871 or write
TellMeMore@kfocus.org   |  GET FOCUS MERCH