I've been Googling like a maniac trying to find an answer, so I've now decided to ask here.

How do I go about changing the background of the login screen? (lightdm-gtk-greeter).
It currently uses whatever background I set as desktop background, and doesn't listen to any configuration in the /etc/lightdm/lightdm-gtk-greeter.conf, this is what it's currently set to:


Method 1: Assuming you're running <=14.0.4,

sudo su
xhost +SI:localuser:lightdm
su lightdm -s /bin/bash
gsettings set com.canonical.unity-greeter draw-user-backgrounds 'true'
gsettings set com.canonical.unity-greeter background 'path-to-image'

Worked for me. Also, you might need to chmod 644 your background.

Method 2

Copy the picture file to this location


Change the file name to warty-final-ubuntu.png

(The image must be a PNG obviously)

| improve this answer | |
  • Tried both methods, tried the second one first but it didn't work. Then I moved onto the first one and got "No such schema 'com.canonical.unity-greeter'" – realsub Mar 28 '16 at 21:21
  • What version of Ubuntu are you running? Because both methods work fine on 14.0.4 for me. (Literally, I just tried them) – You'reAGitForNotUsingGit Mar 28 '16 at 22:51
  • Running 14.04LTS. Sorry, forgot to mention I've also replaced unity with xfce. – realsub Mar 28 '16 at 23:01

I use Nautilus to navigate to wallpaper file and then invoke a custom script to set the login screen and lock screen background simultaneously:


## Set login wallpaper

# strip new line char passed by Nautilus

# Multiple files can't be selected.

if [[ $LINE_COUNT > 1 ]] ; then
    zenity --error --text "Ony one file can be selected at a time! "
    exit 1

# Object type must be "file..." (ie no directories, etc.)
if [ -d "${FILENAME}" ] ; then
    zenity --error --text "$FILENAME is a directory!";
    exit 1
    if [ -f "${FILENAME}" ]; then
        : # Bash noop
        zenity --error --text "${FILENAME} is not a file!";
        exit 2

# Build working file in /tmp
echo "[com.canonical.unity-greeter]" > /tmp/set-login-wallpaper.tmp
echo "draw-user-backgrounds=false" >> /tmp/set-login-wallpaper.tmp
echo "background='$FILENAME'" >> /tmp/set-login-wallpaper.tmp

# Must run as sudo
if [ "$EUID" -ne 0 ] ; then

    # Get sudo password
    PASSWORD=$(zenity --password --title="Set Login Wallpaper" --timeout=20)

    # copy working file to real file using sudo
    echo $PASSWORD | sudo -S cp /tmp/set-login-wallpaper.tmp \

    # compile using sudo
    echo $PASSWORD | sudo -S glib-compile-schemas /usr/share/glib-2.0/schemas

    # Already sudo so simply copy and compile
    # copy working file to real file
    cp /tmp/set-login-wallpaper.tmp \

    # compile
    glib-compile-schemas /usr/share/glib-2.0/schemas

exit 0

Full answer including how to add a script to Nautilus: How to change the Unity lockscreen wallpaper?

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.