اسنپ

Revision as of 15:07, 26 March 2022 by K2latmanesh (talk | contribs) (Created page with "«نرم‌افزارهای گنوم» همچنین می‌تواند نرم‌افزار را از مخازن مانجارو نصب و به‌روز کند.")
Other languages:
English • ‎Türkçe • ‎français • ‎русский • ‎فارسی

نگاه کلّی

اسنپ‌ها شیوه‌ای مستقل از توزیع، برای بسته‌بندی و توزیع‌کردن نرم‌افزار لینوکس می‌باشند.


استفاده از نرم‌افزار های توزیع شده با اسنپ، مزایای مختلفی دارد:

  • نرم‌افزاری که با کتابخانه‌های کنونی سامانه سازگار نیست، در صورتی که توسط اسنپ بسته‌بندی شده باشد، همچنان کار می‌کند
  • اسنپ‌ها به طور خودکار به‌روزرسانی می‌شوند


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


نصب پشتیبانی از اسنپ‌ها

برای استفاده از اسنپ‌ها شما باید Snap Daemon را نصب و پیکربندی کنید. Snap Daemon در مخازن مانجارو به عنوان snapd با libpamac-snap-plugin در دسترس است و می‌توانید با استفاده از مدیر بستهٔ موردعلاقه‌تان یا دستور زیر، آن را نصب کنید:
user $ pamac install snapd libpamac-snap-plugin COPY TO CLIPBOARD

پس از اتمام نصب، باید با دستور زیر snapd را فعّال کنید:

user $ sudo systemctl enable --now snapd.socket COPY TO CLIPBOARD


If you also want support for classic snaps you can use the command:

user $ ln -s /var/lib/snapd/snap /snap COPY TO CLIPBOARD


استفاده از اسنپ‌ها

مدیریت اسنپ‌ها با Discover

Once installed you can run Discover and you will be able to browse and install Snaps with a familiar store interface.


Tip
Discover can also install and update software from the Manjaro repos if you install the package packagekit-qt5

Managing Snaps via Gnome Software

Once installed you can run Software and you will be able to browse and install Snaps with a familiar store interface.


Tip
«نرم‌افزارهای گنوم» همچنین می‌تواند نرم‌افزار را از مخازن مانجارو نصب و به‌روز کند.

Managing Snaps via the CLI

یافتن و نصب کردن اسنپ‌ها

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:

user $ snap search vlc COPY TO CLIPBOARD

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

user $ snap install vlc COPY TO CLIPBOARD

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.

Displaying Detailed Snap Information

شما می‌توانید با دستور snap info اطلاعات بیشتری دربارهٔ یک اسنپِ به‌خصوص را به دست آورید. به عنوان مثال:

user $ snap info vlc COPY TO CLIPBOARD

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:

user $ snap list COPY TO CLIPBOARD


Removing Snaps

You can remove Snaps with the command snap remove. For example:

user $ snap remove vlc COPY TO CLIPBOARD


Removing Snap Support

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.

user $ pamac list -i COPY TO CLIPBOARD

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:

user $ pamac install gnome-software COPY TO CLIPBOARD


Next, remove snapd itself

user $ pamac remove snapd COPY TO CLIPBOARD


Optionally, you can also remove the remaining snapd files which would include any installed snaps.

user $ sudo rm -r /var/lib/snapd COPY TO CLIPBOARD