One of the only problems that can arise with the great diversity of distros in GNU / Linux, is that when you develop a desktop application designed to be distributed to all distros, problems arise between the necessary packages or libraries for your Software and those you have installed the user’s machine.
And as a programmer, developing a desktop application for GNU / Linux can be very tedious. It is very difficult, if not impossible, to know the necessary packages for your application will have or will not have installed the user, or if the version of the required libraries will be the correct ones for your Software. Flatpak is a framework that aims to deal with all these problems which may arise in the development of an application. So in Ubunlog today we want to introduce you and talk a little about him.
How does Flatpak work?
To avoid all these dependency issues between libraries and packages required for the Software, Flatpak works in several layers:
They contain the dependencies that you want the application to use. They are always the same regardless of the distro in which it is used. That way, we don’t have to update the app when the distro undergoes changes.
2.- packaged bookcases.
The idea is to package with the same application all those dependencies that are not in runtime. This way, any distro will have access to the same library (s), regardless of its version.
Flatpak isolates the OS application as well as other applications, which provides security for the user and a predictable environment for developers. In the following image we can see an outline of how Flatpak works and its layers :
Installing Flatpak on Ubuntu 16.04
Installing Flatpak on Ubuntu 16.04 is very easy. Just run the following in the Terminal:
its add-apt-repository ppa: alexlarsson / flatpak
sudo apt update
sudo apt install flatpak
To see how to install Flatpak in other distros you can take a look at theirs official website.
Well, we hope that if you are a developer of applications for Linux take a look at this framework that will make things very easy if we want our apps to be as modular as possible regardless of the distro in which they go to install.