How to permanently switch Desktop Environments

This guide will explain  how to Permanently Switching Desktop Environments in Kali Linux.  switch default desktop environment - blackMORE Ops

Permanently Switch Desktop Environments

Use the following to make a selected Desktop Environment your primary one (i.e. Make Gnome or KDE etc. your default desktop environment.)

update-alternatives --config x-session-manager

Don’t forget to read How to install/remove different Desktop Environment or Window Manager in Kali Linux 1.x. 

Explanation

update-alternatives creates, removes, maintains and displays information about the symbolic links comprising the alternatives system. The alternatives system is a reimplementation of the Debian alternatives system. It was rewritten primarily to remove the dependence on perl; it is intended to be a drop in replacement for Debian’s update-dependencies script. This man page is a slightly modified version of the man page from the Debian project.

It is possible for several programs 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 of editor to invoke if the user has not specified a particular preference.

The 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.

When each package providing a file with a particular functionality is installed, changed or removed, alternatives is called to update information about that file in the alternatives system. alternatives is usually called from the %post or %pre scripts in RPM packages.

It is often useful for a number of alternatives to be synchronised, so that they are changed as a group; for example, when several versions of the vi editor are installed, the man page referenced by /usr/share/man/man1/vi.1 should correspond to the executable referenced by /usr/bin/vi. alternatives handles this by means of master and slave links; when the master is changed, any associated slaves are changed too. A master link and its associated slaves make up a link group.

Each link group is, at any given time, in one of two modes: automatic or manual. When a group is in automatic mode, the alternatives system will automatically decide, as packages are installed and removed, whether and how to update the links. In manual mode, the alternatives system will not change the links; it will leave all the decisions to the system administrator.

Link groups are in automatic mode when they are first introduced to the system. If the system administrator makes changes to the system’s automatic settings, this will be noticed the next time alternatives is run on the changed link’s group, and the group will automatically be switched to manual mode.

Each alternative has a priority associated with it. When a link group is in automatic mode, the alternatives pointed to by members of the group will be those which have the highest priority.

When using the –config option, alternatives will list all of the choices for the link group of which given name is the master link. You will then be prompted for which of the choices to use for the link group. Once you make a change, the link group will no longer be in auto mode. You will need to use the –auto option in order to return to the automatic state. Read the complete man page here
Thanks for reading.

Check Also

How to fix You can’t access this shared folder because your organization’s security policies block unauthenticated guest access error on Windows 11

If you have the following error on Windows 11 “You can’t access this shared folder …

How to unhide menu bar in Virtualbox - blackMORE Ops - 2

How to unhide menu bar in Virtualbox

So I went in and hid the top menu bar and bottom status bar in Virtualbox. After they disappeared, now I cannot find out how to unhide those. Took me a little bit time to figure out, hence this post so that I don't forget it and someone else having the same to unhide menu bar in Virtualbox can find this.

9 comments

  1. not work in cinnamon desktop

  2. Hi BM.

    Can you please please help switch to cinnamon permanently without using alternatives?

    My alternatives do not show cinnamon listed although it is installed.

    There are 2 choices for the alternative x-session-manager (providing /usr/bin/x-session-manager).

    Selection Path Priority Status
    ————————————————————
    * 0 /usr/bin/gnome-session 50 auto mode
    1 /usr/bin/gnome-session 50 manual mode
    2 /usr/bin/gnome-session-fallback 40 manual mode

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

    Any ideas?

    Kind Regards

  3. Didnt work for me either.

    • Try using cinn 2D from drop menu at login. Originally didnt see this option. Now its running just fine. Try to install graphic drivers and hope cinn 3D works without having to change manually. Hope this helps.

  4. In terminal:
    dbus-launch gsettings set org.gnome.desktop.session session-name ‘cinnamon’
    Reboot
    Enjoy :-)

  5. Does it work in kali 2.0?

  6. Awesome! Thank you.

  7. I don’t think Apple is stupid enough to do a full switch to ARM, unless they want to completely kill Macs (which I wouldn’t entirely discount!). An ARM-(under)powered Mac Pro to run your Aperture or Final Cut… yeah, that sounds appealing. All those folks running VMware Fusion or Vagrant on their MacBook Pros would no doubt love it too.But an ARM-based MacBook Air, that could be interesting. Apple has long experience with supporting multiple CPU architectures in their OS.

Leave your solution or comment to help others.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from blackMORE Ops

Subscribe now to keep reading and get access to the full archive.

Continue reading

Privacy Policy on Cookies Usage

Some services used in this site uses cookies to tailor user experience or to show ads.