[PLUG] Xplanet - Gnome

Sean Whitney sean at fork.com
Thu Nov 21 19:32:33 UTC 2002


I'm running debian-unstable with gnome2.

For a while I was running kde2 and really enjoyed the xplanet as a 
background.  Now that I have gnome2 working again, I borrowed some code, did 
a little reading and hacked this little shell script together.  I run it out 
of cron every five minutes and it works great.

But, I am trying to figure out if there is someway to detect that 

a) I am logged in 
b) I am running gnome2

or alternatively run this with some kewl gnome2 app, so that it will
only run when I am logged in and running gnome2.  I want the cron job to
start and if I'm not logged in stop right there.  If I am logged in and 
running gnome2 it should continue.

BTW, if anyone's interested I also rewrote this script to run under gnome 
using

xsetbg, instead of gnome2

Sean


#!/bin/sh
rm /tmp/xplanet-*.jpg;
FNAME=xplanet-`date +%s`.jpg &&

find /home/sean/.xplanet -name clouds_2000.jpg -cmin +180 -exec rm {} \;
cd ~/.xplanet

if  ! [ -f clouds_2000.jpg ]; then
	wget -np -nd http://xplanet.dyndns.org/clouds/clouds_2000.jpg 
	xplanet -image earth.jpg -cloud_image clouds_2000.jpg  -shade 100 -output 
day-clouds.jpg -geometry 1600x1200 
	xplanet -image night.jpg -cloud_image clouds_2000.jpg    -cloud_shade 30 
-output night-clouds.jpg -geometry 1600x1200
fi
nice -n19 xplanet -mapdir ~/.xplanet/ -image day-clouds.jpg -night_image 
night-clouds.jpg -blend -output /tmp/$FNAME -geometry 1600x1200 -proj 
rectangular  &&
gconftool-2 -t string -s /desktop/gnome/background/picture_filename 
/tmp/$FNAME 




More information about the PLUG mailing list