I've seen quite a number of login screen screenshots. I've tried Cmd + Shift + 3, but to no avail. How do I take a picture of the login screen or the boot screen of OS X?
You can SSH into another Mac and use screencapture
in the shell.
- Enable remote login in the sharing preferences on the other computer
ssh username@other_computers_ip
sudo screencapture ~/Desktop/screenshot.png
-
Does this really work? The man page for screen capture (in Lion) says "SECURITY CONSIDERATIONS: To capture screen content while logged in via ssh, you must launch screencapture in the same mach bootstrap hierarchy as loginwindow". – lhf May 24 '12 at 13:41
-
@lhf I actually don't know. At least something like
sudo bash; screencapture
worked on an earlier version of 10.7. @bmike edited it tosudo screencapture
. (I no longer have another Mac to ssh to — can someone test whether that works as well?) – Lri May 24 '12 at 14:24 -
I have not tested this myself, but maybe this link will help. 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.
-
1It would be awesome, and helpful for future readers, if you'd quote the relevant bit of the article (with attribution) in the event that the linked article goes away. In this case Lri has already jumped in and listed the procedure you were citing, so I included an explanatory paragraph rather than the line listing. – jaberg Mar 6 '12 at 14:08
Ensure that fast user switching is enabled, then open grab, take a timed-screen, you have 10 seconds to switch to the login window via fast user switching - don't log out!
-
I was able to get a screen capture of the fast user switching login view, but not the main login screen or the boot screen. – tlatkovich Mar 9 '12 at 17:15
If you don't have a second host to ssh to your Mac or a camera/phone you can use a launch daemon:
Create a plist with:
sudo nano /Library/LaunchDaemons/local.screenshot.plist
with the content:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>local.screenshot</string>
<key>Program</key>
<string>/bin/bash</string>
<key>ProgramArguments</key>
<array>
<string>/bin/bash</string>
<string>-c</string>
<string>/usr/sbin/screencapture -T 1 /Users/user/screen1.png ; /usr/sbin/screencapture -T 16 /Users/user/screen16.png</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
Load the daemon with:
sudo launchctl load /Library/LaunchDaemons/local.screenshot.plist
Replace user in the plist by a real user name or use a different path than /Users/user/. Depending on your system you may have to modify the timing or add additional screenshots to create a whole sequence by adding one or several ; /usr/sbin/screencapture -T <seconds> /Users/user/screen<seconds>.png
terms in the ProgramArguments array.
Instead of cluttering the plist with commands you can also create a shell script using a for loop to do screenshots every second (or two) and load it with the launch daemon.
In my VM I got a black screen after one seconds and the almost finished boot loading bar after 16 seconds.