This script automates the process of setting a custom image or color as the background of GNOME Display Manager 3 on Fedora 34 and 35. Other Fedora versions may work as well, but haven’t been tested.
This tool was made specifically to work with .gresource
files.
If you are going to set an image file that has spaces in its file name or folders, remember to escape them with backslashes.
First, you will need to install Glib development files with sudo dnf install glib2-devel
.
Then you can download the script with the following command:
wget github.com/I-g-e/fedora-change-gdm-background/raw/master/change-gdm-background
And set it as an executable with chmod +x change-gdm-background
.
Run the script with root privileges, (e.g. with sudo
).
Setting a background image: sudo ./change-gdm-background /path/to/image
Setting a solid color: sudo ./change-gdm-background '#ffffff'
The color should be given as a hexadecimal string (six or three characters).
If you see the message login image sucessfully changed
, your GDM background should be changed to the image/color you specified. The changes will take effect after restarting GDM or rebooting your computer.
You can restore your original GDM theme any time with sudo ./change-gdm-background --restore
.
if you use two or more monitors, you may see a streched image through the displays as if they were one screen. This is the default behavior of GDM3 when dealing with multiple displays.
See this comment for setting up the monitor configuration of GDM.