The Fugue Counterpoint by Hans Fugal

12Feb/082

OS X Terminal Emulation Woes

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):

spacer

This is what it should look like:

spacer

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 rxvt and 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.

Setting 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 ncurses-term.

Alternatively, you can install it in your home directory. To do this, on OS X type

infocmp > /tmp/dtterm
scp /tmp/dtterm username@example.com:/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.

Tagged as: curses, dtterm, mac, osx, rxvt, TERM, terminal, xterm Leave a comment
Comments (2) Trackbacks (0) ( subscribe to comments on this post )
  1. spacer
    ./martijn
    February 12th, 2008 - 22:57

    one of the annoyances that I experience is that it is not possible to set a remote hostname (and path) as a terminal/tab-title ..

  2. spacer
    davel
    February 23rd, 2008 - 20:40

    Thanks! Debian loves this setup.
    Aptitude seems to need the “Delete sends Ctrl-H” flag, too.


Leave a comment

( Cancel )

No trackbacks yet.

« Growling On Voting your Conscience »

Tags

asterisk audio bald bash book bread C calculator cs darcs debian diy dsp fat firefox flightgear food git hair health hg hipster jack life linux mac math mercurial music osx pda pdf productivity rails review reviews ruby soap sourdough src terminal typo ubuntu vim voip

Recent Comments

  • www.nexopia.com on X-Plane vs. FlightGear
  • Anonymous on Free File Fillable Forms
  • online shopping dress for women on X-Plane vs. FlightGear
  • tolaris.com Better Cacti memory usage graphs | tolaris.com on Sensible Graphs with Cacti
  • Anonymous on Free File Fillable Forms

Links

  • Code Depot
  • Discography
  • Erin
  • FlightGear
  • FLOSS Portfolio
  • Foton
  • gdmxml
  • Joe Pastry
  • LAM
  • MVLUG
  • My Mutt Page
  • My Vim Page
  • NMSU
  • PGP Public Key
  • PLUG
  • pwgen
  • SkyVector
  • Utah Open Source Planet
  • Wesnoth
  • Why’s (Poignant) Guide to Ruby

Archives

Meta

  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.org
gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.