Description
Two things to fix:
- The description of the help provided with
scrot -h
should be corrected:
-m capture all monitors
a more accurate description can be found in the help provided with man scrot
:
-m --multidisp For multiple heads, screenshot all of them in order.
- The
--multidisp
option is used to capture a "multi-head server" configuration; see
https://wiki.archlinux.org/title/Multihead#Separate_screens
This option iterates through :0.0
, :0.1
, :0.2
, etc., thus capturing all screens.
Currently it doesn't work as the XOpenDisplay
function is called iteratively and causes a crash, fixing that with a dirty hack makes it behave as expected: force the XOpenDisplay
function to be called only once (of course, if you have a configuration with only one screen :0.0
the -m
option will not fail because it iterates only once over XOpenDisplay
currently)
Testing:
Create a new X server (:1) with 3 screens and run a window manager for each one.
Xnest -scrns 3 :1 &
for i in 0 1 2
jwm -display :1.$i &
end
Capture all the screens of this new server.
src/scrot -D :1 -m