how to take a screenshot (screen capture) on a linux desktop
/"A picture is worth a thousand words" - /Frederick R. Barnard (or A Chinese Proverb)
It is probably not quite often that you need to take a screenshot or screen capture, but it does come in handy in some situations. If you happen to be a tech blogger, it comes in handy more often than not. Taking a screenshot of a desktop or webpage is not quite difficult, there are several software and services that lets you do it quite easily. The challenge is to choose the right software depending on the screenshot you want to take. There are mainly two different types of screenshots that you might want to take : a desktop or a webpage.
Of all the software that you can use to capture a screenshot, they can be categorized broadly into three distinct types : command line, desktop software and/or a web browser extension. Which of these types needs to be used depends mainly on what you have available on your machine.
Screenshots from Command Line
It is very unlikely that you will use a command line utility to capture a screenshot, especially given the availability of many desktop software with good interface. But this does come quite handy if you do not have a lot of screenshot software installed on the machine and you do not want to install any just to take an occasional screenshot.
import command
import is a versatile utility which comes with the ImageMagick software. It is a lazy and easy way to capture a quick screenshot of the desktop. Just type in the command import <filename> in a command prompt and then select the section of the screen that you want the screenshot of and you are done.
There are some useful variations of the command that you can use…
bash$ import myscreenshot1.png
This will take a screenshot of the cursor selected section of your screen and save it to the current directory as a png image.
bash$ import -window root mywholescreen.png
This will take the screenshot of your whole root window, which is the entire screen.
There are several other command line utilities available that provides a similar functionality. FBGrab is a popular alternative which uses the framebuffer to capture a screenshot. Scrot and /gnome-panel-screenshot /are couple of other utilities that you might want to check out.
Desktop Software for Screen Capture
Most of the desktop environments and distros have their own favorite screenshot utility that they ship with. These softwares usually have a very useful user interface and provide a whole of options to get a screenshot.
Ksnapshot for KDE
Ksnapshot is the default and very powerful screen capture software for KDE. You can see how to use ksnapshot to capture desktop screenshots.
Shutter For Gnome
Shutter is the pseudo default software for Gnome. See how you can use shutter to capture screenshots.
Gimp
You can also use Gimp to take screenshots in any of the Linux distros. It is quite useful when and if you donot want to install a separate software just for screenshots.
Web Browser Extensions for Screenshots
If you want to take the screenshot of a webpage, then it is quite different than taking the screenshot of the desktop. This is usually the case where you cannot see the complete webpage on screen without scrolling either horizontally or vertically. There are quite a few browser extensions that you can install which will allow you to capture the complete webpage screenshot, whether it is visible or not.
Mozilla Firefox
Mozilla Firefox has many addons for screen capture including Pixlr Grabber and Screen Capture Elite. Find out about the most popular screenshot addons that are available on firefox.
Google Chrome or Chromium
Chrome has an equal number of good extensions available to take a screenshot. Find more about the extensions that you can use in Google Chrome.