Set wallpaper from terminal in xfce4 on linux mint

I want to set the wallpaper from terminal on a Linux 18.1 with xfce4:

I've tried setting it using xfconf-query:

xfconf-query \
  --channel xfce4-desktop  \
  --property /backdrop/screen0/monitor0/image-path \
  --set /usr/share/backgrounds/xfce/xfce-teal.jpg

Indeed, when I later query the same setting with:

xfconf-query \
  --channel xfce4-desktop  \
  --property /backdrop/screen0/monitor0/image-path

it returns the string:

/usr/share/backgrounds/xfce/xfce-teal.jpg

However, this setting seems to have no bearing on anything, the visible wallpaper stays the same. How do I change the actual background from terminal? Thanks.

Additional information:

$ xfconf-query --version
xfconf-query 4.12.0

Solution 1:

The correct setting can be found out using the -m flag (short for --monitor). First, start xfconf-query in monitoring mode:

$ xfconf-query -c xfce4-desktop -m 
Start monitoring channel "xfce4-desktop":

set: /backdrop/screen0/monitor1/workspace0/last-image
set: /backdrop/screen0/monitor1/workspace0/last-image
set: /backdrop/screen0/monitor1/workspace0/last-image
set: /backdrop/screen0/monitor1/workspace0/last-image
set: /backdrop/screen0/monitor1/workspace0/last-image

When you then go into the GUI and change the background there, the console application will print lines starting with set:, which show which properties have been changed.

Now, using

$ xfconf-query  \
  --channel xfce4-desktop \
  --property /backdrop/screen0/monitor1/workspace0/last-image \
  --set /usr/share/backgrounds/xfce/xfce-blue.jpg

you can set the wallpaper from terminal.