I am trying to set my background using setbg with the following command xsetbg -fullscreen Libraries/Pictures/Pictures/1998_Chicago/565462-R10-04-21.jpg

When I do, nothing happens and the return code is 0. The file and path are valid.

I found this link


and tried the command

gsettings set org.gnome.settings-daemon.plugins.background active true

mentioned in the thread but it did not help. I have the latest mate-settings-daemon so that wasn't the issue. Any ideas?


1 Answer 1


Your gsettings code is not customized to Mate or your window manager. That's why it fails. I am going to guess an answer here, you tell me if it works

$ gsettings set org.mate.background picture-filename '/path/to/image/file/whatever.png'

Only change the last part. The full path is required. Note how the location of the config is different than your example for gnome.

Why this might not be correct, but it gets you in the vicinity of correct.

I don't think saying you use Mate is enough detail to be sure what to do. We need also to be sure what your "window manager" program is and whether or not it is managing desktop backgrounds. This is a replace-able thing, not a permanent characteristic of a desktop environment. (how to replace it: https://www.maketecheasier.com/replace-mate-window-manager-with-openbox)

I've done this in compiz (http://pj.freefaculty.org/blog/?p=285) by interacting with gsettings (various desktops). Also have written perl code to set XFCE4 backgrounds with commands that interact with xfconf.

The place where you are most likely hitting trouble is in the "magic words" for the background. The compiz gsettings code is different than the gsettings code for a different gnome-based desktop. Even if you know the magic words, you may need to tell the window manager to pay attention to gsettings. When I did this by sending messages to dbus in 2011 or so, the results were good, but in newer compiz it was necessary to change over to gsettings. And, if you look at my compiz code, you see that you don't get this done with one gsettings call, at least when talking to compiz, you send a few.

According to the Arch docs on Mate (https://wiki.archlinux.org/index.php/MATE), the default window manager is marco, and it does have a gsettings back end. That's why I'm hopeful I have the right answer for you.

  • That didn't work but the link auto provided at the top did give me a method that did. gsettings set org.gnome.desktop.background picture-uri 'file:///home/JohnDoe/Pictures/cool_wallpaper.jpg'
    – jpezz
    Oct 6, 2017 at 20:03
  • 1
    Ah different magic words. Indicates your window manager is not the standard marco, I think. Glad you found answer.
    – pauljohn32
    Oct 6, 2017 at 21:58

Not the answer you're looking for? Browse other questions tagged or ask your own question.