- How to use Snap in Linux Mint
- What is Snap?
- Snap packages in Linux Mint
- How to install Snap on Linux Mint
- How to install Snap based applications
- How to updates Snaps
- How to remove Snaps
- Final words
- Install snapd on Linux Mint
- snapd
- Daemon and tooling that enable snap packages
- Details for snapd
- Enable snaps on Linux Mint and install snapd
- Enable snapd
- Install snapd
- Как включить Snap в Linux Mint
- Как включить Snap в Linux Mint
- Snap в Linux Mint — терминал
How to use Snap in Linux Mint
There are different ways to install software in Linux. The most convenient way is by searching for software in the distribution dedicated software manager and install it from there. Then it is quite certain that you won’t have for example dependency issues. But on the other hand the available software in for example the software manager of Long Term Support based distributions like Linux Mint and Elementary OS, will age over time, until a real new LTS version is released with a more up to date software offering. But sometimes you want to install software that is indeed newer or that is not even available via the Linux software manager. And then you can use for example .deb files to be downloaded directly from the website of an application developer, or you can use more modern solutions like the universal package formats AppImage, Snap and Flatpak. In a future blog post I will go deeper in the different ways of installing software in Linux Mint, but in this post I just want to describe how to use Snap in Linux Mint.
What is Snap?
Snap is a software package format created by Canonical, the company behind the well known Ubuntu operating system. Software that is packaged as a Snap has bundled its dependent components and libraries, so the software works in theory across most Linux distributions, because it contains everything the application needs to work on its own. So a developer that offers his or hers application via Snap doesn’t need to worry about different installers for Debian, Ubuntu, Fedora, Arch, etc. Another plus is that Snap packaged applications can receive their updates automatically when it is available. So your software is always up to date. And there is even a dedicated software store available where all Snap based applications come together. Basically solutions like Snap makes lives easier for both the developer as well as the user.
Snap packages in Linux Mint
Linux Mint does not support Snap out of the box. The team behind Linux Mint choose for an equivalent alternative named Flatpak.
Snap and Flatpak both function in similar way, but Snap is more oriented on Ubuntu-based systems and Flatpak on Fedora-based systems. But both can be installed and used on all kind of distributions. Flatpak support is built into Linux Mint 18.3 and higher, so no special setup is required. But what if an application is not available as Flatpak but only as Snap? Than we need to find a way to install Snap packages on Linux Mint. For this we need “snapd”, which supports installing, configuring, refreshing and removing snap packages.
How to install Snap on Linux Mint
Snap is available for Linux Mint 18.2 (Sonya), Linux Mint 18.3 (Sylvia), Linux Mint 19 (Tara) and Linux Mint 19.1 (Tessa). And of course all upcoming releases will be supported as well.
The most easy way to install snapd is from the Linux Software Manager.
1) Open your applications menu and search for “Software Manager”.
2) Start “Software Manager”.
3) In the “Software Manager” search for “snapd”.
4) Open “snapd” by clicking on it.
5) Click on Install.
You can also install snapd from the command line:
1) Open the command line tool via Ctrl + Alt + T.
2) Type the command “ sudo apt-get update ” and give enter.
3) Type the command “ sudo apt-get install snapd ” and give enter.
How to install Snap based applications
Now that snapd has been installed you can easily install Snap based applications. Canonical, the organization behind Ubuntu, created a dedicated Snap application store called Snapcraft, which offers thousands of Snap based packages.
1) Go to https://snapcraft.io
2) Here you can search for applications in different categories, like Developer, Games, Video and Music.
3) Click on the application you want to install.
4) In the screen with all the details about this specific application click on Install.
What you will see now is some information on how to install the Snap package.
Unlike Flatpak, which is integrated in the Linux Mint Software Manager, you won’t find Snaps in the Linux Mint Software Manager. So we need to use the above proposed terminal line command to install Snap based packages in Linux Mint. In the example above it says that you can install the Snap of Spotify by using the command “ sudo snap install spotify “. And if you want to install for example Deepin Music you type “ sudo snap install deepin-music ” in the terminal
After you typed the specific command in the terminal (Open with Ctrl + Alt + T), an installation process will be visible and after a short while the application has been installed. Now you can look it up via the Application menu and search for the installed application (Possibly a restart is required to make the app visible).
It is not required to search for Snaps via the store https://snapcraft.io (although personally I like the visual way of browsing for apps). You can search for applications via the command line as well.
Type snap find appname to search for a specific application (if you already know the name” or snap find “search keywords” for a specific function based on multiple keywords. This will output a list of packages that are installable, related to your snap search.
For example if you want to find all music related Snaps type:
snap find “music”
This will give you an overview of all music related Snaps.
If you want to list all available Snaps in the Snapcraft store you can just use the command:
Now to install a specific Snap copy the name as presented in the Name column and paste it after the following command:
sudo snap install
So if you want to install Clementine you type sudo snap install clementine .
How to updates Snaps
You can update your Snap based applications once in a while by using the “refresh” command. Type “sudo snap refresh” and all the Snap based applications on your system will be updated to the latest versions.
How to remove Snaps
Snaps can easily be removed from Linux Mint as well via the following command:
sudo snap remove
sudo snap remove deepin-music
Final words
In Linux there are always different ways to achieve the same and everybody has its own preferences. Some people prefer to only use the Linux Mint Software Manager and only stick to what is available there. And some are more adventures and want to try other apps as well or want to use the newest bleeding edge versions. Then Snap is one of your options. I hope this post was helpful in your Linux journey.
Источник
Install snapd
on Linux Mint
snapd
- Canonical Publisher
Verified account
Daemon and tooling that enable snap packages
Install, configure, refresh and remove snap packages. Snaps are ‘universal’ packages that work across many different Linux systems, enabling secure distribution of the latest apps and utilities for cloud, servers, desktops and the internet of things.
Start with ‘snap list’ to see installed snaps.
Details for snapd
Enable snaps on Linux Mint and install snapd
Snaps are applications packaged with all their dependencies to run on all popular Linux distributions from a single build. They update automatically and roll back gracefully.
Snaps are discoverable and installable from the Snap Store, an app store with an audience of millions.
Enable snapd
Snap is available for Linux Mint 18.2 (Sonya), Linux Mint 18.3 (Sylvia), Linux Mint 19 (Tara), Linux Mint 19.1 (Tessa) and the latest release, Linux Mint 20 (Ulyana). You can find out which version of Linux Mint you’re running by opening System info from the Preferences menu.
On Linux Mint 20, /etc/apt/preferences.d/nosnap.pref needs to be removed before Snap can be installed. This can be accomplished from the command line:
To install snap from the Software Manager application, search for snapd and click Install. Alternatively, snapd can be installed from the command line:
Either restart your machine, or log out and in again, to complete the installation.
Install snapd
To install snapd, simply use the following command:
Источник
Как включить Snap в Linux Mint
Snap-пакеты быстро набирают популярность среди пользователей Linux-дистрибутивов. Сегодня каждый дистрибутив Linux поддерживает Snap-пакеты — все кроме Linux Mint. Причина этого заключается в том, что разработчики операционной системы Linux Mint считают, что технология Snap не отвечает их потребностям.
В Linux Mint вместо Snap используется Flatpak. Это неплохая альтернатива Snap. Тем не менее, популярность Snap, делает эту систему выигрышной. Если вы являетесь пользователем Mint и хотите сохранить Flatpak, но вдобавок использовать Snap, есть простой способ включить поддержку Snap-пакетов.
Как включить Snap в Linux Mint
Чтобы включить поддержку пакета Snap в Linux Mint, вам необходимо установить пакет, потому что команда Mint Linux решила удалить инструменты Snap и процессы по умолчанию.
Чтобы установить программное обеспечение на Linux Mint, вам нужно открыть окно терминала. Когда окно терминала открыто, введите: sudo -s, чтобы получить доступ root.
Получив корневую оболочку, используйте команду update, чтобы ваша система работала с последним программным обеспечением. Это важно, чтобы инструмент Snapd работал правильно. Имейте в виду, что если вам не удобно использовать команды для обновления Linux Mint, средство обновления Mint Updater также доступно для использования и будет работать так же хорошо.
Во-первых, используйте команду apt update для обновления источников программного обеспечения Linux Mint. Это также определит наличие обновлений для системы.
Затем используйте команду apt upgrade для установки новых обновлений, доступных в системе. Обязательно добавьте -y в конец, чтобы команда автоматически произнесла «да». Это экономит время, когда нужно нажать «y» на клавиатуре позже.
С установленными обновлениями программного обеспечения мы можем установить программное обеспечение, необходимое для запуска Snap-пакетов в Linux.
apt install snapd
Система должна автоматически включить все службы systemd в Linux Mint, чтобы Snapd функционировал должным образом. Если по какой-либо причине возникает ошибка при их включении, попробуйте:
apt purge snapd
Запуск команды очистки — отличный способ исправить любые проблемы во время выполнения Snap, поскольку очистка удалит и полностью удалит все ссылки на привязки в системе. Отсюда и название «чистка». Когда команда очистки завершится, можно безопасно переустановить оснастку в системе. Поскольку вы очистили все, Linux Mint будет вынужден повторно загружать и переустанавливать все и исправлять любые возникающие проблемы.
apt install snapd
Snap в Linux Mint — терминал
Теперь, когда Linux Mint имеет оснастку, есть что-то, что вы должны знать: это будет не так хорошо, как на Ubuntu. Основная причина этого в том, что Linux Mint 18.3 (и другие версии 18.x) работают поверх базы Ubuntu 16.04. Ubuntu LTS является надежной базой для операционной системы, но имеет свои недостатки, главным образом тот факт, что версии программного обеспечения могут быть немного устаревшими.
В Ubuntu 17.04 и 17.10 пользователи могут легко просматривать и устанавливать привязки в Gnome Software, благодаря плагину Software snaps. К сожалению, для этого плагина требуется версия 3.26 Gnome, а Mint имеет только 3.22. Это означает, что все привязки, которые вы устанавливаете в Mint, должны выполняться с помощью терминала.
Чтобы установить пакет оснастки под Linux Mint, откройте терминал и выполните:
snap find «имя программы»
Это приведет к отображению списка устанавливаемых пакетов, связанных с вашим быстрым поиском. Чтобы установить оснастку, просмотрите список и скопируйте точное имя пакета. Затем используйте эту команду для ее установки в системе.
sudo snap install «имя программы»
Часто Snap требует обновления. Чтобы обновить список оснасток до последней версии, вам нужно будет использовать команду «Обновить». Каждый раз, когда используется команда refresh, Snapd выйдет и получит самую новую версию приложения из магазина и заменит ее на старую.
sudo snap refresh
Ловушки легко удалить из Linux Mint. Пользователи могут сделать это в любое время, используя команду remove.
sudo snap remove «имя программы»
Наконец, если вы хотите перечислить все доступные привязки в snap-магазине, попробуйте использовать команду поиска без каких-либо изменений после нее.
Хотите сохранить весь список устанавливаемых снимков в файл для последующего чтения? Введите это:
Источник