Difference between revisions of "Snap"
Views
Actions
Namespaces
Variants
Tools
imported>Dalto (Add section on removing snap support and update to reflect the current state of Manjaro) |
(fixed missing sudo in command) Tags: Mobile web edit Mobile edit |
||
(13 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
<languages /> | |||
__TOC__ | __TOC__ | ||
<translate>=== Overview === <!--T:1--></translate> | |||
< | {{FlexSideContainerTemplate| | ||
<translate> | |||
<!--T:2--> | |||
[https://snapcraft.io/ Snaps] are a distro independent method for packaging and distributing Linux software. | [https://snapcraft.io/ Snaps] are a distro independent method for packaging and distributing Linux software. | ||
<!--T:3--> | |||
Using software distributed by Snap has a couple of distinct advantages: | Using software distributed by Snap has a couple of distinct advantages: | ||
* Software that is not compatible with current system libraries will still work when packaged as a Snap | * Software that is not compatible with current system libraries will still work when packaged as a Snap | ||
Line 15: | Line 14: | ||
<!--T:4--> | |||
There are some other considerations to be aware of: | There are some other considerations to be aware of: | ||
* Snaps do not always integrate with system themes | * Snaps do not always integrate with system themes | ||
* Snaps may need to install shared run-times which consume disk space | * Snaps may need to install shared run-times which consume disk space | ||
|[[File:Snapcraft.png|right|250px]] | |||
</translate> | |||
}} | |||
{{SectionTemplate|<translate><!--T:5--> Installing Support for Snaps</translate>|2= | |||
<translate> | |||
<!--T:6--> | |||
To use Snaps you to install and configure the Snap Daemon. It is available in the Manjaro repos as {{ic|snapd}} and can be installed with your favorite package manager or using the command | To use Snaps you to install and configure the Snap Daemon. It is available in the Manjaro repos as {{ic|snapd}}, with {{ic|libpamac-snap-plugin}} and can be installed with your favorite package manager or using the command | ||
</translate> | |||
{{UserCmd|command=pamac install snapd libpamac-snap-plugin}} | |||
<translate> | |||
<!--T:7--> | |||
Once installed, you need to enable snapd using the command: | Once installed, you need to enable snapd using the command: | ||
</translate> | |||
{{UserCmd|command=sudo systemctl enable --now snapd.socket}} | |||
<translate> | |||
<!--T:8--> | |||
If you also want support for classic snaps you can use the command: | If you also want support for classic snaps you can use the command: | ||
</translate> | |||
{{UserCmd|command=sudo ln -s /var/lib/snapd/snap /snap}} | |||
}} | |||
{{SectionTemplate|<translate><!--T:9--> Using Snaps</translate>| | |||
<!-- sub 1 --> | |||
{{SubContentTemplate|<translate><!--T:10--> Managing Snaps via Discover</translate>|2= | |||
{{FlexSideContainerTemplate|<translate><!--T:35--> [[File:Kdediscover.png|400px]]</translate>|2= | |||
[[File:Kdediscover.png | |||
<translate> | |||
<!--T:11--> | |||
One way to manage your Snaps is with the application [https://userbase.kde.org/Discover Discover] from the KDE project. You need a special version of Discover that can be found in the repos to manage snaps. This is now installed by default in some Manjaro editions that include Discover. If it isn't, you can install the package {{ic|discover-snap}} with your favorite package manager or the command: | One way to manage your Snaps is with the application [https://userbase.kde.org/Discover Discover] from the KDE project. You need a special version of Discover that can be found in the repos to manage snaps. This is now installed by default in some Manjaro editions that include Discover. If it isn't, you can install the package {{ic|discover-snap}} with your favorite package manager or the command: | ||
</translate> | |||
{{UserCmd|command=pamac install discover-snap}} | |||
<translate> | |||
<!--T:12--> | |||
Once installed you can run '''Discover''' and you will be able to browse and install Snaps with a familiar store interface. | Once installed you can run '''Discover''' and you will be able to browse and install Snaps with a familiar store interface. | ||
</translate> | |||
<translate> | |||
<!--T:13--> | |||
{{BoxSuccess|tip|Discover can also install and update software from the Manjaro repos if you install the package {{ic|packagekit-qt5}}}} | |||
</translate> | |||
}} | |||
|4=1}} | |||
<!-- sub 2 --> | |||
{{SubContentTemplate|<translate><!--T:14--> Managing Snaps via Gnome Software</translate>|2= | |||
{{ | {{FlexSideContainerTemplate|<translate><!--T:36--> [[File:Gnomesoftware.png|400px]]</translate>|2= | ||
< | |||
[[File:Gnomesoftware.png | |||
<translate> | |||
<!--T:15--> | |||
Another way to manage your Snaps is with the application [https://wiki.gnome.org/Apps/Software Gnome Software] from the Gnome project. You need a special version of Gnome Software that has support for managing snaps. This now comes pre-installed in several Manjaro editions. If it isn't, you can install the package {{ic|gnome-software-snap}} with your favorite package manager or the command: | Another way to manage your Snaps is with the application [https://wiki.gnome.org/Apps/Software Gnome Software] from the Gnome project. You need a special version of Gnome Software that has support for managing snaps. This now comes pre-installed in several Manjaro editions. If it isn't, you can install the package {{ic|gnome-software-snap}} with your favorite package manager or the command: | ||
</translate> | |||
{{UserCmd|command=pamac install gnome-software-snap}} | |||
<translate> | |||
<!--T:16--> | |||
Once installed you can run '''Software''' and you will be able to browse and install Snaps with a familiar store interface. | Once installed you can run '''Software''' and you will be able to browse and install Snaps with a familiar store interface. | ||
</translate> | |||
<translate> | |||
<!--T:17--> | |||
{{BoxSuccess|tip|Gnome Software can also install and update software from the Manjaro repos}} | |||
</translate> | |||
}} | |||
|4=1}} | |||
}} | |||
{{SectionTemplate|<translate><!--T:18--> Managing Snaps via the CLI</translate>|2= | |||
<!-- sub 1 --> | |||
{{SubContentTemplate|<translate><!--T:19--> Finding and Installing Snaps</translate>| | |||
<translate> | |||
<!--T:20--> | |||
You can use the command {{ic|snap search}} to search for available Snaps. For example, if you wanted to install VLC here is what it might look like: | |||
</translate> | |||
{{UserCmd|command=snap search vlc}} | |||
Name Version Publisher Notes Summary | Name Version Publisher Notes Summary | ||
vlc 3.0.6 videolan✓ - The ultimate media player | vlc 3.0.6 videolan✓ - The ultimate media player | ||
Line 83: | Line 98: | ||
mjpg-streamer 2.0 ogra - UVC webcam streaming tool | mjpg-streamer 2.0 ogra - UVC webcam streaming tool | ||
audio-recorder 3.0.5+rev1432+pkg-7b07 brlin - A free audio-recorder for Linux | audio-recorder 3.0.5+rev1432+pkg-7b07 brlin - A free audio-recorder for Linux | ||
<translate> | |||
<!--T:21--> | |||
From this output we can see that VLC and some related applications are avialable. To install VLC, we would use the command | From this output we can see that VLC and some related applications are avialable. To install VLC, we would use the command | ||
</translate> | |||
{{UserCmd|command=snap install vlc}} | |||
<translate> | |||
<!--T:22--> | |||
This will install the application as well as any required run-times. Once the application is installed you should be able to run it from your menu as you would with any application. | This will install the application as well as any required run-times. Once the application is installed you should be able to run it from your menu as you would with any application. | ||
</translate> | |||
|4=1}} | |||
<!-- sub 2 --> | |||
{{SubContentTemplate|<translate><!--T:23--> Displaying Detailed Snap Information</translate>| | |||
<translate> | |||
<!--T:24--> | |||
You can get more details about a specific Snap using the command {{ic|snap info}}. For example: | You can get more details about a specific Snap using the command {{ic|snap info}}. For example: | ||
</translate> | |||
{{UserCmd|command=snap info vlc}} | |||
<pre> | <pre lang="bash"> | ||
name: vlc | name: vlc | ||
summary: The ultimate media player | summary: The ultimate media player | ||
Line 119: | Line 140: | ||
</pre> | </pre> | ||
|4=1}} | |||
<!-- sub 3 --> | |||
{{SubContentTemplate|<translate><!--T:25--> Getting a list of installed Snaps</translate>| | |||
<translate> | |||
<!--T:26--> | |||
To show a list of all the Snaps and run-times that are currently installed you can use the command: | To show a list of all the Snaps and run-times that are currently installed you can use the command: | ||
</translate> | |||
{{UserCmd|command=snap list}} | |||
|4=1}} | |||
<!-- sub 4 --> | |||
{{SubContentTemplate|<translate><!--T:27--> Removing Snaps</translate>| | |||
<translate> | |||
<!--T:28--> | |||
You can remove Snaps with the command {{ic|snap remove}}. For example: | You can remove Snaps with the command {{ic|snap remove}}. For example: | ||
</translate> | |||
{{UserCmd|command=snap remove vlc}} | |||
|4=1}} | |||
<!-- sub 5 --> | |||
{{SubContentTemplate|<translate><!--T:29--> Removing Snap Support</translate>| | |||
<translate> | |||
<!--T:30--> | |||
If you want to remove support for snaps from the system, you can do so with a few simple steps. | If you want to remove support for snaps from the system, you can do so with a few simple steps. | ||
<!--T:31--> | |||
First, check if you have {{ic|gnome-software-snap}} or {{ic|discover-snap}} installed. | First, check if you have {{ic|gnome-software-snap}} or {{ic|discover-snap}} installed. | ||
</translate> | |||
{{UserCmd|command=pamac list -i | grep snap}} | |||
<translate> | |||
<!--T:32--> | |||
If you find either of those packages, replace them with the non-snap versions. For example, if {{ic|gnome-software-snap}} was on that list you can replace it with: | If you find either of those packages, replace them with the non-snap versions. For example, if {{ic|gnome-software-snap}} was on that list you can replace it with: | ||
</translate> | |||
{{UserCmd|command=pamac install gnome-software}} | |||
<translate> | |||
<!--T:33--> | |||
Next, remove snapd itself | Next, remove snapd itself | ||
</translate> | |||
{{UserCmd|command=pamac remove snapd}} | |||
<translate> | |||
<!--T:34--> | |||
Optionally, you can also remove the remaining snapd files which would include any installed snaps. | Optionally, you can also remove the remaining snapd files which would include any installed snaps. | ||
</translate> | |||
{{UserCmd|command=sudo rm -r /var/lib/snapd}} | |||
|4=1}} | |||
}} | |||
[[Category:Contents Page]] | [[Category:Contents Page{{#translation:}}]] | ||
[[Category:Software Management{{#translation:}}]] |
Latest revision as of 12:04, 22 January 2024
Overview
Snaps are a distro independent method for packaging and distributing Linux software.
Using software distributed by Snap has a couple of distinct advantages:
- Software that is not compatible with current system libraries will still work when packaged as a Snap
- Snaps are automatically updated
There are some other considerations to be aware of:
- Snaps do not always integrate with system themes
- Snaps may need to install shared run-times which consume disk space
snapd
, with libpamac-snap-plugin
and can be installed with your favorite package manager or using the command
Once installed, you need to enable snapd using the command:
If you also want support for classic snaps you can use the command:
discover-snap
with your favorite package manager or the command:
Once installed you can run Discover and you will be able to browse and install Snaps with a familiar store interface.
gnome-software-snap
with your favorite package manager or the command:
Once installed you can run Software and you will be able to browse and install Snaps with a familiar store interface.
You can use the command snap search
to search for available Snaps. For example, if you wanted to install VLC here is what it might look like:
Name Version Publisher Notes Summary vlc 3.0.6 videolan✓ - The ultimate media player dav1d 0.2.0-1-ge29cb9a videolan✓ - AV1 decoder from VideoLAN mjpg-streamer 2.0 ogra - UVC webcam streaming tool audio-recorder 3.0.5+rev1432+pkg-7b07 brlin - A free audio-recorder for Linux
From this output we can see that VLC and some related applications are avialable. To install VLC, we would use the command
This will install the application as well as any required run-times. Once the application is installed you should be able to run it from your menu as you would with any application.
You can get more details about a specific Snap using the command snap info
. For example:
name: vlc
summary: The ultimate media player
publisher: VideoLAN✓
contact: https://www.videolan.org/support/
license: GPL-2.0+
description: |
VLC is the VideoLAN project's media player.
Completely open source and privacy-friendly, it plays every multimedia file and streams.
It notably plays MKV, MP4, MPEG, MPEG-2, MPEG-4, DivX, MOV, WMV, QuickTime, WebM, FLAC, MP3,
Ogg/Vorbis files, BluRays, DVDs, VCDs, podcasts, and multimedia streams from various network
sources. It supports subtitles, closed captions and is translated in numerous languages.
snap-id: RT9mcUhVsRYrDLG8qnvGiy26NKvv6Qkd
channels:
stable: 3.0.6 2019-01-10 (770) 212MB -
candidate: 3.0.6 2019-01-10 (770) 212MB -
beta: 3.0.6-341-g18d7d08 2019-05-24 (1020) 212MB -
edge: 4.0.0-dev-8011-gfdbf7317e0 2019-05-24 (1019) 335MB -
To show a list of all the Snaps and run-times that are currently installed you can use the command:
You can remove Snaps with the command snap remove
. For example:
If you want to remove support for snaps from the system, you can do so with a few simple steps.
First, check if you have gnome-software-snap
or discover-snap
installed.
If you find either of those packages, replace them with the non-snap versions. For example, if gnome-software-snap
was on that list you can replace it with:
Next, remove snapd itself
Optionally, you can also remove the remaining snapd files which would include any installed snaps.