Taking a screenshot (within X)

The most commonly used Linux application for taking screen-shots is called scrot

You can install it with for Debian:

sudo apt-get install scrot

Or for Arch:

sudo pacman -S scrot

A screenshot is taken by typing:

scrot output-file.png

If you want to bind scrot to the print screen key then that will need to be controlled by your window manager.


I found a great answer to this question here, it is worth repeating.

This can be achieved with ImageMagick. Install by running the command

sudo apt-get install imagemagick

To grab all desktop just type

import -window root screen.png

Or you can do it with a delay of 5 seconds

sleep 5; import -window root screen.png