Lightdm

From Leo's Notes
Last edited on 14 June 2020, at 22:02.

Lightdm is a login manager for Linux.

Lightdm Webkit[edit | edit source]

The lightdm-webkit2-greeter greeter lets you use a webkit engine to drive the login screen. This effectively makes the login screen a webpage which makes it super simple to customize and add functionality (via javascript).

Setup[edit | edit source]

Install the lightdm-webkit2-greeter package either from your distro's repository or from source.

On a Fedora Linux computer, pull the package from the copr repository:

# dnf copr enable antergos/lightdm-webkit2-greeter
# dnf install lightdm-webkit2-greeter

One installed, there are a few files you want to edit:

  • /etc/lightdm/lightdm.conf - change the greeter to lightdm-webkit2-greeter.
  • /etc/lightdm/lightdm-webkit2-greeter.conf - define which theme you want to use.
  • /usr/share/lightdm-webkit/themes - custom themes are placed here.

If you have any issues with lightdm, check out the log files at:

  • /var/log/lightdm/lightdm.log
  • /var/log/lightdm/x-0-greeter.log - JavaScript exceptions will be displayed here

Troubleshooting[edit | edit source]

Issue: I had the lightdm-webkit login screen not accept any keyboard inputs when the webkitgtk4 library got updated past version 2.12.3-1.

Solution: This was resolved by updating lightdm-webkit2-greeter to a more recent version. This however required me to add these lines in the lightdm-webkit2-greeter.conf despite the theme not using these values.

[branding]
logo = /usr/share/lightdm-webkit/themes/antergos/img/antergos.png
user_image = /usr/share/lightdm-webkit/themes/antergos/img/antergos-logo-user.png
background_image = /usr/share/backgrounds/cpsc/lock.jpg
background_images = /usr/share/backgrounds/cpsc


Issue: I kept on getting this error when I clicked on a log in button:

CONSOLE ERROR Expected a string

Solution: I was calling lightdm.start_authentication() without passing in a username.

See Also[edit | edit source]