If you are using GDM3 as display manager and you want to change your background of the login screen or lock screen, you won’t unfortunately find any option in a common settings dialog. In Ubuntu you will always have the nice purple background while entering your password.
But you can change it! (Tested with Ubuntu 18.04 and gdm3 3.28.3) First you have to copy you preferred background to a system directory, for example /usr/local/share/backgrounds
.
#copy background sudo mkdir -p /usr/local/share/background sudo cp mybackground.jpg /usr/local/share/backgrounds
Then you have to copy the current used theme of GDM3 for your modifications:
#copy current theme into local share sudo mkdir -p /usr/local/share/themes sudo cp /etc/alternatives/gdm3.css /usr/local/share/themes/
Then open this file in your favorite editor and search for #loclDialogGroup
. You should change it to:
#lockDialogGroup { background: #000000 url(file:///usr/local/share/backgrounds/mybackground.jpg); background-repeat: repeat; background-size: cover; background-position: center; }
Then you have to install your new theme using update-alternatives
and check that it was successfully installed.
sudo update-alternatives --install /usr/share/gnome-shell/theme/gdm3.css gdm3.css /usr/local/share/themes/gdm3.css 100 sudo update-alternatives --config gdm3.css
Unfortunately not all components uses the gdm3.css alternative, so you additionally have to copy your css over the ubuntu provided.
sudo cp --backup /usr/local/share/themes/gdm3.css /usr/share/gnome-shell/theme/ubuntu.css
After upgrading the package gnome-shell-common
, you have to look at the differences between the new ubuntu.css
and your backup and patch the ubuntu.css
again.
Then you should reboot to apply the changes.