How do I change the wallpaper in GNOME 3 via a script?

Solution 1:

Gnome3 uses dconf instead of gconf to background and wallpaper issues. The tool to modify dconf is gsettings and it can be done by the following way:

gsettings set org.gnome.desktop.background picture-uri "file:///home/user/background.jpg"