In a background Python script I need to detect, when the system just woke up from suspend. What is a good way that does not rely on a root script but rather on python modules such as DBus?
I'm new to dbus so I could really use some example code. From what I read it's related to
org.freedesktop.UPower /org/freedesktop/UPower org.freedesktop.UPower.Resuming
Can anyone help me out with some code that connects the resuming signal to callback?
Here is some example code that answers my question:
See the dbus-python tutorial.
The login1 interface provides the signal now. Here is the modified code: