X

Set lightdm wallpaper that is independant of the user’s wallpaper (Ubuntu/Linux Mint)

Using lightdm, the wallpaper that is shown is usually the one used by the selected user. If you want to change this or just set a static wallpaper for your login screen, there are a few possibilities to do that.

1. Method

The first one is to make your wallpaper inaccessible to others, letting lightdm fall back to its default wallpaper. For this method, dconf-tools must be installed. If it isn't installed on your system yet, install it with

sudo apt-get install dconf-tools

With these tools you can easily configure lightdm - however you cannot do so in the GUI since you must be logged in as lightdm user. Do so by entering following into a terminal:

sudo xhost +SI:localuser:lightdm
sudo su lightdm -s /bin/bash

Now you can edit any of lightdm's settings with the command line - you can use the dconf GUI as reference for the paths and variable names (the dconf path to the lightdm unity greeter configuration is com>canonical>unity greeter). Set the background picture with

gsettings set com.canonical.unity-greeter background '/usr/share/backgrounds/orsomewhereelse.png'

Replace the path I use with the one to the wallpaper of your choice - it must be closed in quotation marks. You can also change the background color to black (x000000) or some other neutral color.

What happens in the login screen now is that the dconf wallpaper blinks up for a second and is then replaced by your wallpaper. To counter that, you must make your wallpaper inaccessible to other users. To do that, log in to your account again and open a terminal. Change the ownership to you instead of root if you need to (wallpapers in /usr/share... usually don't belong to you for example). Replace my username (howtoforge)and my group (howtoforge) with yours:

sudo chown howtoforge:howtoforge /usr/share/backgrounds/orsomewhereelse.png

Now right-click the wallpaper and go to the Permissions tab in the Properties menu. Set the rights of Others to None. Lightdm won't be able to access your wallpaper any longer, so it falls back to the one you specified in dconf-tools.

2. Method

The other possibility is to run

id -u

to find out your user ID and afterwards run (replace [your id] with the ID the previous command spit out (without brackets) and the path I used with the one to the wallpaper you want lightdm to display):

dbus-send --system --print-reply --dest=org.freedesktop.Accounts /org/freedesktop/Accounts/User[your id] org.freedesktop.Accounts.User.SetBackgroundFile string:/path/to/wallpaper.jpg

This command has to be repeated every time you change your wallpaper and only replaces the wallpaper for one user. You can decide whether you like this method or the previous more.

CSch:
X

Headline

You can control the ways in which we improve and personalize your experience. Please choose whether you wish to allow the following:

Privacy Settings