How do I set the LightDM wallpaper in Ubuntu 14.04?

In previous versions of Ubuntu, picking one of the default wallpapers meant that you saw it on the login screen as well.

I am now on a clean install of Ubuntu 14.04, the LightDM wallpaper appears to be set at /usr/share/backgrounds/warty-final-ubuntu.png. It is ignoring anything else.

I tried setting a wallpaper by right clicking the desktop and choosing one of the default set (e.g. the one corresponding to /usr/share/backgrounds/Forever_by_Shady_S.jpg). I then rebooted, but the LightDM wallpaper is still the default purple one.

I had a look at the log file at /var/log/lightdm/x-0-greeter.log:

[+0.10s] DEBUG: background.vala:483: Regenerating backgrounds
[+0.10s] DEBUG: background.vala:68: Making background /usr/share/backgrounds/warty-final-ubuntu.png at 1920x1200,1440x900

The wiki page appears to be out of date as it is pointing to configuration file locations which no longer exist in 14.04.

I did manage to find some potential config files at /usr/share/lightdm/lightdm.conf.d/ but the files there don't contain any specific path locations, so I am not sure how to proceed.

I am aware of LightDM's pickiness - so this is about the default wallpapers that come with Ubuntu, all have read permissions globally and aren't encrypted or on separate drives.

config file in terminal, screenshot


Solution 1:

In my case this Ask Ubuntu answer solved the problem.

The org.gnome.settings-daemon.plugins.background setting had been disabled but I could not determine why. Once I checked this checkbox in dconf-editor and changed my wallpaper, it was reflected on the login screen.

dconf Editor

Dconf-Editor: ORG/GNOME/SETTINGS-DAEMON/PLUGINS/BACKGROUND


We can get the value of the above setting by running this command:

gsettings get org.gnome.settings-daemon.plugins.background active

We can change this value with the command:

gsettings set org.gnome.settings-daemon.plugins.background active 'true'

Solution 2:

How to Change the LightDM wallpaper

  1. Install Ubuntu Tweak

    First Install Ubuntu Tweak Click here to download the .deb and install it though Gdebi, Ubuntu Software Center, ect... Or You can install it though the terminal by these two/three commands:

    wget https://launchpad.net/ubuntu-tweak/0.8.x/0.8.7/+download/ubuntu-tweak_0.8.7-1%7Etrusty2_all.deb
    sudo dpkg -i ubuntu-tweak_0.8.7-1%7Etrusty2_all.deb
    

    OR

    sudo add-apt-repository ppa:tualatrix/ppa
    sudo apt-get update
    sudo apt-get install ubuntu-tweak-tool
    
  2. Open Ubuntu Tweak

    and follow the steps shown in the images below:

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

Solution 3:

If you're going to change a file that belongs to a package (/usr/share/backgrounds/warty-final-ubuntu.png belongs to ubuntu-wallpapers) it's best to add a file diversion using dpkg-divert. Otherwise, the package system doesn't know that the file in that location is yours and it will get overwritten whenever the package is updated. Although ubuntu-wallpapers changes infrequently, it's likely to change when you upgrade your system to a new Ubuntu release.

Using dpkg-divert is simple:

sudo dpkg-divert --local --rename /usr/share/backgrounds/warty-final-ubuntu.png

This renames the file with a .distrib suffix, and you're now free to add your own version of the file. Package updates will affect the .distrib file and not your replacement.

I set the background I wanted using a symlink:

sudo ln -s autumn-dusk.jpg /usr/share/backgrounds/warty-final-ubuntu.png

If you want to use one of your own files, just make sure it's accessible to other users. All the parent directories need to have read and execute permissions. You can check this with:

sudo -u nobody file /usr/share/backgrounds/warty-final-ubuntu.png

If it's not accessible, you'll get a Permission denied message from file.

Solution 4:

I had a similar situation like you, but solved in a real simple way. For me, I successfully changed the background of lightdm to some custom wallpaper after a clean install. Then today, I changed it to another wallpaper and it failed and showed the default purple one.

So, I checked the x-0-greeter.log and found out that it tried to load my wallpaper but failed because the greeter had no permission. Then I checked the permission of the wallpaper image, and for some reason the permission setting for 'Others' was set for 'None'. I changed it to 'Read-only' and then greeter can now successfully load the custom wallpaper.

Perhaps that might be the reason for your case too.

Solution 5:

I simply copied my wallpaper on top of /usr/share/backgrounds/warty-final-ubuntu.png and it worked without problems.