Screen grab via the command line over ssh?
December 4, 2007 5:14 PM   Subscribe

Is there any way to grab a screen shot from a Windows command line via ssh?

Piggybacking on a previous question, is there a Windows solution to grabbing a screen shot via a remote command line? I'd like to log into WinXP Home via OpenSSH/Putty, grab a quick screen shot, and then terminate the connection.

Is there a way to grab the screen via the command line? If not, what are my alternatives?
posted by whatisish to Computers & Internet (11 answers total) 1 user marked this as a favorite
 
Might be barking up the wrong tree, but how about this software? You'd have to install it on the XP machine, but I assume that's not a problem. It's shareware ($20 after 30 days).

Never used it, just found it on Google.
posted by electric_counterpoint at 5:27 PM on December 4, 2007


Let's assume that finding a command line screen capture utility is trivial (which it should be.) The ssh part is actually the hard part. I'm assuming you're going to be using Cygwin's openssh, which will work fine. It is relatively straightforward to install, just run "ssh-host-config -y", don't try to dick around manually as it's easy to mess up. But do note that you'll probably have to edit the service to enable the "allow to interact with the desktop" feature, as otherwise the ssh session will probably not have the required privilege to take the screenshot.

It seems to me that a much easier solution would be to just run a VNC server on the machine, and then remotely schedule a VNC client to take the snapshot.
posted by Rhomboid at 5:35 PM on December 4, 2007


Response by poster: I'm assuming you're going to be using Cygwin's openssh

right, it's already set up and working fine - so I've got a remote command line but don't know where to go from there.

I was hoping not to have to start (then end) the VNC service if it could be accomplished an easier way. XP cant handle it alone, can it? If not, can anybody recommend a good freeware command line screen capture utility?
posted by whatisish at 5:57 PM on December 4, 2007


sshot?
posted by Rhomboid at 6:21 PM on December 4, 2007


Response by poster: fwiw, ScreenKap works fine locally but hangs remotely - even with the service set to "allow to interact with the desktop". With the service set to the default, ScreenKap gives a verbose error, so I think it's at least now *trying*.

... and thanks Rhomboid, I wouldn't have known to set up the service that way.

I'll continue to try other command line capture utilities and report back. Thanks, though, to you both.
posted by whatisish at 6:27 PM on December 4, 2007


Response by poster: sshot works fine locally but generates a blank (black only) file remotely.
posted by whatisish at 6:34 PM on December 4, 2007


Response by poster: ... even with "fast user switching" off.
posted by whatisish at 6:48 PM on December 4, 2007


Are you getting a blank screen because the screen is off?
posted by philomathoholic at 12:34 AM on December 5, 2007


This should make a little more sense: off blank
posted by philomathoholic at 12:35 AM on December 5, 2007


Response by poster: The screen (desktop) is not blank. I think it has to do with the remote connection not knowing which user GUI to grab.
posted by whatisish at 6:23 AM on December 5, 2007


Instead of trying to create a screenshot remotely, you could just periodically run a screenshot utility locally as a scheduled task, and then use SSH/FTP/etc. to transfer the screenshot when needed.
posted by Sharcho at 4:55 PM on December 5, 2007


« Older Move quicksilver's bezel interface   |   So, where do you keep the brown baby Jesus? Newer »
This thread is closed to new comments.