Very useful tip in Linux for taking a screenshot showing the contents of a a single window. Use scrot to take a nice screenshot.
-{homer@homer-H55-USB3 } $ scrot -t 9 -s term.jpg |
With this command just run the command and then click the window you want to capture and it will save a screenshot of the contents of the window and not the window borders. This is very useful for capturing something you want to show online quickly.
Here is a very nice bash script for capturing screenshots of your desktop.
#!/bin/env bash take_ss() { sleep 0.2; scrot 'dap_%Y-%m-%d_%k-%M-%S_$wx$h.png' -e 'mv $f ~/Shots' "$1" } notify_send() { notify-send --expire-time=2000 -i view-fullscreen 'LOOKING GOOD!!' 'Saved to ~/Shots' && sleep 0.5 } main() { case "$1" in -c) take_ss -s notify_send ;; *) notify_send take_ss esac } main "$@" |
This saves screenshots in the ~/Shots folder. Just change this to suit your situation. It also creates a notification to tell you that it worked. Very nice.
ImageMagick may also be used to take a desktop screenshot. This command will capture the whole screen and save it to a jpeg file.
4.4 Mon May 27 jason@Yog-Sothoth 0: $ import -window root shot1.jpeg |
Finally, you can use the MATE screenshot utility on the command line to take a screenshot. Run it like this.
4.4 Mon May 27 jason@Yog-Sothoth 0: $ mate-screenshot |
Then a graphical window will pop up asking for the location to save the screenshot.