我使用OS X 10.6.5并偶尔通过ssh访问它。以这种方式访问它时,我需要能够使用screencapture实用程序拍摄屏幕图像。对抓屏手册页说要做到以下几点,但是这似乎并没有为我工作:如何在OS X上使用'screencapture'
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]
我使用目前的命令是:
sudo launchctl bsexec 53 screencapture foo.png
结果是没有PNG被输出并且命令静默地返回。你们能帮助我做这项工作吗?谢谢!
谢谢,但没有。这是一个能够反复重复我正在做的事情的脚本。为了完整起见,我尝试了这些-xC参数,但没有改变结果。 – c0nsumer 2011-01-05 18:51:38