I want to trigger a security camera script whenever the desktop is locked. I assume that I will work at the desk when the screen is not locked.
I actually ran
ps -ef| grep userid > before
ps -ef| grep userid > after
from the console and noticed that there is a process called:
kdesktop_lock which will only run when it is locked.
I like your idea better though. I will look into it.