11

How can I change my desktop background from command line?

Isaiah
  • 58,486
  • 28
  • 133
  • 145
Wolfy
  • 7,790
  • 12
  • 35
  • 43
  • See the thread [Changin desktop background from the command line](http://ubuntuforums.org/archive/index.php/t-346375.html). – N.N. Jun 22 '11 at 12:18
  • 2
    possible duplicate of [How to change desktop background from command line in Unity?](http://askubuntu.com/questions/66914/how-to-change-desktop-background-from-command-line-in-unity) – Aditya Nov 22 '13 at 10:11

1 Answers1

11

Edit: In later versions of Ubuntu (this question was written in 2011, after all), things moved to gsettings. See: How to change desktop background from command line in Unity?


It's a gconf setting: /desktop/gnome/background/picture_filename. You can set its value by running the following:

gconftool-2 -t string -s /desktop/gnome/background/picture_filename <path>

Obviously, replace <path> with a full path to the background image you want to display.

If you want to see what else is available from a nice GUI, run:

gconf-editor /desktop/gnome/background/
Oli
  • 289,791
  • 117
  • 680
  • 835
  • 2
    I did this with gconf-editor but nothing changed. I'm assuming it will when I restart things, but I'd rather not have to close everything to try out a new background. Is there a way to get it to refresh immediately? – MalcolmOcean Feb 27 '13 at 01:18