Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Taking screen shot of current OS X or iTerm terminal window

In Linux, I'm using imagemagick import -window $WINDOWID to take a screencapture of the terminal.

Is there something similar in OS X?

like image 514
Ilia Choly Avatar asked Aug 14 '13 20:08

Ilia Choly


People also ask

How do I take a snapshot of my computer screen?

Most Android devices should be able to take screen grabs by holding down the power and volume down buttons, though holding the power and home buttons (if your device has a physical button) may also work. Several Android devices have a screenshot button in the pull-down shade.

How do you copy a snip on a Mac?

Press Command-Control-Shift-3 to copy the whole screen. The screenshot will be automatically saved to the clipboard. Select the application where you want to insert the captured image, like Word, Skype, or Outlook. Press Command-V to paste the screenshot.

How do you take a screenshot on a Macbook?

Hold down the power button and press the volume-down button.


1 Answers

You want to be using screencapture rather than import, which only works on X11 windows.

If the window is in front, you can try:

screencapture -l$(osascript -e 'tell app "Terminal" to id of window 1') test.png

See this question for some more background.

like image 138
Nicholas Riley Avatar answered Sep 25 '22 17:09

Nicholas Riley