6

So how does one go about doing this? As of yet, Google has turned up no useful answers for me, although I may yet get lucky.

EDIT:

This would need to be done using just the one Mac, not using a remote login, although using the Terminal in any fashion is well within my capabilities.

5 Answers 5

2

Try this: Grab 'impossible' screenshots

OS X includes a nice command-line screen capture utility named, simply enough, screencapture. While there’s not a ton of documentation on this program, man screencapture will give you the basic options. Once you’ve used ssh to connect to the Mac whose screen you wish to capture, you need to execute the screencapture command with root privileges. You can also specify some of the command line arguments, as shown in the man page. For instance, here’s how I captured the login window:

  1. First, I had to get the login window on-screen. To do that, I just chose Login Window from the Fast User Switching menu in the menubar. If you haven’t enabled Fast User Switching yet, you’ll have to do so first—it’s in the Login Options section of the Accounts System Preferences panel.

  2. On the second Mac, I opened Terminal (in Applications: Utilities) and used the command ssh to connect to the first. (See the No Files Left Behind article for more detailed info on using ssh to remotely access another Mac.)

  3. On the second Mac, I then issued these commands:

     $ cd ~/Desktop
     $ sudo screencapture -ttiff loginwindow.tiff
    

    The first line just switches me to the Desktop folder of the user that I logged into via ssh. The second line actually takes the screenshot; I’ve used -ttiff to set the type to TIFF ( -t is the ‘set type’ option, and tiff is the type, with no added spaces!), and then specified the name for the file. If you don’t want to hear the camera-clicking sound on the remote Mac, use the -x option.

4
  • Great article, but I've only got one Mac. :) Jul 15, 2009 at 10:05
  • On Windows you can use Putty to open a ssh connection to your Mac. Jul 15, 2009 at 10:09
  • I know, but I'd like to see if it's doable using just the one. Jul 15, 2009 at 13:43
  • Please include the relevant information in your answer. Link-only answers lose all value if the linked website ever becomes inaccessible.
    – Stevoisiak
    Jun 8, 2017 at 14:27
5

Go old school and whip out the trusty camera and optional tripod.

1
3

You can use Grab by using the 10-second delay option, then putting the computer to sleep (with it set to show the login screen immediately upon sleep).

1
  • +1 this should have more votes. This really clever and MUCH less of a pain then SSH'ing in from another terminal. Can confirm it works on Yosemite. Feb 7, 2015 at 16:00
1

You could do this if you were connecting to a machine remotely with say VNC.

Another way is to use the screencapture command line utility, by connecing to the mac that is showing the login screen via SSH then using the screencapture utiity

EDIT: You could write a shell script or using a cron job on a timer using the screencapture command line.

1
  • Do you have any example of such a timed script? Jul 15, 2009 at 13:47
0

Use the "grab" utility in the Applications / Utility folder.

It is a screen shot tool provided by apple. It has a variety of options for the single mac user.

Or, let someone else do the work.

1
  • 1
    Grab won't work on the loginwindow process.
    – Chealion
    Jul 15, 2009 at 15:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .