Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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:

share|improve this question

4 Answers 4

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!

share|improve this answer
    
Not sure, but lightDM isn't Unity-specific, so I don't see how that should affect LightDM. –  titaniumtux Apr 12 '12 at 15:38
    
well he did tag it unity-greeter but it's not obvious in his question if he's using the default set up, I guess we'll await an update! –  Jorge Castro Apr 12 '12 at 15:40
    
i am using gnome shell 3.4 if that helps –  tr3quart1sta Apr 12 '12 at 15:48
    
Did you remove Unity completely? You may want to install the Unity-greeter package if you need it to handle LightDM correctly. I'm running Ubuntu 12.04 with Gnome Shell 3.4 but I didn't remove Unity (I just don't use Unity) and the trick I posted did work for me. –  titaniumtux Apr 12 '12 at 15:58
1  
i didnt remove unity. unity-greeter is still installed. –  tr3quart1sta Apr 12 '12 at 16:10

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.

share|improve this answer

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!

share|improve this answer

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: http://askubuntu.com/a/121594/43660 It turns out you need to be the 'lightdm' user for those settings to take.

share|improve this answer
    
Well done, I am attaching a bounty to the linked original so we can update it, please submit this as an answer! askubuntu.com/questions/64001/… –  Jorge Castro Apr 12 '12 at 16:52
    
And then we'll just combine the two questions, nice catch on this one! –  Jorge Castro Apr 12 '12 at 16:54
    
@JorgeCastro Sadly, the gsettings command doesn't work for me. I haven't read all the way through that thread yet... maybe there's a solution in there still. –  Chan-Ho Suh Apr 12 '12 at 17:06
    
@Chan-HoSuh I'm working on getting you some testers, we'll get to the bottom of this! –  Jorge Castro Apr 12 '12 at 17:12
1  
didnt work for me either –  tr3quart1sta Apr 12 '12 at 17:22

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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