View Full Version : setting gnome desktop background from command line

21st June 2007, 03:14 PM
Hello all,

I can see there are several interesting topics in the forums with the recent release of f7. After searching on Google and the forums, I've encountered a few topics to this question but no replies to it. So, here is my question for this topic:

How does one setup a desktop background in gnome using the command line interface?

I'm writing a script that will change the desktop background each day. Any help would be appreciated.


21st June 2007, 03:23 PM
Well, I just found a way to set the background via a command line and it works. Here it is

gconftool-2 --type string --set /desktop/gnome/background/picture_filename /path/to/image.jpg

This works for the script that I'm writing. The only thing left to test is whether this will work from a cron job. I will post whether I'm successful with the cron or not. :)

24th December 2014, 07:59 PM
Due to gnome now being gnome3, gconftool-2 does not work anymore, instead this does:

dbus-launch gsettings set org.gnome.desktop.background picture-uri file:///home/<user>/Pictures/<some_really_cool>.svg

I'd imagine a cronjob would work - but don't plan on testing/trying.