Intro
At the start of this year, I installed Linux Mint on my main laptop. I’ve used Mint Mate edition before on my secondary laptop a bit, so I wasn’t new by then. Since then, because of various issues I’ve distrohopped
Mint (lack of touchpad gestures + freezing thumbnails)
-> Ubuntu (Anti snap propaganda got to my head)
-> Fedora (Issue where 'output' speakers list grew infinitly and crashed GNOME)
-> opensuse tumbleweed (failing updates + bricked system)
-> Ubuntu
I’ve learned quite a lot from this journey, and now I’ve used being on ubuntu for about a month and I think I can confidently say that I will stay.
None of the distros I’ve used were bad, they just weren’t for me. The 2 most important features of any linux distros are frequncy of updates/stability and look and feel. All else is secondary. Fedora’s dnf might be better than ubuntu’s apt, but I like ubuntu’s take on GNOME more. Yes, I could make fedora like ubuntu, but the burden of maintaince would be on me.
The main problem with desktop linux
Sadly, there isn’t a single ‘main problem’, if there was it’d just be easy to fix it and enter the year of the linux desktop. Along with freedom, comes the freedom to mess up easily. What we strive for, is up to date packages and general system stability.
Every time you install a package using a traditional package manager(apt, dnf, pacman, etc…), then basiclly you run an install script the package provides, where they can pretty much do anything(yes, you could theoretically make a package that runs DOOM during installation). So basiclly you mutate your root directories to install a package. This is an extremely chaotic approach, and often the root cause for instability.
All we want is for distros to focus on the feel of the desktop, be unbreakable. This is incompatible with traditional package managers1.
The solution to this is actually quite simple, make every directory other than /home immutable. That way, you can rollback all upgrades, maintance is super easy as the devs know everyones file system is synced, and the system is more stable, as updates are applied as full images instead of constantly mutating the system.
Immutable linux distros: Problems
Ok, so we now have immutable distros where only the /home directory is under the user’s control. There’s a very obvious problem with this: You can’t install packages, as they mutate the system. There are 2 solutions that most distros use:
1. Use flatpaks for gui apps.
2. For other packages, ‘layer’ them (tools like rpm-ostree do this). So say you ‘layer’ emacs on your immutable system, your system becomes base + mutation(emacs). So whenever you update, your base syncs to the official base image, then is mutated with emacs. This can get really slow really fast once you have base + mutation(a) + mutation(b) + mutation(c), where for every update base will be synced, then mutations a, b, and c will be applied.
Considering that now to install any cli program, any daemon, or anything that can’t come as a flatpak you’ll need to take the latter approach for most things, now I bet immutable distros don’t seem so attractive anymore. Luckily, there’s a simple solution.
Snaps
BUT.. BUT… SNAPS BAD, SNAPS SLOW, NOT OPEN SOURCE, BAD DEPENDENCY MANAGEMENT , EVIL.
Let’s address this: Snaps are not slow anymore, they used to be, but that’s simply not a problem anymore. Snaps are open source, the only thing that isn’t is cannonical’s backend code for the snap 2. Contrary to popular belief, snap do use shared dependencies, just not the traditional way. Most libraries are included in each snap, but snaps can reuse parts of other snaps.
Now, lets talk about why snaps are good:
- They are sandboxed, like flatpaks
- They are immutable
- ANY .deb or rpm package can be a snap. Even the linux kernal can be a snap(see ubuntu core).
The future
So why did I bring up snaps? Well, it’s obvious now, that they can replace the flatpak + layering combo for immutable distros. So you’ll be able to install everything(cli tools, gui stuff, daemons, etc…) with snaps and enjoy the unbreakable stability of an immutable distro at the same time. No more worrying about updates breaking things, or tiny user specific bugs.
Although a immutable snap based version of ubuntu dosn’t exist yet, it’s likley cannonical is going to come out with one, and when it does, I’m switching.
There are distro’s that come close to this, for example opensuse tumbleweed which uses BTRFS to provide functionality. However, it’s still a hack, your system still mutates constantly. Recently, opensuse updated to systemd-boot from grub. You had to do this manually, as there was no image to sync to that would have done this for you. Users shouldn’t have to go through this.↩︎
Although I don’t agree fully with this decison, you can see why they did this, they don’t want other people making snap stores so easily because you are basiclly giving anyone whose repo you install a snap from root access. It’s the same for flatpak, I bet you don’t have any non flathub flatpaks, why?↩︎