OS X's Termina.app is the terminal I've been using since I switched to Leopard, because it has tabs now and it's beautiful. Oh, and iTerm gave me too much grief with odd, illogical and unpredictable bugs.
One of the drawbacks to Terminal.app is that it's broken. This is what Aptitude looks like with
TERM=xterm (I think this is the default):
This is what it should look like:
How to get from there to here? The short answer is to choose
dtterm as your terminal emulation (in Preferences, on the Advanced tab).
The long answer is that the problem here is that xterm supports this capability called back-color-erase (bce). If you tell programs that you are an xterm (with
TERM=xterm), they will assume you support bce. The same goes for
xterm-color and even
vt100 (even though that one doesn't seem to support color). bce isn't the only problem, either. There's also redraw problems that are difficult to show with a screenshot.
TERM=dtterm seems to get rid of at least the major breakage. It would seem that the actual capabilities of Terminal.app are closest to dtterm, or at least closer to dtterm than to xterm or rxvt. It solves all the issues I've been having with aptitude, mutt, and screen locally and on remote linux boxes. But there's a caveat—not all remote systems will have the dtterm entry in their terminfo databases. Ubuntu 7.10 didn't by default, for example. The package you want on Debian-based systems (like Ubuntu) is
Alternatively, you can install it in your home directory. To do this, on OS X type
infocmp > /tmp/dtterm scp /tmp/dtterm firstname.lastname@example.org:/tmp ssh example.com tic /tmp/dtterm
tic (terminfo compiler) will create a terminfo database entry in
~/.terminfo/d/dtterm, and you should be good to go.