I can't seem to find the signal for "Shutdown" in dbus???
–
koogeeNov 25 '12 at 12:33

cannot find it as well, this used to be handled by HALd, but it is obsolete now
–
RaberNov 27 '12 at 7:09

i placed a shell script in /etc/init.d/ and set it to run during shutdown. The script does the work that i wanted to do in python. I would've liked all events handled in a single python program but i'll settle for using different scripts.
–
koogeeNov 27 '12 at 9:13

thanks. its what i was looking for. btw where can you get a list of what these codes mean? e.g. 000000081?
–
koogeeNov 23 '12 at 14:16

Hm no idea honestly, i got those by generating the events and see what the string looked like, you might try to see in the documentation of acpid, which is the daemon sending those strings.
–
LtWorfNov 23 '12 at 14:46

Starting with newer versions of upower, the signal has moved to systemd logind, the new interface is "org.freedesktop.login1.Manager", the new bus name is "org.freedesktop.login1" and the new signal is "PrepareForSleep" with an argument: True for suspending, False for resuming. More info here: serverfault.com/questions/573379/…
–
totaamMar 17 '14 at 4:45