0How to Take a Screenshot in Linux With the Terminal
scrot -d <seconds_delay> MyScreenshot?.png
First, make sure you have ImageMagic?
installed: type import -version
. To install sudo apt-get install imagemagick
To take a screenshot in the terminal with ImageMagick?
, type the following line into a terminal and then click-and-drag the mouse over a section of the screen:
Beeps may indicate the beginning and end of the screen shot. eog
may be used to view the resulting file.
To capture the entire screen after a delay (so you can open some menus or whatever), type
sleep 10; import -window root MyScreenshot2?.png
to give yourself a 10 second delay before the screenshot begins. The argument -window root
, tells ImageMagick?
to import the "root" window — that is, the entire screen. The last part MyScreenshot2?.png
is the name of your screenshot.
You can also manipulate the screenshot with ImageMagick?
as you take it. For example, the following line will take a screenshot and resize the image to a width of 500 pixels:
import -window root -resize 500 AnotherScreenshot?.png