Misplaced Pages

Snap (software)

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.

Snap is a software packaging and deployment system developed by Canonical for operating systems that use the Linux kernel and the systemd init system. The packages, called snaps , and the tool for using them, snapd , work across a range of Linux distributions and allow upstream software developers to distribute their applications directly to users. Snaps are self-contained applications running in a sandbox with mediated access to the host system. Snap was originally released for cloud applications but was later ported to also work for Internet of Things devices and desktop applications.

#508491

26-410: Applications in a Snap run in a container with limited access to the host system. Using Interfaces , users can give an application mediated access to additional features of the host such as recording audio, accessing USB devices and recording video. These interfaces mediate regular Linux APIs so that applications can function in the sandbox without needing to be rewritten. Desktop applications can also use

52-862: A Snap. This causes Snap to work best only on distributions that can adopt that init system . Snap initially only supported the all-Snap Ubuntu Core distribution, but in June 2016, it was ported to a wide range of Linux distributions to become a format for universal Linux packages. Snap requires Systemd which is available in most, but not all, Linux distributions. Other Unix-like systems (e.g. FreeBSD ) are not supported. ChromeOS does not support Snap directly, only through Linux distributions installed in it that support Snap, such as Gallium OS . Ubuntu and its official derivatives pre-install Snap by default, as well as other Ubuntu-based distributions such as KDE Neon , and Zorin OS . Solus have currently planned to drop Snap, to reduce

78-441: A centralized OCS ( Open Collaboration Services ) user-contributed content database, thus providing the best user experience. " With the 0.6 release, the scope of the project was expanded to include more metadata for other software components, such as fonts, codecs, input-methods and generic libraries , which will allow applications to query information about software which is available in a distribution-independent way. This enhances

104-491: A day, snapd checks for available updates of all Snaps and installs them in the background using an atomic operation . Updates can be reverted and use delta encoding to reduce their download size. Publishers can release and update multiple versions of their software in parallel using channels . Each channel has a specific track and risk , which indicate the version and stability of the software released on that channel. When installing an application, Snap defaults to using

130-509: A result, on distributions such as Fedora which enable SELinux by default, the Snap sandbox is heavily degraded. Although Canonical is working with many other developers and companies to make it possible for multiple LSMs to run at the same time, this solution is still a long time away. The Snap sandbox prevents snapped desktop applications from accessing the themes of the host operating system to prevent compatibility issues. In order for Snaps to use

156-624: A stated preference for submissions from the developers themselves. Although Flathub is the de facto source for applications packaged with Flatpak, it is possible to host a Flatpak repository that is independent of Flathub. Theoretically, Flatpak apps can be installed on any existing and future Linux distribution , including those installed with the Windows Subsystem for Linux compatibility layer, so long as bubblewrap and OSTree are available. It can also be used on Linux kernel -based systems like ChromeOS . AppStream AppStream

182-467: A theme, it also needs to be packaged in a separate Snap. Many popular themes are packaged by the Snap developers but some themes are not supported yet and uncommon themes have to be installed manually. If a theme is not available as a Snap package, users have to resort to choosing the best matching theme available. Work is ongoing to make it easier for third parties to package themes in a Snap and to automatically install uncommon system themes. Multiple times

208-525: A trusted third party which re-published the Snaps without the miner present. Although the Snap sandbox reduces the impact of a malicious app, Canonical recommends users only install Snaps from publishers trusted by the user. Snaps are self-contained packages that work across a range of Linux distributions . This is unlike traditional Linux package management approaches, which require specifically adapted packages for each Linux distribution. The snap file format

234-432: Is a utility for software deployment and package management for Linux . It provides a sandbox environment in which users can run application software in (partial) isolation from the rest of the system. Flatpak was known as xdg -app until 2016. Applications using Flatpak need permissions to access resources such as Bluetooth , sound (with PulseAudio ), network , and files . These permissions are configured by

260-449: Is a single compressed filesystem using the SquashFS format with the extension .snap . This filesystem contains the application, libraries it depends on, and declarative metadata. This metadata is interpreted by snapd to set up an appropriately shaped secure sandbox for that application. After installation, the snap is mounted by the host operating system and decompressed on the fly when

286-719: Is a tool for developers to package their programs in the Snap format. It runs on any Linux distribution supported by Snap, macOS and Microsoft Windows . Snapcraft builds the packages in a Virtual Machine using Multipass, in order to ensure the result of a build is the same, regardless of which distribution or operating system it is built on. Snapcraft supports multiple build tools and programming languages, such as Go , Java , JavaScript , Python , C / C++ and Rust . It also allows importing application metadata from multiple sources such as AppStream , git , shell scripts and setup.py files. The Snap Store allows developers to publish their snap-packaged applications. All apps uploaded to

SECTION 10

#1732851723509

312-415: Is also used by developers of server applications such as InfluxDB , Kata Containers, Nextcloud and Travis CI . Snap has received mixed reaction from the developer community. On Snap's promotional site, Heroku praised Snap's auto-update as it fits their fast release schedule well. Microsoft mentions its ease of use and Snap being YAML -based, as well as it being distribution-agnostic. JetBrains says

338-419: Is an agreement between major Linux vendors (i.e. Red Hat , Canonical , SUSE , Debian , Mandriva , etc.) to create an infrastructure for application installers on Linux and sharing of metadata . The initiative was started as early as 19-21 January, 2011. The project describes itself as: " an initiative of cross-distro collaboration, which aims at creating an unified software metadata database, and also

364-475: Is often used to share common libraries and application frameworks between Snaps to reduce the size of Snaps by avoiding duplication. The Snap sandbox heavily relies on the AppArmor Linux Security Module from the upstream Linux kernel . Because only one "major" Linux Security Module (LSM) can be active at the same time, the Snap sandbox is much less secure when another major LSM is enabled. As

390-439: The latest/stable channel, which will automatically update to new major releases of the software when they become available. Publishers can create additional channels to give users the possibility to stick to specific major releases of their software. For example, a 2.0/stable channel would allow users to stick to the 2.0 version of the software and only get minor updates without the risk of backwards incompatible changes. When

416-617: The Snap Store gives their tools more exposure, although some users claim launching the tools takes much longer when it's installed from the Snap Store than when it's installed another way. Others have objected to the closed-source nature of the Snap Store. Clément Lefèbvre ( Linux Mint founder and project leader) has written that Snap is biased and has a conflict of interest. The reasons he cited include it being governed by Canonical and locked to their store, and also that Snap works better on Ubuntu than on other distributions. He later announced that

442-453: The Snap Store undergo automatic testing, including a malware scan. However, the scan does not catch all issues. In one case in May 2018, two applications by the same developer were found to contain a cryptocurrency miner which ran in the background during application execution. When this issue was found, Canonical removed the applications from the Snap Store and transferred ownership of the Snaps to

468-654: The XDG Desktop Portals, a standardized API originally created by the Flatpak project to give sandboxed desktop applications access to host resources. These portals often provide a better user experience compared to the native Linux APIs because they prompt the user for permission to use resources such as a webcam at the time the application uses them. The downside is that applications and toolkits need to be rewritten in order to use these newer APIs. The Snap sandbox also supports sharing data and Unix sockets between Snaps. This

494-460: The burden of maintaining AppArmor patches needed for strict Snap confinement. Zorin OS have removed Snap as a default package in the Zorin OS 17 release. While other official Ubuntu derivatives such as Kubuntu , Xubuntu , and Ubuntu MATE have also shipped with the competing Flatpak as a complement, they will no longer do so beginning with Ubuntu 23.04, meaning that it must be installed manually by

520-513: The files are used. Although this has the advantage that snaps use less disk space, it also means some large applications start more slowly. A significant difference between Snap and other universal Linux packaging formats such as Flatpak is that Snap supports any class of Linux application such as desktop applications, server tools, IoT apps and even system services such as the printer driver stack. To ensure this, Snap relies on systemd for features such as running socket-activated system services in

546-482: The installing of Snap would be blocked by APT in Linux Mint, although a way to disable this restriction would be documented. On recent versions of Ubuntu, Canonical has migrated certain packages exclusively to Snap, such as Chromium and Firefox web browsers. The replacement of Firefox led to mixed reception from users due to performance issues with the Snap version, especially on startup. Flatpak Flatpak

SECTION 20

#1732851723509

572-506: The maintainer of the Flatpak and can be added or removed by users on their system. Another key feature of Flatpak allows application developers to directly provide updates to users without going through linux distributions , and without having to package and test the application separately for each distribution. Because Flatpak runs in a sandbox (which provides a separate, ABI -stable version of common system libraries), it uses more space on

598-456: The publisher releases a new major version in a new channel, users can manually update to the next version when they choose. The schedule, frequency and timing of automatic updates can be configured by users. For example, this command will check for updates on the last Friday from 23:00 to 01:00. Users can also pause automatic updates for a certain period of time, or indefinitely. Updates are automatically paused on metered connections. Snapcraft

624-479: The quality of data displayed in software-centers, but also makes it possible for 3rd-party application installers like Listaller to find the components a new application needs to run in the distribution's package database. Additionally, the new metadata allows easier installation of prerequisites needed to build software in the first place, as well as matching upstream applications with distribution packages and matching packages across distributions, which might improve

650-543: The system than common native packages. However, OSTree , a technology underlying Flatpak, deduplicates matching files. This means that the first few Flatpak installations will occupy more space, but as more packages are added, the system will use space more efficiently. Flathub , a repository (or remote source in the Flatpak terminology) located at flathub.org , is the de facto standard for getting applications packaged with Flatpak. Packages are contributed by both Flathub administrators and application developers, with

676-534: The user. A number of notable desktop software development companies publish their software in the Snap Store, including Google , JetBrains , KDE , Microsoft (for Linux versions of e.g. .NET Core 3.1, Visual Studio Code , Skype , and PowerShell ), Mozilla and Spotify . Snaps are also used in Internet-of-Things environments, ranging from consumer-facing products to enterprise device management gateways and satellite communication networks. Finally, Snap

#508491