as u can easily google out “killall -USR1 xfdesktop” works as charm for changing the desktop bg from the list of images (set in the desktop settings wizard. so here’s what i did-
1. set as desktop context menu – put this in a new custom action of thunar
Name: Set as Desktop
Command: echo ‘# xfce backdrop list\n%f’>$HOME/.config/xfce4/desktop/backdrops.list;killall -USR1 xfdesktop
File pattern: *
Appears if selection contains: Image Files
Note: u can also put it into mirage custom actions – if u use mirage as ur image viewer. btw, mirage is a very light weight decent image viewer much better than eog etc…
2. script for choosing random wallpaper in xfce: this script was actually written for gnome by someone else (David Loschavio, Steven Ingelgem). I modified it for xfce.
# script: change_backgrounds.sh – bash version
# version 2007.3.7
# description: randomly replace gnome background with one from a directory
# credits: David Loschiavo [http://www.djlosch.com], Steven Van Ingelgem, Sudhanshu [http://home.iitk.ac.in/~sudhansh]
# license: GPL
# change bg_path to ur wallpapers folder. the subfolders are automatically added.
extensions=”jpg png gif jpeg JPG GIF PNG”
rm -f $temp_bg_list
for extension in $extensions
find $bg_path -iregex “.*.$extension” “$temp_bg_list”
cnt=`wc -l “$temp_bg_list” | cut -f1 -d” “`
all_bgs=`echo \`expr $RANDOM % $cnt\“
selected_bg=`head -n$all_bgs “$temp_bg_list” | tail -n1`
echo “Changed desktop to: $selected_bg”
# use the follwing command if u want the script for gnome.
#gconftool-2 -t string -s /desktop/gnome/background/picture_filename “$selected_bg”
echo -e “# xfce backdrop list\n$selected_bg”>$HOME/.config/xfce4/desktop/backdrops.list
killall -USR1 xfdesktop
so just copy this into a bash executable file (say .ranbg.sh). make the file executable (chmod a+x .ranbg.sh) and run it whenever u need to get a new wallpaper. u can put it in ur sttartup applications to get a new wallpaper on every logon.