[ltp] How to catch close lid event?

Richard Neill linux-thinkpad@linux-thinkpad.org
Fri, 30 Jan 2009 16:33:20 +0000


Daniel Castro wrote:
> Hello!
> 
> Anyone knows how can I catch 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.
> 

May I suggest that you trap Fn-F4 instead? I find there are times when I 
want to close the lid without anything happening, eg if I leave it 
playing music, or if on an ext. monitor, or sometimes I want to carry it 
a short distance without suspending and losing network connections.

Regards,

Richard