24

I am using Debian 6 with two desktop managers (Gnome and KDE). During installation, I chose KDE as the default desktop. But, now I want to change the default desktop to Gnome. How do I change it?

3 Answers 3

19

I have found the solution by editing the file default-display-manager in the path /etc/X11/:

#vim /etc/X11/default-display-manager

For Gnome, edit as:

/usr/sbin/gdm

For KDE, edit as below:

/usr/lib/kde4/bin/kdm

Once updated, reboot the computer. You can find it updated the display manager.

You can also do it by executing the below command:

$ sudo dpkg-reconfigure gdm
6
  • 4
    Also update-alternatives --configure x-window-manager should allow you to select which one do you want to be the system default.
    – Wolfer
    Oct 6, 2013 at 17:58
  • 5
    @Wolfer You mean update-alternatives --config x-window-manage
    – Mike
    Sep 25, 2014 at 6:08
  • 1
    @Mike On my system update-alternatives --display x-window-manage outputs update-alternatives: error: no alternatives for x-window-manage whereas update-alternatives --display x-window-manager reports what one would want to see... For reference this is on sid...
    – Wolfer
    Oct 4, 2014 at 17:20
  • 2
    @Wolfer Sorry, that was a typo on my part. My point is that it is "config" and not "configure".
    – Mike
    Oct 4, 2014 at 17:42
  • 2
    x-window-manager is not a X display manager (or "X Desktop Manager", as in question) Dec 5, 2016 at 16:38
10

Run sudo update-alternatives --config x-window-manager

This uses Debian's built-in mechanisms to choose "alternatives" for default commands.

2
  • Answer is taken from nearby comments of Wolfer and Mike. Since this is the preferrable solution, it'd better be posted as one. Oct 12, 2017 at 19:32
  • Annnnnnnnnd, NOPE! Making this change had no effect at all.
    – John Smith
    Nov 20, 2023 at 11:11
6

The correct answer is likely:

sudo update-alternatives --config x-session-manager

assuming that "desktop manager" (which is not a meaningful term under X11) refers to the desktop environment (both KDE and GNOME are desktop environments, not window managers nor display managers).

Only when x-session-manager doesn't exist does Debian GNU/Linux fall back to x-window-manager or even x-terminal-emulator.

Historical note: What Debian GNU/Linux refers to as session manager is not actually a session manager in the X11 sense, but it's the term used by most modern GNU/Linux distributions to refer to a desktop environment, which typically includes a window manager, file manager, compositing manager, panels and other amenities.

2
  • Likely, and, wrong. Yes, this let me pick LDXE from a list. Which accomplished nothing, as my machine continued to boot into Gnome regardless.
    – John Smith
    Nov 20, 2023 at 11:12
  • 1
    The "likely" referred to the question using an undefined term ("desktop manager"). Your argument is also a non-sequitur, because changing the default only takes effect when the default is used, so your machine still booting into gnome just means you are not booting into the default environment, but gnome was selected over the default. Dec 7, 2023 at 5:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .