Ubuntu – Change the background of the login screen

backgroundlightdm

I installed Ubuntu Studio 15.10 and upon that:

sudo apt-get install ubuntu-desktop

Now on the login screen, I have the default brownish Ubuntu default background.

  • I tried this as root:

    sudo xhost +SI:localuser:lightdm
    sudo su lightdm -s /bin/bash
    gsettings set com.canonical.unity-greeter background /usr/share/backgrounds/Tranquil_by_Pat_David.jpg
    

    But this didn't change anything.

  • Also starting the unity-control-center as user lightdm and changing the background there had no effect.

  • I also checked the rights of /usr/share/backgrounds/Tranquil_by_Pat_David.jpg which are globally readable.

Best Answer

The proper way of changing default unity-greeter background is through overriding glib-2.0 schema, as specified in the Lightdm Ubuntu Wiki

The steps are as follows:

  1. Create /usr/share/glib-2.0/schemas/10_unity_greeter_background.gschema.override file with the following contents:

    [com.canonical.unity-greeter]
    draw-user-backgrounds=false
    background='/foo/wallpaper.png'
    
  2. Run sudo glib-compile-schemas /usr/share/glib-2.0/schemas

  3. Reboot or login to TTY2 (accessed by pressing Ctrl+Alt+F2 ) and run sudo service lightdm restart

This has been tested on my Ubuntu 14.04

Update: November 17 2015

I have put together a script that simplifies the process of changing the greeter background. It has been tested in its final form on two versions of Ubuntu, 14.04 LTS (actual physical machine ) and 15.10 (Virtual Machine ) It can be found in my GitHub