Scrot - screenshot tool

Abarbarian

Acruncher
Joined
Sep 30, 2005
Messages
11,023
Reaction score
1,221
Scrot is a command line tool so you have to use it from a terminal. As I tend to have a terminal open most of the time, I'm still setting up Arch and have been for the last year or so. I find scrot a a lot easier and faster to use than a GUI program which I do not have installed anyway.
You can take full desktop screenshots as well as capturing images from web pages.Scrot may seem a bit longwinded to use if you have to type all the commands every time you use it.However if you combine it with aliases it is much faster and easier to use than a GUI program.
I am not using Gnome or KDE which both have excellent screen shot programs but have instead opted for Windowmaker and so far I have not found a Dock App for screenshots.

Two good articles on using scrot and the "man" page below.

Have fun.

http://www.itnewb.com/tutorial/Using-Scrot-the-Screen-Shot-Command-Line-Utility-for-Linux

http://www.freesoftwaremagazine.com/articles/how_to_take_screenshots_with_scrot

http://pwet.fr/man/linux/commandes/scrot

:D
 

Abarbarian

Acruncher
Joined
Sep 30, 2005
Messages
11,023
Reaction score
1,221
Scrot is a command line tool so you have to use it from a terminal. As I tend to have a terminal open most of the time, I'm still setting up Arch and have been for the last year or so. I find scrot a lot easier and faster to use than a GUI program which I do not have installed anyway.
You can take full desktop screenshots as well as capturing images from web pages.Scrot may seem a bit longwinded to use if you have to type all the commands every time you use it.However if you combine it with aliases it is much faster and easier to use than a GUI program.
I am not using Gnome or KDE which both have excellent screen shot programs but have instead opted for Windowmaker and so far I have not found a Dock App for screenshots.

Two good articles on using scrot and the "man" page below.

Have fun.

http://www.itnewb.com/tutorial/Using-Scrot-the-Screen-Shot-Command-Line-Utility-for-Linux

http://www.freesoftwaremagazine.com/articles/how_to_take_screenshots_with_scrot

http://pwet.fr/man/linux/commandes/scrot

:D

If like me you are not very familiar with the command line you may find these examples of scrot usage helpful.

Just using

Code:
$ scrot

Will output a file into your "~/" home directory like

2012-03-10-213041_1920x1200_scrot.png

Now this may be all you need but I like to keep all my different files in folders as it helps me keep track of what I am doing.So here is how you can use scrot with different options and special strings and place the screenshots in a designated folder.

This will take a full desktop shot instantly and place the file in "~/Mirages/screenshots/"

Code:
$ scrot '%Y-%m-%d-%T_$wx$h.png' -e 'mv $f ~/Mirages/screenshots/'
2012-03-10-21:27:19_1920x1200.png

This will take a full desktop shot after a delay of 5 seconds

Code:
scrot -d 5  '%Y-%m-%d-%T_$wx$h.png' -e 'mv $f ~/Mirages/screenshots/'
2012-03-10-21:28:29_1920x1200.png

This will take a full desktop shot after a delay of 5 seconds and show a countdown sequence in the terminal

Code:
$ scrot -cd 5  '%Y-%m-%d-%T_$wx$h.png' -e 'mv $f ~/Mirages/screenshots/'
Taking shot in 5.. 4.. 3.. 2.. 1.. 0.
2012-03-10-21:35:18_1920x1200.png

This will allow you to mark out a portion of your screen with the mouse or you can click on a window to capture it

Code:
$ scrot -s  '%Y-%m-%d-%T_$wx$h.png' -e 'mv $f ~/Mirages/screenshots/'

Notice the two different sizes for the saved file. The first is a section of the screen marked out with the mouse and the second is an active window I just left clicked with the mouse.

2012-03-10-22:06:10_315x1113.png
2012-03-10-22:08:28_1260x895.png

This will allow you to mark out a portion of your screen with the mouse or you can click on a window to capture it with a 5 second delay before the shot is taken.This can be useful if you need to raise or lower pop up menus or suchlike

Code:
$  scrot -sd 5  '%Y-%m-%d-%T_$wx$h.png' -e 'mv $f ~/Mirages/screenshots/'
2012-03-10-22:16:28_1882x221.png

These are just a few ways to use scrot and there are many other options and ways to use the special strings. Give it a try and have some fun.
:D
I'd like to say thanks to securitybreach whose patience and knowledge helped me to write this guide and my next one on "alias"
http://forums.scotsnewsletter.com/index.php?showtopic=53084
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top