Screen capture in Mac is all black

1

I'm trying get screen capture through a SSH connection. In this SSH connection, I'm using the root user.

I found that after executing this command:

screencapture -t jpg -S /test.jpg

the jpg file I got is all black. If I do this in the normal way (not through SSH), then I can get the screen capture successfully.

What could be causing this?

Yinan

Posted 2010-02-01T13:37:59.000

Reputation: 171

Answers

5

There's a command line client for the OS X screen capturing? Gosh, didn't know that.

I wonder what the man page says…

SECURITY CONSIDERATIONS

To capture screen content while logged in via ssh, you must launch screencapture in the same mach bootstrap hierarchy as loginwindow:

PID=pid of loginwindow
sudo launchctl bsexec $PID screencapture [options]

Quentin

Posted 2010-02-01T13:37:59.000

Reputation: 1 191

Snarky, I like it :-) +1 – Nifle – 2010-02-01T14:04:01.983