The Ubuntu Snap App Format As An User

New Article

2020/5/20

Ubuntu Snap

Ubuntu brought up an app format called snaps a long time ago. Let us take a pure pragmatic look at it.

People who install ubuntu may encounter (intentionally or not) some applications which have been installed using the snap format. There have been many discussions around the politics and technical side of this app format but I wanted to take a look at it purely from the user experience side of things.

Foreword

At first I was interested in this universal app format as I thought it would be a good way to solve the old problem regarding linux app distribution and compatibility. So I started looking at it as a user.

I wasn't even using the snap store GUI which is delivered with ubuntu (I did not knew about it back then). The website was used: Snapcraft-Store. I discovered many applications and started naively installing every one I could find using the snap command line tool.

And that's it. After installing many of my daily drivers using snap over CLI the first things started catching my eye. Let us start with the user view.

User view

The good things

Convenience

Having your applications installed so easy was very convenient. At most for third-party or closed-source apps which are not available in the regular repositorys. But you found also applications which are in the repositorys. One advantage was also that you could get the most current versions of them.

It is very easy to get fast moving projects like Blender in their latest release for example. There was also a snap package which makes it much easier to just plug and play Command And Conquer Tiberium Sun as it would pull a compatible wine version and the needed sources and assets.

Compatibility

I did not encounter any applications which couldn't be started at all. Even the proprietary ones ran fine and as expected. More complex constructs like the mentioned Command And Conquer Snap were a combination of multiple snap packages which installed with just one line and flawlessly.

Updating

Every packages you install from the snap store pulls the most current version available there when it is marked as stable. Snaps are checked multiple times daily for a new version and will be immediately installed. Without taking a deeper look this felt like a great feature as I don't had to actively seek and install new versions.

The bad things

Startup times

The weird thing regarding snap apps is the startup time. While some applications seem to start immediately or at least as fast as their native counterparts some others take a long while. Starting up a game for example was very fast and did not show any slow starts but GTK-based applications like GIMP or applications like the chromium-browser took up to 30 seconds or more.

I suspect that this could be related to the method these applications have been implemented. While a game might depend more on static libraries which are part of the compiled code it seems that GUI-applications may pull in many dynamic libraries which slow down the startup time immensely for whatever reason.

GUI, GUI, GUI

If you are using custom themes you will encounter that the snap based applications don't consider your theme. This feels very off and give you a feeling of alpha-software. There are some solutions for this problem already but most users will still see many of their applications having the wrong theme. I linked the bug report here for more information.

Filesystem pollution

Every snap has its own filesystem which even gets mounted when the snap isn't used. Take a look at this:

Dateisystem Größe Benutzt Verf. Verw% Eingehängt auf
/dev/loop0 94M 94M 0 100% /snap/core/9066
/dev/loop1 226M 226M 0 100% /snap/atom/252
/dev/loop2 163M 163M 0 100% /snap/blender/37
/dev/loop3 55M 55M 0 100% /snap/core18/1754
/dev/loop4 41M 41M 0 100% /snap/teeworlds-unofficial/117
[...]

This may not seem as a big problem but there is some more to this: snaps are saved up to three time (default) on your hard disk. With every update a fallback copy is kept of the old applications version. Storage may be cheap these days but consider using about 700MB for atom IDE or 3GB for the 0ad game. See this stackexchange answer for details on how to clean them up.

Slower system start

With every snap you install and every filesystem that needs to get mounted you slow down your systems startup. I currently have about 50 applications installed without using snaps. Consider installing them using snaps it could slow down your startup by many seconds everytime.

627ms snapd.service
260ms snap-core18-1754.mount
260ms snap-teeworlds\x2dunofficial-117.mount
257ms snap-atom-252.mount
257ms snap-blender-37.mount
256ms snap-core-9066.mount
25ms snapd.apparmor.service
11ms snapd.seeded.service
1ms snapd.socket

Unstoppable updates

A big feature of snaps for developers is to always be sure that a user is using the most current version of their software but this may be a advantage as well as and disadvantage.

After the installation of many snap applications I recognized that my internet connection was very slow for a while after system startup. I really like my computers to be started fast and usable immediately afterwards so this was a problem for me. While you can change the timeframe in which updates are installed I consider this a problem for default configuration.

Things I did not consider in this article

There may be many more things to consider while using snaps but I left them out on purpose for this article. One of them is the closed-source nature of the snap store itself. You can't add additional sources for your snaps and are depending on the repository which is provided by the ubuntu project.

I did not test snaps outside of the ubuntu environment. While it is advertised that snaps can run flawlessly on nearly all mainstream distributions I did not test them there.

Snaps do provide more than just graphical applications. You can bring CLI tools to snaps and even services and daemons. As I did not find a use case for this I did not test this also.

Conclusion

Snap is a feature-full technology which is able to solve many old and well-known problems in the linux-ecosphere. It brings in many conviences for users and developers and fells like a good solution for users who have few or no experience with linux-based distributions.

But all this comes at a cost. More experienced users may be very unhappy about forced updates, slow startups and the high overhead in the filesystem.

Also the developers behind the snap technology have shown high ambitions to provide new features and improvements. The future will show whether snaps will be kept and prove as worthwhile.