Skip to Main Content
Linux Desktop Hacks
book

Linux Desktop Hacks

by Nicholas Petreley, Jono Bacon
March 2005
Beginner to intermediate content levelBeginner to intermediate
342 pages
15h 55m
English
O'Reilly Media, Inc.
Content preview from Linux Desktop Hacks
Take a Screenshot from the Command Line #12
Chapter 2, Console
|
41
HACK
command uses the import utility that is part of the ImageMagick suite of
tools (use your package manager to install ImageMagick if it isn’t already on
your system) to take a screenshot of the root window (the root window is the
entire screen) and name the image screen.png. If you want to grab a particu-
lar part of the screen, you also can use the
crop option to grab that specific
area (such as
import –crop 500x400). And if you run import without window
your cursor will change to a crosshair, which you can drag over the area you
want to capture. For many print and digital media houses, PNG is a recom-
mended screenshot format, but ImageMagick supports a range of different
formats, so you can use what you need. Read the
import manpage for more
information.
Take a Screenshot from a Command-Line Terminal
If you need to take a screenshot from a command-line console while X is
running elsewhere on the system, adjust the command line and add a few
additional features to it. This method is commonly used when you need a
screenshot of an installation routine or a program running on an embedded
device. To do this, first access the shell that runs behind the installer by
pressing Ctrl-Alt-F2; this provides you with a simple shell in which you can
run the commands to grab the shot. If you are planning on using this hack
while installing a
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Linux Server Hacks, Volume Two

Linux Server Hacks, Volume Two

William von Hagen, Brian K. Jones
Introducing Linux Distros

Introducing Linux Distros

Jose Dieguez Castro

Publisher Resources

ISBN: 0596009119Supplemental ContentCatalog PageErrata