Software & AppsOperating SystemLinux

How To Set GDM as Default Display Manager in Ubuntu

Ubuntu 16

Ubuntu, a popular Linux distribution, comes with several display managers to choose from. These display managers handle the login screen and the initialization of your graphical session. The default display manager in Ubuntu is LightDM, but you can switch to GDM (GNOME Display Manager) if you prefer. In this article, we will guide you through the process of setting GDM as your default display manager in Ubuntu.

Quick Answer

To set GDM as the default display manager in Ubuntu, you need to install GDM using the terminal command "sudo apt-get install gdm". Then, run "sudo dpkg-reconfigure gdm" to configure GDM as the default. Finally, stop the current display manager (LightDM) and start GDM using the commands "sudo service lightdm stop" and "sudo service gdm start".

What is GDM?

GDM, or GNOME Display Manager, is a display manager (a graphical login program) by the GNOME project. It provides the GNOME desktop environment’s look and feel for the login screen. GDM is highly customizable and can support various types of sessions, including GNOME, KDE, XFCE, and others.

Installing GDM

Before you can set GDM as your default display manager, you need to install it. Open a terminal and run the following command:

sudo apt-get install gdm

This command uses the apt-get package manager to install the gdm package. The sudo command is used to run the command with root privileges, which is necessary for installing packages.

Setting GDM as Default Display Manager

Once GDM is installed, you can set it as your default display manager. Run the following command in the terminal:

sudo dpkg-reconfigure gdm

The dpkg-reconfigure command reconfigures packages after they have already been installed. In this case, it brings up a configuration menu for GDM. Select GDM from the list and press Enter.

Switching to GDM

After configuring GDM, you need to stop the current display manager (LightDM) and start GDM. Run the following commands in the terminal:

sudo service lightdm stop
sudo service gdm start

The service command is used to start, stop, and manage system services. In this case, it is used to stop the lightdm service and start the gdm service.

Verifying the Change

Once GDM is started, log out of your current session. You should see the GDM login screen when you log back in. If you still see LightDM, there might be some other configuration issue.


If you have followed these steps and still see LightDM as the display manager, you can try manually setting GDM as the default. Open the file /etc/X11/default-display-manager in a text editor:

sudo nano /etc/X11/default-display-manager

Replace the content of the file with the following line:


Save the file and restart your computer. This should set GDM as the default display manager.


Switching display managers in Ubuntu is a straightforward process, but it requires some knowledge of the command line. Always remember to proceed with caution when making system-level changes, and make sure to back up your important files before making any changes. By following the steps in this guide, you should be able to set GDM as your default display manager in Ubuntu.

What is the difference between GDM and LightDM?

GDM and LightDM are both display managers, but they have different features and are associated with different desktop environments. GDM is the default display manager for the GNOME desktop environment and provides the GNOME look and feel for the login screen. LightDM, on the other hand, is a more lightweight and customizable display manager that can be used with various desktop environments.

Can I switch back to LightDM after setting GDM as the default display manager?

Yes, you can switch back to LightDM if you prefer. To do so, you would need to install LightDM using the package manager and then run the sudo dpkg-reconfigure lightdm command to reconfigure LightDM as the default display manager.

Leave a Comment

Your email address will not be published. Required fields are marked *