Although the suggestion below is far from "waterproof", it offers at least some "first-line" precautions against changing the wallpaper too easily.
You could make a small script to run in the background that checks every x seconds if the current wallpaper is still the wallpaper that you set in the first place.
The command to see (get) what is the current wallpaper:
gsettings get org.gnome.desktop.background picture-uri
If you run this in a terminal, you will get an output looking like:
We can make the script restore the original wallpaper if it has changed.
To set a specific wallpaper, the command is:
gsettings set org.gnome.desktop.background picture-uri 'file:///home/jacob/Thema/Bureaublad4/Frog.jpg'
If we use these two in a python script, we could get the following (python3, 14.04):
set_wallpaper = "file:///home/jacob/Thema/Bureaublad4/Frog.jpg"
cmd2 = "gsettings set org.gnome.desktop.background picture-uri "+set_wallpaper
cmd1 = "gsettings get org.gnome.desktop.background picture-uri"
curr_wallpaper = subprocess.check_output(["/bin/bash", "-c", cmd1]).decode("utf-8").strip()
if curr_wallpaper == "'"+set_wallpaper+"'":
subprocess.Popen(["/bin/bash", "-c", cmd2])
The only difference for 12.04 is the shebang: 12.04 does not come with python3 by default, so the shebang should be:
How to use
copy the script into an empty file. Change the wallpaper line (after
set_wallpaper =) into the path to your wallpaper image (starting with
file://, like in the example). Save it as
run it by the command:
If all works as you wish, add it to your startup applications: Dash > "Startup Applications" > "Add"