Pick of the Week - Nov 10 [Show all picks]
Path Finder 5 - A feature-laden Finder replacement
Submit Hint Search The Forums LinksStatsPollsFAQHeadlinesRSS
12,000 hints and counting!

Take screenshots from the command line UNIX
There is a new utility in Jaguar which allows you to take screenshot with a Terminal command. The command is /usr/sbin/screencapture. Just type screencapture and hit "enter" in the Terminal for a list of options.

    •    
  • Currently 0.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (0 votes cast)
 
[11,236 views]  

Take screenshots from the command line | 9 comments | Create New Account
Click here to return to the 'Take screenshots from the command line' hint
The following comments are owned by whomever posted them. This site is not responsible for what they say.
Much more than just command line...
Authored by: bbum on Sat, Aug 24 2002 at 11:40PM PDT
See this brief article for a full description of all of the changes to the screen capture features in OS X. All of the command line features are available without using the command line!

[ Reply to This | # ]
Much more than just command line...
Authored by: Jacco Rens on Sun, Aug 25 2002 at 2:21AM PDT
but how do we change de default format (PDF) in to something else?

[ Reply to This | # ]
Much more than just command line...
Authored by: dim ben on Sun, Aug 25 2002 at 10:53AM PDT
I found this tip in a newsgroup:

"You can change the screenshot format with the string

< defaults write NSGlobalDomain AppleScreenShotFormat JPEG >

in the Terminal. Log-out, re log-in required to change the format."

But I didn't try it out (don't have 10.2. yet). I assume you can use TIFF or PICT, too.

[ Reply to This | # ]
Much more than just command line...
Authored by: batmanppc on Thu, Aug 29 2002 at 10:44AM PDT
Doesn't seem to work in Jaguar

[ Reply to This | # ]
Much more than just command line...
Authored by: adriaant on Thu, Aug 29 2002 at 10:12PM PDT
I did a "screencapture -w -W -i ~/Desktop/capture.jpg" (note the .jpg extension) and a capture of my selected window was saved as a JPG.



[ Reply to This | # ]
Much more than just command line...
Authored by: hombre on Thu, Oct 17 2002 at 2:22PM PDT
When I tried "screencapture -w -W -i ~/Desktop/capture.jpg", I got a pdf file with a .jpg extension, i.e., it was not viewable until I changed the extension to pdf.

[ Reply to This | # ]
Much more than just command line...
Authored by: rocteur on Sun, Oct 27 2002 at 3:51PM PST
And this does not work, you have to rename it to .pdf to view it..

Anyone had any luck changing the format..

[ Reply to This | # ]
Much more than just command line...
Authored by: father2a-f on Mon, Dec 8 2003 at 7:30PM PST

Try this (only works in 10.3, though):

$ screencapture -S /tmp/screengrab.pdf ; sips -s format png /tmp/screengrab.pdf --out /tmp/screengrab.png

You can change the format type to tiff or jpeg, as well (e.g., ... format jpeg ... screengrab.jpg). sips may have other formats it supports, but I haven't tried but these. Type sips --help for more info.



[ Reply to This | # ]
Seems worthy of a tip of its own...
Authored by: robg on Sun, Aug 25 2002 at 10:58AM PDT
And so it shall be...

-rob.

[ Reply to This | # ]