I've been using elementary os for the last half a year and now I have installed the latest Ubuntu on my system. On elementary os, I was using this command to change the desktop background:
gsettings set org.gnome.desktop.background picture-uri file:///path_to_image
However, this command does not seem to do anything in Ubuntu. I can change the background by choosing a different image in the Appearance menu but I need to change the background from a script and hence the need for a working command.
When running the above command in a terminal no error is produced. If I run the gsetting get command, it returns the background image it always had, as if nothing happened. It totally ignores my set command. The images I tried this command on are the same images in the /usr/share/backgrounds images that are provided by default. Also, I changed the permissions of the entire background folder (and its contents) to be readable and writable to everyone to no avail.
I tried logging out and back in to see if it produces any changes to the background but nothing happens and even if it did, I wouldn't like to re-login every time the background changes…
Doing an online search yielded no results.
Thank you for your time!