2
I'm trying to tinker with a machine where I can only connect via shell. I don't have physical access and can't access VNC (maybe that's another question). I'm trying to take a screenshot right now to see what's going on, using screencapture
over ssh
, but it doesn't save the screenshot. No error message or anything. And there's no verbose mode for screencapture
, so I can't diagnose it easily.
This is what happens when I try to take the screenshot:
Rogers-iMac:screenshots roger$ screencapture 0911.png
Rogers-iMac:screenshots roger$
(returns to shell and outputs nothing)
Rogers-iMac:screenshots roger$ ls -la
total 0
drwxr-xr-x 2 roger staff 68 Sep 11 19:56 .
drwxr-xr-x+ 32 roger staff 1088 Sep 11 19:56 ..
Rogers-iMac:screenshots roger$
EDIT: Beroe has suggested that being connected through SSH is a factor. I've edited my question to reflect the fact that I am doing this all over SSH. Unfortunately, screencapture
still fails silently even when I follow the instructions given in the man page:
Rogers-iMac:screenshots roger$ ps -axww | grep loginwindo[w]
82 ?? 0:05.10 /System/Library/CoreServices/loginwindow.app/Contents/MacOS/loginwindow console
Rogers-iMac:screenshots roger$ sudo launchctl bsexec 82 screencapture 0915.png
Rogers-iMac:screenshots roger$ ls -la
total 0
drwxr-xr-x 2 roger staff 68 Sep 11 19:56 .
drwxr-xr-x+ 32 roger staff 1088 Sep 15 10:17 ..
Can you use the AppleScript solution? That worked for me. Wouldn't be hard to move the file it generates to a new directory. – beroe – 2014-09-15T22:13:22.860