Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

How can I take a screenshot in X.org?

I am unsure if the Print Screen button will "just work" and I don't know how I would go about testing it.

share|improve this question

migrated from raspberrypi.stackexchange.com Jul 9 '12 at 18:36

This question came from our site for users and developers of hardware and software for Raspberry Pi.

2 Answers 2

up vote 5 down vote accepted

The most commonly used Linux application for taking screen-shots is called scrot

You can install it with for Debian:

sudo apt-get install scrot

Or for Arch:

sudo pacman -S scrot

A screenshot is taken by typing:

scrot output-file.png

If you want to bind scrot to the print screen key then that will need to be controlled by your window manager.

share|improve this answer
1  
Scrot is quicker and smaller than ImageMagick - 1MB compared to 43MB. –  Andrew Fogg Jun 16 '12 at 23:26

I found a great answer to this question here, it is worth repeating.

This can be achieved with ImageMagick. Install by running the command

sudo apt-get install imagemagick

To grab all desktop just type

import -window root screen.png

Or you can do it with a delay of 5 seconds

sleep 5; import -window root screen.png
share|improve this answer
    
I wonder whether we could bind this to a key combo; anyone? –  Alex Chamberlain Jun 16 '12 at 19:22
    
@AlexChamberlain: This is dependant on the WM that is being used. –  Jivings Jun 16 '12 at 21:03
    
@AlexChamberlain there is an answer as to how to do that here –  Andrew Fogg Jun 17 '12 at 13:54
    
-1 I despise ImageMagick and all of its derivatives/relatives. It's a kick in the pants to install, and it's even worse to fix if something breaks. –  Andrew Larsson Jun 18 '12 at 17:21
    
@Jivings I guess if you're using your window manager's keybindings; I would think most people use xbindkeys though –  Michael Mrozek Jul 9 '12 at 18:37

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.