16.5. Terminal Preferences
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. In fact, in Leopard's Terminal 2.0, you can manage your preferences in a whole
new way.
Instead of having a single set of options saved (as with other applications), Terminal now
manages your options as named settings groups, allowing you to quickly apply different
settings to different windows at any time using the Inspector window (Shell Show
Inspector).
You can also save the layout of entire groups of windows, each with their own settings in
effect, into a single configuration, allowing you to recreate those layouts in an instant.
Configure your settings using Terminal's Preferences panel (Figure 16-8
), which you get
to by choosing Terminal Preferences (of all places).
16.5.1. Startup
The Startup tab lets you configure what Settings or Window group Terminal should use
to open (in case you want something other than the default). This tab also gives you
another way to switch from bash to a different default shell. (Where it says "Shells open
with," choose "command (complete path)" and then type /bin/bash for bash, or /bin/tcsh
for tcsh. New Terminal windows will then open with that shell.)
Figure 16-8. To access the Terminal Inspector, choose Terminal Show Inspector
(or press -I). This window shows all of your Terminal saved settings. To apply
any to an existing window, just select the window and then a setting.
16.5.2. Settings
This tab is the heart of Terminal's preferences management. On the left: a list of settings
categories. On the right: the options for the currently selected category. Terminal comes
with several preconfigured settings, and you can add and remove these and your own
using the+and-buttons below the list. (To restore all the options for the prepackaged
•
Scrollback. 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. The new Terminal stores the data in this buffer much more efficiently, so you
should have no problem keeping this at its default unlimited setting. However, if
you do get the crazy urge to display all 1.3 million lines from the manpages, you
just might run out of memory if you don't set a limit.
Note: And how would you do that? By running this command, of course: find
/usr/share/man/man* -name "*gz" -exec man -P cat /{} \;
16.5.2.3. Shell
•
Startup. Enter a command here (for example, cal -y), and each time you open a
new window, you'll see its output and then get a new prompt. (If you just want the
output without a new prompt, check "Run inside shell.")
•
When the shell exits. 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.
•
Prompt before closing. 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.2.4. Keyboard
or
ssh 192.168.43.76.
The trouble is, these IP names and addresses are hard to remember—and the numbers
may change over time. To make connecting easier, Terminal can use the magic of
Bonjour—a networking feature in which Macs announce their presence to the network,
using their plain-English names. Bonjour lets you browse other Macs on your network
just as you'd browse them in the Finder (Chapter 13
).
To get started, choose File New Remote Connection. Continue as shown in Figure
16-9.
Tip: Even if the remote machine isn't running Bonjour, 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 browse at all.
Figure 16-9. From the left side, choose the service you want; from the right, you can
choose from a list of 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.