How to set up LightDM on Arch Linux
It is notoriously tedious to set up LightDM on Arch Linux. For this reason, many choose not to use it as their default display manager on Arch Linux. Skipping over LightDM is a real shame, as it’s one of the best login systems on all of Linux! In this tutorial, we’ll go over how to get LightDM working on Arch Linux.
Install LightDM
LightDM is readily available for Arch Linux users (as well as it’s derivatives, like Manjaro) on the primary OS software servers. Though, keep in mind that the LightDM packages are located in the “Extra” software source, a repository that users need to enable manually.
To give your Arch Linux system access to the “Extra” software source, open up a terminal and use it to edit your Pacman configuration file.
sudo nano /etc/pacman.conf
In the Pacman.conf file, press down on the arrow key and look for “Extra.” Remove the # symbol from in front of it, as well as the two lines below. These symbols need to be completely removed from anything by the “Extra” software repository, or the Pacman packaging tool will refuse to enable it.
Once you’ve removed all comment signs (#), press the Ctrl + O key combination on the keyboard to save the edits. Then, close Nano by pressing Ctrl + X.
With the edits done, re-sync your package manager and install LightDM.
sudo pacman -Syyu lightdm
Choose a greeter
LightDM is installed, but unlike other Display Managers on Linux, this isn’t enough to use it. Instead, for this display manager to function correctly, a “Greeter” is necessary.
You might be wondering “what is a greeter?” It’s the aspect of the LightDM software that the user interacts with and uses to log in. There are many types of greeters, including a GTK (Gnome) one, a WebKit based one, the old Ubuntu Unity one, and so many more! In this section of the tutorial, we’ll briefly tell you about the different greeters available and go over how to install them.
GTK greeter
GTK greeter is the default LightDM login engine. It works well with existing GTK themes and is reasonably configurable. Install it with the commands below.
sudo pacman -S lightdm-gtk-greeter
Webkit2 greeter
The Webkit2 greeter uses the Webkit rendering engine to generate user-themes. To use it with LightDM on Arch, do the following in a terminal.
sudo pacman -S lightdm-webkit2-greeter
Pantheon greeter
Pantheon greeter is the default login setup for the ElementaryOS project. Those that want to get a more “Elementary” look should install this one. Get it with:
sudo pacman -S git base-devel git clone https://aur.archlinux.org/lightdm-pantheon-greeter.git cd lightdm-pantheon-greeter makepkg -sri
Unity greeter
Unity greeter is the LightDM login setup that Ubuntu has used for years with their custom desktop environment. If you miss this style of login screen, install it from the AUR by following the commands below.
sudo pacman -S git base-devel git clone https://aur.archlinux.org/lightdm-unity-greeter.git cd lightdm-unity-greeter makepkg -sri
Slick greeter
Slick is the LightDM greeter favored by many Linux distribution manufacturers. To get it on your Arch system, do:
git clone https://aur.archlinux.org/lightdm-slick-greeter.git cd lightdm-slick-greeter makepkg -sri
Mini greeter
The Mini greeter is a login screen setup for LightDM that is much more slimmed down than other greeters.
The Mini greeter handles only one user, and as a result, is much less resource-intensive. Mini is available in the AUR and users can install it with these commands:
git clone https://aur.archlinux.org/lightdm-mini-greeter.git cd lightdm-mini-greeter makepkg -sri
Enable the greeter
After installing your LightDM greeter of choice, it’s time to enable it in the configuration files. Open lightdm.conf in the Nano text editor.
sudo nano /etc/lightdm/lightdm.conf
Press the Ctrl + W keyboard combination, type “#greeter-session=example-gtk-gnome” in and press Enter.
Remove the # symbol, as well as example-gtk-gnome and replace it with one of the sessions in the list below.
- lightdm-slick-greeter
- lightdm-webkit2-greeter
- lightdm-unity-greeter
- lightdm-pantheon-greeter
- lightdm-mini-greeter
- lightdm-gtk-greeter
Save the edits to Lightdm.conf with Ctrl + O, and exit Nano with Ctrl + X. Once the edits are saved, test your LightDM settings and confirm they work with dm-tool.
Note: if the test fails, you will need to edit the configuration file and determine what went wrong.
lightdm --test-mode --debug
LightDM as primary display manager
LightDM must be set as the default login manager on Arch before you can use it. To enable it, follow the steps below.
Step 1: Disable your current login manager with systemd disable.
sudo systemctl disable gdm -f
or
sudo systemctl disable sddm -f
or
sudo systemctl disable lxdm -f
Step 2: Enable LightDM with systemctl enable.
sudo systemctl enable lightdm -f
Step 3: Reboot your Arch Linux PC using the systemctl reboot command. Be sure to save anything you’re working on before entering the command!
Step 4: Let Arch Linux start back up. When it finishes starting up, you’ll see LightDM appear as the new login screen.
I was struggling in the last part of enabling lightdm, which helped me.