129

What is gdm3, kdm, lightdm? How to install and remove and repair them? Can anyone explain in details?

Anwar
  • 76,649
Shateel
  • 1,403

5 Answers5

159

gdm3, kdm, and lightdm are all display managers. They provide graphical logins and handle user authentication.

From a Wiki article,:

A display manager presents the user with a login screen. A session starts when a user successfully enters a valid combination of username and password.

GNOME Display Manager (gdm3)

gdm3 is the successor of gdm which was the GNOME display manager. The newer gdm3 uses a minimal version of gnome-shell, and provides the same look and feel of as GNOME3 session. Is the Canonical choice since Ubuntu 17.10. You can install it with:

sudo apt-get install gdm3

and remove it with:

sudo apt-get remove gdm3

KDE Display Manager (kdm)

kdm was KDE's display manager. But it's been deprecated in KDE5 in favor of SDDM, which is more capable as a display manager, and hence comes by default with Kubuntu. You can install it with:

sudo apt-get install sddm 

and remove it with:

sudo apt-get remove sddm

LightDM

LightDM was Canonical's solution for a display manager. It was supposed to be lightweight and comes by default with Ubuntu (until 17.04), Xubuntu, and Lubuntu. It's configurable, with various greeter themes available.

You can install it with:

sudo apt-get install lightdm

And remove it with:

sudo apt-get remove lightdm

Repairing is broad term. However, if you have multiple display managers installed, you can choose between them using:

sudo dpkg-reconfigure gdm3

You can use any display manager's name in place of gdm3 in the above command, and it will allow you to choose between them. You must reboot for the change to take affect.

To check which display manager is currently being used, run this command:

cat /etc/X11/default-display-manager

as suggested in this question: How to check using the command line which display manager is running?

One important point to note that, currently due to a bug (I checked in 16.04) you cannot start GNOME3 or Ubuntu Unity session using SDDM. So, if you have both KDE and Unity or GNOME3 installed, make sure your display manager is either gdm3 or lightdm.

rubo77
  • 32,486
Anwar
  • 76,649
  • 4
    Thanks nicely explained! How can I determine which display manager is used in my linux system? And how can I switch between them? – Shateel Sep 24 '16 at 15:29
  • 1
    @Shateel This was in the answer. you switch between them using the last command. You can also see what is the current by that command. The current one will be the selected one – Anwar Sep 24 '16 at 15:30
  • Few days ago, I faced a weird problem after I upgraded kali linux to the newest version! I couldn't login to my system! I typed username and password then the system ask me again for the username and password! Thus it continues asking and I couldn't login though I could login using different tty in text mood by pressing ctrl+alt+f2. So was it the display managers problem? If I reinstall the display manager then can I get rid of the problem? Thanks – Shateel Sep 24 '16 at 15:35
  • @Shateel Yes, it could be a problem caused by mis-configured login manager – Anwar Sep 24 '16 at 15:43
  • Thank you this actually helped me solve a black screen issue which was due to having both gdm3 and lightdm. Using sudo dpkg-reconfigure gdm3 I switched it back to lightdm and that fixed my problem. – Ansjovis86 Apr 07 '17 at 20:45
  • @Ansjovis86 hmm.. Glad to help. I added a note about a nasty bug. But here I can start Unity session from gdm3. Only sddm is problematic – Anwar Apr 08 '17 at 06:08
  • How do I know which one is being used on my system? – Steve3p0 Jan 24 '19 at 18:38
  • sddm is still broken for me in Ubuntu 20.04, had to use gdm3 – eri0o Jun 29 '20 at 14:31
  • @eri0o You should not use sddm with GNOME. gdm3 should be used instead – Anwar Jun 29 '20 at 17:27
  • Yes, I wanted to be able to switch session from GNOME to KDE, but when I tried from gdm3 the Plasma session was broken. @Anwar – eri0o Jun 29 '20 at 18:54
  • loginctl (systemd) show the display manager on each seat. Maybe is a better way, might work on Wayland – Pablo Bianchi Aug 09 '23 at 07:32
13

Lightdm, gdm3, and kdm are all graphical logins for linux. Lightdm is the default for Ubuntu. To switch between display managers, use the following command:

sudo dpkg-reconfigure lightdm

And choose your display manager.

If you want to install, say, gdm, use the command:

sudo apt-get install gdm
Anwar
  • 76,649
negusp
  • 2,821
  • Which display manager is best? Efficient, fast and less error prone? How can I find which display manager is used in my linux system? – Shateel Sep 24 '16 at 15:24
  • 8
    They all have about the same functions. Just use lightdm, or gdm if you're using gnome. Lightdm has all the same functions as gdm (gnome display manager), but it doesn't require gnome libraries. --upvote if this helped! :)-- – negusp Sep 24 '16 at 15:25
3

Personally, I think the Display Manager is a misleading name. It's better to be called graphical login manager. It is typically a graphical user interface that is displayed at the end of the boot process in place of the default shell.

Different desktop environment use different login managers to keep the visual style consistent.

  • GNOME use gdm3.
  • xfce use lightdm
  • KDE use kdm

A display manager can starts a session on an X server from the same or another computer.

smwikipedia
  • 1,112
1

GDM(GNOME Display Manager), LightDM(Light Display Manager) and KDM(KDE Display Manager) are display managers configured for different version of Ubuntu. They help in starting up the X servers, user sessions and greeter (login screen).

You can run sudo dpkg-reconfigure <your display manager> to change between the lightdm, gdm and kdm.

Installing them is just as easy as

sudo apt-get install <your desired display manager>

Where your display manager will be replaced by kdm, gdm, or lightdm

More info here.

Tony Lancer
  • 1,003
0

After installing and restarting Kubuntu with lightdm, I could not login with my username and password. So if you are using kubuntu 20.04, I recommendSimple Desktop Display Manager (SDDM) . If you are using ubuntu 18.04, I recommend gdm3. Of course, these are purely personal suggestions. I am not saying use it strictly.

You can use the command sudo nano /etc/X11/default-display-manager to find out which default display manager you are using (it can be with any text editor I use nano).

Purgoufr
  • 131