All posts by Matteo

lives in Switzerland, is System Engineer MCP at A-Enterprise GmbH. Member of the UNBLOG Knowledge Network. Author and blogger topics, tutorials for Linux and Open Source.

Set visudo editor using Debian update-alternatives

How to set visudo editor on Debian using update-alternatives

Set visudo editor using Debian update-alternatives

“vi” as visudo editor

On Debian and derivatives, the editor “nano” is set as the default editor for visudo. 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

set visudo editor on debian by update-alternatives

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

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.

Kopano WebApp circle rotates endlessly in Firefox

In this Tutorial we show you how to solve the issue with the Kopano WebApp Login using the Mozilla Firefox Browser under Windows.

Kopano WebApp did not match session

Symptom

If you try to Login via the Kopano WebApp 3.5.2 from Mozilla Firefox 95 under Windows, an animation with rotating circle appears after entering user and password, the circle continues to rotate non-stop, the page stops and it doesn’t go any further, after pressing the F5key or Ctrl+R (Refresh) authentication resume successfully.

Cause

The browser performs a Javascript function that sends a fingerprint (special ID) to the server (at the login request) and later when logging in, the server checks the fingerprint for compliance. Mozilla Firefox (version 94.0.2 / 95.02 64bit) distinguishes the second fingerprint from the first. With Firefox on Linux, the behavior was not detected and does not seem to be known.

Solution

The workaround/solution is to remove the Arial Narrow font from Javascript, so that the fingerprint does not change. To do this, edit the Java file fingerprint.js.

$ nano /usr/share/kopano-webapp/client/fingerprint.js

Delete the text Arial Narrow; (marked in red) (Arial Black; Bodoni MT).

Javascript fingerprint.js

After removing “Arial Narrow” from Javascript, the session fingerprint is no longer changed, the login passed successful.

Try now Kopano WebApp Login

Kopano WebApp Front-End did not match session terminated

Finaly Kopano WebApp Login from Mozilla Firefox Browser under Windows now works

This app contains the Kopano WebApp, which users can use to conveniently carry out their everyday communication and organizational tasks, from e-mail and calendar entries to file management and video calls. The WebApp can be expanded with plugins and used with various themes that can also be customized.

To install Kopano WebApp, the Kopano Core App must already be installed on at least one server. The Kopano WebApp does not necessarily have to be installed on the same machine. It can also be installed on several servers at the same time for load balancing or for optimized data communication. This app is also required if the Kopano DeskApp is to be used.