Posts

Showing posts with the label Snapshot

Save photos when entering wrong password in Ubuntu

Step 1 : Installing App to take photo (optional if already exists) For more ways to take picture refer this article . $ sudo apt update $ sudo apt install ffmpeg Step 2 : Create script to save photos $ sudo gedit /usr/local/bin/takepic Paste the following #!/bin/bash filename=`date +%s` ffmpeg -f video4linux2 -s vga -i /dev/video0 -vframes 1 /tmp/$filename.jpg exit 0 Save and close. $ sudo chmod +x /usr/local/bin/takepic Step 3 : Configure PAM  Backup the original file $ sudo cp /etc/pam.d/common-auth /etc/pam.d/common-auth.orginal $ sudo gedit /etc/pam.d/common-auth Update auth    [success=1 default=ignore]    pam_unix.so nullok_secure To auth    [success=2 default=ignore]    pam_unix.so nullok_secure Add the following, next to the updated line auth    [default=ignore]               pam_exec.so seteuid /usr/local/bin/takepic Then save ...

How to take a picture from terminal

Image
 Step 1 : Choose any one of the following software ffmpeg streamer fsm Step 2 : Installation  Install ffmped  $ sudo apt update $ sudo apt install ffmpeg Install streamer $ sudo apt-get install streamer Install fswebcam $ sudo apt-get install fswebcam Step 3 : Sample shot Snapshot using ffmped $ ffmpeg -f video4linux2 -s vga -i /dev/video0 -vframes 3 /tmp/sample.jpg Snapshot using fswebcam $ fswebcam sample.jpg Snapshot using streamer streamer -f jpeg -o sample.jpeg   $ - requires given linux commands to be executed as a regular non-privileged user