How To Change The GDM3 Login Screen (Greeter) GTK Theme And Background Image Using gdm-tools

gdm-tools is, like its name suggests, a set of command line tools to change the look of the GNOME Display / Login Manager (GDM 3).

Using gdm-tools, you'll be able to easily change the GDM login screen (greeter) theme and background image, backup / restore the default GDM theme and optionally reset everything to default, and extract the default GDM theme for use in "weird" GNOME sessions, such as the Ubuntu session.

Not sure what's this GDM login screen / greeter? Here's a screenshot:

GDM3 login screen greeter

Not all GTK themes are compatible with GDM. To be able to use a GTK theme as your GDM login screen theme, you'll need to make sure the theme is installed in /usr/share/themes and that it contains a gnome-shell subdirectory with a valid GNOME Shell theme (a valid gnome-shell.css file).

It's worth noting that gdm-tools is new, and it probably hasn't been widely tested. So use it with care and at your own risk! Using the wrong GDM settings may prevent you from logging in to your Linux desktop. 

The developer recommends using only one tool to change the GDM login screen theme, since each such tool creates a different backup of the original GNOME Shell gresource file. In this regard, gdm-tools is smarter than other such tools, using a dual backup system which should avoid running into issues.

It's also worth mentioning that a GNOME Shell update will revert the custom theme you set for the GDM login screen / greeter, to its default (to use a custom GDM theme, the gnome-shell-theme.gresource file needs to be replaced, and this file is overwritten by GNOME Shell updates). So when this happens, you'll need to apply the theme again using gdm-tools.

All this information about the dual backup system, etc., is not available on the gdm-tools GitHub page. However, everything is explained in the gdm-tools man page, so you can check it out after installing this, using man set-gdm-theme, or online here.

GDM-related:  How To Change The Default Display Manager (Switch To GDM, LightDM, SDDM, Or LXDM) In Debian, Ubuntu Or Linux Mint


gdm-tools installation


Let's get started with gdm-tools installing it. For Arch Linux / Manjaro, you can directly install gdm-tools from AUR.

For other Linux distributions, start by installing the packages required to run these tools (GLib 2.0 and dconf-cli, as well as Git to get the latest code from GitHub):

  • Debian / Ubuntu / Pop!_OS / other Linux distributions based on Debian or Ubuntu:
sudo apt install libglib2.0-dev dconf-cli git

  • Fedora:
sudo dnf install glib2-devel dconf git

For other Linux distributions you'll need to figure out the package names for GLIB 2.0 (development headers), and dconf-cli, and install them.

Next, clone the gdm-tools Git repository and install it using:

git clone --depth=1 https://github.com/realmazharhussain/gdm-tools.git

cd gdm-tools

./install.sh

In case you later want to uninstall gdm-tools, use the uninstall.sh script from the cloned GitHub repository.


Using gdm-tools to change the GDM3 login screen theme and background image


Before using gdm-tools to change your GDM login screen or wallpaper, make a backup of the default theme by using:

set-gdm-theme backup update

Now let's list all the available valid GDM login screen themes:

set-gdm-theme list

Warning for Ubuntu users: the theme called "default" in the set-gdm-theme list command output is the default GNOME Shell theme (Adwaita), and not Yaru. If you attempt to change the background image only (see below), the GTK theme will also be switched to "default", which is the GNOME Shell Adwaita theme!

To set one of the themes listed above for your GDM login screen / greeter, use:

set-gdm-theme set <theme-name>

For example, to set Yaru-light as the GDM3 theme, you'd use:

set-gdm-theme set Yaru-light

Don't have any themes installed that support GDM3? Try Orchis or WhiteSur (run the install script with sudo, because the theme has to be installed to /usr/share/themes to use it as a GDM greeter theme).

Set the background image of your GDM3 login screen using:

set-gdm-theme set -b </path/to/background/image.png>

You can set both the GDM greeter theme and background image in one go, using:

set-gdm-theme set <theme-name> [/path/to/background/image.png]

For example, set Yaru-light as the GTK theme used by the GDM login screen, and /usr/share/backgrounds/warty-final-ubuntu.png as its background image:

set-gdm-theme set Yaru-light /usr/share/backgrounds/warty-final-ubuntu.png

If you wish to restore a GDM3 theme backup, use:

set-gdm-theme backup restore

Or, if you want to reset everything to the original state, use:

set-gdm-theme reset

For more on this, check out the help of both scripts (set-gdm-theme -h and gnomeconf2gdm -h, as well as man set-gdm-theme).

You might also like:  How To Use A Different GTK 3 Theme For Specific Applications