Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
 

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: problem with xplanet scripts, made some scripts that  bug each other< Next Oldest | Next Newest >
Patrick Offline





Group: Members
Posts: 333
Joined: Sep. 2004
Posted: Sep. 26 2005,08:55 QUOTE

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
Back to top
Profile PM WEB 
Patrick Offline





Group: Members
Posts: 333
Joined: Sep. 2004
Posted: Sep. 26 2005,13:17 QUOTE

I changed some in my scripts and now it seems to be working better! (strange how everything becomes much clearer when you write it down)

changed scripts:

#!/bin/bash
myvar=0
until [ $myvar -eq -1]
do
sudo killall -9 xplanet
sudo killall -9 xplanet
sudo killall -9 xplanethur
sudo killall -9 xplanetmoon
sudo killall -9 sleep
sudo killall -9 sleep
sudo wget http://giga.forfun.net/clouds_2048.jpg
sudo wget http://www.wizabit.eclipse.co.uk/xplanet/files/local/storm
sudo cp /home/dsl/storm /home/dsl/.xplanet/markers
xplanet -num_times 1 -longitude 5 -latitude 51 -date `date +%G%m%d.%H%M%S` -range 100 -radius 100 -marker_file=/home/dsl/.xplanet/markers/storm &
sleep 6000
myvar=$(( $myvar + 1 ))
done

#!/bin/bash
myvar=0
until [ $myvar -eq -1]
do
sudo killall -9 xplanet
sudo killall -9 xplanet
sudo killall -9 xplanetearth
sudo killall -9 xplanetmoon
sudo killall -9 sleep
sudo killall -9 sleep
sudo wget http://giga.forfun.net/clouds_2048.jpg
sudo wget http://www.wizabit.eclipse.co.uk/xplanet/files/local/storm
sudo cp /home/dsl/storm /home/dsl/.xplanet/markers
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 -marker_file=/home/dsl/.xplanet/markers/storm &
sleep 6000
myvar=$(( $myvar + 1 ))
done

#!/bin/bash
sido killall -9 xplanet
sudo killall -9 xplanetearth
sudo killall -9 xplanethur
sudo killall -9 sleep
sudo killall -9 sleep
sudo rm /home/dsl/clouds_2048.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



bit overkill with all the killall sleep commands but better save than sorry..

(works great so far, added an extra marker for huricane info on screen)


--------------
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
Back to top
Profile PM WEB 
1 replies since Sep. 26 2005,08:55 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

 
reply to topic new topic new poll
Quick Reply: problem with xplanet scripts

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code