Is it possible to have a script invoked when my PC decides to sleep or when it is put to sleep manually.
What I am trying to do is to have a script that will take down my VPN and the SSH key, when sleep happens. I don't use hibernate these days, otherwise I would have been interested in that event as well.
Is there some sort of setup that can be done to handle a dbus event? Does the power management fire off such events?
Any pointers will be of great help. I would prefer to do it in the normal user land; i.e no root privileges. I am more in bed with KDE than any other DE; but I wouldn't mind a more generic solution that I can take along to any other DE.