16.6. Terminal Tips and Tricks

 <  Day Day Up  >  

16.5. Terminal's Window Preferences

Like most applications, Terminal has a Preferences command. Among other things, it's one way to switch from bash to a different shell. ( Turn on "Execute this command" and then type /bin/bash for bash , or /bin/csh for tsch . Then open a new Terminal window.)

However, you'll access most of Terminal's settings from the Terminal Window Settings command instead; the Terminal Inspector window opens. If you spend endless hours staring at the Terminal screen, as most Unix junkies do, you'll eventually be grateful for the preference settings that let you control how Terminal looks and acts.

Most of the options here are self-explanatory, but here are a few worth noting.

16.5.1. Window Settings

When you choose Terminal Window Settings, the Terminal Inspector window appears (Figure 16-8).


Tip: Changes you make in the Terminal Inspector window affect only the active window, so that you can change each open window independently. Clicking Use Settings as Default, on the other hand, applies the changes to the active window and all subsequent Terminal windows you open.

Using the pop-up menu at the top, you can choose any of the following panels:

16.5.1.1. Shell

When you're finished fooling around in Terminal, you end your session either by closing the window, or more properly, by typing exit (or pressing Control-D) at the prompt. The "When the Shell Exits" setting determines what happens when you do that.

16.5.1.2. Processes

Shell commands can take some time to complete. In some cases, when you attempt to close a Terminal window before its work is finished, Terminal asks you if you're sure you want to cancel the process and lose your work. The options here let you configure when you want to be prompted, if ever, and even which processes you don't want Terminal to warn you about.

16.5.1.3. Emulation

These options pertain to Terminal's impersonation of a traditional, metal-and-silicon terminal. Among the most useful options:

  • Option-click to position cursor . As noted earlier, this option lets you move your insertion point on the command line by Option-clicking.

  • Visual Bell . Terminal generally beeps to let you know when you've typed something it can't understand. If you're keeping your roommates awake with constant beeping, then select Visual Bell here, which quietly flashes the Terminal window instead.

16.5.1.4. Buffer

As your command line activity fills the Terminal window with text, older lines at top disappear from view. So that you can get back to these previous lines for viewing, copying, or printing, Terminal offers a Scrollback Buffer , which sets aside a certain amount of memory ”and adds a scroll bar ”so that you can do so.


Tip: Although it may be tempting to set the buffer to Unlimited , restrain yourself; you'll only increase Terminal's memory use. 10,000 lines should be plenty.
16.5.1.5. Display

Here's where you control what the insertion point looks like, along with settings like these:

  • Text . No matter what font you choose for your future Terminal sessions, note that characters in successive rows of text line up with each other, monospaced as though they're all Monaco or Courier.

  • Antialiasing . Select here to turn on font smoothing if you find that easier to read.

16.5.1.6. Color

People who spend long hours in Terminal revel in its ability to serve as a software chameleon, changing its look to suit offbeat tastes (and sore eyes). For example, you can specify the colors of the type and background by selecting a predetermined set from "Standard color selections" pop-up menu. Or, if you're truly discriminating, you can dream up your own color schemes by clicking the color swatches and making selections from the Color Picker (Section 5.11).

If you're truly an extremist, you can click "Use an image for the background" (and then the Set button) to choose a picture file to fill your background instead.


Tip: Actually, there's a more entertaining way to choose a background color. Choose Font Show Colors; in the Colors dialog box, choose the color you want. Finally, drag the color rectangle at top into any empty area of the Terminal window (or into one of the "color wells" in the Terminal Inspector window). Boom! It changes color to match.

You can also make your Terminal windows translucent, a sure way to make novices fall to their knees in awe. Just drag the slider to the right and watch the background of the active window nearly disappear, like the Cheshire Cat, leaving only text.

Is this really useful? You'd have to do quite a bit of stretching to imagine how. Still, the effect is really neat, especially when you consider the drop shadows and other lighting effects that are still visible at the window edges.


Tip: This effect looks especially cool if you make the Terminal window black with white or yellow writing.
16.5.1.7. Window

The Dimensions boxes affect the width in characters ( columns ) and height in lines (rows) of new Terminal windows. (Of course, you can always resize an existing window by dragging its lower-right corner. As you drag, the title bar displays the window's current dimensions.)

In the Title section, turn on the elements that you'd like the current Terminal window to display in the title bar. Remember, your preferences can be different for each Terminal window; you might therefore want the windows' title bars to identify the differences.

Figure 16-9. From the left side, choose the service you want; from the right, you can choose from a list of Panther and Tiger machines whose Remote Login and FTP checkboxes are turned on in the Sharing panel of System Preferences. Type your account name into the User box. As you adjust the connection options, the box at the bottom shows the Unix command that you're building. Click Connect to open a new Terminal window and send that command inside it.


16.5.1.8. Keyboard

These controls let you choose keyboard shortcuts that help you navigate your Terminal window, or that send strings of canned text to the shell. As your Unix prowess grows, these shortcuts will become more useful.


Tip: For some Unix geeks , the non-Unixy location of the Control key has been frustrating enough to keep them from using Macs. They use that key constantly, and would rather not have to rewire their brains to handle the changed location. Maybe Tiger will make them feel more at home. In System Preferences, in Keyboard & Mouse, the Modifier Keys button lets you swap the Control key and Caps Lock keys' functions, allowing the confused pinkies of Unix-heads to once again find their way.

16.5.2. Connect to Server

When you use Terminal to connect to other computers across a network ”a common Terminal task ”you use commands like ssh and ftp in conjunction with the other computer's IP address. For example, you might type ssh 192.168.43.76 .

The trouble is, these IP addresses are hard to remember ”and they may actually change over time. In Panther, though, Apple brought the magic of Bonjour (formerly Rendezvous) ”a networking feature in which Macs announce their presence to the network, using their plain-English names ”to Terminal. Bonjour lets you to browse other Panther and Tiger computers on your network just as you'd browse them in the Finder (Chapter 12).

To get started, choose File Connect to Server. Continue as shown in Figure 16-9.


Tip: Even if the remote machine isn't running Panther or Tiger, you can still add its address to the Server list manually by clicking the + button below it. Likewise, all command lines entered in the bottom field get added to the pop-up menu beside it, allowing you to quickly reconnect without having to use the browse list at all.
 <  Day Day Up  >  


Mac OS X. The Missing Manual
Mac OS X Snow Leopard: The Missing Manual (Missing Manuals)
ISBN: 0596153287
EAN: 2147483647
Year: 2005
Pages: 506
Authors: David Pogue

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net