catch hibernate, suspend and login, logout events
Hi
language: c programming os : ubuntu 9.10 I am doing a program in which I want to catch events when system shutdowns, hibernated, suspended, user logged out and when user logged in(gnome and sh in both). I successfully catched shutdown event by placing a sript in runlevel 0 and 6.. But unable to catch hibernate, suspend , login and log out events. I know we can use lastlog to get login records.. but It gives database of login only.. so please tel me how can i catch these signals.. suggest a c program or shell script to do this.. Thank You in advance |
Quote:
http://www.linuxquestions.org/questi...events-800327/ Perhaps you and he could get together, and work with him to write this code. |
The other thread has been closed.
naveen*; Please explain why you are posting the identical message as another member. |
Hi..
First Sorry for posting the same thread here.. The reason is: that naveen is my friend and he is working along with me. Since I didnot get any reply for my question, I asked him to post the same in his blog.. Ok.. sorry again.. Please send the answers.. |
Quote:
Your 'friend' Naveen posted at 6:57, and your post was at 7:22. So you asked your 'friend' to post the same question, BEFORE you did?? And even if it was the other way around, too bad...you don't get an answer within 30 minutes, so you post again?? You and your 'friend', should Google for "linux hibernate event". Things come up that you can look at, one of them is even a shell script. |
All times are GMT -5. The time now is 12:40 AM. |