How to Install and Configure LightDM Display Manager on Arch Linux


LightDM is a free and lightweight display manager with different greeters available. It’s a cross-desktop display manager that supports different display technologies, such as X, Mir, and Wayland. LightDM is a daemon that runs display servers and greeters. Greeters allow users to choose their user account and session type. LightDM is highly customizable and a great alternative to GDM.

You can get LightDM on Arch Linux with a few simple commands. Let’s check the complete process to install LightDM on Arch and the different ways to customize it.

Contents:

How to Install LightDM Display Manager on Arch Linux?

To install LightDM on Arch Linux, you need to enable the Extra repository in your Pacman configuration file. The Extra repository contains the LightDM package and several greeters that you can select from. These greeters include lightdm-gtk-greeter, lightdm-slick-greeter, lightdm-pantheon-greeter, and others. You can use a greeter to log in to your computer. It shows you a screen where you can enter your username and password, select a session, and more.

Enable the Extra Repository

Open the Pacman configuration file using any editor with sudo privileges:

sudo nano /etc/pacman.conf

To enable the Extra repository, uncomment the following two lines:

[extra]

Include = /etc/pacman.d/mirrorlist

To save your changes after deleting the comment symbols (#), use the keyboard shortcut Ctrl + O. Then, exit Nano by pressing Ctrl + X.

Disable the Running Display Manager

Now, the Extra repository is enabled, and we can download the LightDM using Pacman. But before that, first, check the current display manager of your system.

To find the display manager in Arch Linux, run:

systemctl status display-manager

A screenshot of a computer Description automatically generated

This will provide an output that lists the display manager your system currently has or is using. From the output, you can see we are currently running the GNOME display manager (gdm).

Note:

Keep in mind that if you have already installed a different display manager, you need to disable it.

So first we will disable the current login manager (gdm), for that run:

sudo systemctl disable gdm.service

Or

 

sudo systemctl disable gdm -f

The difference between the above two commands is that the -f flag forces the command to run even if the service is already disabled. If the service is already disabled, running sudo systemctl disable gdm.service will not do anything.

If you are using any other display manager like sddm and lxdm you can disable them by running their respective command:

For sddm:

sudo systemctl disable sddm.service

For lxdm:

sudo systemctl disable lxdm.service

Now our current display manager is disabled, let’s move toward the installation of LightDM.

Installing LightDM on Arch Linux

To install LightDM display manager, you can use the default package manager Pacman:

sudo pacman -S lightdm

After installing LightDM, you need to enable the lightdm.service so that LightDM will be started at boot.

sudo systemctl enable lightdm.service

A screen shot of a computer Description automatically generated

Make sure to disable the already running display manager first, otherwise, you will encounter the following error:

LightDM is installed and enabled on your Arch Linux system. Next, we have to install a greeter for LightDM.

Select a Greeter for LightDM

After installing LightDM, you also need to have a greeter installed. The greeter is the component that provides the user interface for LightDM. There are different types of greeters available, such as GTK, Slick, Webkit2, Pantheon, and Unity. Select the one you like and install it with Pacman as well.

GTK Greeter

GTK is the default greeter for LightDM. You can easily customize it to match your GTK themes. Install it with the commands below:

sudo pacman -S lightdm-gtk-greeter

Note: GTK greeter is by default enabled for LightDM, you don’t have to manually enable it to run. But for all other greeters to run, first you have to enable them in the lightdm.conf configuration file.

Slick Greeter

Slick Greeter is another LightDM greeter. It is for all desktops and gives you a graphical user interface to enter credentials and log into your system. It is based on GTK and has a focus on appearance and customization.

To install Slick Greeter on Arch Linux, use the Pacman package manager:

sudo pacman -Sy lightdm-slick-greeter

Slick greeter is also available as an AUR package:

git clone https://aur.archlinux.org/lightdm-slick-greeter.git

cd lightdm-slick-greeter

makepkg -sri

Webkit2 Greeter

If you want to create custom themes for your Arch Linux login screen, you can use the Webkit2 greeter with LightDM. To install it, run this command in the console:

sudo pacman -S lightdm-webkit2-greeter

Unity Greeter

Unity greeter for a long time was used as a default greeter for Ubuntu. It was the default greeter for Ubuntu versions 11.04 to 16.04. If you miss the Ubuntu login screen, then why not bring it to your Arch Linux system?

You can get the Unity greeter from the AUR repository:

sudo pacman -S git base-devel

git clone https://aur.archlinux.org/lightdm-unity-greeter.git

cd lightdm-unity-greeter

makepkg -sri

You can customize the Unity greeter with themes, wallpapers, and indicators.

Mini Greeter

Mini greeter is a login screen configuration for LightDM, It is simpler and lighter than other alternatives. It only supports one user, which makes it more efficient and faster. You can install Mini from the AUR repository with these commands:

sudo pacman -S git base-devel

git clone https://aur.archlinux.org/lightdm-mini-greeter.git

cd lightdm-mini-greeter

makepkg -sri

Pantheon Greeter

The Pantheon greeter is a part of the Pantheon desktop environment. It was developed by the elementary OS project, and it is based on LightDM. If you are looking to customize your lock screen with a look that matches the Elementary OS, then you must install it on your system. To install run:

sudo pacman -S git base-devel

git clone https://aur.archlinux.org/lightdm-pantheon-greeter.git

cd lightdm-pantheon-greeter

makepkg -sri

Enable a Greeter for LightDM

The default LightDM package does not include any theme or greeter, the graphical interface that prompts you for your credentials and session type. Therefore, you need to install a greeter separately, otherwise LightDM will fail to start.

Installing GTK Greeter For LightDM

If you are new to LightDM, I suggest you use the lightdm-gtk-greeter, which is the default greeter that LightDM uses.

You can install it from the official repository by running the command:

sudo pacman -Sy lightdm-gtk-greeter

A screenshot of a computer Description automatically generated

Enable the GTK Greeter For LightDM

The gtk-greeter is the default greeter for the LightDM. It automatically gets enabled once you install it on your system. But for all other greeters, you have to enable them first from the /etc/lightdm/lightdm.conf file.

Now both the LightDM and gtk-greeter are installed. To test the new display manager, simply reboot your system.

You will be prompted to your lock screen to check the new LightDM display manager.

A screenshot of a computer Description automatically generated

You can also run the dm-tool command to test the LightDM:

dm-tool switch-to-greeter

Note:

The dm-tool only works when installing a new display manager, if you are only switching the greeters it will require a reboot.

We have successfully applied the LightDM on our Arch Linux system.

However, if the LightDM doesn’t work or is not loaded by default, you can also set the default greeter by changing the greeter-session option in the [Seat:*] section of the LightDM configuration file.

To enable the LightDM gtk-greeter, navigate to /etc/lightdm directory. It is where the LightDM configuration file is saved:

cd /etc/lightdm

ls

A screen shot of a computer Description automatically generated

Open lightdm.conf in the Nano or any text editor with sudo privileges:

sudo nano /etc/lightdm/lightdm.conf

Inside the configuration file, search for the following line in the [Seat:*] section:

#greeter-session=example-gtk-gnome

You can also use the Ctrl + W shortcut key to search and type the #greeter-session=example-gtk-gnome and press Enter.

Uncomment the line by removing the # symbol and replace the example-gtk-gnome with the LightDM greeter command from the list below:

lightdm-gtk-greeter

lightdm-slick-greeter

lightdm-webkit2-greeter

lightdm-unity-greeter

lightdm-pantheon-greeter

lightdm-mini-greeter

Here, as we are enabling the GTK greeter, we have replaced it with the gtk-greeter command.

A screenshot of a computer Description automatically generated

Press Ctrl + O to save, and exit the editor with Ctrl + X. Now test the LightDM greeter using dm-tool:

dm-tool switch-to-greeter

Or reboot your system to test the LightDM greeter.

A screenshot of a computer Description automatically generated

Installing Slick Greeter For LightDM

Like gtk-greeter you can also install the slick-greeter. Simply run the below Pacman command to install slick-greeter:

sudo pacman -Sy lightdm-slick-greeter

Enable the Slick Greeter For LightDM

As mentioned earlier, only gtk-greeter is by default enabled for LightDM. For other greeters like the slick-greeter, first, go to the LightDM configuration file and enable them.

To enable the slick-greeter, uncomment the greeter-session line and replace the example-gtk-gnome with the lightdm-slick-greeter command:

A screenshot of a computer Description automatically generated

Now reboot your Arch system to check the new greeter.

Common Errors While Installing LightDM Greeters

If you are installing LightDM greeters first time, then there is high chance you end up on a screen like this:

A black background with white text Description automatically generated

The Failed to start Light Display Manager error usually occurs when you have not enabled the LightDM service at all. Otherwise, it can also occur if you have not installed any greeter for LightDM, or it is disabled.

To fix the problem of LightDM not starting, Press CTRL+ALT+F2 to reach the console mode. Enter your Arch system ID and password to log in to your Arch system.

Now here you can enable the LightDM or install a new greeter for LightDM. After doing the required steps, simply reboot your system.

A black screen with white text Description automatically generated

This will give you a simple and functional greeter for LightDM.

A screenshot of a login box Description automatically generated

Here are some additional solutions you can try to resolve the Failed to Start Light Display Manager error in Arch Linux:

Reinstall xorg using:

pacman -S xorg

Reinstall lightdm-gtk-greeter:

pacman -S lightdm-gtk-greeter

After that, first disable your current display manager, for example for gdm run:

sudo systemctl disable gdm.service

Now enable the LightDM display manager:

sudo systemctl enable lightdm.service

Make sure to enable the greeter inside the lightdm.conf file.

If all these steps don’t work, then check the Pacman configuration file and enable the Extra Repository section.

Customizing LightDM Greeter Background

To customize the background of a LightDM greeter background, we can edit the greeter configuration file.

GTK greeter has a default configuration file, but for other greeters, this configuration file is missing.

For other greeters, you can simply copy the GTK greeter configuration file and name it as their configuration file name, such as for slick you will write (slick-greeter.conf).

To create a configuration file for slick greeter by copying the gtk greeter file, run:

sudo cp lightdm-gtk-greeter.conf slick-greeter.conf

A screenshot of a computer Description automatically generated

Now we can see from the above image, the lightdm-slick-greeter file is created. The next step is to move the background we want to set to /usr/share/backgrounds directory:

sudo mv /home/linux/Downloads/background.jpg /usr/share/backgrounds

It is recommended to place your PNG or JPG file in either /usr/share/backgrounds or /usr/share/pixmaps. That way, the LightDM can read the wallpaper file for the root user. Otherwise, you will not see the LightDM background changed.

The background image is moved to the defined location.

A screenshot of a computer screen Description automatically generated

As we are going to change the background of the Slick greeter, make sure it is enabled inside the LightDM configuration file:

 

sudo nano /etc/lightdm/lightdm.conf

Switch your current directory to the lightdm directory:

cd /etc/lightdm

After that, switch the user and modify the background of the LightDM Slick greeter:

su

This step is required if you have multiple users on the system, like if you have one main root user and any other user along with it. However, it’s best to switch to the root user to apply changes throughout the system.

Now open the lightdm-slick-greeter configuration file:

sudo nano /etc/lightdm/slick-greeter.conf

Uncomment the background option and specify the background image path, such as:

/usr/share/backgrounds/background.jpg

A screen shot of a computer Description automatically generated

Note:

One important step you must follow is to capitalize the G of [Greeter] in case of a slick greeter. It is not required for gtk greeter. This is because both the slick and gtk greeters use different configuration files and formats. Slick greeter follows the dconf schema syntax, while lightdm-gtk-greeter follows the lightdm.conf syntax.

A black screen with white text Description automatically generated

Now, save the configuration file and test the new background with the help of dm-tool:

dm-tool switch-to-greeter

If this doesn’t work, try rebooting your Arch system.

You will see a new background applied to slick-greeter:

A house next to a lake Description automatically generated

Similarly, you can also change the background of gtk-greeter:

In the case of the GTK greeter, it’s not compulsory to capitalize the G of Greeter in the GTK configuration file. But if the background doesn’t change, you can give it a try.

GUI Tools For Modifying The LightDM Greeters

If you see this process of changing the background of greeters as tiring. You can try the GUI for these greeters. Unfortunately, each of these greeters has a separate GUI that can customize only a specific greeter.

For example, to customize the default gtk-greeter you can use the following GUI greeter settings:

sudo pacman -Sy lightdm-gtk-greeter-settings

To launch it, run:

sudo lightdm-gtk-greeter-settings

Similarly, to customize the slick greeter, you can use the yay to install the following tool:

yay -S lightdm-settings

To launch it, run:

sudo lightdm-settings

Alternative Way of Installing LightDM on Arch Linux

Archinstall is a new and easy way to customize and install your Arch Linux system. You can choose your display manager from a text-based installation script. Just go to Profile settings and pick your preferred desktop environment and greeter.

Here you will get GNOME, KDE, or other desktop environments. You will find display managers like lightdm, gdm, or sddm greeter.

A screenshot of a computer Description automatically generated

This way, you can install the LightDM display manager right away, without any extra steps.

A computer screen with white text Description automatically generated

Conclusion

To install and configure the LightDM on Arch Linux, first, you have to enable the Extra repository from the Pacman configuration file. After that, you can install the LightDM on your system. After installation, first disable the current running display manager, and after that enable the LightDM using the systemctl command. Once enabled, you must install a greeter for the lightdm.

You can install gtk-greeter which is by default enabled for LightDM. However, you can also install any other greeter, such as Slick greeter. Further, you can also customize the background of gtk-greeter by using their configuration files.

 

Categories