scrot(1)
β¨ scrot(1) β command line screen capture utility β¨
okay bestie, welcome to the scrot manual page, aka scrot(1) in the command line screen capture utility section. buckle up, it's giving very useful π
πΈ NAME πΈ
scrot β command line screen capture utility. that's it, that's the name. iconic.
π SYNOPSIS π
scrot [-bcfhimopuvz] [-a X,Y,W,H] [-C NAME] [-D DISPLAY] [-d SEC] [-e CMD]
[-k OPT] [-l STYLE] [-M NUM] [-n OPTS] [-q NUM] [-s OPTS] [-t % | WxH]
[-w NUM] [[-F] FILE]
like look at her. all those flags. main character energy fr fr π«Ά
π DESCRIPTION π
scrot (aka SCReenshOT, yes it's an acronym, we love a clever girlie) is a simple command line screen capture utility, and she uses imlib2 to grab and save images.
bestie, scrot has so many useful features, not me listing them all:
- support for multiple image formats: JPG, PNG, GIF, and others.
- the screenshot's quality is configurable. yes you can tune it. slay.
- it is possible to capture a specific window or a rectangular area on the screen. obsessed.
because scrot is a command line utility, it can easily be scripted and put to novel uses. for instance, scrot can be used to monitor an X server in absence. lowkey a whole security camera situation.
scrot is free software under the MIT-feh license. periodt.
β¨ OPTIONS β¨
every single one, no skips, we don't do that here π
-a,--autoselect X,Y,W,Hβ non-interactively choose a rectangle starting at positionX,Yand ofWbyHresolution. no mouse drama, just coordinates.-b,--borderβ when selecting a window, grab the WM's border too. use with-sto raise the focus of the window.-C,--class NAMEβNAMEis a window class name. associative with-k.-c,--countβ display a countdown when used with-d. dramatic tension β¨-D,--display DISPLAYβDISPLAYis the display to use; seeX(7).-d,--delay [b]SECβ waitSECseconds before taking a shot. when given thebprefix, e.g-d b8, the delay will be applied before selection.-e,--exec CMDβ executeCMDon the saved image. chef's kiss automation π-F,--file FILEβ specify the output file. ifFILEis-,scrotwill output the image to stdout. the filename is expanded according to the format specified in SPECIAL STRINGS. the output file may be specified through the-Foption, or as a non-option argument.-f,--freezeβ freeze the screen when-sis used. time stop moment π§-h,--helpβ display help and exit. we love a helpful queen.-i,--ignorekeyboardβ don't exit for keyboard input.ESCstill exits. so you can type but not escape, the duality.-k,--stack[=OPT]β capture stack/overlapped windows and join them. a running Composite Manager is needed for it to work correctly.OPTis optional join letter:v/h(vertical/horizontal). default:h.-l,--line STYLEβSTYLEindicates the style of the line when the-soption is used; see SELECTION STYLE.-M,--monitor NUMβ capture Xrandr monitor numberNUM.-m,--multidispβ for multiple heads, screenshot all of them in order. all of them?? all of them π-o,--overwriteβ by defaultscrotdoes not overwrite the outputFILE, use this option to enable it.-p,--pointerβ capture the mouse pointer.-q,--quality NUMβNUMmust be within[1, 100]. a higher value represents better quality image and a lower value represents worse quality image. effect of this flag depends on the file format, see COMPRESSION QUALITY section. default:75.-s,--select[=OPTS]β interactively select a window or rectangle with the mouse, use the arrow keys to resize. see the-land-foptions.OPTSit's optional; see SELECTION MODE.-t,--thumb % | WxHβ also generate a thumbnail. the argument represents the thumbnail's resolution: if the argument is a single number, it is a percentage of the full size screenshot's resolution; if it is 2 numbers separated by an"x"character, it is a resolution. if one of the resolution's dimensions is0, it is replaced by a number that maintains the full size screenshot's aspect ratio. examples:10,25,320x240,500x200,100x0,0x480.-u,--focused,--focussedβ use the currently focused window. (two spellings, she contains multitudes)-v,--versionβ output version information and exit.-w,--window WIDβ window identifier to capture.WIDmust be a valid identifier (seexwininfo(1)).-Z,--compression LVLβ compression level to use,LVLmust be within[0, 9]. higher level compression provides lower file size at the cost of slower encoding/saving speed. effect of this flag depends on the file format, see COMPRESSION QUALITY section. default:7.-z,--silentβ prevent beeping. shhh π€«--format FMTβ specify the output file format. e.g"--format png". if no format is specified,scrotwill use the file extension to determine the format. if filename does not have an extension either, thenPNGwill be used as fallback.--list-options[=OPT]β list all program options. if argument is"tsv"it outputs a TAB separated list intended for scripts. default is"human".
β οΈ note that the tsv format is not stable and may change in the future. so if you script against it, bestie, be aware she's a shapeshifter π
π¦ SPECIAL STRINGS π¦
-e, -F and FILE parameters can take format specifiers that are expanded by scrot when encountered. there are two types of format specifier: characters preceded by a '%' are interpreted by strftime(3). the second kind are internal to scrot and are prefixed by '$'. the following specifiers are recognised by scrot:
$$ A literal '$'.
$a The system's hostname.
$F The output file format.
$f The image's path (may be relative, ignored when used in the filename).
$h The image's height.
$m The thumbnail's path (may be relative, ignored when used in the filename).
$n The image's basename (ignored when used in the filename).
$p The image's pixel size.
$s The image's size in bytes (ignored when used in the filename).
$t The image's file format (ignored when used in the filename).
$w The image's width.
$W The name of the window (only for --select, --focused and --window).
\n A literal newline (ignored when used in the filename).
example:
$ scrot '%Y-%m-%d_$wx$h.png' -e 'du -h $f'
this would create a PNG file with a name similar to 2000-10-30_2560x1024.png and show the disk-usage with du(1). cute AND informative π
π₯ SELECTION MODE π₯
when using -s, optionally you can indicate the action to perform with the selection area. some actions allow optional parameters too.
capture Capture the selection area, this action is by default and
does not need to be specified.
hole Highlight the selected area overshadowing the rest of the capture.
hide,IMAGE Hide the selection area by drawing an area of color (or image) over it.
Optionally indicate name of the image to use as cover.
Image has priority over color.
blur,AMOUNT Blurs the selection area.
Optionally you can specify the amount of blur.
Amount must be within [1, 30]. Default: 18.
in modes 'hole' and 'hide' the color of the area is indicated by 'color' property of the line style and the opacity of the color (or image) is indicated by property 'opacity', SELECTION STYLE.
if the 'hide' mode uses an image that does not have an alpha channel, the opacity parameter will be ignored and it will be drawn fully opaque. no cap.
examples:
$ scrot --select=hide
$ scrot -shole --line color="Dark Salmon",opacity=200
$ scrot -sblur,10
$ scrot -shide,stamp.png --line opacity=120
π SELECTION STYLE π
when using -s, you can indicate the style of the line with -l.
-l takes a comma-separated list of specifiers as argument:
style=STYLE STYLE is either "solid" or "dash" without quotes.
width=NUM NUM is a pixel count within [1, 8].
color="COLOR" Color is a hexadecimal HTML color code or the name of
a color. HTML color codes are composed of a pound
sign '#' followed by a sequence of 3 2-digit
hexadecimal numbers which represent red, green, and
blue respectively. Examples: #FF0000 (red), #E0FFFF
(light cyan), #000000 (black).
opacity=NUM NUM is within [0, 255]. 255 means 100% opaque, 0 means
100% transparent. For the opacity of the line, this is only
effective if the compositor supports _NET_WM_WINDOW_OPACITY.
mode=MODE MODE can be "auto", "edge" or "classic" without quotes.
edge is the new selection, classic uses the old one.
"auto" uses "edge" if -f flag isn't active, "classic"
otherwise. "edge" ignores the style specifier, "classic"
ignores the opacity specifier.
without the -l option, a default style is used:
mode=auto,style=solid,opacity=100
the default width is automatically derived from the display DPI. she knows what she's doing β¨
example:
$ scrot -l style=dash,width=3,color="red" -s
π COMPRESSION QUALITY π
- for lossless formats (e.g
PNG), the quality options is ignored. - for lossy formats where the quality and compression are tied together (e.g
JPEG), compression will be ignored. - and for image formats where quality and compression can be independently set (e.g
WebP,JXL), both flags are respected.
like ok versatile π
π EXAMPLES π
following are a couple examples of using scrot with other utilities.
copying screenshot to clipboard using xclip(1):
$ scrot - | xclip -selection clipboard -target image/png
taking a screenshot and optimizing its size with optipng(1):
$ scrot -e 'optipng -o4 $f'
selecting a window by PID with xdo(1):
$ scrot -w $(xdo id -p PID)
taking a screenshot and annotating it with ImageMagick(1):
$ scrot - | magick - -pointsize 64 -gravity North -annotate +16+16 'hello, world!' out.png
π AUTHOR π
scrot was originally developed by Tom Gilbert.
currently, source code is maintained by volunteers. newer versions are available at https://github.com/resurrecting-open-source-projects/scrot
π«Ά SEE ALSO π«Ά
ImageMagick(1) optipng(1) xclip(1) xdo(1) xwininfo(1)
and that's the whole page bestie, no crumbs left π this manual was brought to you by scrot-2.0.0, dated 13 Mar 2026, living in the scrot(1) section of the manual. go take some screenshots, you absolute icon π
β¨
π¦ where this page comes from
- alpine 3.24: scrot-doc 2.0.0-r0 Β· MIT
- arch rolling: scrot 2.0.0-1 Β· MIT
- ubuntu stonking: scrot 2.0.0-1 Β· MIT-feh
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms