Capture remote screenshots behind a screensaver

Feb 06, '03 08:48:26AM

Contributed by: marcpage

The following comes in handy when you ssh into your machine. Its a one-line command that will kill the screen saver, and do a screen capture. You can then copy the file to your local machine and view it. At the command line type:

 % sh -c "kill `ps -caxwwopid,command | grep ScreenSaverEngin 
| cut -b 1-6`;/usr/sbin/screencapture ~/Desktop/capture.pdf"
Notice the back tick before ps and after 1-6. This command is all on one line (though it's been shown here on two to narrow display width; remove the line break when entering the command).

The screen saver will automatically start back up again.

Comments (8)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20030206054826462