Programmatically changing wallpaper

Maximilien Noal noal.maximilien at gmail.com
Tue May 29 19:42:30 CEST 2012


On 05/29/2012 05:06 PM, brian wrote:
> My wife has about a gazillion photos which she likes to use as her
> wallpaper, and she also like them to change every few minutes,
> selecting pictures randomly. At the moment, she insists on using KDE
> and Plasma because that desktop can handle her pictures, as above.
>
> I can't find any way to randomly change from a defined list of
> wallpapers in XFCE. Am I missing something? If not, does anyone know
> where XFCE keeps the details of the current wallpaper? I can easily
> write a program in FreePascal to do the changing if I knew where to
> set the name of the file. I've tried doing a grep from / downwards on
> my PC looking for a file containing the name of the wallpaper that I
> currently use, but there were no matches.
>
> Anyone have any ideas?
Hello,

You can use xfconf in your script for that.

Something like :
xfconf-query -c xfce4-desktop -p "/backdrop/screen0/monitor0/image-path" 
-s "someimagepath"
xfconf-query -c xfce4-desktop -p 
"/backdrop/screen0/monitor0/image-style" -s "0"
(0 for "auto", 1 for "centered", etc.)

Actually, there is an application written in zenity/bash/python that is 
very much alike what you describe, here :
http://www.batraciens.net/divers/xl-wallpaper.deb

Source page:
http://forum.xubuntu-fr.org/viewtopic.php?pid=9246311#p9246311

(It's not mine, and there is a lot of comments in the code in french, 
but you can still see the code for yourself in the .deb file with an 
archive manager, like file-roller)

There is indeed something like this in Xfce 4.10 in xfdesktop, but 
without the random part.


More information about the Xfce mailing list