Changing background programatically

dsyates dsyates at mindspring.com
Thu Jan 20 14:54:12 CET 2005


On 18/01/05 17:16:59, Brian J. Tarricone wrote:
> 
>>Alberto Manuel Brandao Simoes wrote:
>>
>>
>>>I would like to have a way to change the background of xfce using  
>>>another program.
>>
>>There's a post about this that I made some time ago; I'm not sure if it  
>>was on xfce4-dev or xfce.  Please search the archives.  The short summary  
>>is that you want to create a backdrop list, and put just the single  
>>backdrop in it that you want.  Then change backdrops by using a script to  
>>modify the backdrop list file, and then run 'xfdesktop -reload'.  Note  
>>that the list file *must* have the comment on the first line, otherwise  
>>it won't be recognised as a backdrop list.
> 
> 
> FWIW, I was involved in that thread, so you could search for my name/ 
> address. :)
> 
> Cheers,
> Andrew

For what it is worth here, is the script I use to get xplanet and xfce 
to get along:




#!/bin/bash
#xplanet-xfce.sh shell script v0.2
#shows Earth on your xfce desktop with current lighting conditions,i.e. 
day and night

DELAY=20m

PREFIX=/home/norris/pics/wallpapers/
OUTPUT=xplanet.png
#don't forget to create a background list for the directory in the xfce 
display settings

GEOMETRY=1280x1024
LONGITUDE=-82
LATITUDE=34
#default is no projection,i.e. render a globe
#rectangular is the flat world map. also try ancient, azimuthal, 
mercator,..
#PROJECTION=rectangular

if [ -z $PROJECTION ]; then
xplanet -num_times 1 -output "$PREFIX$OUTPUT" -geometry $GEOMETRY 
-longitude $LONGITUDE -latitude $LATITUDE
else
xplanet -num_times 1 -output "$PREFIX$OUTPUT" -geometry $GEOMETRY 
-longitude $LONGITUDE -latitude $LATITUDE -projection $PROJECTION
fi

xfdesktop -reload
sleep $DELAY
exec $0





-- 
David S. Yates
http://lottalinuxlinks.com
http://lottalinuxlinks.com/cgi-bin/blosxom.cgi/



More information about the Xfce mailing list