LightDM Display Manager Documentation

repository·main·Indexed 21 days ago

https://github.com/ubuntu/lightdm

A lightweight, cross-desktop display manager daemon that manages graphical login sessions. It supports X, Wayland, and Mir, facilitating authentication via PAM and launching session processes. Documentation covers greeter installation, keyfile configuration via /etc/lightdm/, display setup scripts, and debugging using xephyr.

Tokens
776
Snippets
3
Records
5
Agent score
26%

What's inside LightDM

  1. What is LightDM and how does it work?

    main

    LightDM is a lightweight, cross-desktop display manager daemon. It manages the lifecycle of a graphical login session by:

    • Running display servers (e.g., X).
    • Running greeters to allow users to select user accounts and session types.
    • Facilitating authentication via PAM.
    • Launching session processes after successful authentication.
    • Providing remote graphical login options (incoming via XDMCP and VNC; outgoing via XDMCP and pluggable mechanisms).

    LightDM is designed to be cross-desktop, supporting various technologies including X, Wayland, and Mir.

  2. Test LightDM configuration in debug mode

    main

    You can test your LightDM configuration and display setup scripts using xephyr to run a nested X server.

    1. Install the required testing tool:
      sudo apt install xserver-xephyr
    2. Run the LightDM test command as the lightdm user:
      sudo -u lightdm lightdm --test-mode --debug
    sudo apt install xserver-xephyr
    sudo -u lightdm lightdm --test-mode --debug
  3. Install a greeter for LightDM

    main

    The core LightDM project does not include a greeter by default. To provide a graphical login interface, you must install a greeter compatible with your desktop environment. Popular options include:

    • LightDM GTK+ Greeter: Moderate requirements (GTK+).
    • LightDM KDE Greeter: For KDE environments (Qt).
    • LXQt Greeter: For LXQt environments (Qt).
    • Pantheon Greeter: For elementary OS (GTK+/Clutter).
    • Unity Greeter: For Unity.
    • WebKit2 Greeter: Allows theming using HTML/CSS/Javascript.
    • No Greeter: For automatic login only.
  4. Configure LightDM settings

    main

    LightDM uses the keyfile format for configuration. Settings are aggregated from multiple files in a specific order of precedence:

    1. /usr/share/lightdm/lightdm.conf.d/*.conf (System defaults)
    2. /etc/lightdm/lightdm.conf.d/*.conf (Administrator overrides)
    3. /etc/lightdm/lightdm.conf (Administrator overrides)

    Best Practice: To override system defaults, create a new file in /etc/lightdm/lightdm.conf.d/ rather than editing the main /etc/lightdm/lightdm.conf file directly. Most user-facing settings, such as session selection, should be placed under the [Seat:*] section to apply to all seats.

    # Example: Overriding the default session in /etc/lightdm/lightdm.conf.d/50-myconfig.conf
    
    [Seat:*]
    user-session=mysession
  5. Use a Display Setup Script

    main

    LightDM can execute an external shell script to configure displays during the setup process. If you implement a custom display setup script, it must adhere to these requirements:

    • Location: Must be located under /usr/share.
    • Permissions: Must be owned by the user lightdm and group lightdm.
    • Output: The script must not print or log to any destination that is not accessible to the lightdm user.

    To use a script, add the display-setup-script key to the [Seat:*] section of your configuration.

    [Seat:*]
    display-setup-script=/usr/share/example_display_setup_script.sh