[ltp] How to catch close lid event?

Pascal Wittmann linux-thinkpad@linux-thinkpad.org
Fri, 30 Jan 2009 17:01:03 +0100


Daniel Castro wrote:
> Hello!
>
> Anyone knows how can I catbutton/lidch the lid close and open events?
>
> I have a T61 (widescreen), running Ubuntu 8.10. I would like to run 
> some scripts whenever I close and open the lid.
>
> Any help is much appreciated.
>
> Thanks!
>
> -- 
> ________________________
>
> Daniel Castro, M.Sc.
> +353 083-318-2058
> dancasmo@gmail.com <mailto:dancasmo@gmail.com>
> castromd@tcd.ie <mailto:castromd@tcd.ie>
> ________________________
you can catch this event with thinkpad-acpi with the event button/lid.

an example for /etc/acpi/event/lid:
event=button/lid
action=/etc/acpi/action/lid.sh