3

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

1 Answer 1

3

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .