Change background in the login screen

No, I have rebooted my System.

Hi everyone,
I think I've finally figured it out!

You can actually change the background on the Zorin 17 Core login screen.
Sorry for the blurry photo — I don't use virtual machines. :flushed_face:


Just give me a moment to double-check everything, and I'll explain.

I finally understood why it is not enough to replace the image called "login-background.png" in the "/usr/share/themes//gnome-shell" folder with another image of the same name (in .png or .jpg format) to change the background of the GDM login screen in Zorin 17 Core.

The files in the "/usr/share/themes//gnome-shell" directory are just used to define the theme, which is packaged as a special "gnome-shell-theme-gresource" file.

First, you need to get the things in this file. After that, you can make the changes you want (like the background). Finally, you recompile the file.

I've tried to make the task as easy as possible while making sure that the process is easy to understand.


_______________

Open the terminal (Ctrl Alt t).
Note: Select and copy all the lines shown in the code boxes. Press “Ctrl Shift v” to paste them into the terminal, then press “Enter” to execute them.


1. Extract the “gnome-shell-theme-gresource” file

After a few attempts, I think that the “ZorinBlue-Dark” theme needs to be modified for a standard configuration.

cat << 'EOF' > extract.sh
#!/bin/sh

gst=/usr/share/themes/ZorinBlue-Dark/gnome-shell/gnome-shell-theme.gresource
workdir=${HOME}/shell-theme

for r in `gresource list $gst`; do
	r=${r#\/org\/gnome\/shell/}
	if [ ! -d $workdir/${r%/*} ]; then
	  mkdir -p $workdir/${r%/*}
	fi
done

for r in `gresource list $gst`; do
        gresource extract $gst $r >$workdir/${r#\/org\/gnome\/shell/}
done
EOF
chmod +x extract.sh
./extract.sh

2. Choose your image

Put the wallpaper you want (in .png or .jpg format) in the "Pictures" folder.

Paste these three lines into the terminal, replacing “xxxxx” with the name of your wallpaper in the second line.
If your image is in ".jpg" format, also change the four “png” extensions in lines 2 and 3.

sudo cp /usr/share/themes/ZorinBlue-Dark/gnome-shell/assets/login-background.png{,.bak}
sudo cp ~/Pictures/xxxxx.png ~/shell-theme/theme/assets/login-background.png

sudo cp ~/shell-theme/theme/assets/login-background.png /usr/share/themes/ZorinBlue-Dark/gnome-shell/assets/login-background.png

The first line will make a backup copy of the Zorin wallpaper.
The last two lines will rename your wallpaper and copy it to the two locations where it needs to be.


3. Create a “gnome-shell/gnome-shell-theme.gresource.xml” file

This file, which is necessary for compilation, will be placed in the directory “/usr/share/themes/ZorinBlue-Dark/gnome-shell”.

Again, those who have chosen a “.jpg” file will need to change the extension in the line <file>assets/login-background.png</file>.

3. Create a “gnome-shell/gnome-shell-theme.gresource.xml” file

echo "<?xml version="1.0" encoding="UTF-8"?>
<gresources>
  <gresource prefix=\"/org/gnome/shell/theme\">
    <file>assets/activities-dark.svg</file>
    <file>assets/activities.svg</file>
    <file>assets/calendar-event-dark.svg</file>
    <file>assets/calendar-event-today-dark.svg</file>
    <file>assets/calendar-event-today.svg</file>
    <file>assets/calendar-event.svg</file>
    <file>assets/checkbox-dark.svg</file>
    <file>assets/checkbox-focused-dark.svg</file>
    <file>assets/checkbox-focused.svg</file>
    <file>assets/checkbox-off-dark.svg</file>
    <file>assets/checkbox-off-focused-dark.svg</file>
    <file>assets/checkbox-off-focused.svg</file>
    <file>assets/checkbox-off.svg</file>
    <file>assets/checkbox.svg</file>
    <file>assets/gnome-shell-start.svg</file>
    <file>assets/login-background.png</file>
    <file>assets/texture-dark.svg</file>
    <file>assets/texture.svg</file>
    <file>assets/toggle-off-dark.svg</file>
    <file>assets/toggle-off.svg</file>
    <file>assets/toggle-on-dark.svg</file>
    <file>assets/toggle-on.svg</file>
    <file>assets/workspace-placeholder-dark.svg</file>
    <file>assets/workspace-placeholder.svg</file>
    <file>gnome-shell.css</file>
    <file>pad-osd.css</file>
    <file>process-working.svg</file>
  </gresource>
</gresources>" | sudo tee /usr/share/themes/ZorinBlue-Dark/gnome-shell/gnome-shell-theme.gresource.xml> /dev/null

4. Recompile “gnome-shell-theme-gresource” file

sudo cp /usr/share/themes/ZorinBlue-Dark/gnome-shell/gnome-shell-theme.gresource{,.bak}
cd /usr/share/themes/ZorinBlue-Dark/gnome-shell
sudo glib-compile-resources /usr/share/themes/ZorinBlue-Dark/gnome-shell/gnome-shell-theme.gresource.xml


____________

5. Restart

reboot


Thanks to @Aravisian for the tips, and to the Arch Linux Wiki for the script! :nerd_face:

3 Likes

It sounds really difficult to change the background in gnome. Does anyone have experience with the tool gdm settings in Zorin 17.3? Does it work? The appimage v.1 and v.2 should work in Ubuntu 22.04 or the ppa, but I'm not sure what's about Zorin that is more modified:

And I read that it can happen in rare cases that the loginscreen is no longer working - so that scares off me.

Maybe it will be easier in Zorin 18.

No... Gnome is working to make it harder. They do not want the end user having control over customization.

1 Like

I mean because the tool is in the repo and the newest version can be used.
But gnome is a tough nut to crack...

I tried the GDM settings, of course, but it didn't work.

Although Zorin 17 Core is closer to a GNOME distribution than others (Ubuntu Budgie, for example), it is heavily customised.

For instance, there is no 'com.ubuntu.login-screen.background-picture-uri' schema to make it easier to change the login screen background using scripts such as 'ubuntu-change-login-background'.

So I'm sceptical that Zorin 18 switching to Ubuntu 24.04 or 26.04 will change anything in this regard. :slightly_frowning_face:

1 Like

I tried it but only with limited Success. Cutomizing in Form of Theming and Icons didn't worked. Wallpaper Change neither. What worked was setting Clock Seconds and change Font.

1 Like

Hm, then it's not much use if the most important things are missing. Maybe I'll try the appimage v.1 or the gnome lock screen background extension.

If You should try it, You could report back here if it has worked or not.

1 Like

Don't bother, it doesn't work. I've tried it too.

Instead, give what I've explained above a try. :blush:

Did you try it with the older versions or only with the current one?

Sorry, only with the latest 17.3 Core.

I meant if you tried gdm settings appimage v.1 or v.2 or only the current v.5 because I read that in ubuntu 22.04 only v.1 and v.2 worked.

Oops. Shame on me. I thought I had tried everything. AppImage v2 works. :face_without_mouth:

But it's not "GDM Settings", it's "Login Manager Settings"...

Diem perdidi...

3 Likes

Good to know! Thank you for testing!

2 Likes

This is why I use distros that have KDE/Plasma. :winking_face_with_tongue:

By switching to lightdm you can change the background of the loginscreen easily (I have also installed lightdm-gtk-greeter-settings).

1 Like

Obviously. This is the method used by Ubuntu Budgie... and Zorin Xfce Lite.
I just thought you cared about GDM.

Yes, I was really interested in how it works in gdm because most users use the default gdm in Zorin core/pro.