Accéder au contenu principal

How to turn off the microphone in Ubuntu or Linux Mint?

How to install snap packages on Linux Mint?



By default, Linux Mint does not support the Snap format and application installation from Snap Store. Also, here's how to change that on Linux Mint 18.x, Linux Mint 19.x, and Linux Mint 20.


Introduction

What is Snap?

Snap is a package management system offered by Canonical (developers of Ubuntu). One of its goals is to allow developers to provide, for an application, a single installer (a Snap package) that can be installed on any distribution regardless of its version and state. Indeed, all dependencies must be included in the package and the application will be executed in a sandbox which will isolate it from the system and strengthen security. Packages are centralized and distributed from a single app store: the Snap Store. The clients (what we install on our system) are under a free license (GPLv3), but not the server that hosts and distributes the packages to be installed ...


Initially only supported in Ubuntu (and for good reason ...), it is also possible to use it with other distributions.


Snap and Linux Mint

For those who don't yet know, Linux Mint is based on Ubuntu ...


However, Linux Mint, basic, does not allow the installation of snap packages. In fact, like some other distributions, the developers of Linux Mint have made the choice, since Linux Mint 18.3, to integrate a basic alternative to this format, the Flatpak format, and not to preinstall the take in exchange for the Snap format.


A Flatpak package also has its dependencies and can therefore be installed on any system that supports it.

Applications in Flatpak formats are also executed in a Sandbox.

It also benefits from an application store, the Flathub. But the Flathub is not the only possible source to get a Flatpak package. It is possible to have other repositories or sources.

And it is completely free (LGPL-2.1 license) client and server.

In addition, it has the advantage of not requiring administrator rights to install a package ...


Finally, for those who really want to, it is still possible to install the snap manager from the official Linux Mint repositories.


Install support for snap format in Linux Mint

To do this, you have to install the snapd package. But since Linux Mint 20, the installation of this package is basically blocked.


This decision by Linux mint developers follows Canonical's decision to remove some popular DEB packages from Ubuntu 20.04 repositories (ex: chromium-browser) to replace them with Snap packages and thus try to impose this format. ….


However, this blockage is not irremediable….


Allow installation of snapd (only on Linux Mint 20)

To authorize, open a terminal (Ctrl + Alt + T).


Then, rename the APT preferences file nosnap.pref to, for example, nosnap.pref.bak:


sudo mv /etc/apt/preferences.d/nosnap.pref /etc/apt/preferences.d/nosnap.pref.bak

or delete it:


sudo rm /etc/apt/preferences.d/nosnap.pref

To recreate the file, open from a terminal, with administrator rights, the nano text editor (or other):


sudo nano /etc/apt/preferences.d/nosnap.pref

then copy the following lines:


# To prevent repository packages from triggering the installation of Snap,

# this file forbids snapd from being installed by APT.

# For more information: https://linuxmint-user-guide.readthedocs.io/en/latest/snap.html


Package: snapd

Pin: release a = *

Pin-Priority: -10

and save the file in /etc/apt/preferences.d/nosnap.pref (Ctrl + S) and exit (Ctrl + X).


And update your APT cache:


sudo apt update

Install snap support on Linux Mint

To install snapd, do in a terminal:


sudo apt install snap

And restart.


To restart from the command line, do:


sudo reboot

Using snap in Linux Mint

The management of snap (installation, removal, ...) can be done through a graphical interface with the (optional) installation of the snap-store manager from a snap package:


sudo snap install snap-store


But, a command line management offers access to other equally interesting options ... (some examples below)


Also, an application installed in snap format can be launched from a launcher in the applications menu:


but also with a command line ...


In the commands indicated below, the words between [and] must be replaced by the appropriate text.


Install a snap package

To install a snap application, in command line do:


sudo snap install [package_name]


But, it is also possible to choose to install the application from another channel (stable version, beta version, current version of dev ...) if they exist.


To find out which versions are available for a package, do:


snap info [package_name]


So to install from the application from a specific channel, do:


sudo snap install --channel = [selected_channel] [package_name]


Launch a snap application

To launch an application from the command line, just enter its name. For example, for Chromium, do:


chromium

Sometimes it may be necessary to specify the path / snap / bin (folder containing all links to installed snap applications):


/ snap / bin / chromium

Find snap apps

To find the snap apps without the Snap Store installed, you can use its web version: https://snapcraft.io/store.


Update the installed snaps

Snap packages are automatically updated regularly.


To find out when the last update search took place and when the next one will be, do:


snap refresh --time


And to force the updates, do:


sudo snap refresh

It is also possible to change the channel for an application already installed with:


sudo snap refresh --channel = [selected_channel] [package_name]


Remove an installed snap package

Do:


sudo snap remove [package_name]

but a snapshot of its state will be kept for 31 days and restored in case of reinstallation. For a complete removal, do instead:


sudo snap remove [package_name] --purge

Other useful commands

To see the list of installed snap packages, do:


snap list


To revert to the previous version after an update, do:


sudo snap revert [package_name]

Commentaires

Posts les plus consultés de ce blog

How to turn off the microphone in Ubuntu or Linux Mint?

Does your computer have a built-in microphone? Here is how to mute or disable the microphone in Linux (Ubuntu or Linux Mint) in software. Introduction The easiest way to turn off a microphone is to unplug it. So we can be sure that it is no longer picking up anything ... However, on a laptop with a built-in microphone, you can't do it. On the other hand, it is always possible to deactivate it by software. One solution is to mute the microphone input (not its listening), which is equivalent to deactivating it. This is usually done through the GUI, in the Sound settings of the distribution. But, it is also possible to do it in a terminal. However, on a laptop, the microphone can be linked to the integrated webcam. So to deactivate it, just deactivate the webcam. Finally another solution, a little radical, consists in deactivating the sound card. On the other hand, in this case, of course the microphone will be deactivated, but also the other audio inputs / outputs. And you will not h...

How to enable Num Lock on startup in Linux Mint

On most Linux distributions, the keypad lock (Num Lock or Num Lock key) is inactive on the login screen and must be enabled manually. But, here's how to turn on Num Lock on startup in Linux Mint by default. Prerequisites to modify this preference In Linux Mint, it is possible to activate this key at startup by default by modifying, through the graphical interface, the preferences of the login window. But before you can do this, you must first install an additional package numlockx. Numlockx is a utility that allows you to activate the keypad lock at the initialization of an X11 session (graphical session) or by using a command line. It is available from the repositories for Ubuntu and therefore is also available for Linux Mint. To install it, open a terminal and run the following command: sudo apt install numlockx If you prefer to install it with the GUI, look in the numlockx software manager and install it. Enable Num Lock on Boot in Linux Mint To modify the parameters of the conn...

How to change DNS server in Ubuntu?

By default, for an individual, when he connects to the Internet, the DNS server addresses provided in DHCP are those of his Internet service provider. But it is possible to choose others. Here is how to change DNS server in Ubuntu (18.04 and 20.04). Prerequisites Have Ubuntu 16.04 or higher Introduction to DNS What is a DNS server? DNS is the abbreviation for Domain Name System. A DNS server is a system whose purpose is to convert an Internet address (www.domainname.ext) into an IP address (physical address of machines connected to a network). This is called domain name resolution. So, for example when you type in your browser www.wikipedia.fr, the DNS server converts the path to the IP address: 78.109.84.114. You can find out this IP address by pinging the domain. For example : ping wikipedia.fr and under Linux you will have an answer of this type PING wikipedia.fr (78.109.84.114) 56 (84) bytes of data. 64 bytes from wikimedia2.typhon.net (78.109.84.114): icmp_seq = 1 ttl = 51 time = ...