Home > manjaro > set the desktop wallpaper under Xfce4

set the desktop wallpaper under Xfce4

You use the Xfce4 desktop environment (e.g. with Manjaro), and you want to change the desktop wallpaper from the command line.

Get the path of the current wallpaper:

$ xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitorLVDS-0/workspace0/last-image
/trash/wallpapers/hd_wallpapers_forbackground_2015.jpg  # sample output

Set the wallpaper to a new background image:

$ xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitorLVDS-0/workspace0/last-image -s PATH_OF_NEW_IMAGE

Where PATH_OF_NEW_IMAGE is the absolute path of the image you want to set (to avoid problems, use absolute paths).

Xfce properties
(This paragraph is based on this post). How to list Xfce channels and their properties:

for channel in $(xfconf-query -l | grep -e '^\s'); do echo "Channel: $channel"; xfconf-query -c $channel -l; echo ''; done

This will give you a full listing of all the properties of each channel. You can query the value of a property this way:

xfconf-query -c <channel> -p <property>

Update (20150731)
I wanted to use this method on another machine of mine and it turned out that the property to be set is called differently! If I want to set the background, instead of /backdrop/screen0/monitorLVDS-0/workspace0/last-image I had to set /backdrop/screen0/monitorDVI-I-2/workspace0/last-image. Great :( So here is my updated method:

First, query all properties that end with “last-image“:

$ xfconf-query -c xfce4-desktop -l | grep "last-image$"

Sample output on my machine:


Then set the value of each of these properties to the absolute path of the background image.

Categories: manjaro Tags: , ,
  1. February 5, 2016 at 01:22

    I don’t know if you are still using this, but I used your examples and came up with a BASH script that will save the channels, properties, and their values to a file. Here it is if you are interested. The first do loop just lists your example to a file, the second loop adds the values:


    cp /dev/null channel-list.txt
    cp /dev/null channel-prop.txt

    for channel in $(xfconf-query -l | grep -e ‘^\s’);
    echo “Channel: $channel” >> channel-list.txt
    xfconf-query -c $channel -l >> channel-list.txt
    echo ” >> channel-list.txt

    for channel in $(xfconf-query -l | grep -e ‘^\s’)
    echo “Channel: $channel” >> channel-prop.txt
    for property in $(xfconf-query -c $channel -l)
    echo -n ” $property: ” >> channel-prop.txt
    echo `xfconf-query -c $channel -p $property ` >> channel-prop.txt

  1. No trackbacks yet.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: