LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (http://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   how to detect system power event(user trigger),suspend,hibernate,resume...? (http://www.linuxquestions.org/questions/linux-desktop-74/how-to-detect-system-power-event-user-trigger-suspend-hibernate-resume-703817/)

minge.zu 02-11-2009 04:51 AM

how to detect system power event(user trigger),suspend,hibernate,resume...?
 
Hi,everyone
My user space Application wants to know whether and when a user click the hibernate/suspend/logout button.If it happens,My application should do some works to respond these event.how can i do? Is there some reference or source code anywhere? As far as I know,communicating with acpid can just perceive the event that happen when user press the power button(hardware) on the computer.
Thanks:)

KenJackson 02-11-2009 09:19 PM

Check out these:
man acpid
man acpi_listen


All times are GMT -5. The time now is 01:30 PM.