I'd like to set up my laptop so that if a wrong password is entered when the screen is locked, a picture is taken using the laptop's webcam. I examined
xlock (from xlockmore package), but there is no option to run a customized action when a wrong password is entered.
There is a similar question on SuperUser, but only targets Windows: Taking a picture after entering wrong password.
(For those who like funny cat photos: My laptop is set up to take a picture after 3 incorrect password attempts.)