Skip to content

nwg-piotr/lightdm-nwg-greeter

Repository files navigation

LightDM nwg greater

This greeter is based on the LightDM Elephant Greeter by Maximilian Moser, and has been preconfigured for use with nwg-iso. This is a part of the nwg-shell project. Please check the project website.

LightDM Elephant Greeter is a small and simple LightDM greeter, using Python and GTK, that doesn't require an X11 server, based on Matt Shultz's Fischer's example LightDM greeter.

Screenshot

Screenshot

Original Elephant greeter features

  • optionally uses Wayland, via Cage (instead of X11);
  • remembers the last authenticated user;
  • automatically selects the last used session per user.

Note: The last authenticated user is stored in a cache file in the LightDM user's home directory (e.g. /var/lib/lightdm/.cache/nwg-greeter/state), similar to Slick Greeter.

Changes implemented in nwg greeter

  • always opens on screen 0;
  • supports multiple languages;
  • supports background image;
  • uses a different layout, inspired by Sugar Candy SDDM theme by Marian Arlt;
  • provides the "Show password" check button;
  • features power buttons;
  • supports command line arguments (mostly for testing purposes):
❯ nwg-greeter.py -h
usage: nwg-greeter.py [-h] [-v] [-t] [-l LANG]

options:
  -h, --help            show this help message and exit
  -v, --version         display Version information
  -t, --test            Testing mode - do not connect to greater daemon
  -l LANG, --lang LANG  force a certain Language, e.g. 'pl_PL' for Polish

Dependencies

  • LightDM
  • Python 3.8+
  • PyGObject: GObject bindings for Python
  • Cage: small wayland compositor for the greeter

Note: Please make sure you have all requirements installed, as having a LightDM greeter constantly failing isn't as much fun as it sounds.

Installation

The greeter can be installed by copying the files to the right places (make install) and updating LightDM's configuration file to register the greeter (/etc/lightdm/lightdm.conf):

[LightDM]
sessions-directory=/usr/share/lightdm/sessions:/usr/share/wayland-sessions:/usr/share/xsessions
greeters-directory=/usr/share/lightdm/greeters:/usr/share/xgreeters

[Seat:*]
greeter-session=lightdm-nwg-greeter

Note: If you wish to install the files somewhere else, specify them in the make command.
For instance, to install the files into subdirectories of /usr/local instead of /usr, call make INSTALL_PATH=/usr/local install. The CONFIG_PATH (default: /etc) can be overridden in the same fashion.

Configuration

The greeter's configuration file (/etc/lightdm/nwg-greeter.conf) contains the sections Greeter and GTK.
The former are basic configuration values that can determine the behavior of the greeter (e.g. override file locations), while the latter are passed directly to GTK (and can be used to e.g. set the GTK theme).

Example configuration file:

[GTK]
gtk-theme-name=Adwaita
gtk-application-prefer-dark-theme=true
gtk-cursor-theme-name=Adwaita

[Greeter]
ui-file-location=/usr/share/nwg-greeter/nwg-greeter.ui
background-file-location=/usr/share/nwg-greeter/img/nwg.jpg
icons-location=/usr/share/nwg-greeter/img/
lang-files-location=/usr/share/nwg-greeter/lang/

Credits

About

A fork of LightDM Elephant Greeter, intended to replace sddm on nwg-iso.

Resources

License

Stars

Watchers

Forks

Packages

No packages published