[Linux-disciples] Detecting the terminal type

Stephen R Laniel linux-disciples@bostoncoop.net
Sun, 26 Oct 2003 21:05:08 -0500


I SSHed to my Linux box from an OS X terminal window today, and saw a
bunch of escape characters. Turns out that laniels.org thought I was
using vt100, when the terminal was in fact emulating xterm. So I wonder:
how does Linux (i.e., the kernel, or bash, or whoever) guess the terminal
type? If it's something that OS X should be reporting, I'm surprised that
OS X would send vt100 along. And if OS X gets it wrong, why does PuTTY
always get it right?

Just curious about the technical details, if there's anything complicated
happening here.

-- 
``Tragedy is when I cut my finger. Comedy is when you walk into an
  open sewer and die.''
 -Mel Brooks