Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way to take a screenshot of what is on screen by being remotely logged on that machine with ssh?
Vnc is no good, since AFAIK it cannot take ownership of an existing X session.

share|improve this question
as the user owning the x11-session you are interested in? – akira Dec 22 '10 at 14:13
@akira Yes. (some more characters) – mbq Nov 18 '13 at 16:32
up vote 7 down vote accepted

You might want to try this:

xwd -out screenshot.xwd -root -display :0.0

It will save the screenshot to screenshot.xwd which GIMP should be able to open. Check out the xwd man page here:

share|improve this answer
any screenshot program will do: scrot, import (from imagemagick) etc. you just point it to the right $DISPLAY (or -display or --display or --dpy .. thats why i prefer $DISPLAY) and thats it. the main question remains unanswered: wants OP to capture a session (aka spy) on someone else? – akira Dec 23 '10 at 7:27

Your Answer


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.