#### Beyond Linux® From Scratch (System V Edition) - Version r12.4-737

### Chapter 26. Display Managers

- Prev

  Display Managers

- Next

  lightdm-1.32.0

- Up
- Home

# GDM-48.0

## Introduction to GDM

GDM is a system service that is responsible for providing graphical logins and managing local and remote displays.

### Note

Development versions of BLFS may not build or run some packages properly if LFS or dependencies have been updated since the most recent stable versions of the books.

### Package Information

- Download (HTTP): https://download.gnome.org/sources/gdm/48/gdm-48.0.tar.xz

- Download MD5 sum: a17868752c9a90ed560891886f2882f2

- Download size: 920 KB

- Estimated disk space required: 44 MB

- Estimated build time: 0.2 SBU

### GDM Dependencies

#### Required

AccountsService-23.13.9, DConf-0.40.0, libcanberra-0.30 (built after GTK-3.24.51), and Linux-PAM-1.7.1

#### Optional

keyutils-1.6.3 and check (for testing)

#### Runtime Dependencies

gnome-session-48.0, gnome-shell-48.4, and elogind-255.22

## Installation of GDM

It is recommended to have a dedicated user and group to take control of the gdm daemon after it is started. Issue the following commands as the `root` user:

    groupadd -g 21 gdm &&
    useradd -c "GDM Daemon Owner" -d /var/lib/gdm -u 21 \
            -g gdm -s /bin/false gdm &&
    passwd -ql gdm

First, adapt GDM to build with GCC 15:

    sed -r 's/([(*])bool([) ])/\1boolval\2/' -i common/gdm-settings-utils.*

Install GDM by running the following commands:

    sed -e 's@systemd@elogind@'                                \
        -e 's/-session optional/-session required/'            \
        -e '/elogind/isession  required       pam_loginuid.so' \
        -i data/pam-lfs/gdm-launch-environment.pam &&

    mkdir build &&
    cd    build &&

    meson setup ..                   \
          --prefix=/usr              \
          --buildtype=release        \
          -D gdm-xsession=true       \
          -D initial-vt=7            \
          -D run-dir=/run/gdm        \
          -D logind-provider=elogind \
          -D systemd-journal=false   \
          -D systemdsystemunitdir=no \
          -D systemduserunitdir=no   &&
    ninja

The test suite requires Check that we've removed from LFS.

Now, as the `root` user:

    ninja install

## Command Explanations

`--buildtype=release`: Specify a buildtype suitable for stable releases of the package, as the default may produce unoptimized binaries.

`-D initial-vt=7`: This switch starts GDM on VT7 by default, since on SysV systems, elogind is not available until it gets activated by PAM during a login session. The default behavior is to start on the currently active TTY, but this behavior causes GDM to fail to start in virtual environments and other situations where Wayland is not supported.

`-D default-pam-config=lfs`: Use this switch if you did not create the `/etc/lfs-release` file or distribution auto detection will fail and you will be unable to use GDM.

`-D gdm-xsession=true`: This enables the installation of the GDM Xsession file.

## Configuring GDM

### Config Files

`/etc/gdm/custom.conf`

### Configuration Information

The GDM daemon is configured using the `/etc/gdm/custom.conf` file. Default values are stored in GSettings in the `gdm.schemas` file. It is recommended that end-users modify the `/etc/gdm/custom.conf` file because the schemas file may be overwritten when the user updates their system to have a newer version of GDM.

On some systems with NVIDIA GPUs or virtual GPUs (such as provided by qemu), GDM will hide Wayland sessions by default. This is often done to prevent users from encountering problems with buggy drivers, which can result in system lockups, application crashes, power management problems, and graphics slowdowns. If your system is a virtual machine or you have an NVIDIA GPU and still want to try running Wayland sessions anyway, execute the following command as the `root` user:

    ln -s /dev/null /etc/udev/rules.d/61-gdm.rules

### Boot Script

To start gdm automatically when the system is switched to runlevel 5, install the `/etc/rc.d/init.d/xdm` script and the `/etc/sysconfig/xdm` configuration file included in the blfs-bootscripts-20250225 package and adjust `/etc/inittab` by running as the `root` user:

    make install-gdm

In order to permanently set the default runlevel to 5, starting the gdm greeter screen automatically, you can modify `/etc/inittab`. As the `root` user:

    sed /initdefault/s/3/5/ -i /etc/inittab

### Configuring GDM Auto-Suspend

GDM will suspend the system when the greeter screen has been running for a while without any interactive input. If you want to disable auto-suspending for any reason (for example if the system is hosting some services besides functioning as a desktop system), as the `root` user, issue:

    su gdm -s /bin/bash                                                \
           -c "dbus-run-session                                        \
                 gsettings set org.gnome.settings-daemon.plugins.power \
                               sleep-inactive-ac-type                  \
                               nothing"

## Contents

Installed Programs: gdm, gdm-config, and gdmflexiserver
Installed Libraries: libgdm.so and pam_gdm.so (PAM Module)
Installed Directories: /etc/gdm, /usr/include/gdm, /usr/share/gdm, and /usr/share/help/*/gdm

### Short Descriptions

gdm | is a login prompt for GNOME
gdm-config | configures a variety of authentication options for GDM

- Prev

  Display Managers

- Next

  lightdm-1.32.0

- Up
- Home