Chapter 1. Designing Your World

Mac OS X may look “so good, you just want to lick it,” as Steve Jobs famously put it. The truth is, though, that the best stuff is under the hood. The incredibly stable Unix core multitasks like a pro and opens up a world of software previously unavailable to Mac fans.

This OS is unlike anything that came before, which has tripped up more than one computer veteran. But the time you invest learning Mac OS X will gain you boatloads of speed and efficiency. Just keep an open mind—think “Zen and the Art of Computing.”

Startup and Shutdown

You won’t get far with your Mac (or this book) until your Mac is turned on. But even that simple act, as it turns out, has a few nuances worth learning.

Keyboard Login

The dialog box shown in Figure 1-1 greets millions of Mac mavens every morning. It’s the login dialog box, which you use to identify yourself and instruct the Mac to display your files, desktop picture, and settings while hiding everyone else’s. (More on this accounts system in Chapter 5.)

You can save some mousing around by navigating this box with the keyboard. For example, select your name from the list by typing your first initial (or the first couple of letters, if the list is long). As you do so, the highlight bar moves down the list, matching what you type. When the name you want is highlighted, press the Return or Enter key, type the password, and then hit Return again.

Tip

If you hold down Shift when you select your account’s name, the window will fade to the password screen in super-slow motion. (Make sure a jealous PC fanatic is watching when you do this.)

Before you can start using your machine, your Mac wants to make sure it knows who you are . . . or at least who you want to be today.

Figure 1-1. Before you can start using your machine, your Mac wants to make sure it knows who you are . . . or at least who you want to be today.

Automatic Login

Of course, the accounts system mentioned in the previous hint is primarily designed for families, schools, or businesses, where different people use the same Mac at different times. If you’re the only one who uses your machine, and you’re not worried about security, all this business about choosing your name from a list and entering a password is so much red tape. “It’s me!” you feel like saying, “Who the heck else would it be?”

If that’s your situation, you can set up the system so it logs you in automatically at startup, bypassing the login screen altogether.

Start the maneuver by opening System Preferences. Click the Accounts icon, and then choose Login Options at the bottom of the left pane. Click Automatically Log Me In As, select your account from the pop-up list, and enter your password. From now on, OS X won’t bother you with the login dialog box unless you summon it yourself—by choosing

Automatic Login

Log Out or using Fast User Switching, for example.

The Listless Login Screen

There are two ways of displaying the login panel. The user-friendly way is the list of names shown in Figure 1-1.

For greater security (though less convenience), though, you may prefer to require all who desire to log in to type both their names and passwords into text boxes (Figure 1-2). That way, would-be evildoers must know both the correct spelling of a legitimate account holder’s name and its password.

To return to the list view, click the Back button at the lower left of the login panel.

Figure 1-2. To return to the list view, click the Back button at the lower left of the login panel.

Note

You might also want to consider this compact arrangement if you use your computer in a school or business. This way, people won’t have to scroll through dozens of other names to find their own.

Most people think that accessing this text box login screen entails opening System Preferences, clicking Accounts, clicking Login Options, and selecting “Name and password.” Truth is, there’s a much quicker way to switch, without System Preferences—a trick you might use when you want to log in as >console (the full-screen Unix user), for example. From the list-of-names view, hold down the Option key, hit the down arrow, and then hit Enter. The login panel switches to displaying the text entry boxes, where you can now log in as console or root.

Startup Items Tricks

What Apple calls a login item is a program, file, folder, or other icon that you’ve designated to open automatically as soon as you log in. If the first thing you do is check a favorite Web page, by all means, designate your Web browser as a startup item so it will be open and ready by the time you’ve finished your morning coffee.

With your user name selected in the Account pane of System Preferences, you build your list of auto-opening items by dragging their icons into the Startup Items tab. You can even rearrange items within this list; items on top launch first.

Sometimes, however, you don’t want your regularly scheduled programs to fire at startup. Maybe you’re dying to see if your spouse, boss, or senator responded to your email and you want to get to your desktop as quickly as possible. Or maybe you’ve recently installed a program that you think might be causing problems when it autostarts.

In these cases, you’ll want to prevent login items from opening. To do that, hold down the Shift key just after entering your user name and password on the login screen.

The Login Screen “Marquis”

In case you’ve been lying awake wondering how to add customized text to your login window (Figure 1-3), help is at hand. Maybe you work somewhere that requires a disclaimer on the usage of computing resources. Or maybe you want to add a touch of personalization to your login window—a daily reminder to back up your hard drive or to floss, for example.

Adding this line of text entails editing a special preference file—a running theme in the Mac OS X hacking community, as well as in this book.

In the Finder, open the Library Preferences folder. Inside you’ll find a file called com.apple.loginwindow.plist. To edit it, open it using TextEdit (read the details of this ritual on Section P.3.5.2).

The file contains a long list of bracketed words known to programmers as tags (Figure 1-3, bottom). Just below the first <dict> tag, insert these two lines:

<key>LoginwindowText</key>
<string>Your text goes here</string>

Replace Your text goes here with whatever you’d like displayed in the login window screen. If you’d like to show the whole Constitution on the login screen, then go ahead: OS X will turn the marquis into a scrolling text block if it’s too long to fit on one screen.

Close the window, and click Save. When TextEdit asks you, “Attempt to overwrite?” click Overwrite.

The next time you log in, you’ll savor the results of your modification.

Top: The login screen as public billboard. It can display a friendly reminder, a favorite political slogan, or whatever you like.

Figure 1-3. Top: The login screen as public billboard. It can display a friendly reminder, a favorite political slogan, or whatever you like.

Quick Restart, Shut Down, and Log Out

As confirmation boxes go, the one that appears when you choose Restart, Log Out, or Shut Down from the

Quick Restart, Shut Down, and Log Out

menu is especially pointless. If you’re like most people, your reaction is: “Well, duh—I chose that command, didn’t I? Of course I’m sure.”

In this case, you’re a perfect candidate for the following trick: hold down Option before selecting Restart, Log Out, or Shut Down in the

Quick Restart, Shut Down, and Log Out

menu. The instant you do so, the ellipsis (...) after each of these menu choices disappears. This is your clue that Mac OS X won’t ask for any further comment as you restart, log out, or shut down.

Restart, Shut Down, or Sleep Keystrokes

If, like many an efficiency freak before you, you prefer keyboard shortcuts to choosing commands from menus, here’s your cheat sheet:

  • Shut down by pressing Control-Option-

    Restart, Shut Down, or Sleep Keystrokes

    -Eject. (It’s not as complex as it looks; the first three keys are all in a tidy row to the left of the Space bar.)

Tip

If your computer freezes (an unlikely occurrence in the Mac OS X world), you can force it to shut down by holding the power button down for about six seconds. Keep in mind, though, that you’ll instantly lose all changes to your open documents if you shut down this way.

  • Restart with Control-

    Restart, Shut Down, or Sleep Keystrokes

    -Eject.

Tip

You can force-restart by pressing Control-

Restart, Shut Down, or Sleep Keystrokes

-Power key. Just like a force-shutdown, though, you’ll lose all changes to open documents.

  • Log out by pressing Shift-

    Restart, Shut Down, or Sleep Keystrokes

    -Q.

  • Sleep with Option-

    Restart, Shut Down, or Sleep Keystrokes

    -Eject.

If your older Mac lacks an Eject key, substitute the F12 key in each of these keystrokes.

Restart/Sleep/Shut Down Dialog Box

There’s yet another way to power down your computer. Press Control-Eject (or Control-F12 if you don’t have an Eject key, or, on a laptop, just press the power button). You get the dialog box shown in Figure 1-4, where you can tap a single letter to trigger the option you want.

Get Mac OS X Power Hound, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.