Different Ways Of Taking Screenshots In GNU/Linux
The ‘Print Screen’ Way
The simplest way to take a screenshot, whether in the GNOME desktop environment or in KDE, is to press the “Print Screen(PrtScr)” key on the keyboard. Most probably a small window(Dialog Box) will popup prompting to save the screenshot under a filename. This is what you will most likely see under GNOME when you press the “Print Screen” key:
And a similar dialog box is presented by KSnapshot, a screen capturing utility, in KDE:
Just enter a name for the screenshot and click the ‘Save’ button. This is a very easy way to take screenshots in GNU/Linux when compared to the Microsoft Windows way of capturing the screen, where you need to open MS Paint or a similar program, copy the screenshot and then save it. In some distributions, a screen capturing utility might not be bound to the ‘PrtScr’ key on the keyboard; in that case, the mapping can be done manually(see this for more info) or a utility can be invoked from the system menu or command line to take the screenshots(which may not be as convenient as pressing a key on the keyboard, if you take a lot of screenshots).
Using a Screen Capturing Utility:
From the GNOME panel, go to Desktop->Take a screenshot…
You can add this menu item to the main panel by right clicking on the panel, clicking on “Add to panel” and then selecting “Take Screenshot…” from the dialog box.
Or, run it from the shell:
Or, run it from the shell:
The GIMP Way:
But if you are looking for more flexibility while taking the screenshots, then the screen capturing functionality provided by GIMP is what you are looking for, especially for GNOME as the basic screen capturing utility in it doesn’t allow delayed screen capturing(which is needed to capture mouse held over a menu item, for example). If GIMP is installed on your system, then load the program from Applications->Graphics->The GIMP(or something similar) and go to File->Acquire->Screenshot… to bring the dialog box similar to that of KSnapshot.
Here you can specify things like whether you want to take a screenshot of the entire screen or the active window only; whether you want to take the screenshot immediately or after a delay(in which time you can arrange the screen in the way you want to capture it). Once you take the screenshot from GIMP in this way, it will open the acquired screenshot in a window where you can view it and, if you want, you can also edit it(cropping, scaling etc). Then save the screenshot by going to File->Save.
Some of this flexibility(delaying screen capture etc) is available in KDE through the simple “Print Screen” approach too, but only GIMP shows a preview of the screenshot taken and allows you to edit it before saving.
The command-line Way
If you are not too fond of the graphical tools, then its equally simple to take the screenshots from a command-line.
Infact, some of these tools can be used irrespective of the desktop environment you are using(so works for fluxbox, enlightenment etc). My favourite way is to use the ‘import’ tool available in the ImageMagick package(you need to install this if its already not available on your system). Run the following command in a shell:
and select the window you want to capture or select a region by pressing the left mouse button and dragging.
‘import’ is a actually a very powerful command which can be used in many ways to capture the screen. For example, to capture the entire screen and after some delay and resizing it, use the following command:
To see all the options available with import command, go to ImageMagick’s website.
There are a lot of options when it comes to capturing screen under GNU/Linux. While the import command is all about power, “Print Screen” is all about convenience. Use GIMP to further operate on the captured screenshot before posting it on a blog/website. It doesn’t end here: ‘setterm -dump N’ command can be used to dump the contents of the terminal number N in a file named ‘screen.dump’ if you are working in console mode; khtml2png is a software hosted at Sourceforge website that can be used to take screenshots of HTML websites. GNU/Linux has it all that is needed to post screenshots on the blogs and websites.