[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

How to send a function when the laptop Lid is closed ?(acpi)



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,..


There is special file in /proc/acpi that changed it state when the lid
is closed :

/proc/acpi/button/lid/LID (on my acer 5102wlmi).


so if i close the lid it will :

(lid open) cat /proc/acpi/button/lid/LID/state
state:      open
(lid closed) cat /proc/acpi/button/lid/LID/state
state:      closed

I would like to do a spesific event when it happen (start a timer then
hibernate-disk).


the question is how ?


i tried creating the next file in /etc/acpi/event :


/etc/acpi/events# cat ./lid
event=button[/]lid
action=touch /tmp/lidfilename


Debian testing

- --
- --
Could you at least use man ?
    Jabka Atu (aka mha13/Mashrom Head) || bsh83.blogspot.com
- --
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQIVAwUBR1vTUm9p6JnF9I1qAQIxqA//Qk7Br4rVaEFw6LDLpqbnDqUsjPFHDYYU
WlBISCjxfjCo+AEouN7VIpdcFpRTRYb25j4Vehvsq9x3cyucE2E3fuWXKlUCi0uH
f29cHpG7tpqWrlHvocePod2jgMWwo0nc0Y5TtbzjlI7coWxdz+SQZbgMVQqDT7NE
cLfCTT8Fvl6y+ZPvA5MsJtZg/LYnT5mj3I04JQgXyHtewrhec55lSmUh8hrUoIsu
VPQvVDfQc/55pbiFEUHpUiym8ANnCBnY/id4WrBjh5YEB5iBqmKVAyqKWmKyOl3b
z4mGvpZHjQTSmCrfY6RNJfeY7ngSvHU8X/GFAQjT0F+qNTC7yvRpAMTLdyuTI0BS
+4RzV9F1a/jo9KaH/25EEMBxpgqQ18N7+gYClIIuTy97wXhoHKrE0a2kwNGNuLr6
//9bhmQurx/rBw5LWHzHNaet1sKeQF9Flar3HqWxm9BDKYAij+bPN2lpAiqkOP/l
car9ztzeX9ysc+KAONZ8ZJIcFLiavLyod7N435XFpre1Wwx7yvsRL0KFb9qoKx7q
M4e0527OaXZotsHg1RyElhKtV1he2vBId+HrlenpgopUMtVsILty4EEp4E7KzB1f
txXJy6g0EHdWpESYQqIYiFQnADkGjy0v+YYKO53P7xirnquiN0JR+zCyLpsLeCXC
PPi9rAjYOCs=
=rt3m
-----END PGP SIGNATURE-----



Reply to: