Changing wallpaper using keyboard shortcut in XFCE.

Step 1. Create an image list (backdrop) in desktop settings.







Step 2.  Create a script with following contents.

IMAGE_PATH=`xfconf-query -c xfce4-desktop -p ${PROPERTY}`
xfconf-query -c xfce4-desktop -p ${PROPERTY} -s “”
xfconf-query -c xfce4-desktop -p ${PROPERTY} -s “${IMAGE_PATH}”

Step 3. Add a desktop entry to /home/user/.config/autostart with the contents below. Desktop entry has  a .desktop extension.By doing this you’ll get your wallpaper changed every time you log in.

[Desktop Entry]
Name=Rotate bg
Exec=/scriptPath &

Step 4. Execute the following command from terminal.

xfconf-query -c xfce4-keyboard-shortcuts -p /commands/custom/”<Alt>r” -n -t string -s /scriptPath

substitute scriptPath with path to the script you created in step 2. This will make the script execute on pressing the key combination. In this case alt-r


About aman

Another computer science and engineering student. I have been living in mountains of Himachal Pradesh(India) since my childhood. Just like anyone else I have also dabbled with many programming technologies just to find out that Java Programming Language is the one. In this blog I'll be writing about my experience with Java technologies and will be sharing what I have learned.
This entry was posted in Linux. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

Note: If you are replying to another commenter, click the "Reply to {NAME} ↵" button under their comment!