How to Install and Run Flatpak Applications 2021.
Linux offers a number of package management options. Traditionally, these options have been limited to only package managers like APT, DNF, or YUM.
How To Install & Run Linux Apps On a Chromeboo
The app stores that are available on the major distributions have been a great relief for users who don’t want to work with the command line. They provide a simple graphical interface that allows users to install, update, or remove installed software applications on Linux.
Installing Software Packages in Linux
Over time, Linux software package management has faced many complex problems.
First, not all apps could be found in app stores. To install them, you had to download and run the appropriate rpm or debin packages. Sometimes, when running these packages, you may run into dependency problems, which often lead to errors during installation.
Second, while you can successfully install a software package on one Linux system, say Debian, the installation will fail entirely on Ubuntu or another Debian based operating system.
Considering the setbacks faced by users in managing software packages in different environments, innovative ways of working with packages have been developed.
Distribution Agnostic Software Packages
Given the set of problems that arise when installing packages on multiple Linux distributions, a distribution-agnostic package handling system was required that would allow users to install and manage packages regardless of which distribution they were using.
In light of this, Canonical, the publisher of Ubuntu, thought about snapshots, which are compressed applications that are bundled with their own libraries and dependencies. The snapd daemon allows users to install, update, and uninstall snap-in packages on all major distributions that support snap-in. Canonical took advantage of Snapcraft, which is a snapshot repository that stores over 4,000 snapshots.
In addition, there is AppImage, a packaging system that allows users to install portable applications without requiring root privileges. Another alternative is Flatpak, which we’ll talk about and try to understand it better.
Flatpak, What Is It?
The Flatpak is a package management system that allows users and developers to install and manage software packages on Linux systems regardless of Linux distribution, runtime, dependencies, and package management type. Flatpak runs in an isolated environment. It is a sandboxed environment that has all the dependencies, libraries, and everything you need to keep your application running smoothly.
Consistency in distribution and packaging makes it easier for developers to develop and test applications.
To take advantage of Flatpak, you need Flatpak enabled on your system. Without further ado, let’s dive into this and see how Flatpak can be installed on major Linux distributions.
Enabling Flatpak on Red Hat / CentOS / Fedora
For RedHat / CentOS 8 and Fedora 22 and later, call the command below to enable flatpak:
$ sudo dnf install flatpak
For earlier versions of Red Hat and CentOS, use the YUM Package Manager as shown:
$ sudo yum install flatpak
Enable Flatpak on Debian / Ubuntu
If you are using the latest Debian and Ubuntu versions, the following commands will come in handy for installing Flatpak on your system:
$ sudo apt install flatpak
For Linux Mint and other Ubuntu derivatives i.e. Elementary OS, add Alexander Larsson’s PPA first. (Pssst !, is the creator of the Flatpak packaging system).
$ sudo add-apt-repository ppa: alexlarsson / flatpak
Then update your system packages and run the commands shown:
$ sudo apt update
$ sudo apt install flatpak
Enable Flatpak in ArchLinux / Manjaro
If you’re a fan of Arch Linux or Arch-based distributions, use the pacman package manager to enable Flatpak support.
$ sudo pacman -S install flatpak
Enable Flatpak in OpenSUSE
In OpenSUSE, run the command as shown:
$ sudo zypper install flatpak
How to Install and Run Flatpak Applications
Flatpak applications, like snapshots, are hosted in a repository. The most popular repository is the FlatHub repository, which has apps in broad categories such as audio and video, graphics and photography, developer tools, utilities, and more.
To enable the Flathub repository for installing apps from Flathub, enter the following command:
$ flatpak remote-add –if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
You can check the installed repository by running the command:
$ flatpak remotes
After adding the repository, you can search for the availability of the application as shown.
$ flatpak search app-name
For example, we will be looking for a desktop Skype client as shown in the picture:
$ flatpak search skype
In the imprint, you will find detailed information about the Flatpak app, such as the app ID, version, branch, and a brief description of the app.
To install flatpak application, use the following syntax:
$ sudo flatpak install remotes Application-ID
Here the command to install the Skype client would be:
$ sudo flatpak install flathub com.skype.Client
Your system will contact flathub, find the flatpak app, and install it. Just follow the prompts by typing “y” and pressing ENTER. Installation can take quite a long time, and it can be a great opportunity to have a cup of tea or rush to take a break.
You can view a list of all installed Flatpak apps by running:
$ flatpak list
Getting Flatpak up and running is pretty straightforward. Just use the syntax:
$ sudo flatpak run Application-ID
For example, in our case it will be
$ sudo flatpak run com.skype.Client
If you need to update Flatpak applications, you can do it with one command, as shown.
$ flatpak update
Finally, if you no longer need the flatpak application, you can uninstall it using the syntax:
$ flatpak uninstall Application-ID
For example, to uninstall Skype, run the command:
$ sudo flatpak uninstall com.skype.Client
Closing Thoughts
It is clear that Flatpak, along with Snap, revolutionized Linux package management. Flatpak provides a level playing field where users can be confident that applications will run on any Linux distribution that supports Flatpak without any problem.
In addition, Flatpaks guarantees future compatibility and easy integration with existing applications on your system. If you’re having trouble installing apps on your system, we highly recommend Flathub as a decent package management system.
How to Install and Run Flatpak Applications 2021
How to Install and Run Flatpak Applications 2021