iTranslated by AI

The content below is an AI-generated translation. This is an experimental feature, and may contain errors. View original article
👑

Switching the Display Manager to LightDM on Ubuntu 24.04

に公開

Ubuntu 24.04 uses GDM3 as the default display manager, but I have introduced LightDM because it is convenient when using x11vnc.


Environment

  • Ubuntu 24.04.3 LTS

Installing LightDM

$ sudo apt install lightdm

First, enter the command above to install LightDM.

A display manager is a program that provides graphical login capabilities for the X Window System.

Although only one X server can be managed by one display manager, multiple display manager packages are installed. Please select the display manager to run by default.

You can run multiple display managers simultaneously if you configure them to manage different servers. To achieve this, configure the display managers appropriately, edit each startup script in /etc/init.d, and disable the check for the default display manager.

Since it displays a message like the one above, read it and press Enter.


Select lightdm and press Enter.

Finally, restart to apply the settings and complete the installation.

Organizing the Desktop Environments Displayed at Login

When using x11vnc, it is necessary to switch the window system from Wayland to X11.

Clicking the Ubuntu logo in the upper right of the username on the login screen and selecting Ubuntu on Xorg to log in will switch the window system to X11.

At this time, in the options for the "Please select a desktop environment" screen:

  • Ubuntu (default)
  • Ubuntu (default)
  • Ubuntu on Wayland
  • Ubuntu on Xorg

For some reason, the phenomenon of Ubuntu (default) being displayed twice occurs.

This is caused by the fact that there is one ubuntu.desktop file in each of the /usr/share/wayland-sessions/ and /usr/share/xsessions/ directories.

To solve this:

  • If you want to prioritize Wayland, keep /usr/share/wayland-sessions/ubuntu.desktop
  • If you want to prioritize Xorg, keep /usr/share/xsessions/ubuntu.desktop

and delete the ubuntu.desktop for the other environment.
(It is recommended to take a backup before deleting just in case.)


You can check the currently used window system by looking at "Windowing System" under "Settings / System / About". After logging in with "Ubuntu (default)", please verify that the default window system is as intended.


That's all.
Of course, X11 can be used with GDM3 as well, but it seems many people use LightDM as a quick way to reduce the hassle of VNC logins.
I hope this serves as a helpful reference for anyone introducing LightDM for similar purposes.

Discussion