|
|
#1 |
|
Prospect
Join Date: Mar 2008
Posts: 24
|
Screencapture Command and Multiple Monitors
I need to totally automate a screencapture command for each screen attached to a Mac Pro, running either Snow Leopard or Lion. This would happen hourly, saving each file to the Sites directory, for viewing online (e.g. MONITOR1 -> ~/Sites/monitor1.png, MONITOR2 -> ~/Sites/monitor2.png).
This is literally the task, so I can't unfortunately include human intervention/interaction in the process. I know how to write the script to do most of this, except I don't know how to specify a monitor, or otherwise get an image of every attached screen. Can the monitor by specified in the command? Can I tell it to capture all screens to separate files? Thanks. |
|
|
|
|
|
#2 |
|
MVP
Join Date: Apr 2008
Location: Berkeley CA USA
Posts: 1,016
|
I gather that you've already looked at man screencapture, which admits right up front that the command is not very well documented. It does mention that it takes as arguments a list of files to write the screen images to, one per monitor.
I can only surmise that you simply provide as many filenames as you have monitors. You probably already know how many monitors you have; if not you can query the output from system_profiler, as in: system_profiler SPDisplaysDataType | grep "Online: Yes" | wc -l Unfortunately, I have only one monitor, and can't test what happens with multiple monitors. If you only want some of the monitors captured, you may have to just capture them all and then throw away the ones you don't want. You're opening a huge security hole when you do this. There's no telling what sensitive information will get captured by screencapture, and you're blabbing it to the entire web over Web Sharing. Do not imagine for a moment that "no one will look because no one will know to look." That's what's known as "security through obscurity", a stratagem that has been repeatedly demonstrated to be woefully inadequate. |
|
|
|
|
|
#3 | |||||||||||||||||||||||
|
League Commissioner
Join Date: Aug 2006
Posts: 5,071
|
Yes, this works for dual monitors. |
|||||||||||||||||||||||
|
|
|
|
|
#4 |
|
Prospect
Join Date: Mar 2008
Posts: 24
|
Thanks, ganbustein!
Security isn't a consideration in this case. |
|
|
|
|
|
#5 | |||||||||||||||||||
|
Moderator
Join Date: Jun 2003
Location: Boulder, CO USA
Posts: 19,560
|
Those are famous last words. Security is always a consideration unless your computer is on display in the cellar with the lights gone out, the stairs gone out, in the bottom of a locked filing cabinet stuck in a disused lavoratory with a sign on the door saying "Beware of The Leopard". (my apologies to the spirit of Douglas Adams) Trevor
__________________
How to ask questions the smart way |
|||||||||||||||||||
|
|
|
|
|
#6 |
|
Prospect
Join Date: Mar 2008
Posts: 24
|
We don't always have the luxury of dictating these things, trevor. I have to deal with the questions that arrive at my desk, even if they're usually the wrong ones. I do my best, but this place is as sophisticated as Diebold.
C'est la vie, unfortunately. |
|
|
|
|
|
#7 |
|
MVP
Join Date: Apr 2008
Location: Berkeley CA USA
Posts: 1,016
|
Then get a liability waiver signed by the guy who stamped "Security is not a consideration" on the question that fell on your desk. Make it as scary sounding as you can, but make it very clear that security consequences are present, that he has been so advised, and that when the **** hits the fan he's volunteered to have it all land on him.
CYA, man. CYA! |
|
|
|
![]() |
| Tags |
| automation, bash, screencapture, terminal |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|