Scrot is a command line utility that can directly take screenshots from the Terminal.
To install it in Ubuntu/Linux Mint, open Terminal and type the following :
Once installed, it is easy to use.
To directly take a screenshot of the Terminal :
What this will do is save the screenshot with a timestamp in the current directory.
To save a screenshot in other location :
So for example, to save a screenshot of the Terminal to the Pictures folder in the home directory and name it as term.jpg, the command will be :
Scrot can also be used to take a screenshot of any window, not just the Terminal. To do that, use the delay parameter with the number of seconds as delay time :
The above command will after a delay of 10 seconds take a screenshot of the currently active window with focus. The screenshot will be saved as test.jpg in Pictures folder of the home directory.
You can also take a screenshot of the entire desktop, simply set a delay timer and then minimize all the windows. Also, it can be useful to have a countdown timer when using this delay option. The count parameter does just that.
So, to take a screenshot after a delay of 15 seconds with countdown display and save it in current directory with timestamp, the command will be :
To save it in a different directory with a preferred file name :
There are other parameters too like for running an application on the saved screenshot, interactively selecting a window, generating screenshot thumbnails and so on.
A detailed list can be viewed using the man command :
This is a handy command line tool for taking basic screenshots. If you want a graphical interface, the default screenshot tool can also be quite useful.
All done.