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.

As the title above suggests I want to add some custom wallpapers (png images I have created myself) to the user/share/backgrounds folder in 12.04. I have completed this task.

Issue : They do NOT appear in the Desktop Appearance for selection ( I am assuming if they did appear here they would be the default background in the LightDM dynamic unity greeter. Only the "contest images" work with unity greeter. I came across the links below which are similar but to not resolve my question

How do I add new wallpapers? (Refers to 11.10 only)

How do I change the wallpaper in LightDM? (SHows only how to turn off Dynamic unity greeter and assign a fixed background for LightDM

After some thought this may also be a permissions issue. The reason for suggesting is that I copied a theme folder using sudo nautilus. The theme did not appear in "Advanced Settings" for selection. To make this theme work in Unity I copied it to ~.themes. I copied the bankgrounds using the same method

share|improve this question
1  
have you got an encrypted /home folder? –  fossfreedom May 2 '12 at 15:35
    
No I don't have any permission restrictions nor an encryped folder –  Kruptein May 2 '12 at 15:41
    
ok - you mentioned IRC... please add your comment to your question as well as what you have discussed on IRC and have tried (but failed). Thanks! –  fossfreedom May 2 '12 at 15:43
    
That's easy I didn't try anything as nobody knew what could possibly be wrong, (I didn't get that much attention and I'm not a fan of spamming) I did however notice that my images all had chmod 700 I changed that to 775 but that didn't solve it –  Kruptein May 2 '12 at 15:48

7 Answers 7

up vote 14 down vote accepted

After you added you images to /usr/share/backgrounds you need to open the Change Desktop Background dialog by right clicking in your desktop and selecting it.

After the dialog is open you can click the + to add the backgrounds you just copied to /usr/share/backgrounds

enter image description here

Add all the images you have in /usr/share/backgrounds, after you have done that you can select one and it will become your background.

If you are using 12.04 that same image will become the dynamic background for the Unity Greeter. If it does not follow the Setting the dynamic switching off section of How do I change the wallpaper in LightDM? except instead of actually switching it off you use the command

gsettings reset com.canonical.unity-greeter draw-user-backgrounds

has described in the answer.

Note to summarise:

  • Step 1: Add you custom wallpaper to `/usr/share/backgrounds

  • Step 2: Is conditional if you want your custom wallpaper to appear in the dynamic unity greeter (log in) in 12.04. Right click on your custom image and select "Properties" then select the Permissions tab. Navigate to the "Other" permission and change it from None to "Read-only". Note: If you don't do this Unity's default wallpaper will appear in Unity Greeter.

  • Step 3: Now you need to open the Change Desktop Background dialog by right clicking on your desktop and selecting it.

  • Step 4: After the dialog is open you can click the + to add the backgrounds you just copied to`/usr/share/backgrounds.

  • Step 5: Select your image to and change your desktop background`

  • Step 6: Log out and see the Unity Greeters background is your custom image

.

share|improve this answer
    
"After the dialog is open you can click the + to add the backgrounds you just copied to /usr/share/backgrounds" This is what I am having the issue with. I hit the +, navigate to user/share/backgrounds, select the custom image and hit "Open" in Nautilus. The image does not appear for selection in the Desktop Appearance dialog –  Stephen Myall Apr 19 '12 at 22:08
    
The answer is the same, if its not working then that is bugged and should be reported as such. –  Bruno Pereira Apr 19 '12 at 22:15
    
Sounds good, I will report it as a bug and see if it resolves it self when I do the Distro upgrade next Thursday. Thanks Bruno –  Stephen Myall Apr 19 '12 at 22:21
    
@StephenMyall did you report a bug? If so, could you post a link to it? I'm having the same issue (using 12.04) - the bug doesn't seem to be resolved yet. –  Koen Oct 8 '12 at 18:38
    
You do not need to have "other" permissions set to "Read and Write" for this to work. Read Only is enough. Setting to Read and Write means that anyone else with access to the system, can easily replace the image file with another. This can result in rather bad and embarrassing conditions, particularly in office settings. –  dobey Jan 30 '13 at 20:36

I can confirm this works!

  1. After copying new *jpg files into the /usr/share/backgrounds/ folder (using root)
  2. Edit the 2 *xml files under /usr/share/gnome-background-properties/

I used gvim editor for 2. above.

Just do these steps using gvim:

  • gvim /usr/share/gnome-background-properties/*xml

  • Shift+G to go to end of file

  • Shift+O to insert above the last line
  • :r !ls

    /usr/share/backgrounds/*jpg → to insert all the new background. filenames

  • Now go to the beginning of inserted block text.

  • Use this command in gvim after : (Replace ^M with CTRL-M )

    :.,$s;\(.*\);^M\t<wallpaper>^M\t<name>paper10</name>^M\t<filename>&</filename> ^M\t<options>zoom</options>^M\t<pcolor>#000000</pcolor>^M\t<scolor>#000000</scol or>^M\t<shade_type>solid</shade_type>^M\t</wallpaper>^M;cg
    

Auto increment numbers (paper10) to give unique names to wallpapers

 :let i=1 | g/>paper/s//\='>paper_'.i/ | let i=i+1

Save the file and repeat for the second XML file.

Newly added backgrounds will now appear in the GUI:

share|improve this answer

There is also another option that will make wallpapers from user's home directory available in lightdm.

You can choose one of two variants:

Variant A.

You just have to run one simple command in terminal:

$ sudo usermod -aG username lightdm

Just replace username with your username. This will grant lightdm access to your home directory, so it will be able to display images from /home/username.

Variant B.

Create new usergroup named, for example, wallpapers:

$ sudo groupadd wallpapers

Then, create a directory in your home directory, where you will store all wallpapers you want to use and change it's group to wallpapers:

$ mkdir '~/My Wallpapers'
$ chgrp wallpapers '~/My Wallpapers'

And finally add group wallpapers as supplementary group for you and lightdm user:

$ sudo usermod -aG wallpapers username
$ sudo usermod -aG wallpapers lightdm

Remember to replace username with your username.

Notice that if you have more than one user using the system and you want to give ability like this for every one of them, you will have to repeat these steps (omitting adding new group - wallpapers) for each individual.

share|improve this answer
    
I tried the second variant, but it does not seem to work in 13.10. –  user138784 Feb 26 at 18:52

I'd written a little perl script to make it easier to add choices to the Change Desktop Background in Ubuntu.

To recreate it you could, for example, use sudo gedit /usr/local/bin/wallpaper-add-to-choices from terminal, paste the contents of the script, save, then sudo chmod 755 /usr/local/bin/wallpaper-add-to-choices.

I found post this because I was searching for info about what might have changed in Ubuntu 12.04LTS. The "options" portion of that script output used to say "scale", I had to change it to "zoom" or none of the images would work as choices. It's a shame, I don't feel like manually resizing the dozens of images imported to a new system to scale them properly. (Scale letterboxed the images, only enlarging the image until any edge hit the edge of the display, zoom means I lose the tops or sides of most images.)

share|improve this answer
2  
This script is short enough that it would be reasonable to include in your answer. Of course, if you do, then people may use the script under the terms of CC-BY-SA 3.0. (They may also use it under any other terms you choose to allow, of course. Which is good, since CC-BY-SA 3.0 is not ideal as a software license.) –  Eliah Kagan Aug 5 '12 at 18:15

I am using 12.04 Gnome Classic desktop. None of the solutions above have helped me to display my wallpapers in /user/share/backgrounds. If I click on + as suggested above, Ubuntu 12.04 opens my Pictures folder and does not add the wallpapers I added to /usr/share/backgrounds. The only way that I have found to do this is to add them to the precise-backgrounds.xml file as new items between the main <wallpaper> </wallpaper> tags. This is really a nuisance if you have a large number to add. I am hoping that someone has a simpler solution.

The only way that I have found to add my wallpaper to my login name in the greeter is to install Ubuntu Tweak and then set it using its options.

share|improve this answer

You have to edit the files in /usr/share/gnome-background-properties in order for them to appear in the 'wallpaper' section rather than the 'picture' section.

share|improve this answer

I had similar issues, I don't know if there is another solution but here is mine.

Copy and paste your wallpaper into usr/share/backgrounds. (Use gksu nautilus)

Right click on your image file and select properties

In the permissions tab make sure "Other" is set to Read or Read Only

Right click on your Wallpaper and set it as your desktop background

Log out and it should appear as Your LightDM paper

I dont know anything about Wallpaper Switcher however if this application can retrive the files from the usr/share/background location, Im sure it will work

share|improve this answer
    
Your answer more or less helped me in finding the problem. it had indeed to do with the permissions thanks :) –  Kruptein May 2 '12 at 15:53

protected by Community Sep 1 at 17:40

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

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