Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,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 2.00 / 5
  You rated: 2 / 5 (5 votes cast)
 
[21,368 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 whoever posted them. This site is not responsible for what they say.
Much more than just command line...
Authored by: Anonymous on Aug 24, '02 11:40:23PM
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: Anonymous on Aug 25, '02 02:21:42AM

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 Aug 25, '02 10:53:25AM

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 Aug 29, '02 10:44:45AM

Doesn't seem to work in Jaguar



[ Reply to This | # ]
Much more than just command line...
Authored by: adriaant on Aug 29, '02 10:12:40PM

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 Oct 17, '02 02:22:17PM

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 Oct 27, '02 03:51:04PM

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 Dec 08, '03 07:30:25PM

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 Aug 25, '02 10:58:19AM

And so it shall be...

-rob.



[ Reply to This | # ]