grim(1) General Commands Manual grim(1)

# [NAME](#NAME)

grim - grab images from a Wayland compositor

# [SYNOPSIS](#SYNOPSIS)

**grim** \[options...] \[output-file]

# [DESCRIPTION](#DESCRIPTION)

grim is a command-line utility to take screenshots of Wayland desktops. For now it requires support for the screencopy protocol to work. Support for the xdg-output protocol is optional, but improves fractional scaling support.

grim will write an image to *output-file*, or to a timestamped file name in **$GRIM\_DEFAULT\_DIR** if not specified. If **$GRIM\_DEFAULT\_DIR** is not set, it falls back first to **$XDG\_PICTURES\_DIR** and then to the current working directory. If *output-file* is **-**, grim will write the image to the standard output instead.

# [OPTIONS](#OPTIONS)

**-h**

Show help message and quit.

**-s** &lt;factor&gt;

Set the output image's scale factor to *factor*. By default, the scale factor is set to the highest of all outputs.

**-g** "&lt;x&gt;,&lt;y&gt; &lt;width&gt;x&lt;height&gt;"

Set the region to capture, in layout coordinates.

If set to **-**, read the region from the standard input instead.

**-t** &lt;type&gt;

Set the output image's file format to *type*. By default, the filetype is set to **png**, valid values are **png**, **jpeg** or **ppm**.

**-q** &lt;quality&gt;

Set the output jpeg's filetype compression rate to *quality*. By default, the jpeg quality is **80**, valid values are between 0-100.

**-l** &lt;level&gt;

Set the output PNG's filetype compression level to *level*. By default, the PNG compression level is 6 on a scale from 0 to 9. Level 9 gives the highest compression ratio, but may be slow; level 1 gives a lower compression ratio, but is faster. Level 0 does no compression at all, and produces very large files; it can be useful when grim is used in a pipeline with other commands.

**-o** &lt;output&gt;

Set the output name to capture.

**-c**

Include cursors in the screenshot.

**-T** &lt;identifier&gt;

Set the identifier of a foreign toplevel handle to capture.

# [AUTHORS](#AUTHORS)

Maintained by Simon Ser &lt;contact@emersion.fr&gt;, who is assisted by other open-source contributors. For more information about grim development, see &lt;https://gitlab.freedesktop.org/emersion/grim&gt;.

2026-09-01

---

Document: grim(1) from grim 1.5.0-r2 (Chainguard OS)
Source: https://gitlab.freedesktop.org/emersion/grim
