How do I change the login screen in Ubuntu 16.04+?
The recipies for changing one's login screen in 14.04 [EDIT or in 15.04, 15.10] don't work in 16.04. The "custom" background shows for a split second and then fades to the Ubuntu one. So, how do I change the login screen background in 16.04?
[Edit: this post is not a duplicate because all other related questions specifically refer to previous versions of Ubuntu, and the solutions to those do not apply here (as they do not work on 16.04).]
Solution 1:
You said:
The "custom" background shows for a split second and then fades to the Ubuntu one.
The greeter by default load the selected user background if it is available. A fade transition used to change between backgrounds of users including greeter default (for guest user). I think that the question should: How to stop lightdm greeter from loading the user background?
Be aware of two distinct greeters, default is unity-greeter
. I noticed that some answer here in AU, don't mention this and mix up between them.
Using lightdm-gtk-greeter
GUI tool
-
Install the settings tool
sudo apt install lightdm-gtk-greeter-settings
-
Run it
pkexec lightdm-gtk-greeter-settings
In Appearance tab: Select the image
- On same tab: Unckeck User user wallpaper if available
-
Save & Close
CLI tools
-
Open lightdm greeter settings file
sudo nano /etc/lightdm/lightdm-gtk-greeter.conf
-
Change it this way
[greeter] background = /usr/share/backgrounds/Spring_by_Peter_Apas.jpg user-background = false
Ctrl+o to save it then Ctrl+x to exit.
Using unity-greeter
(default)
Same answer by Serg, I have tested it in a fresh VBox Ubuntu 16.04.
-
Change the background of the login screen
$ sudo nano /usr/share/glib-2.0/schemas/10_unity_greeter_background.gschema.override [com.canonical.unity-greeter] draw-user-backgrounds=false background='/usr/share/backgrounds/Spring_by_Peter_Apas.jpg' $ sudo glib-compile-schemas /usr/share/glib-2.0/schemas $ sudo service lightdm restart
-
Some debug hints:
-
Purge
lightdm-gtk-greeter
settingssudo apt purge lightdm-gtk-greeter lightdm-gtk-greeter-settings
Or you may want just disabling it temporary
sudo mv /usr/share/lightdm/lightdm.conf.d/60-lightdm-gtk-greeter.conf /usr/share/lightdm/lightdm.conf.d/60-lightdm-gtk-greeter.conf.disabled
To enable it back
sudo mv /usr/share/lightdm/lightdm.conf.d/60-lightdm-gtk-greeter.conf.disabled /usr/share/lightdm/lightdm.conf.d/60-lightdm-gtk-greeter.conf
Restarting the lightdm is needed
sudo systemctl restart lightdm
-
Reinstall
unity-greeter
to remove any change in/usr/share/glib-2.0/schemas/com.canonical.unity-greeter.gschema.xml
sudo apt install --reinstall unity-greeter
-
Check if there any other dconf override file that take priority
grep -rn -e "com.canonical.unity-greeter" -e "background=" -e "draw-user-backgrounds=" /usr/share/glib-2.0/schemas/
-
Solution 2:
To change the login screen in Ubuntu 16.04 I used the following:
gksu gedit /usr/share/glib-2.0/schemas/10_unity_greeter_background.gschema.override
Insert these lines:
[com.canonical.unity-greeter]
draw-user-backgrounds=false
background='/home/$USER/Pictures/1920x1080-TuxSuckingWindowsTetraWwallpaper.jpg'
# After changing use: sudo glib-compile-schemas /usr/share/glib-2.0/schemas
Where:
-
$USER
= your user ID. -
Pictures
= your wallpaper directory. -
1920x1080-TuxSuckingWindowsTetraWwallpaper.jpg
= your image file name (can be.png
format too). -
#
(comment) ... reminds you what to do after changing!
Save the file and exit gedit
Now compile the new login wallpaper with:
sudo glib-compile-schemas /usr/share/glib-2.0/schemas
Last step is to reboot.
Many thanks and credit to Serg: (Change the background of the login screen) Note on my system this no only changes the initial login screen but also the lock screen login as well.
Point and click with Nautilus to set login screen wallpaper
I wrote a script where you can navigate to a directory / image, right click on it and set it as login screen / lock screen background using Nautilus (file manager now called "Files"): Nautilus can set desktop wallpaper. How can it set login and lock screen wallpaper?
Solution 3:
Run sudo lightdm-gtk-greeter-settings
(if installed). Go to the Appearance tab, and select Background > Image.
Note: If you're selecting an image from your home folder and the folder's encrypted, it won't work, because
/home/user
hasn't been mounted yet.