Ubuntu 12.04 Unity greeter has introduced selected user dynamic background, that means that when selecting a user from the available users list the background will change to reflect the selected user's desktop background.
By default lightdm will set /usr/share/backgrounds/warty-final-ubuntu.png as the default background and the option for the dynamic background switching on.
Setting the dynamic switching off
Open a terminal and get root
sudo -i
(Type sudo password)
Allow the user lightdm to create a connection to the X server
xhost +SI:localuser:lightdm
Switch user to lightdm
su lightdm -s /bin/bash
Turn off the dynamic switching of the background
gsettings set com.canonical.unity-greeter draw-user-backgrounds 'false'
If you want to reset that setting to default after changing it, follow all the steps until the command above and instead use
When you are done setting off or reseting to default the dynamic background feature you can close the terminal or type 2x exit, first to revert back to root and the second to clear the root privileges and revert back to your normal user.
Changing the default fixed background
(you will only see this one if the user did not set a desktop background picture or if the dynamic setting is set to false)
Open a terminal and get root
sudo -i
(Type sudo password)
Allow the user lightdm to create a connection to the X server
xhost +SI:localuser:lightdm
Switch user to lightdm
su lightdm -s /bin/bash
Change the default background with a picture of your choice
gsettings set com.canonical.unity-greeter background '/foo/wallpaper.png'
(Note: the wallpaper file cannot be located inside a encrypted user's home, those are only mounted after the user has logged in with his account.)
If you want to revert that to the default background follow all the steps until the command above but instead type
When you are done changing the default background feature or reverting back to the default one you can close the terminal or type 2x exit, first to revert back to root and the second to clear the root privileges and revert back to your normal user.
Bruno Pereira's answer worked for me but could not be used in a context without X11.
Here is an other way to do the same ... without the need of X11 (and easily scriptable) :
I'd suggest to use Ubuntu Tweak. You can configure what the logo and the backgroundimage comforably without messing around with config files:
This screenshot was taken on 10.10 Maverick, if somebody can check easily if it works also with recent Ubuntu versions an edit of this answer is welcome!
You need to edit /etc/lightdm/unity-greeter.conf (sudo nano /etc/lightdm/unity-greeter.conf). In that file you have to replace value of BACKGROUND tag.
The main answer doesn't work for me, as I'm not using unity-greeter. My lightdm is configured to use lightdm-gtk-greeter.
I found a solution by looking through the lightdm source code. It queries DBus to find the BackgroundFile property for the user. You can change this by using the d-feet program (or command-line tools).
Navigate to this point on d-feet:
Double click the "SetBackgroundFile" function. In the window that opens, type your desired wallpaper filename (with double quotes around it). Click the Execute button. If all is well, you'll see a message like, "This function didn't return anything".
The next time lightdm runs, it should have the new wallpaper that you selected.
This is a workaround for 12.04 and the current version of unity-greeter (the default "theme"). For other greeters like lightdm-gtk-greeter, the usual editing of the conf file in /etc/lightdm/ works. But unity-greeter no longer looks at unity-greeter.conf, and it's unclear how to configure it.
What I did is this: I found the image that unity-greeter insists on using. For me, it was in /usr/share/backgrounds. Move/delete/rename it. Now unity-greeter will fallback to the default background which is /usr/share/backgrounds/warty-final-ubuntu.png. Move/delete/rename that. Now you need to put another image at that location with that name. And no, it doesn't have to be a png (in fact, warty-final-ubuntu.png is actually a jpg for reasons I won't go into here). I believe the replacement must be a jpg (someone correct me if I'm wrong). Be very careful here. I think if lightdm can't fallback to the default background, something horrible might happen :-/ (maybe it'll only show a colored background... anyway be careful!).
In my case, I just made a symlink from another background in that location:
run this command while you are in /usr/share/backgrounds/ (or adjust command accordingly). Of course, replace the jpg with whatever is available and desired.
Keep in mind that if you are going to use a background in your home, you need to make sure your home is not encrypted, as lightdm will not be able to read that file until you login. Also make sure you have the right permissions on the file. If you don't know what any of this means, stick with a wallpaper that's already in /usr/share/backgrounds/. (Random tip: you can get more wallpapers from earlier versions of Ubuntu installed properly in that directory by sudo apt-get install ubuntu-wallpapers-oneiric, replace 'oneiric' with 'natty', etc.)
Ubuntu 12.04 to 13.04
Ubuntu 12.04 Unity greeter has introduced selected user dynamic background, that means that when selecting a user from the available users list the background will change to reflect the selected user's desktop background.
By default lightdm will set
/usr/share/backgrounds/warty-final-ubuntu.png
as the default background and the option for the dynamic background switching on.Setting the dynamic switching off
Open a terminal and get root
(Type sudo password)
Allow the user lightdm to create a connection to the X server
Switch user to lightdm
Turn off the dynamic switching of the background
If you want to reset that setting to default after changing it, follow all the steps until the command above and instead use
When you are done setting off or reseting to default the dynamic background feature you can close the terminal or type 2x
exit
, first to revert back to root and the second to clear the root privileges and revert back to your normal user.Changing the default fixed background
(you will only see this one if the user did not set a desktop background picture or if the dynamic setting is set to false)
Open a terminal and get root
(Type sudo password)
Allow the user lightdm to create a connection to the X server
Switch user to lightdm
Change the default background with a picture of your choice
(Note: the wallpaper file cannot be located inside a encrypted user's home, those are only mounted after the user has logged in with his account.)
If you want to revert that to the default background follow all the steps until the command above but instead type
When you are done changing the default background feature or reverting back to the default one you can close the terminal or type 2x
exit
, first to revert back to root and the second to clear the root privileges and revert back to your normal user.For 11.10
Run this command in the terminal (Ctrl+Alt+T)
You will see gedit (text-editor app) appear with this text:
Just edit the line that says
BACKGROUND=...
with the absolute path to the background image of your desire.Then click save or Ctrl+S and close the window. You are done.
Log out to see it working.
source
Ubuntu 12.04, 14.04 & 16.04
Bruno Pereira's answer worked for me but could not be used in a context without X11. Here is an other way to do the same ... without the need of X11 (and easily scriptable) :
Edit the following file :
sudoedit /usr/share/glib-2.0/schemas/10_unity_greeter_background.gschema.override
Apply the new settings :
sudo glib-compile-schemas /usr/share/glib-2.0/schemas/
11.10 - Simple LightDM Manager
An enterprising developer has put together a simple applet that will change the wallpaper:
to install
source
11.10
I'd suggest to use Ubuntu Tweak. You can configure what the logo and the backgroundimage comforably without messing around with config files:
This screenshot was taken on 10.10 Maverick, if somebody can check easily if it works also with recent Ubuntu versions an edit of this answer is welcome!
Ubuntu 12.10
This approach uses the dconf-editor, rather than gsettings. Changes to the unity-greeter must be done as the lightdm user. The steps are as follows:
Change to root user.
Give lightdm user access to the X server.
Change to lightdm user.
Run dconf-editor.
Select /com/canonical/unity-greeter and change properties.
For 11.10:
You need to edit /etc/lightdm/unity-greeter.conf (
sudo nano /etc/lightdm/unity-greeter.conf
). In that file you have to replace value of BACKGROUND tag.For ref check the below screen shot.
The main answer doesn't work for me, as I'm not using unity-greeter. My lightdm is configured to use lightdm-gtk-greeter.
I found a solution by looking through the lightdm source code. It queries DBus to find the BackgroundFile property for the user. You can change this by using the d-feet program (or command-line tools).
Navigate to this point on d-feet:
Double click the "SetBackgroundFile" function. In the window that opens, type your desired wallpaper filename (with double quotes around it). Click the Execute button. If all is well, you'll see a message like, "This function didn't return anything".
The next time lightdm runs, it should have the new wallpaper that you selected.
All versions
1) Download Ubuntu Tweak:
Download for Ubuntu 12.04 Precise Pangolin
Download for Ubuntu 11.10 Oneiric Ocelot
Download for other Ubuntu
If you use 12.04 Precise: to change the login wallpaper just change your desktop wallpaper, with Ubuntu Tweak you can change only the logo.
If you use 11.10 Oneiric you can use Ubuntu Tweak to change the login wallpaper and logo.
2) Open the downloaded package and install it
3) Launch Ubuntu Tweak.
Go to Tweaks > Login Settings. Click Unlock and click on the image you want to change.
If you use 12.04 Precise: to change the login wallpaper just change your desktop wallpaper, with Ubuntu Tweak you can change the logo.
This is a workaround for 12.04 and the current version of unity-greeter (the default "theme"). For other greeters like lightdm-gtk-greeter, the usual editing of the conf file in
/etc/lightdm/
works. But unity-greeter no longer looks at unity-greeter.conf, and it's unclear how to configure it.What I did is this: I found the image that unity-greeter insists on using. For me, it was in
/usr/share/backgrounds
. Move/delete/rename it. Now unity-greeter will fallback to the default background which is/usr/share/backgrounds/warty-final-ubuntu.png
. Move/delete/rename that. Now you need to put another image at that location with that name. And no, it doesn't have to be a png (in fact, warty-final-ubuntu.png is actually a jpg for reasons I won't go into here). I believe the replacement must be a jpg (someone correct me if I'm wrong). Be very careful here. I think if lightdm can't fallback to the default background, something horrible might happen :-/ (maybe it'll only show a colored background... anyway be careful!).In my case, I just made a symlink from another background in that location:
run this command while you are in
/usr/share/backgrounds/
(or adjust command accordingly). Of course, replace the jpg with whatever is available and desired.Keep in mind that if you are going to use a background in your home, you need to make sure your home is not encrypted, as lightdm will not be able to read that file until you login. Also make sure you have the right permissions on the file. If you don't know what any of this means, stick with a wallpaper that's already in
/usr/share/backgrounds/
. (Random tip: you can get more wallpapers from earlier versions of Ubuntu installed properly in that directory bysudo apt-get install ubuntu-wallpapers-oneiric
, replace 'oneiric' with 'natty', etc.)