Roland's homepage

My random knot in the Web

Creating a screenshot in X11

Creating a screenshot from a terminal, using standard UNIX tools.

Command-line 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.

Gimp

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.

Gimp screenshot window

For comments, please send me an e-mail.


Related articles


←  My e-mail setup Opening vim in a new terminal  →