> From: "logan browne"
Hi logan,
> I was just wondering if anyone had a good hack to run a script when apm
> suspends (say when the battery goes dead or I close the lid on the laptop).
> I have a script so that I can keep X from getting corrupted (thanks to mr.
> rader), but if it happens autmatically I still need my X session to be
> stable. Any ideas?
Oh, yea, *very* good point, I crash xwindows by letting my
battery get too low now and again... so now I use the magic
you request:
apmd -s "chvt 1" -r "sleep 2; chvt 7"
Try it by hand and if it's right, then change apmd invocation
in your apmd startup script (/etc/rc.d/init.d/apmd.init under
RedHat, at least.)
Horray! Now the ever-so-cool Fn+CoffeeCup keystroke works on
my Micron XKE! =:) =:)
And note: this is a better kludge. If you do this, you should
no longer use my ol' suspend-x script because apmd has taken
over responsibility for changing virtual terminals. Just use
"sudo apm --suspend" or somesuch.
Thanks logan: good questions are often better than good answers!
later
steve
- - -
systems guy
wiscnet.net