I have no /etc/lightdm/unity-greeter.conf
file. but there is /etc/lightdm/lightdm.conf
and /etc/lightdm/users.conf
but there isn't a background=path/to/image line in either of those files.
Related:
I have no /etc/lightdm/unity-greeter.conf
file. but there is /etc/lightdm/lightdm.conf
and /etc/lightdm/users.conf
but there isn't a background=path/to/image line in either of those files.
Related:
In Ubuntu 12.04, your lightDM background is automatically set to your background image in session as long as your background image is in the /usr/share/backgrounds/
folder. If your background image is not in that folder, you can copy it there via sudo cp /location/of/image/here.png /usr/share/backgrounds/
, then add it to your background images in the Appearance Settings and set it as your background image. Now when you log out, you should see your background image as your lightDM background!
GNOME's dconf
editor has a quick and easy GUI way to fix this (same directions as the gsettings
answer already given).
Navigate to com.canonical.unity-greeter
and change the background field to the path of the image you want.
I created a script that would let me define if the grid is to be displayed in the unity-greeter, whether the background image is to be gotten dynamically from the user (that does not work for me, but other posts suggested, that the image must fit the screen dimensions for it to work) and you can define the background image to be displayed (if you do not use the dynamic background image):
#!/bin/bash
GRID=$1
DYNAMIC_BG=$2
BG_IMAGE=$3
usage ()
{
echo "Usage: ConfigureUnityGreeter <draw grid> <draw user bg> <bg image>" >&2
echo " <draw grid> : true or false" >&2
echo " <draw user bg>: true or false" >&2
echo " <bg image> : full path to image file" >&2
}
if [ -z "$GRID" ]
then
usage
else
if [ "$GRID" != "true" -a "$GRID" != "false" ]
then
echo "Grid parameter must be 'true' or 'false'!\n" >&2
usage
fi
fi
if [ -z "$DYNAMIC_BG" ]
then
usage
else
if [ "$DYNAMIC_BG" != "true" -a "$DYNAMIC_BG" != "false" ]
then
echo "User background parameter must be 'true' or 'false'!\n" >&2
usage
fi
fi
if [ "$DYNAMIC_BG" == "false" ]
then
BG_IMAGE_CMD="set"
if [ -z "$BG_IMAGE" ]
then
echo "Missing background image file name." >&2
usage
fi
else
BG_IMAGE_CMD="reset"
if [ -n "$BG_IMAGE" ]
then
echo "Background image file name ignored!" >&2
BG_IMAGE=""
fi
fi
sudo xhost +SI:localuser:lightdm
sudo su lightdm -s /bin/bash <<EOF
set -x
gsettings set com.canonical.unity-greeter draw-grid $GRID
gsettings set com.canonical.unity-greeter draw-user-backgrounds $DYNAMIC_BG
gsettings $BG_IMAGE_CMD com.canonical.unity-greeter background $BG_IMAGE
exit
EOF
Feel free to use to your liking!
In 12.04, unity-greeter no longer uses /etc/lightdm/unity-greeter.conf
. It took me hours to figure this out... luckily I found this link on the Ubuntu forums (see post #6). Now the greeter uses gsettings
for configuration. Now my question is (but perhaps I should post this as a new question)... how am I supposed to use gsettings to configure unity-greeter?
In post #173 on page 19 of that thread above, someone suggests
gsettings set com.canonical.unity-greeter background '/path/to/wallpaper.jpg'
but the above doesn't work (at least for me). Maybe someone more familiar with gsettings can shed some light here.
Update: Here's how to configure unity-greeter in 12.04: https://askubuntu.com/a/121594/43660 It turns out you need to be the 'lightdm' user for those settings to take.