Flatpak, the perfect framework for developing desktop applications on Linux

cover-flatpak

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 intended to be distributed in all distros, problems arise between the necessary packages or libraries for your Software and the ones you have installed the user's machine.

As a programmer, developing a desktop application for GNU / Linux can be very tedious. It is very difficult, if not impossible, to know what packages necessary for your application will or will not have installed the user, or if the version of the necessary libraries will be correct for your Software. Flatpak is a framework that aims to deal with all these problems that may arise in the development of an application. So in Ubunlog today we want to introduce it to you and talk a little about it.

How does Flatpak work?

To avoid all these dependency problems between libraries and packages necessary for the Software, Flatpak works in several layers:

1.- Runtimes

They contain the dependencies to be used by the application. They are always the same regardless of the distro in which it is used. In this way, we do not have to update the application when the distro undergoes changes.

2.- Packaged libraries.

The idea is to pack all those dependencies that are not in runtime with the same application. In this way, any distro will have access to the same library (s), regardless of its version.

3.- Sandboxes

Flatpak isolates the application from the OS as well as from 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 and its layers work:

Screenshot from 2016-06-18 16:33:04

Installing Flatpak on Ubuntu 16.04

Installing Flatpak on Ubuntu 16.04 is very easy. It is enough that we execute the following in the Terminal:

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

To see how to install Flatpak on other distros you can take a look at its official website.

Well, we hope that if you are a Linux application developer you will take a look at this framework that will make things very easy for us if we want our apps to be as modular as possible regardless of the distro in which they are to be installed.


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

     ... said

    The image of the scheme is missing ... although for the curious it is found on the Flatpak website.

        Miquel Perez said

      Thanks for the warning! For some unknown reason the image was not attached correctly. It's already added!