LinuxCommandLibrary

gnome-screenshot

Capture screen images

TLDR

Take a screenshot and save it to the default location, normally ~/Pictures

$ gnome-screenshot
copy

Take a screenshot and save it to the named file location
$ gnome-screenshot [[-f|--file]] [path/to/file]
copy

Take a screenshot and save it to the clipboard
$ gnome-screenshot [[-c|--clipboard]]
copy

Take a screenshot after the specified number of seconds
$ gnome-screenshot [[-d|--delay]] [5]
copy

Launch the GNOME Screenshot GUI
$ gnome-screenshot [[-i|--interactive]]
copy

Take a screenshot of the current window and save it to the specified file location
$ gnome-screenshot [[-w|--window]] [[-f|--file]] [path/to/file]
copy

Take a screenshot after the specified number of seconds and save it to the clipboard
$ gnome-screenshot [[-d|--delay]] [10] [[-c|--clipboard]]
copy

Display version
$ gnome-screenshot --version
copy

SYNOPSIS

gnome-screenshot [OPTION…]

PARAMETERS

-h, --help
    Show help message and exit

--version
    Display release version

-w, --window
    Capture current window instead of desktop

-a, --area
    Interactively select area with mouse

-b, --background, --root
    Capture root window (desktop background)

-B, --include-border
    Include window border (default)

-e, --exclude-border
    Exclude window border from capture

-f, --file=FILENAME
    Save directly to file (mutually exclusive with --clipboard)

-d, --delay=SECONDS
    Delay capture by seconds; screen blinks

-c, --clipboard
    Copy image to clipboard (mutually exclusive with --file)

-p, --png
    Save as PNG format (default)

DESCRIPTION

The gnome-screenshot command is a utility for capturing screenshots in the GNOME desktop environment. It allows users to grab the entire desktop, a specific window, a selected area, or the background/root window. By default, it captures the full screen and displays a dialog for saving or copying the image.

Key features include customizable delays before capture, direct saving to a file, copying to the clipboard, and options for including or excluding window borders. Images are saved as PNG by default. It blinks the screen to indicate capture and integrates seamlessly with GNOME's desktop.

This tool is ideal for quick screenshots via terminal or scripts, supporting automation with options like --delay for timed shots or --area for interactive selection. It's lightweight and relies on the X11 display server, making it a staple for GNOME users on traditional X sessions.

CAVEATS

Best on X11; limited Wayland support via portals. --file and --clipboard are exclusive. Interactive modes like --area may require mouse input.

EXAMPLES

Full screen: gnome-screenshot
Window: gnome-screenshot -w
Area after 3s delay to file: gnome-screenshot -a -d 3 -f shot.png
Clipboard: gnome-screenshot -w -c

HISTORY

Introduced in early GNOME 2.x (circa 2002) as part of gnome-utils. Evolved into standalone gnome-screenshot package. Maintained through GNOME 40+, with portals added for Wayland compatibility.

SEE ALSO

scrot(1), grim(1), import(1)

Copied to clipboard