lightdm-1.32.0

#### Beyond Linux® From Scratch (systemd Edition) - Version 13.0

### Chapter 26. Display Managers

- Prev

  GDM-49.2

- Next

  sddm-0.21.0

- Up
- Home

# lightdm-1.32.0

## Introduction to Lightdm

The lightdm package contains a lightweight display manager based upon GTK.

### Note

This package is known to build and work properly using an LFS 13.0 platform.

### Lightdm Package Information

- Download (HTTP): https://github.com/CanonicalLtd/lightdm/releases/download/1.32.0/lightdm-1.32.0.tar.xz

- Download MD5 sum: e62a5da6c35f612e4d9575eda5c8d467

- Download size: 508 KB

- Estimated disk space required: 20 MB

- Estimated build time: 0.2 SBU

### Additional download

### Note

The greeter is a program to present a graphical login screen. There are several alternative greeters, but the gtk+ package is the reference implementation. For a list of other greeters, see https://en.wikipedia.org/wiki/LightDM.

- Download (HTTP): https://github.com/Xubuntu/lightdm-gtk-greeter/releases/download/lightdm-gtk-greeter-2.0.9/lightdm-gtk-greeter-2.0.9.tar.gz

- Download MD5 sum: 35752d730f39293c2bbe884ef6963830

- Download size: 592 KB

- Estimated disk space required: 5.2 MB

- Estimated build time: less than 0.1 SBU

### Lightdm Dependencies

#### Required

Exo-4.20.0 (for the greeter), libgcrypt-1.12.0, itstool-2.0.7, Linux-PAM-1.7.2, and Xorg-Server-21.1.21 (Runtime)

#### Recommended

GLib-2.86.4 (with GObject Introspection), libxklavier-5.4, and Vala-0.56.18

#### Optional

AccountsService-23.13.9 (run time), at-spi2-core-2.58.3, GTK-Doc-1.35.1, libido, and libindicator

## Installation of Lightdm

First, create a dedicated user and group to take control of the lightdm daemon after it is started. Issue the following commands as the `root` user:

    groupadd -g 65 lightdm       &&
    useradd  -c "Lightdm Daemon" \
             -d /var/lib/lightdm \
             -u 65 -g lightdm    \
             -s /bin/false lightdm

Install lightdm by running the following commands:

    ./configure --prefix=/usr                 \
                --libexecdir=/usr/lib/lightdm \
                --localstatedir=/var          \
                --sbindir=/usr/bin            \
                --sysconfdir=/etc             \
                --disable-static              \
                --disable-tests               \
                --with-greeter-user=lightdm   \
                --with-greeter-session=lightdm-gtk-greeter \
                --docdir=/usr/share/doc/lightdm-1.32.0 &&
    make

This package does not come with a test suite.

Now, as the `root` user:

    make install                                                  &&
    cp tests/src/lightdm-session /usr/bin                         &&
    sed -i '1 s/sh/bash --login/' /usr/bin/lightdm-session        &&
    rm -rf /etc/init                                              &&
    install -v -dm755 -o lightdm -g lightdm /var/lib/lightdm      &&
    install -v -dm755 -o lightdm -g lightdm /var/lib/lightdm-data &&
    install -v -dm755 -o lightdm -g lightdm /var/cache/lightdm    &&
    install -v -dm770 -o lightdm -g lightdm /var/log/lightdm

Now build the greeter:

    tar -xf ../lightdm-gtk-greeter-2.0.9.tar.gz &&
    cd lightdm-gtk-greeter-2.0.9 &&

    ./configure --prefix=/usr                 \
                --libexecdir=/usr/lib/lightdm \
                --sbindir=/usr/bin            \
                --sysconfdir=/etc             \
                --with-libxklavier            \
                --enable-kill-on-sigterm      \
                --disable-libido              \
                --disable-libindicator        \
                --disable-static              \
                --disable-maintainer-mode     \
                --docdir=/usr/share/doc/lightdm-gtk-greeter-2.0.9 &&
    make

Now, as the `root` user:

    make install

### Note

If you installed Xorg in /opt, you will need to create a symbolic link so lightdm can find the Xorg server. As the `root` user:

    ln -sf /opt/xorg/bin/Xorg /usr/bin/X

## Command Explanations

sed ... /usr/bin/lightdm-session: This command ensures that the initial login via the greeter sources /etc/profile and ~/.bash_profile. Without this, commands that depend on different environment variables may not work as expected.

## Configuring lightdm

### Config Files

/etc/lightdm/{lightdm,users,keys,lightdm-gtk-greeter}.conf

The configuration files offer many options. If, for instance, you have a multiple monitor setup but prefer the login window to be displayed on only one monitor, set 'active-monitor=<monitor-name>' in `lightdm-gtk-greeter.conf`. For example you could use `active-monitor=HDMI-1`. You can determine the monitor-names with xrandr --listmonitors. Note that the monitor names may change if you change the graphics driver and you may have to adjust the configuration accordingly.

### Systemd Unit

Install the `lightdm.service` unit included in the blfs-systemd-units-20251204 package:

    make install-lightdm

### Available Sessions

The greeter offers a list of available sessions, depending on the Window Managers and Desktop Environments installed. The list includes sessions which have a corresponding `.desktop` file installed under `/usr/share/xsessions`. Most of the Window Managers and Desktop Environments automatically provide those files, but if necessary, you may include a custom one.

## Contents

Installed Programs: dm-tool, lightdm, and lightdm-gtk-greeter
Installed Libraries: liblightdm-gobject-1.so
Installed Directories: /etc/lightdm, /etc/apparmor.d, /usr/lib/lightdm, /usr/include/lightdm-gobject-1, /usr/share/help/C/lightdm /usr/share/gtk-doc/html/lightdm-gobject-1, /usr/share/doc/lightdm-gtk-greeter-2.0.9, /var/lib/lightdm, /var/lib/lightdm-data, /var/cache/lightdm, and /var/log/lightdm

### Short Descriptions

lightdm | is a display and login manager
lightdm-gtk-greeter | is an auxiliary process that displays the greeter, a graphical user interface that performs user authentication and initiates the selected window manager or display environment

- Prev

  GDM-49.2

- Next

  sddm-0.21.0

- Up
- Home