• Skip to main content
  • Skip to secondary menu
  • Skip to primary sidebar
  • Skip to footer
WebSetNet

WebSetNet

Technology News

  • Technology News
    • Mobile
    • Games
  • Internet Marketing
  • System Admin
    • Windows
    • Linux
    • Mac & Apple
    • Website Scripts
      • Wordpress

Using Flatpak on Ubuntu and Other Linux Distributions [Complete Guide]

August 5, 2020 by Martin6

 

Installing an application in Linux is as easy as opening the Software Center, searching and installing it. The applications which are not available in the App Stores can be installed via the DEB or RPM packages. Some of them are available via PPAs (for Debian based distributions) and if nothing, one can build from the source code.

There are some limitations though. The App Stores do not generally have the latest release of an application, handling dependencies can be tiresome and the PPAs may not always be safe! And, building from the source requires some terminal hands-on.

With several Linux distributions and the package management systems, there was a need of a Universal Packaging system that could run an application irrespective of what Linux distribution you are using. Canonical thought of it and created Snaps. There is also an independent universal software package called AppImage where you download an application and run it without actually installing the application.

Along with Snaps and AppImage, there is another universal package system called Flatpak from Fedora. We will see how to install and use Flatpak on most Linux distributions along with its advantages.

What is Flatpak?

Flatpak is basically a framework for the applications on Linux. With the different distributions preferring their own package management, Flatpak aims at providing a cross-platform solution with other benefits. It makes the work for developers even easier. A single application build can be used in almost all the Linux distribution (that support Flatpak) without any modification to the bundle.

Primary advantages of Flatpak

  • Apart from offering a single bundle for different Linux distributions, Flatpak offers integration to the Linux desktops making it easier to browse, install and use Flatpak applications, e.g. the Gnome Software Center can be used to install a Flatpak.
  • Flatpaks are forward compatible i.e. the same Flatpak app can run on the next releases of a distribution without changes.
  • Run-time dependencies are maintained which can be used by the application. Missing ones can be added as a part of the application.
  • Though Flatpak provides a centralized service for distribution of applications, it fully supports the decentralized distribution of applications.

A. Enable Flatpak support for various Linux distributions

How to use Flatpak in Ubuntu and other Linux distributions

Installing Flatpak is a two-step process. The first one is to install Flatpak so and then we have to add the Flathub repo from where we can install applications.

Install Flatpak on Ubuntu 18.04 and Linux Mint

Linux Mint and Ubuntu 18.04 has Flatpak supported by default. However, you can verify it by trying to install Flatpak again:

sudo apt install flatpak

Install Flatpak on Debian, Ubuntu 17.10, 16.04, Elementary OS and other Ubuntu based distributions

Debian based distros can use the official PPA to install Flatpak. Open a terminal and use the commands below:

sudo add-apt-repository ppa:alexlarsson/flatpak
sudo apt update
sudo apt install flatpak

Install Flatpak on Red Hat and Fedora based Linux distributions

Since Flatpak is a project developed by Fedora itself, all recent Fedora releases support Flatpak. However, you can still verify it by using the command below:

sudo yum install flatpak

Install Flatpak on openSUSE

To enable Flatpak support on openSUSE based Linux distributions, use the command below:

sudo zypper install flatpak

Install Flatpak on Arch Linux

To enable Flatpak support on Arch based Linux distributions, use the command below:

sudo pacman -S flatpak

B. Enable Flatpak application support in Software Center

Flatpak applications can be completely managed via command line. But not everyone likes using command line for installing applications and this is where enabling Flatpak support in GNOME software center will be a lifesaver.

You will need the GNOME software plugin to install a flatpak via GUI. Use the below command to install it in Ubuntu based distributions:

sudo apt install gnome-software-plugin-flatpak

For other distributions, use the regular package installation command to install gnome-software-plugin-flatpak. Once installed, restart the Software Center or your machine.

Now you can download the .flatpakref file from the application developer’s website or from the official Flatpak application store, Flathub.

Navigate to the download folder and double click on the downloaded .flatpakref file. It should open the Software Center and will provide the installation option as shown in the picture below:

You can also right click on the file and Open with Software Install (default) if double click doesn’t work.

Once the installation completes, you can launch it from software center or from the application menu.

C. Using Flatpak commands (for intermediate to experts)

Now that we have seen how to enable Flatpak support and how to install Flatpak applications, we can move forward to see Flatpak commands for complete control over package installation.

This part of the tutorial is optional and only intended for intermediate to expert users who prefer command line over GUI.

Add repositories for installing Flatpak applications

Flatpak needs to have repository information from where you can find and download applications. It would be a good idea to add the Flathub repository so that you get access to a number of Flatpak applications.

To do that, use the following command:

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

Searching Flatpak through terminal

You can search for available Flatpak applications using the search option in Flatpak command in the following manner:

flatpak search <application-name>

The application name need not to be exact. It will show all possible results matching the search query.

For example, flatpak search libreoffice returns LibreOffice stable release.

Flatpak search

You should note two things in the above command output. The “Application ID” and “Remotes”. You’ll need these two for installing the application.

Install Flatpak applications

The generic way to install a Flatpak command from a repository is:

flatpak install <remote_repository> <application_id>

For example, in the previous search command, you got the Application ID and the repository name. You can use this info to install the application in the following manner:

flatpak install flathub org.libreoffice.LibreOffice

Flatpak install

Some developers provide their own repository. You can use the absolute path to the application’s flatpakref to install the application.

flatpak install --from https://flathub.org/repo/appstream/com.spotify.Client.flatpakref

If you have downloaded the .flatpakref file on your system, navigate to the directory and use the command to install it,

flatpak install <package-name>

There are some useful terminal commands which can make your task easier around Flatpak applications.

Install Flatpak applications from flatpakref file

If you have downloaded a .flatpakref file from Flathub or the developer’s repository, you can install the application in the following fashion:

flatpak install <path_of_flatpakref_file>

If you are in the same directory as the fltapakref files (Downloads directly usually), you just need to provide the name of the downloaded flatpakref file.

Run a Flatpak

To run a Flatpak application, you can use the command below:

flatpak run <package-name>

Display all Flatpak apps installed on your system

You can display all Flatpak applications installed on your system using the command below:

flatpak list

Flatpak list

Uninstall a Flatpak application

You can use the uninstall option with the application id to remove the installed Flatpak package.

flatpak uninstall <application_id>

Updating all Flatpak applications at once

flatpak update

What do you think of Flatpak?

Enabling Flatpak support certainly provides access to more software. Flathub website provides an easy way of finding these Flatpak applications.

Flathub for finding Flatpak apps

Not only Flatpak addresses the cross-platform application installation among Linux users, it saves efforts to develop separate bundles for different distribution. A single package can be used on various kinds of Linux distributions and the maintenance is super easy.

Though, in comparison to Snap, Flatpak is slightly complicated. Relying on the application id instead of application name is an annoyance in my opinion. I was also surprised that installation and removal of Flatpak application doesn’t require sudo rights.

What do you think about Flatpak and do you use them? Do you prefer it over AppImage or Snaps? Let us know if you face any issue in the comment section.

Source

Related posts:

  1. How to Install Flatpak on Ubuntu (Step-by-Step Guide)
  2. 7 Flatpak Apps You Can Install Right Now from Flathub
  3. How To Install Latest LibreOffice from Flatpak Package
  4. Things to do After Installing Ubuntu 18.04
  5. Linux Jargon Buster: What is Flatpak? Everything Important You Need to Know About This Universal Packaging System
  6. Flatpak Apps Look Out of Place? Here’s How to Apply GTK Themes on Flatpak Applications
  7. LibreOffice Is Now Available on Flathub, the Flatpak App Store
  8. Using PPA in Ubuntu Linux [Complete Guide]
  9. Amazon Alexa Easter eggs: Over 180 funny things to ask Alexa
  10. Amazon Alexa Easter eggs: Over 180 funny things to ask Alexa

Filed Under: Debian

Primary Sidebar

Trending

  • How to fix Windows Update Error 80244019
  • Windows 10 Update keeps failing with error 0x8007001f – 0x20006
  • How To Change Netflix Download Location In Windows 10
  • Troubleshoot Outlook “Not implemented” Unable to Send Email Error
  • How do I enable or disable Alt Gr key on Windows 10 keyboard
  • How To Install Android App APK on Samsung Tizen OS Device
  • 3 Ways To Open PST File Without Office Outlook In Windows 10
  • FIX: Windows Update error 0x800f0986
  • How to Retrieve Deleted Messages on Snapchat
  • Latest Samsung Galaxy Note 20 leak is a spec dump revealing key features
  • Install Android 7.0 Nougat ROM on Galaxy Core 2 SM-G355H
  • 192.168.1.1 Login, Admin Page, Username, Password | Wireless Router Settings
  • Websites to Watch Movies Online – 10+ Best Websites Without SignUp/Downloading
  • How to Backup SMS Messages on Your Android Smartphone
  • How to delete a blank page at the end of a Microsoft Word document
  • Fix: The Disc Image File Is Corrupted Error In Windows 10
  • Android 11 Custom ROM List – Unofficially Update Your Android Phone!
  • Samsung Galaxy Z Fold 3 could be scheduled for June 2021, with S Pen support

Footer

Tags

Amazon amazon prime amazon prime video Apple Application software epic games Galaxy Note 20 Galaxy S22 Plus Galaxy S22 Ultra Google Sheets headphones Huawei icloud Instagram instant gaming ip address iPhone iphone 12 iphone 13 iphone 13 pro max macOS Microsoft Microsoft Edge Mobile app office 365 outlook Pixel 6 Samsung Galaxy Samsung Galaxy Book 2 Pro 360 Samsung Galaxy Tab S8 Smartphone speedtest speed test teams tiktok Twitter vpn WhatsApp whatsapp web Windows 10 Windows 11 Changes Windows 11 Release Windows 11 Update Windows Subsystem For Android Windows 11 Xiaomi

Archives

  • June 2022
  • May 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • September 2021
  • August 2021
  • July 2021
  • June 2021
  • May 2021
  • April 2021
  • March 2021
  • February 2021
  • January 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • August 2020
  • July 2020

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org