So Canonical sought to solve the problem with distributing applications on Linux due to the very many and different Linux distributions around and each with their own packaging formats. So Canonical introduced Snaps. Whew, that would be great. But again, Canonical isn’t the only ones hoping to crack this problem on Linux. In fact, there are two other frameworks that are seeking to be the one-stop app framework for distributing an application on Linux. There are Flatpak and AppImage. So today we take a look at Flatpak and what it means to Linux.
What Is Flatpak?
Flatpak (previously known as xdg-app) is an app distribution framework that aims to enable users to install and run the same desktop application on multiple Linux distributions and their different versions. So according to the developers –
Flatpak is the new framework for desktop applications on Linux – Distributing applications on Linux is a pain: different distributions in multiple versions, each with their own versions of libraries and packaging formats. Flatpak is here to change all that. It allows the same app to be installed on different Linux distributions, including different versions. And it has been designed from the ground up with security in mind, so that apps are isolated from each other and from the host system.
Flatpak is the brainchild of Alexander Larsson, Principal Software Engineer at Red Hat.
How Does It Work?
Flatpak employs 3 main features to enable it to function.
- The first feature is the runtime. So the idea is that, whatever Linux distribution will come with a shared runtime that which contains all the dependencies required by the apps. So your Flatpak apps will run on your OS so far as you have the Flatpak runtime available.
- The second feature is the use of bundled libraries. Other app dependencies that do not come with the runtime can be bundled as part of the app. The developer may even use a dependency different from the one with the runtime.
- The third feature that Flatpak also employs is app sandboxing. Apps are isolated from the operating system providing security for users.
So with Flatpak, apps can be updated without fear of conflicts occurring. Developers and users even may install different versions of the same app at the same time. Currently, there are some applications are available as Flatpaks including stable builds of LibreOffice, Telegram, Pitivi and Rhythmbox and then nightly builds of GIMP, Inkscape, Mypaint, and Scribus.
Flatpak seeks to make Linux kind of a single OS by developing tools that will allow the universal installation of apps on all Linux distros. Currently, installing and updating flatpak tools and apps is via the command line only and a graphical tool will be so appreciated. Flatpak and Snaps all aim to achieve the same things. And since they can both coexist, let’s hope they can push each other to get better.