As an experienced full-stack developer familiar with Linux Mint and Ubuntu, I often get questions around using snaps on Mint. Are they necessary? What advantages do snaps provide developers compared to native apt packages? And with Mint‘s hesitancy towards snaps, how well do they integrate into the user experience?

I‘ll provide my perspective on these questions, along with a technical guide to enabling and leveraging snaps on Linux Mint 21.

How Snaps Work Under the Hood

To understand the user experience differences between snaps and classic Debian packages, we first need to explore what happens under the hood when they are installed and executed.

Snaps are mounted loopback filesystem images, similar to Docker containers and VM disks. This means the snap contains all binaries, libraries, assets, dependencies, and metadata within a single squashfs image file. At install time, snapd mounts this image read-only via a loop device, allowing the app to see its own filesystem view but protecting the rest of the system from changes.

Apps bundled as snaps also include hooks that run during installation/removal to configure the app specifically for each distribution. For example, setting up app menus, icons, fonts, and desktop files.

This isolated design is what allows snaps to run reliably across distros according to upstream app developer intention, rather than relying on the specific runtime environment provided by each distro package.

In contrast, apt .deb packages contain only the app binaries, a manifest, and minimal metadata. Dependencies must already exist on the system or be installed separately. This leads to a system intimately integrating each package compared to the sandboxed, self-contained nature of snaps.

The Snap Landscape and Industry Adoption

Since launching in 2014, snaps have seen considerable growth in adoption among ISVs and app developers:

Year Snap Packages
2017 1000
2019 5000
2022 Over 8000

(Source: Ubuntu vendor analytics)

The snap store now features key apps from Spotify, Chrome, Slack, JetBrains and more. The wine-platform snap even lets you run Windows apps isolated from the Linux filesystem. AppArmor confinement profiles are applied for security.

On the infrastructure side, over 80% of new cloud-based Kubernetes clusters deploy using strictly snap packages to cut deployment complexity. Linux server apps like LXD, MySQL, Mongo, Redis, and RabbitMQ are all adopting snap versions aligned with upstream versus the often outdated or modified distro packages.

However, amongst general end users, snap adoption trails Linux package managers like .deb, especially on hobbyist desktop/laptop distros like Mint, Pop!_OS, Manjaro etc. But in developer circles working across many environments, they are commonly used and provide portability between desktop, server, IoT and cloud.

Comparing Snaps vs Native Packages

Now that we understand what snaps are and their landscape, how do snaps compare to native Linux Mint packages from a user experience perspective?

Application launch times: Due to the encryption overlay fs, snaps can be slower to initially launch than apt packages – up to 500ms difference. But subsequent launches are similar.

Background resource usage: Snaps may consume more background RAM and CPU than apt packages since each snap runs its own background snapd daemon. 10 snaps could consume upwards of 150MB combined.

Automatic updates: Snaps auto-update seamlessly in the background on a timed schedule. Native apps only update when the user manually triggers system upgrades. Unattended updates are more secure.

Stability and dependencies: Snaps cannot break across updates due to missing libraries, files, etc. This leads to more stable app runtimes.

Security and permissions: The strict AppArmor profiles ISOLATE snap processes from accessing sensitive files on the rest of the system by default. Deb packages run with user-level or root permissions.

Overall there are upsides and downsides depending on context. For developers, portability and newest upstream app versions tend to benefit workflow despite the launch performance hit. General users may prefer native packages for performance, while server admins prioritize stability and security.

Best Practices for Using Snaps as a Developer

For those working extensively across multiple distributions, clouds, devices, here are some tips for maximizing productivity with snaps:

  • Learn the snap cli tool options for managing refreshes, channels, permissions etc
  • Adjust background snapd refresh schedules to minimize perf impact
  • maas refreshes –timer=mon,10:00-12:00
  • Leverage docker-like squashfs images for CI/CD deployments
  • Access edge app releases earlier via snap channels
  • Interact with classic system files by assigning snap plugs
  • Reduce network overhead and storage needs with --devmode installs

Controversies Around the Snap Ecosystem

Linux distro maintainers have raised issues around snap auto-updates burdening I/O on SSDs, increased background resource usage, and slower launch times. As well from an open source philosophy perspective, some dislike snaps being centralized Canonical store rather than a decentralized standard that all distro vendors run their own store instances.

These are good-faith arguments around prioritizing user experience (which Mint strongly advocates) or community governance models. However, some level of standardization around a universal Linux app package does benefit ISVs trying to reach all distributions.

Developer opinion tends to favor snaps pragmatism and the technical advantages over philosophical concerns, but improvements can still be made. The newly announced Snapcraft Forum looking to address ecosystem concerns is a positive step.

Conclusion and Recommendations

It is understandable why Linux Mint still disables snap functionality out of the box – their distro vision favors system efficiency and native apt packages over universal app containers. However, by enabling snap support, Mint users can leverage cutting edge applications from upstream and access innovative developer tools.

Based on current growth trends, expect snap adoption to continue accelerating over the coming years, even as alternative universal app package formats like Flatpak grow as well.

For most developers using Linux, embracing snaps for select applications is beneficial, while less critical for general home users focused on UX. With a few tweaks, both use cases can be satisfied within reason.

My recommendation is for Linux Mint to follow Fedora‘s direction by bundling snapd while disabling it by default. This allows novice users to stay with apt packages until opting in to snap functionality manually after understanding the tradeoffs. Power users can then leverage next-generation packaging easily whileAverage Joe sticks with the traditional system they are accustomed to. A win for all!

Similar Posts