import is part of ImageMagick package. Note: Import will not work in MS Windows.
#import the "root" window - that is, the entire screen. magick import -window root filename.png magick import -window root screenshot-$(date +%Y-%m-%d_%k.%M.%S).png # Take screenshots of the entire screen forever. # Useful when you also need to click on UI. while true; do sleep 1s magick import -window root screenshot-$(date +%Y-%m-%d_%k.%M.%S).png done