1scrot(1) command line screen capture utility scrot(1)
2
3
4
6 scrot - command line screen capture utility
7
9 scrot [-bcfhimopuvz] [-a X,Y,W,H] [-C NAME] [-D DISPLAY] [-d SEC] [-e CMD]
10 [-k OPT] [-l STYLE] [-M NUM] [-n OPTS] [-q NUM] [-s OPTS] [-t % | WxH]
11 [-w NUM] [[-F] FILE]
12
13
15 scrot (SCReenshOT) is a simple command line screen capture utility, it
16 uses imlib2 to grab and save images.
17
18 scrot has many useful features:
19
20 • Support for multiple image formats: JPG, PNG, GIF, and oth‐
21 ers.
22
23 • The screenshot's quality is configurable.
24
25 • It is possible to capture a specific window or a rectangular
26 area on the screen.
27
28 Because scrot is a command line utility, it can easily be scripted and
29 put to novel uses. For instance, scrot can be used to monitor an X
30 server in absence.
31
32 scrot is free software under the MIT-advertising license.
33
35 -a, --autoselect X,Y,W,H
36 Non-interactively choose a rectangle starting at position X,Y
37 and of W by H resolution.
38
39 -b, --border
40 When selecting a window, grab the WM's border too. Use with -s
41 to raise the focus of the window.
42
43 -C, --class NAME
44 NAME is a window class name. Associative with -k.
45
46 -c, --count
47 Display a countdown when used with -d.
48
49 -D, --display DISPLAY
50 DISPLAY is the display to use; see X(7).
51
52 -d, --delay [b]SEC
53 Wait SEC seconds before taking a shot. When given the `b` pre‐
54 fix, e.g `-d b8`, the delay will be applied before selection.
55
56 -e, --exec CMD
57 Execute CMD on the saved image.
58
59 -F, --file FILE
60 Specify the output file. If FILE is "-", scrot will output a PNG
61 image to stdout. The filename is expanded according to the for‐
62 mat specified in SPECIAL STRINGS. The output file may be speci‐
63 fied through the -F option, or as a non-option argument.
64
65 -f, --freeze
66 Freeze the screen when -s is used.
67
68 -h, --help
69 Display help and exit.
70
71 -i, --ignorekeyboard
72 Don't exit for keyboard input. ESC still exits.
73
74 -k, --stack[=OPT]
75 Capture stack/overlapped windows and join them. A running Com‐
76 posite Manager is needed. OPT it's optional join letter: v/h
77 (vertical/horizontal). Default: h
78
79 -l, --line STYLE
80 STYLE indicates the style of the line when the -s option is
81 used; see SELECTION STYLE.
82
83 -M, --monitor NUM
84 Capture Xinerama monitor number NUM.
85
86 -m, --multidisp
87 For multiple heads, screenshot all of them in order.
88
89 -n, --note OPTS
90 OPTS is a collection of options which specify notes to bake into
91 the image. See NOTE FORMAT.
92
93 -o, --overwrite
94 By default scrot does not overwrite the output FILE, use this
95 option to enable it.
96
97 -p, --pointer
98 Capture the mouse pointer.
99
100 -q, --quality NUM
101 NUM must be between 1 and 100. For lossless output formats, a
102 higher value represents better but slower compression. For lossy
103 output formats, a higher value represents higher quality and
104 larger file size. Default: 75.
105
106 -s, --select[=OPTS]
107 Interactively select a window or rectangle with the mouse, use
108 the arrow keys to resize. See the -l and -f options. OPTS it's
109 optional; see SELECTION MODE
110
111 -t, --thumb % | WxH
112 Also generate a thumbnail. The argument represents the thumb‐
113 nail's resolution: if the argument is a single number, it is a
114 percentage of the full size screenshot's resolution; if it is 2
115 numbers separated by an "x" character, it is a resolution. If
116 one of the resolution's dimensions is 0, it is replaced by a
117 number that maintains the full size screenshot's aspect ratio.
118 Examples: 10, 25, 320x240, 500x200, 100x0, 0x480.
119
120 -u, --focused
121 Use the currently focused window.
122
123 -v, --version
124 Output version information and exit.
125
126 -w, --window
127 Window identifier to capture. Must be a valid identifier (see
128 xwininfo(1)).
129
130 -z, --silent
131 Prevent beeping.
132
133 --format FMT
134 Specify the output file format. E.g "--format png". If no for‐
135 mat is specified, scrot will use the file extension to determine
136 the format. If filename does not have an extension either, then
137 PNG will be used as fallback.
138
140 -e, -F and FILE parameters can take format specifiers that are expanded
141 by scrot when encountered. There are two types of format specifier:
142 Characters preceded by a '%' are interpreted by strftime(2). The second
143 kind are internal to scrot and are prefixed by '$'. The following spec‐
144 ifiers are recognised by scrot:
145
146 $$ A literal '$'.
147 $a The system's hostname.
148 $f The image's full path (ignored when used in the filename).
149 $h The image's height.
150 $m The thumbnail's full path (ignored when used in the filename).
151 $n The image's basename (ignored when used in the filename).
152 $p The image's pixel size.
153 $s The image's size in bytes (ignored when used in the filename).
154 $t The image's file format (ignored when used in the filename).
155 $w The image's width.
156 $W The name of the window (only for --select, --focused and --window).
157 \n A literal newline (ignored when used in the filename).
158
159 Example:
160
161 $ scrot '%Y-%m-%d_$wx$h.png' -e 'optipng $f'
162
163 This would create a PNG file with a name similar to
164 2000-10-30_2560x1024.png and optimize it with optipng(1).
165
167 When using -s, optionally you can indicate the action to perform with
168 the selection area. Some actions allow optional parameters too.
169
170 capture Capture the selection area, this action is by default and
171 does not need to be specified.
172
173 hole Highlight the selected area overshadowing the rest of the capture.
174
175 hide,IMAGE Hide the selection area by drawing an area of color (or image) over it.
176 Optionally indicate name of the image to use as cover.
177 Image has priority over color.
178
179 blur,AMOUNT Blurs the selection area.
180 Optionally you can specify the amount of blur.
181 Amount,range: 1..30, default: 18
182
183 In modes 'hole' and 'hide' the color of the area is indicated by
184 'color' property of the line style and the opacity of the color (or im‐
185 age) is indicated by property 'opacity', SELECTION STYLE
186
187 If the 'hide' mode uses an image that does not have an alpha channel,
188 the opacity parameter will be ignored and it will be drawn fully
189 opaque.
190
191 Examples:
192
193 $ scrot --select=hide
194 $ scrot -shole --line color="Dark Salmon",opacity=200
195 $ scrot -sblur,10
196 $ scrot -shide,stamp.png --line opacity=120
197
198
200 When using -s, you can indicate the style of the line with -l.
201
202 -l takes a comma-separated list of specifiers as argument:
203
204 style=STYLE STYLE is either "solid" or "dash" without quotes.
205
206 width=NUM NUM is a pixel count between 1 and 8 inclusive.
207
208 color="COLOR" Color is a hexadecimal HTML color code or the name of
209 a color. HTML color codes are composed of a pound
210 sign '#' followed by a sequence of 3 2-digit
211 hexadecimal numbers which represent red, green, and
212 blue respectively. Examples: #FF0000 (red), #E0FFFF
213 (light cyan), #000000 (black).
214
215 opacity=NUM NUM is between 0 and 255 inclusive. 255 means
216 100% opaque, 0 means 100% transparent. For the
217 opacity of the line this is only effective if a
218 Composite Manager is running.
219
220 mode=MODE MODE is either "edge" or "classic" without quotes.
221 edge is the new selection, classic uses the old one.
222 "edge" ignores the style specifier and the -f flag,
223 "classic" ignores the opacity specifier.
224
225 Without the -l option, a default style is used:
226
227 mode=classic,style=solid,width=1,opacity=100
228
229 Example:
230
231 $ scrot -l style=dash,width=3,color="red" -s
232
233
235 The -n option's argument is more arguments:
236
237 -f 'FontName/size'
238 -t 'text'
239 -x position (optional)
240 -y position (optional)
241 -c color(RGBA, range 0..255) (optional)
242 -a angle (optional)
243
244 Example:
245
246 $ scrot -n "-f '/usr/share/fonts/TTF/DroidSans-Bold/40' -x 10
247 -y 20 -c 255,0,0,255 -t 'Hi'"
248
249
251 optipng(1) xwininfo(1)
252
254 scrot was originally developed by Tom Gilbert.
255
256 Currently, source code is maintained by volunteers. Newer versions are
257 available at https://github.com/resurrecting-open-source-projects/scrot
258
259
260
261scrot-1.9 10 Apr 2023 scrot(1)