I am looking into using DBus to catch power events on Linux such as sleep, hibernate and wakeup using PrepareForSleep() and PrepareForShutdown() signals. I have two main requirements:
The approach must work for systems that have GUI or are purely console based
Work for both Linux desktop and...