Taking screenshots from the terminal
As GUI applications proliferate, it becomes important to take screenshots, both to document your actions and to report unexpected results. Linux supports several tools for grabbing screenshots.
Getting ready
This section will describe the xwd application and a tool from ImageMagick, which was used in the previous recipe. The xwd application is usually installed with the base GUI. You can install ImageMagick using your package manager.
How to do it...
The xwd program extracts visual information from a window, converts it into X Window Dump format, and prints the data to stdout
. This output can be redirected to a file, and the file can be converted into GIF, PNG, or JPEG format, as shown in the previous recipe.
When xwd is invoked, it changes your cursor to a crosshair. When you move this crosshair to an X Window and click on it, the window is grabbed:
$ xwd >step1.xwd
ImageMagick's import
command supports more options for taking screenshots:
To take a screenshot...