O'Reilly Hacks
oreilly.comO'Reilly NetworkSafari BookshelfConferences Sign In/My Account | View Cart   
Book List Learning Lab PDFs O'Reilly Gear Newsletters Press Room Jobs  



Bypassing the Mac OS X GUI
Find out how to bypass the beautiful Aqua GUI for those die-hard command line fans.

Contributed by:
Jason Deraleau
[05/06/03 | Discuss (43) | Link to this hack]

The Mac OS X GUI, Aqua, can be kept from loading by making two simple changes on your Macintosh. The first involves manipulating the Open Firmware, the second a BSD configuration file. Both of these changes require you to have administrator access [See Mac OS X Hack #50]. Please keep in mind that working with the Open Firmware can be dangerous, so be sure to type all commands exactly as they appear. You'll need to use the Terminal application [/Applications/Utilities] to access the command line.

Verbose Booting

Verbose booting shows you the actual process of Mac OS X's startup. You'll see drivers get loaded and services launch. This command should work on any recent (New World) Macintosh: sudo /usr/sbin/nvram boot-args="-v". The -v flag tells the system to boot verbosely. You can get the same result by holding Command + V at boot time, but that will only work the one time. Modifying the boot-args will cause Mac OS X to always boot verbosely from now on.

Bypassing LoginWindow

The second step in bypassing Aqua involves manipulating the file /etc/ttys. We'll open the file up in the pico editor. To do so, enter the command: sudo /usr/bin/pico /etc/ttys. The file will open in pico and you should see something like the following:

#
#       @(#)ttys        5.2 (Berkeley) 6/10/93
#
# name  getty                           type    status          comments
#
# If the console is marked insecure, single-user requires
# the root password.
#console        "/usr/libexec/getty std.9600"   vt100   on secure
console "/System/Library/CoreServices/loginwindow.app/Contents/MacOS/loginwindow"

Notice the two lines that start with the word "console"? The first one is commented out, which means that the second is used. The second loads the LoginWindow. To bypass LoginWindow, comment out its line by preceding it with a # mark. The pico editor does not wrap the line, so be careful that during your changes parts of the LoginWindow line don't get pushed down to the next line. If they do, use backspace to move them back, being careful to maintain white space.

Now uncomment the first console line. You've now switched which of the two lines is commented out. Save your changes by pressing Ctrl+O, then Enter, then Ctrl+X. Reboot your system and you should now see your system's complete boot process and then be presented with a standard BSD-style login.

Reversing the Changes

To resume normal booting, use the command sudo /usr/sbin/nvram boot-args="". To resume using the normal login interface, swap the two console lines in /etc/ttys again.

See also: man nvram, man ttys


O'Reilly Home | Privacy Policy

© 2007 O'Reilly Media, Inc.
Website: | Customer Service: | Book issues:

All trademarks and registered trademarks appearing on oreilly.com are the property of their respective owners.