A big push from the Linux community in the last decade has been to make the Linux desktop experience more user friendly. A difficulty users have faced is dealing with the terminal, package managers, and dependencies. With Windows and MacOS, installing a desktop application usually only requires a few clicks. Package managers and dependencies can be difficult to navigate if users do not know about how shared libraries work, and how to navigate the terminal.

The Linux developer community has come up with a few solutions to application distribution that make it easier for users to install applications. These packaging methods are not as “light” as a package installed with apt that links to shared libraries, but they are more user friendly.

In this article I will be discussing three of the most popular application packaging systems for Linux: Flatpack, Snap, and AppImage.

Flatpack

Flatpack (formally known as xdg-app) is a framework for distributing desktop applications across Linux distributions. flatpacks are compatible with all Linux distributions. They are “sandboxed” meaning the applications can only access parts of the system that the developer and user have allowed.

Applications must be built against a runtime (ie. GNOME, KDE, etc.) which provide a stable base for applications to be developed against. Different versions, or even different runtimes, are installed in parallel on the system automatically.

Flathub.org is a repository of flatpacks that users can download and install. Applications are verified by the Flathub team to ensure they are coming from the original developer. The flathub.org source code is available on GitHub.

A great introduction to flatpacks can be found here

If you want to develop your own flatpack, a hello world can be found here

Snap

Snaps are a similar application packing system developed by Canonical ( the developers of Ubuntu). Snaps are also sandboxed and can be installed on many distributions, including Ubuntu, Fedora, Gentoo, and Debian. I have some reservations about Canonical’s snap system, but first how it works.

Snaps are self-contained applications that include all of the dependencies they need to run.

The snapcraft software repository can be found here. Snapcraft is the only way to download snaps. Unlike apt or flatpacks, the repository for snaps is hard coded into the snapcraft software. This means that canonical has complete control over what snaps are available to users. This is not what you want in an open source community if you want to avoid vendor lock in.

AppImage

AppImage is another application packaging system that is similar to flatpacks. They go by the “one-file-one-app” philosophy. AppImages are are a single file that, if done right, contain the application and all of its dependencies. The developers aim to allow the user to replicate the “download a .exe and double click to run” experience on Linux.

AppImages do not have “sandboxed” permissions like flatpacks or snaps. This means that AppImages can still access the files and devices on your system.

AppImages also do not have an “update” feature like flatpacks or snaps. They are files, if you want a new one, download it. If you want to downgrade, run the old file. Different versions can be run in parallel, by just running both files.

AppImage documentation can be found here.

Opinion

I think that flatpacks are the best option for long term application packaging. The open source community has control over the repository, and the applications. Using flathub, or your distribution’s flatpack repository, you can easily install your favorite applications.

For more niche applications, AppImages are still a great option. They can be distributed any way a developer wants. An example is as a Github release. For quick distribution for applications, without the need for repositories or updates, this might be the best option.

Snaps. Snaps are lock in. As long as flatpacks and AppImages continue to have great support, snaps should only be used as a last resort. I can see how enterprise users could use snaps as a way to control what applications are installed on their systems. But, the lack of control over the repository gives Canonical too much power over the “open source app store”. Also, the snap documentation is not as good as the flatpack or AppImage, so in writing this article it was difficult to find information on how snaps work.

Conclusion

The Linux community has made great strides in making the desktop experience easier for new users. I hope that you have learned more about the application distribution systems available to Linux developers.

-E