more linux basics – the sleep timer

I dig somafm, particularly the Groove Salad station. Sometimes I get into a nice chilled state of mind at night and would love to fall asleep to some cool grooves, but don’t want XMMS (my mp3 player) to run all night long. Well, I can do this easily in a terminal shell by first finding the pid of XMMS and then using the sleep command. Elegance in simplicity.

michael@orion:~$ ps ax | grep xmms
29540 ?        SLl    0:20 /usr/bin/xmms /tmp/groovesalad.pls
30511 pts/0    R+     0:00 grep xmms
michael@orion:~$ sleep 1200; kill 29540

One thought on “more linux basics – the sleep timer

  1. Could you use this:

    michael@orion:~$ sleep 1200; killall -HUP xmms

    and avoid looking up the process number?

Comments are closed.