After upgrading to the latest LTS Ubuntu 20.04, I decided to stop using the old standard lightdm-gtk-greeter and give in to using Gnome’s gdm3. But I don’t like Ubuntu’s default styles — in fact, I use a vanilla gnome-session entirely to avoid the purple flash you get on ubuntu-session.
After some research, I found you can switch to different gdm3 login themes using
update-alternatives — and while there’s one alternate for the default Gnome styling, the shell theme I settled on, Flat-Remix (ppa) offers its own alternate. Hooray!
But, no matter which GDM3 theme you choose, they all have default backgrounds I don’t like. I prefer setting my own. How to do it?
Well, with some research, I was able to put together my own notes on modifying GDM3 themes in Ubuntu 20.04. My notes cover extracting Gnome gresource files, identifying the gresource to extract for the theme you want to base your modification on, generating an XML for the contents, setting an external CSS file for easier editing, setting a background image, and compiling the new gresource, installing & setting the new alternative.
NOTE: if your CSS file becomes malformed, GDM3 will throw an error and you won’t be able to login. Always back up and be able to restore! I offer no support or assistance to any issues you may experience.
(And, on the down side, if you want to customize the CSS colors as well, this only changes the login screen, not the lock screen, which seems to draw from gnome-shell.css instead of gdm3.css, and modifying that can cause more problems.)