Linux is a free and open-source operating system just like Android. To an extent, Linux is also fragmented quite like Android. For instance, installing applications in Ubuntu is easy and there is more than one way to do it. But, there are different Linux distributions each with its packaging format that gets tedious and confusing. Apps not available in the official stores can be installed via packages. Debian uses DEB packages, for example, whereas SUSE uses RPM packages. The need for a uniform packaging format was felt, resulting in Flatpak and others. Today we’ll see how you can enable or install Flatpak on Ubuntu.
Flatpak is a universal packaging format from Fedora. It works across all Linux distributions and many apps available as Flatpaks. Canonical, the creators of Ubuntu also have created something similar that they call Snaps. Similarly, there is an independent packaging format known as Appimage. These are all different packaging systems and often you’ll find programs available as only one of them. This beats the purpose of a single unified packaging system. However, all of these work across any Linux distributions so they’re still better than platform-specific packaging systems.
The primary goal of Flatpak is the ease of distribution for apps and more control for application developers. It’s a containerized approach to developing Linux apps. “We want the Linux desktop to be a single platform that developers can easily target and we want them to build and release their apps the way they want, according to their schedule and not someone else’s. And if we solve that problem, we think it will mean more desktop apps being available,” said Allan Day and Alexander Larsson who are involved with Flatpak.
Install Flatpak on Ubuntu
Ubuntu 18.04 already comes with Flatpak support built-in. You can verify this by trying to install Flatpak again using the following command.
sudo apt install flatpak
Previous versions of Ubuntu do not support Flatpaks out of the box. These and other Debian-based distros can use the official PPA to install Flatpak. Open up a terminal and enter the following commands one by one to add the PPA, update the system, and install Flatpak.
sudo add-apt-repository ppa:alexlarsson/flatpak
sudo apt update
sudo apt install flatpak
When you have Flatpak installed, it may be a good idea to also add the Flatpak repository. This ensures that you can easily download and install apps available as Flatpak. You can add this repository by using this command:
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
Enable Flatpak in the GNOME Software Center
Generally, Flatpak apps can be installed via the Terminal only. For instance, if you’ve downloaded a .deb package file on your Ubuntu system, you can use the Terminal or double-click it and let the Software Center or another package installer take care of the installation. If you download a .flatpakref you can only install it via the Terminal, by default. You can do this by using the following command:
flatpak install <package-name>
There are even ways to search for Flatpaks and install them directly from the repositories using the Terminal and commands. Not everyone is very comfortable with the command line though. If you’re using GNOME, which is the default desktop environment on Ubuntu 17.10+ and Ubuntu 18.04+, you can enable Flatpak support in the GNOME Software Center. To do so, install the Flatpak plugin using this command:
sudo apt install gnome-software-plugin-flatpak
Once this is installed, restart the Software Center. From now on, you can double-click a .flatpakref package file and it will open up in the Software Center as any .deb file. Alternatively, right-click on the file and select Open with Software Install (default). When the package opens in the Software Center, you can click the Install button to install it. The best place to look for Flatpak packages is the official Flatpak application store known as Flathub.
Read Next: Best Photo Management Software for Linux