divers alarums

blodgett needs to wake up! so it wrote a scriptee to ensure its occurrence.
http://blodgett.doof.me.uk/real/alarum

once started it naps the computorg until the time given, then uses rtcwake to wake up, and xine to play an audio.

rtcwake needs to be run as root, so blodgett also made sure it could do this without password by adding to sudoers file using visudo the line:
blodgett ALL=(root) NOPASSWD: /usr/sbin/rtcwake

which is to say the user blodgett, on ALL hosts, may do as root, without entering a password, the command rtcwake.

so! now can do e.g.
alarum 0800
or
alarum 10:00 music/monkey.mp3

one other note, blodgett’s computorg is set to screenblank on lid close, not go to sleep! otherwise if set alarm and close lid, computorg will briefly wake up then return to nap before playing song. not good.

edit: alsoalso, it uses suspend-to-memory (sleeping) rather than suspend-to-disk (hibernate), or off, as blodgett’s computorg cannot wake up automatically from these ones. a few computorgs can’t do wake from memory either, so should probably test this before using!

3 Responses to “divers alarums”

  1. cakesniffer says:

    This very useful! Doesn’t wake up on my desktop though but I think suspend has always been borked on it :-(

  2. blodgett says:

    but we waked the shuttle remotely! oh wait, that was from off. maybe one of the other nap options works?

  3. cakesniffer says:

    Mmm, yes, we did! Experimentation required.

Leave a Reply