KevCaz's Website

Two days ago, I was attempting to install GNOME Fractal but apt-get couldn’t find it… Cause it’s a GNOME application I thought is was unexpected, so I checked the README file. It turned out that the developers actually suggest to install their app with either Snap or Flatpak. As I knew about the former and hadn’t heard about the later, I decided to install flatpak.

1
$ apt install flatpak 

I then used flatpak to install Fractal. I must stress that the installation was seamless and that the information displayed during it was clear and helpful.

Screenshot of my first installation with flatpak.

Neat, right!? But what is flatpak exactly? Another package manager meant to replace apt-get? Not really, flatpak was created to ease desktop application delivery in Linux (only in Linux). It uses container technology to deliver applications inside a desktop session (see the FAQ for more details). This removes major limitations that have been around for some time in the Linux world. Indeed, with such technology, application developers don’t need to worry about how their applications will be distributed across Linux distributions, at least for 28 distributions. All they need to do is to create a manifest and use flatpak-builder and their application is ready to go on 28 distributions!

This is a significant step towards making application updates easy in Linux1. Mainly because there is no longer a need of one maintainer per distribution per package (desktop application packages are big packages and I guess they are hard to maintain). The easiness of building and shipping application with this kind of technology ultimately allows users to quickly have access to the newest release of the application and package maintainers get a reduced workload, so they can spend more time on other projects.

I wouldn’t say flatpak is new, because the project origins go back in 2007, but it has certainly matured since that time and it has reached a high maturity level with the release of its application store, flathub in July 2017. With Flathub it is now super easy to cherry pick and install the set of desktop applications you need is with a few clear and concise command lines (e.g. VLC, QGIS, etc.). All you need to do is to add Flathub as a repository

1
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

and then use the installation command line provided on the web page of the application.For instance, for Fractal, the installation becomes:

1
flatpak install -y flathub org.gnome.Fractal

Tchao extra external personal package archives (PPA) for Slack & Microsoft teams & co! Now on I’ll use Flatpak and I’ve already edited my installDebian.sh gist accordingly.

1
2
3
4
5
6
flatpak apt install gnome-software-plugin-flatpak
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak install -y flathub \
  org.videolan.VLC com.slack.Slack us.zoom.Zoom com.dropbox.Client \
  com.github.IsmaelMartinez.teams_for_linux com.discordapp.Discord \
  com.simplenote.Simplenote org.qgis.qgis org.gnome.Fractal

Note that because it is a simple command to run the application, one can created aliases easily, which mean I can use the same command line to launch one application:

1
alias vlc='flatpak run org.videolan.VLC'

Obviously, just as other package managers do, Flatpak makes it easy to update packages …

1
2
3
4
5
6
7
8
9
$ flatpak update 
Looking for updates…


       ID                        Branch Op Remote  Download
1. [] org.gnome.Platform.Locale 3.38   u  flathub 17.5 kB / 326.1 MB
2. [] org.gnome.Platform        3.38   u  flathub 22.1 MB / 344.0 MB

Updates complete.

… and remove them.

1
2
3
4
5
6
7
$ flatpak remove com.github.IsmaelMartinez.teams_for_linux   [12:07:29]


       ID                                             Branch     Op
1. [-] com.github.IsmaelMartinez.teams_for_linux      stable     r

Uninstall complete.

👏 👏 👏 I’m glad I’ve spent some time understanding Flatpak and using it. It is already part of my setup now and I am confident that I’ll be using it for months. I might dig deeper in future posts to understand what could possibly be the downside of using Flatpak (e.g. I wonder whether there are some performance costs) and also to understand what are the differences between Snap, Flatpak and AppImage2. I’ll certainly report my findings here!


  1. a major limitations of most Linux distributions according to Linus Torvald↩︎

  2. there is at least one discussion about this on Ask Ubuntu↩︎