-
Take screenshots in Linux with Scrot
Posted on October 25th, 2008 1 commentScrot is a console based screen capturing utility. Not withstanding its status as a command line tool, it is quite powerful and can be used to capture screenshots of GUI. Scrot is available for most Linux distributions in their own repositories and can be installed using their respective package management tools. But if you are using a custom Linux distribution, then you can download the utility from the scrot website.
The following are some ways in which you can use scrot to take screenshots of your Linux desktop.
Take an instant screenshot and saving it to the specified file
$ scrot -s screenshot.png
When you execute the above command, scrot will pause for you to click on the desktop or application window whose image you want to capture. The moment you click on the desired spot, scrot will capture an image and save it as the file name you specified; in the above case it is ‘
screenshot.png‘.If you do not append the file name as the following command shows, scrot will create a unique PNG file with the date and time stamp and save it in the current directory.
$ scrot -s
Take a screenshot with a time delay
$ scrot -d 5 -s screenshot.png
-dspecifies the time delay in seconds. I have passed a value of 5 so scrot will take the screenshot only after 5 seconds.Take a screenshot with a time delay and a count down timer
$ scrot -d 5 -c -s screenshot.png
-cspecifies that scrot should show a count down timer in the console.Take a screenshot and move the image to a specified directory
$ scrot -s screenshot.png -e 'mv $f ~/images/.'
Where,
-eexecutes the mv command after taking the screenshot.$fis a specifier that indicates image path or filename. In the above command, the scrot, after taking the image and saving it as ’screenshot.png’ will execute themvcommand to move it to theimages/directory.Take a screenshot and open the image in GIMP for editing
You can use the
-eoption to execute any program, not necessarily GIMP, and scort will transfer control to that program.$ scrot -s screenshot.png -e 'gimp $f'
Take a screenshot and generate a thumbnail of desired size
$ scrot -s screenshot.png -t 25
-tgenerates a thumbnail scaled to 25% of the actual size of image and saves it in the current directory as screenshot-thumb.png.As you can see, scrot utility is a very powerful screenshot taking tool which can be put to versatile use.
Related Posts
- How to install GIMP scripts in Ubuntu Linux
- tar command in Linux
- Shutter – Screenshot Capture Tool
- LightScreen – A Free Screenshot Capture Tool for Windows
- Chvt – Switch between Virtual Terminals – Linux Command
1 responses to “Take screenshots in Linux with Scrot”

-
simpler, but without the thumbnail or -e option is xwd, which is part of the x11-apps package (in debian).

austernkommunikation October 26th, 2008 at 04:15