我使用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