How To make your GNOME desktop wallpapers available system-wide

So, you've downloaded from, say, GNOME Art, some nice background images for your GNOME 2.16 desktop, but they are only available to your account: if you use another login, they are nowhere to be found, because they got stored in the home directory of the first account. So you go back to the other login, and look for a way to transfer them to a central, system-wide, location, using super user privileges, but there is no tool to be found which will help you accomplish that.

So, roll up your sleeves and get to work, because you're going to have to do it manually. But it's not terribly difficult.
Note: if there is an easier way, please add it to this article, or mention it in the associated discussion page.

Contents

Location of the system-wide wallpapers

If you have a /usr/share/gnome-background-properties/, then we're in business. Because that's where the central lists of wallpapers are stored. Those lists are XML files which enumerate the wallpapers which are in, say, /usr/share/backgrounds/, or under /usr/share/pixmaps/backgrounds/gnome/ (depending on your distribution). The names of the XML files do not matter, apparently GNOME reads them all, and cares only about whether their content is valid.

The hack

So we're going to add another XML file which will point to all your favorite wallpapers, and put it there with the others, or better yet, in /usr/local/share/gnome-background-properties/ which you create ("sudomkdir ...") (yes, GNOME looks there too, nicely so), this way your work won't get overwritten or removed by a software upgrade, and, if you were later to change distro, you'll have kept it all, provided that you mount /usr/local/ on a separate disk partition (as recommended here).

Editing the XML file

To build the XML file, there's a way to cheat: we're going to grab one just like it in your home directory, the ~/.gnome2/backgrounds.xml, and trim it: we're going to copy it as, say, /usr/local/share/gnome-background-properties/gnome-art.xml and edit it, removing all the items about the system default files, leaving only the ones you downloaded yourself. Each entry in the list starts with <wallpaper> (or <wallpaper deleted="false">) and ends with </wallpaper>; that should be 8 lines or so per picture to edit out. A warning: leave the <wallpapers> and the </wallpapers> alone (notice the s at the end of the word) at the beginning and the end of the file or you'll make it useless.

Next you'll have to adjust the path of all the files mentioned in your list, so find out from your text editor how to change every occurrence of "/home/yourusernamehere/.gnome2/gnome-art/download/backgrounds/" (or wherever they are) to, say, "/usr/local/share/wallpapers/".
Save file, and exit the editor.

The move

Cleaning up

Remove your ~/.gnome2/backgrounds.xml

The new system

You're done! Well, almost. Log out and back in. Now invoke the Desktop Background Change application again, and all your downloaded wallpapers should be visible. Re-select the one you want at the moment.

Log out and back in as another user, and check that it worked. Voilà. Enjoy.

Try to do it all by one script

It would take still a long time to edit backgrounds.xml if you want to make, lets say, all your 100 pictures in (for example) /home/$USER/Pictures/ available as wallpapers for all users. You can try to manage it all by the script:
link script