I want to know how I can detect whether the system is going to a standby mode in Linux using C. I found a message called WM_POWERBROADCAST
in windows for that purpose, which sends this message before going to the sleep mode.
Is there any alternatives in C, for Linux?
I heard that DBus can be used for same purpose, could somebody explain it more?