Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

migrated from stackoverflow.com Feb 1 '10 at 13:48

This question came from our site for professional and enthusiast programmers.

add comment

1 Answer

up vote 4 down vote accepted

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]
share|improve this answer
    
Snarky, I like it :-) +1 –  Nifle Feb 1 '10 at 14:04
    
thanks a lot man! –  Yinan Feb 1 '10 at 14:08
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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