Creating a screenshot from a terminal, using standard UNIX tools.
xwd | convert xwd:- filename.png
When you invoke xwd(1), it changes the cursor so you can select a window. The contents of the image are by default written to standard output.
The output is piped to the convert(1) program from the ImageMagick suite. The first argument tells convert to expect an X Window Dump format image on standard input. The second argument tells it where and in which format to save the picture.
The gimp also has the possibility to grab screenshots. It offers more choice in what to grab and how to process it, see the screenshot window below.