| Patrick  
 
  
 
 
 Group: Members
 Posts: 333
 Joined: Sep. 2004
 | 
|  | Posted: Sep. 26 2005,08:55 |  |  These litle scripts i made to change my background (X). I call them with a keymapping (for instance ALT-1, ALT-2, etc..) whenever i feel like a different background. Generally what happens is: i fire up xplanet to show Europe with clouds or America with clouds or the moon with constellations.
 
 Here are the 3 scripts:
 
 #!/bin/bash
 myvar=0
 sudo killall -9 xplanethur &
 sudo killall -9 xplanetmoon &
 until [ $myvar -eq -1]
 do
 wget -c http://xplanet.dyndns.org.nyud.net:8090/clouds/clouds_2048.jpg &
 xplanet -num_times 1 -longitude 5 -latitude 51 -date `date +%G%m%d.%H%M%S` -range 100 -radius 100 &
 sleep 6000
 rm ~/clouds*.*
 myvar=$(( $myvar + 1 ))
 done
 
 #!/bin/bash
 myvar=0
 sudo killall -9 xplanetearth &
 sudo killall -9 xplanetmoon &
 until [ $myvar -eq -1]
 do
 wget -c http://xplanet.dyndns.org.nyud.net:8090/clouds/clouds_2048.jpg
 xplanet -num_times 1 -long -89.29 -lat 26.32 -date `date +%G%m%d.%H%M%S` -radius 148 -label -marker_file=/home/dsl/.xplanet/markers/earth &
 sleep 6000
 rm ~/clouds*.*
 myvar=$(( $myvar + 1 ))
 done
 
 #!/bin/bash
 killall -9 xplanetearth &
 killall -9 xplanethur &
 rm ~/clouds*.jpg &
 xplanet -rotate 350 -marker_file constellations -gmtlabel -arc_file constellations -longitude 5 -latitude 51 -date `date +%G%m%d.%H%M%S` -body moon -radius 10 -range 10 -origin earth
 
 The work fine but sometimes when i have been switching backgrounds a lot i suddenly (without requesting it) get an other background from an other script.
 
 
 I want to know what i am doing wrong. I look a lot with "top" at the processes that remain active whenever i killall the scripts that should end and notice a lot of "sleep 6000" remaining active (untill the die by them self, the can't be killed)
 
 
 
   
 --------------
 Usb-stick sandisk cruzer titanium 512 Mb:
 DSL 2.3 (final)
 Firefox (Mozilla 1.06)
 WM -biff  -cdplay -clockmon -smixer -usic -top -net -biff -ifinfo -cpuload
 gps vnc LinNeighborhood (samba) QtParted bdc
 xawtv imagemagick xplanet
 |