Secretly capture screenshots on my Mac?
When I used to work on a Linux system, there was a utility we had that would let me take screen captures every 30 seconds while my computer was otherwise unattended, as a way to see if anyone else was using it or not. I liked it. Now I'd like to do the same on my Mac system. Possible?
Well, Mr. Bond, it sounds like some good spy software for a computer in the SMERSH offices, but perhaps that's not your intention. Still, it opens up a bit of a can of worms if you are letting others use your computer while you're running any sort of spyware or monitoring software that actually tracks and stores their action.
That's not exactly what you're asking me, but it's not hard to subvert the script I'll share for that purpose. Then again, guns don't kill people, bullets do. Um. Nevermind.
Anyway, yes, if you are willing to write a short shell script that you'd run in Mac's Terminal application, it's quite doable.
The key is a program called screencapture.
To see how to use it, you can simply type its name into Terminal directly with "--help":
$ screencapture --help usage: screencapture [-icMPmwsWxSCUtoa] [files] -c force screen capture to go to the clipboard -C capture the cursor as well as the screen. only in non-interactive modes -d display errors to the user graphically -i capture screen interactively, by selection or window control key - causes screen shot to go to clipboard space key - toggle between mouse selection and window selection modes escape key - cancels interactive screen shot -m only capture the main monitor, undefined if -i is set -M screen capture output will go to a new Mail message -o in window capture mode, do not capture the shadow of the window -P screen capture output will open in Preview -s only allow mouse selection mode -S in window capture mode, capture the screen not the window -tThat's a lot of data to absorb. The key flags are "-tfmt" to specify the output format and "-x" to disable the screen capture sound. You can add a time delay, but we'll do that with a looping structure in the shell itself so that it's reinvoked every "n" seconds.
Kind of like this:
while true ; do sleep 30 screencapture -tpng -x capture.$(date +%F-%T).png done
There are more graceful ways to come up with an incrementing filename, but we're just using date and time so that a typical resultant filename might be capture.2012-04-15-16:24:25.png.
Want to take a screen cap every 15 second or five minutes? Just change the sleep variable.
To use this, simply type the above into the Terminal -- I recommend moving into a new subdirectory first so that the screencaps don't take over the Desktop -- then minimize the Terminal window and walk away. As long as they don't kill the shell, it'll diligently keep taking a screen capture every "n" seconds until you either run out of disk space (not good) or kill it.
Done capturing? Just open up the Terminal window again and press Ctrl-C.
Now, use this wisely and appropriately, please.
More Useful Mac OS X Help Articles:
✔ Audacity can't find LAME library, I can't save Mp3?
Hey Dave. I read your article Audacity can't save mp3 audio files and am still puzzled because I downloaded the LAME Mp3 converter...✔ How to remove Dashboard as a "space" in Mac OS X Spaces?
I'm a big fan of the Spaces utility in Mac OS X that lets me have multiple virtual screens [see Set Up Mac...✔ Best place to buy a cheap MacBook laptop?
Hi Dave. I am looking for two gently used MacBook laptops for my teen daughters. Personal computers would greatly facilitate their studies as...✔ File too big error copying to USB flash drive on my Mac?
I'm baffled. I have a 16GB Kingston USB flash drive that I use on my Mac system and I'm trying to copy a...✔ Stealth image capture photo from webcam on my Mac?
Someone sneaks into my cubicle while I'm at lunch and takes candy out of my desk. Petty, but stupid too. I want to...
Let's stay in touch!
Sign up for my weekly AskDaveTaylor Newsletter and you'll receive even more tech and gadget help right to your inbox, along with exclusive news and industry updates. It's good stuff. I promise!
I do have a comment, now that you mention it!
Check This Out Too...
Look for Answers
All Our Categories
Apple iPad Help
Articles and Reviews
Auctions and Online Shopping
Blogs and Blogging
Building Web Site Traffic
Business and Management
Computer and Internet Basics
d) None of the Above
Google Gmail Help
Google Plus Help
Industry News and Trade Shows
iPhone and Cell Phone Help
iPod, Sony PSP and MP3 Player Help
Kindle Fire Help
Mac OS X Help
Pay Per Click (PPC) Advertising
Search Engine Optimization (SEO)
Shell Script Programming
Tech Support Video Help
The Writing Business
Twitter, LinkedIn and Social Network Help
Unix and Linux Help
Video Game Tips and Help
Windows PC Help
Find Me on Google+
ADT on G+