[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: OS X Terminal.app and Aptitude

Ian Brandt <ian@ianbrandt.com> wrote:

> Hi,

> I'm trying to get OS X 10.4.7's Terminal.app to play nice when ssh'ing
> into my Debian Etch box.

> I've run `infocmp -L > xterm-color' on my Mac (I have Terminal.app set
> to report xterm-color), and compiled the result on my Debian box with
> the following output...

> $ tic -svx xterm-color
> "xterm-color", line 2, terminal 'xterm-color': missing sgr string
> 1 entries written to /home/ibrandt/.terminfo

> This fixed up my backspace/delete issues at the Bash shell, but when I
> try to run Aptitude no such luck.  I get ^? when trying to backspace
> during a package search, and the menus are pretty garbled.

"pretty garbled" could be more than one thing...

> Any advice on a next step?  I'm completely rusty with all this
> terminal emulation voodoo.

hmm - since the Mac OS X developers don't write terminal descriptions
either, you're on a par with them.

> P.S. Here's the infocmp result from the Mac in case that is any help...

yes: it answers one of my own questions - whether the Mac OS X developers
had constructed a custom terminal description which matched Terminal's
functionality - appears the answer is no - aside from removing the
sgr (set_attributes) string - no technically sound reason for _that_.

> $ cat xterm-color
> #       Reconstructed via infocmp from file:
> /usr/share/terminfo/78/xterm-color
> xterm-color|nxterm|generic color xterm,

Backing up a little, I'd edit that line to show

macosx|generic color xterm,

and remove the $HOME/.terminfo/x/xterm-color and $HOME/.terminfo/n/nxterm,
rerun tic.  Then

	infocmp macosx xterm-color

would show whatever changes were made other than the sgr string.

xterm-color is almost certainly technically incorrect because it's unlikely
that Terminal was designed to match that set of data.  Running on Debian, you
should be able to use tack (part of ncurses) to step through the features.  I'd
expect some differences on the color model for instance.  Seeing the test fail
for either flavor of "xterm-color" should help a little.

Since xterm-color was not designed to match Terminal, any differences
here aren't going to be applied to ncurses.  (In particular, I recall some
complaints that the backspace/delete settings don't match Debian).  But it
would be useful to have an accurate terminal description for Terminal.

Supposedly we already have this - the nsterm entries that have been in
ncurses since 2001.  There were some minor fixes to those early this
year - see


Thomas E. Dickey

Reply to: