I am using Ubuntu 14.04 and want to add a security feature to my system. From this question, I came to know how to take picture when an incorrect password entered in login screen, using the following script,
#!/bin/bash ts=`date +%s` ffmpeg -f video4linux2 -s vga -i /dev/video0 -vframes 3 /tmp/vid-$ts.%01d.jpg exit 0 #important - has to exit with status 0
After making it executable, I am able to take pictures from my webcam with this script.
I have some confidential PDF documents which are password protected. Now I want to do the same thing again. I want to take picture, if someone attempts to open those files with incorrect password. How to do that?