Is there anyway that we can detect when the system/screen gets locked and notify some event to trigger in Ubuntu ?
相关问题
- how to define constructor for Python's new Nam
- streaming md5sum of contents of a large remote tar
- How to get the background from multiple images by
- Evil ctypes hack in python
- Correctly parse PDF paragraphs with Python
There is a possibility to be notified when the screen becomes locked/unlocked with DBus, this is reference on GnomeScreensaver showing the basics of it.
I am not DBus expert, but there are bindings for python, so you can listen for DBus events in python. Combinig the two, you should be able to get what you want:-).
Here is a python-dbus programming tutorial on wikibooks.