What is gdm3, kdm, lightdm? How to install and remove them?

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.


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