capture screenshots in Linux

I was searching for a commandline tool for capturing screen shot in Linux, and ended up using very nice tool called import (An utility from imagemagic). import is a command line tool, where we can use it for taking screenshot, image manipulation, filtering etc.

In arch Linux you can install imagemagic using command:

$ sudo pacman -S imagemagick

Let me tell you 2 usefull commands of import.

$ import region.jpg

This command will give you mouse prompt to select region in the window to capture. By selecting the region, file with the name region.jpg gets created.

$ sleep 2; import -window root /tmp/MyScreenshot.png

This command sleeps for 2 seconds before capturing the entire screen. The complete screen will get stored in file MyScreenshot.png. The sleep time user can give anything which is necessary.

I haven’t found options to take screenshot along with mouse pointer in import command. There is one more tool called gnome-screenshot, can be used to capture screenshot with mouse pointer.

Installing gnome-screenshot in Arch Linux:

sudo pacman -S gnome-screenshot

Example command to capture screenshot along with mouse pointer using gnome-screenshot:

gnome-screenshot  -p -f /tmp/image.png

Here, option -p is for including mouse pointer, without this option it will ignore the mouse pointer. -f option is for filename to save the screenshot.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s