Tag Archives: Linux How to

Unix Similar multi-user operating systems based on the Linux kernel and essentially on GNU software. Like CentOS, Debian, Ubuntu Fedora.

Set visudo Editor using Debian Alternatives System

update-alternatives –config editor

On Debian and Debian derivatives, the editor nano is preset as the default editor. If you do not want to edit sudoers using the command visudo with “nano”, but else use “vi” as the default editor, which was used as before by earlier Linux and Unixoid systems, you can change the editor with the help of “Debian Alternatives-System”.

$ sudo update-alternatives --config editor
There are 4 choices for the alternative editor (providing /usr/bin/editor).

  Selection    Path                Priority   Status
------------------------------------------------------------
* 0            /bin/nano            40        auto mode
  1            /bin/ed             -100       manual mode
  2            /bin/nano            40        manual mode
  3            /usr/bin/vim.basic   30        manual mode
  4            /usr/bin/vim.tiny    15        manual mode

Press <enter> to keep the current choice[*], or type selection number:

Entering a number for the desired editor, to create symbolic link.

update-alternatives generates, removes, manages and displays information about the symbolic links that make up the “Debian Alternatives System”.

  A directory, by default /etc/alternatives, containing the symlinks.

If you run it again, the setting can be checked with press the Enter key.

$ sudo update-alternatives --config editor
There are 4 choices for the alternative editor (providing /usr/bin/editor).

  Selection    Path                Priority   Status
------------------------------------------------------------
  0            /bin/nano            40        auto mode
  1            /bin/ed             -100       manual mode
  2            /bin/nano            40        manual mode
* 3            /usr/bin/vim.basic   30        manual mode
  4            /usr/bin/vim.tiny    15        manual mode

It is possible for several programs (text editors) fulfilling the same or similar functions to be installed on a single system at the same time. For example, many systems have several text editors installed at once. This gives choice to the users of a system, allowing each to use a different editor, if desired, but makes it difficult for a program to make a good choice for an editor to invoke if the user has not specified a particular preference.

Debian’s alternatives system aims to solve this problem. A generic name in the filesystem is shared by all files providing interchangeable functionality. The alternatives system and the system administrator together determine which actual file is referenced by this generic name. For example, if the text editors “ed” and “nvi” are both installed on the system, the alternatives system will cause the generic name /usr/bin/editor to refer to /usr/bin/nvi by default. The system administrator can override this and cause it to refer to /usr/bin/ed instead, and the alternatives system will not alter this setting until explicitly requested to do so.

The generic name is not a direct symbolic link to the selected alternative. Instead, it is a symbolic link to a name in the alternatives directory, which in turn is a symbolic link to the actual file referenced. This is done so that the system administrator’s changes can be confined within the /etc directory: the FHS (q.v.) gives reasons why this is a Good Thing.

Linux Mint MATE desktop and Cinnamon desktop

MATE-Desktop or Cinnamon-Desktop

MATE is one of the most popular Linux desktop environments, alongside the Cinnamon desktop environment. The MATE desktop is based on the Gnome Shell. Linux Mint is one of the many distributions that include the MATE desktop and Cinnamon desktop.

MATE Desktop Environment

The history of MATE is quite exciting. It’s actually the sequel to GNOME 2. GNOME is the most widely used desktop environment. But the big change came with the release of v3. It was a completely different design than that of the classic GNOME 2. It caused a huge uproar in the community, which loved and nurtured the classic look.

This is where MATE began its journey as a fork of GNOME 2 with numerous improvements and new features. Still, it remains true to the original GNOME 2.

Linux Mint is one of the most popular Linux distributions, many choose the Linux Mint Cinnamon Edition to install as operating system. Linux Mint is also involved in the development of MATE, a classic desktop environment that is the sequel to GNOME 2, the default desktop of Linux Mint between 2006 and 2011. Although some features are missing and its development is slower than Cinnamon’s, MATE runs faster, consumes fewer resources and is more stable than Cinnamon.

Install MATE-Desktop

If you want to switch to the MATE desktop environment at a later time after installing Linux Mint Cinnamon Edition, there is the possibility to add a second graphical desktop environment as an alternative to the already installed desktop environment, with the following command from Gnome Terminal Shell.

$ sudo apt install mint-meta-mate

Install Cinnamon-Desktop

If it is the other way around, if you have the Linux Mint MATE Edition installed on the system, the Cinnamon desktop environment can be added.

$ sudo apt install mint-meta-cinnamon

Now you have to log out, the login screen now shows an icon next to the user name, via the icon “Select Desktop environment” the graphical desktop environment is selected.