3

I have Pi at work which is always on and does some stuff. I want to see the progress of the work at home, for that I need to see a screenshot from Pi like every one hour. Is it possible to capture and download a screenshot from Pi when I am connected to it using SSH?

  • 2
    scrot is a command line tool to take screenshots. See for example my answer here: raspberrypi.stackexchange.com/questions/7423/… You can then send them with scp, or by email, or you can ssh -X and use eg qiv to see them on your screen – M Noit Jan 9 '14 at 11:48
  • @MNoit : It would be great if you posted that as an actual answer; see here for information about why this is important, particularly since we are a beta site and are evaluated on how often questions actually get answers. – goldilocks Jan 9 '14 at 16:27
  • @goldilocks : I would have thought that the question would be closed as duplicate? – M Noit Jan 12 '14 at 16:30
  • @MNoit : The only way for that to happen is if 5 people w/ > 500 rep vote to close it as a duplicate. I've added one (although this question is perhaps better because it is more to the point), but I doubt we'll get 4 more any time soon as the question is already a little stale. – goldilocks Jan 12 '14 at 18:50
  • @goldilocksMy quesion is abouit how to make screen shot, when you are in SSH from another computer...that other question is not helping me. – Sean87 Jan 12 '14 at 23:04
5

If you're running something that needs interaction you may want to consider using VNC.

sudo apt-get install tightvncserver
vncserver -geometry 1024x768 :1
DISPLAY=:1 lxsession &

And then from your remote system use a VNC client (what one you needs depends on your other system) to access and monitor the application. You can use SSH forwarding of port 5901 to access it over SSH without adjusting the firewall or router further, e.g.:

ssh -C -L 5901:localhost:5901 remotehost

To take a screenshot remotely with scrot as suggested in comments over SSH you'll need to specify the display:

sudo apt-get install scrot
DISPLAY=:0 scrot file.png

You can use scp to copy the file to the local computer for viewing, e.g.:

scp user@remotehost:file.png .

Under Windows use the PSCP tool from Putty.

  • You should make this two answers. I'd upvote them both, but I particularly found the DISPLAY=:0 tip helpful (I almost tl:dr'd over it after I reading about VNC on the first line) – mwfearnley Mar 30 '16 at 9:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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