Windows screen shots via command-line SSH session
Posted
by Geoff Fritz
on Super User
See other posts from Super User
or by Geoff Fritz
Published on 2010-01-21T21:01:51Z
Indexed on
2010/04/06
21:03 UTC
Read the original article
Hit count: 388
I've browsed the handful of "screen capture" queries here, but I was unable to find anything which addressed my specific need.
I'm looking for a command-line tool that I can run via remote SSH connection (by way of the cygwin sshd daemon). There are several to choose from, but the few I've tried (ImageMagick, nircmd, and MiniCap) all result in a blank screen. I assume that this is due to the remotely logged in user not having a proper graphical console session running.
The goal here is automate screen capture and retrieval of the main system console (what one would see if they were looking at the physical monitor) through the use of ssh script from a Unix host:
ssh user@windowshost "screencap --output /tmp/console.jpg"
scp user@windowshost:/tmp/console.jpg /some/destdir
Note that these must be done on demand, so polling a remote directory that has snapshots dumped periodically will not work.
Bonus points for programs that are open source and have a portable install (so I don't need to RDP/VNC into the machine to run a graphical installer).
© Super User or respective owner