 |
|
 |
|
|
 |
OS X Terminal.app and Aptitude |
 |
 |
|
|
07-11-06 12:23 AM
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.
Any advice on a next step? I'm completely rusty with all this
terminal emulation voodoo.
Thanks,
Ian
P.S. Here's the infocmp result from the Mac in case that is any help...
$ cat xterm-color
# Reconstructed via infocmp from file:
/usr/share/terminfo/78/xterm-color
xterm-color|nxterm|generic color xterm,
auto_right_margin, eat_newline_glitch, has_meta_key,
move_insert_mode, move_standout_mode,
columns#80, init_tabs#8, lines#24, max_colors#8,
max_pairs#64, no_color_video@,
acs_chars=``aaffggiijjkkllmmnnooppqqrrss
ttuuvvwwxxyyzz{{||}}~~,
bell=^G, carriage_return=^M,
change_scroll_region=\E[%i%p1%d;%p2%dr,
clear_all_tabs=\E[3g, clear_screen=\E[H\E[2J,
clr_eol=\E[K, clr_eos=\E[J,
cursor_address=\E[%i%p1%d;%p2%dH, cursor_down=^J,
cursor_home=\E[H, cursor_left=^H, cursor_right=\E[C,
cursor_up=\E[A, delete_character=\E[P,
delete_line=\E[M, ena_acs=\E)0,
enter_alt_charset_mode=^N, enter_bold_mode=\E[1m,
enter_ca_mode=\E7\E[?47h, enter_insert_mode=\E[4h,
enter_reverse_mode=\E[7m, enter_standout_mode=\E[7m,
enter_underline_mode=\E[4m, exit_alt_charset_mode=^O,
exit_attribute_mode=\E[m,
exit_ca_mode=\E[2J\E[?47l\E8, exit_insert_mode=\E[4l,
exit_standout_mode=\E[m, exit_underline_mode=\E[m,
init_2string=\E7\E[r\E[m\E[?7h\E[?1;3;4;6l\E[4l\E8\E>,
insert_line=\E[L, key_backspace=^H, key_dc=\E[3~,
key_down=\EOB, key_f1=\E[11~, key_f10=\E[21~,
key_f11=\E[23~, key_f12=\E[24~, key_f13=\E[25~,
key_f14=\E[26~, key_f15=\E[28~, key_f16=\E[29~,
key_f17=\E[31~, key_f18=\E[32~, key_f19=\E[33~,
key_f2=\E[12~, key_f20=\E[34~, key_f3=\E[13~,
key_f4=\E[14~, key_f5=\E[15~, key_f6=\E[17~,
key_f7=\E[18~, key_f8=\E[19~, key_f9=\E[20~,
key_find=\E[1~, key_ic=\E[2~, key_left=\EOD,
key_mouse=\E[M, key_npage=\E[6~, key_ppage=\E[5~,
key_right=\EOC, key_select=\E[4~, key_up=\EOA,
keypad_local=\E[?1l\E>, keypad_xmit=\E[?1h\E=,
orig_pair=\E[m, parm_dch=\E[%p1%dP,
parm_delete_line=\E[%p1%dM,
parm_down_cursor=\E[%p1%dB,
parm_insert_line=\E[%p1%dL,
parm_left_cursor=\E[%p1%dD,
parm_right_cursor=\E[%p1%dC,
parm_up_cursor=\E[%p1%dA,
reset_2string=\E7\E[r\E8\E[m\E[?7h\E[?1;3;4;6l\E[4l\E>,
restore_cursor=\E8, save_cursor=\E7, scroll_forward=^J,
scroll_reverse=\EM, set_a_background=\E[4%p1%dm,
set_a_foreground=\E[3%p1%dm, set_tab=\EH, tab=^I,
user6=\E[%i%d;%dR, user7=\E[6n, user8=\E[?1;2c,
user9=\E[c,
--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.or
g
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
 |
Re: OS X Terminal.app and Aptitude |
 |
 |
|
|
07-11-06 01:12 PM
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, yo
u
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 fa
il
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
ftp://invisible-island.net/ncurses/terminfo.src.gz
--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net
--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.or
g
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
 |
Re: OS X Terminal.app and Aptitude |
 |
 |
|
|
07-12-06 12:28 AM
Sorry, meant for this to go to the list (why no Reply-To?)...
Thomas Dickey wrote:
First off thank you for such a helpful response!
[vbcol=seagreen]
Here are some screen shots:
<http://www.flickr.com/photos/445337...57594195837848/>
[vbcol=seagreen]
Here is the result:
$ infocmp macosx xterm-color
comparing macosx to xterm-color.
comparing booleans.
comparing numbers.
comparing strings.
hts: '\EH', NULL.
is2: '\E7\E[r\E[m\E[?7h\E[?1;3;4;6l\E[4l\E8\E>',
'\E[m\E[?7h\E[4l\E>\E7\E[r\E[?1;3;4;6l\E8'.
kdch1: '\E[3~', '\177'.
kend: NULL, '\E[4~'.
kfnd: '\E[1~', NULL.
khome: NULL, '\E[1~'.
kslt: '\E[4~', NULL.
meml: NULL, '\El'.
memu: NULL, '\Em'.
rs2: '\E7\E[r\E8\E[m\E[?7h\E[?1;3;4;6l\E[4l\E>',
'\E[m\E[?7h\E[4l\E>\E7\E[r\E[?1;3;4;6l\E8'.
[vbcol=seagreen]
I agree.
[vbcol=seagreen]
I'll try to learn my way around tack's tests and follow up with a
meaningful log.
[vbcol=seagreen]
I compiled your terminfo on my Debian box, and ssh'd over with TERM
set to 'nsterm'. A few initial observations:
- Color is lost at the Bash prompt.
- Horizontal borders in Aptitude (e.g. in the search or quit
dialogs) become '?' characters.
- Delete works at the bash prompt, but in Aptitude it prints '^[[3~'
.
- Backspace works in Aptitude, whereas with xterm-color it printed '^?'.
Thanks Again,
Ian
--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.or
g
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
 |
Re: OS X Terminal.app and Aptitude |
 |
 |
|
|
07-12-06 12:28 AM
On 2006-07-11 12:09:45 -0700, Ian Brandt wrote:
[...]
>
> Here is the result:
>
> $ infocmp macosx xterm-color
> comparing macosx to xterm-color.
> comparing booleans.
> comparing numbers.
> comparing strings.
> hts: '\EH', NULL.
> is2: '\E7\E[r\E[m\E[?7h\E[?1;3;4;6l\E[4l\E8\E>
',
> '\E[m\E[?7h\E[4l\E>\E7\E[r\E[?1;3;4;6l\E8'.
> kdch1: '\E[3~', '\177'.
> kend: NULL, '\E[4~'.
> kfnd: '\E[1~', NULL.
> khome: NULL, '\E[1~'.
> kslt: '\E[4~', NULL.
> meml: NULL, '\El'.
> memu: NULL, '\Em'.
> rs2: '\E7\E[r\E8\E[m\E[?7h\E[?1;3;4;6l\E[4l\E>
',
> '\E[m\E[?7h\E[4l\E>\E7\E[r\E[?1;3;4;6l\E8'.
[...]
> I compiled your terminfo on my Debian box, and ssh'd over with TERM
> set to 'nsterm'. A few initial observations:
>
> - Color is lost at the Bash prompt.
> - Horizontal borders in Aptitude (e.g. in the search or quit
> dialogs) become '?' characters.
> - Delete works at the bash prompt, but in Aptitude it prints '^[[
;3~'.
> - Backspace works in Aptitude, whereas with xterm-color it printed '^?'.
You should set TERM to 'macosx'. If things don't work, just fix them
in the terminfo data and rerun tic.
Note: you shouldn't use the ncurses that come with Mac OS X. They are
buggy.
--
Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / SPACES project at LORIA
--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.or
g
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
 |
Re: OS X Terminal.app and Aptitude |
 |
 |
|
|
07-12-06 12:28 AM
Ian Brandt <ian@ianbrandt.com> wrote:
> Sorry, meant for this to go to the list (why no Reply-To?)...
tin doesn't post to email (I often followup with the same information)
> Thomas Dickey wrote:
> First off thank you for such a helpful response!
[vbcol=seagreen]
> Here are some screen shots:
> <http://www.flickr.com/photos/445337...57594195837848/>
[vbcol=seagreen]
> Here is the result:
> $ infocmp macosx xterm-color
> comparing macosx to xterm-color.
> comparing booleans.
> comparing numbers.
> comparing strings.
> hts: '\EH', NULL.
> is2: '\E7\E[r\E[m\E[?7h\E[?1;3;4;6l\E[4l\E8\E>
',
> '\E[m\E[?7h\E[4l\E>\E7\E[r\E[?1;3;4;6l\E8
'.
> kdch1: '\E[3~', '\177'.
> kend: NULL, '\E[4~'.
> kfnd: '\E[1~', NULL.
> khome: NULL, '\E[1~'.
> kslt: '\E[4~', NULL.
> meml: NULL, '\El'.
> memu: NULL, '\Em'.
> rs2: '\E7\E[r\E8\E[m\E[?7h\E[?1;3;4;6l\E[4l\E>
',
> '\E[m\E[?7h\E[4l\E>\E7\E[r\E[?1;3;4;6l\E8'.[/vbco
l]
ok. Much of this is benign. Note that is2 and rs2 are for instance just
altered order. The macosx flavor is older. khome/kend and kfnd/kslt are
again an older choice (modeled on vt220) versus the newer preference.
kdch1 is like backspace/delete one of the troublesome things, since it's
not the "backspace" key but the "Delete" key on the small editing keypad.
screen will do odd things if it has the same string as kbs.
[vbcol=seagreen]
[vbcol=seagreen]
> I agree.
[vbcol=seagreen]
> I'll try to learn my way around tack's tests and follow up with a
> meaningful log.
[vbcol=seagreen]
> I compiled your terminfo on my Debian box, and ssh'd over with TERM
> set to 'nsterm'. A few initial observations:
> - Color is lost at the Bash prompt.
bash on Debian? odd - since I thought it would be using ncurses (actually
the termcap interface). It may be special-casing $TERM by comparing for
something containing "xterm".
> - Horizontal borders in Aptitude (e.g. in the search or quit
> dialogs) become '?' characters.
This is more interesting. Those dashes look like they're double-width. I h
ave
a hunch that your locale on Debian is set to a UTF-8 flavor and that aptitud
e
is emitting line-drawing in UTF-8, but that Terminal isn't doing the Right
Thing with that. A quick check with uxterm shows me that aptitude sends
_something_ in UTF-8.
I seem to recall reading that Terminal can handle UTF-8, so given that, one
of
these possibilities comes to mind:
a) the OS X locale isn't UTF-8 (and Terminal gets confused)
b) Terminal works for UTF-8 text, but not line-drawing (chooses
an incorrect set of glyphs for mapping the line-drawing text).
> - Delete works at the bash prompt, but in Aptitude it prints '^[[
;3~'.
> - Backspace works in Aptitude, whereas with xterm-color it printed '^?'.
Your stty settings might not match the nsterm terminfo entry. Bear in
mind that for *BSD the general rule is
stty erase \^H
while Debian does
stty erase \^?
--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net
--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.or
g
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
 |
Re: OS X Terminal.app and Aptitude |
 |
 |
|
|
07-12-06 12:28 AM
Vincent Lefevre <vincent@vinc17.org> wrote:
> You should set TERM to 'macosx'. If things don't work, just fix them
> in the terminfo data and rerun tic.
that's more/less what I was advising.
> Note: you shouldn't use the ncurses that come with Mac OS X. They are
> buggy.
hmm - to the best of my knowledge, the "ncurses that come with Mac OS X"
are some version of ncurses, just like Debian/stable, Debian/testing, etc.
While I recall a handful of platform-specific bugs, there's no reason
why he can't use the terminfo, etc.
Are you concerned with a specific bug, or is this just a suggestion to
use Linux instead?
--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net
--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.or
g
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
 |
Re: OS X Terminal.app and Aptitude |
 |
 |
|
|
07-12-06 06:28 AM
On 2006-07-11 23:49:23 -0000, Thomas Dickey wrote:
> Vincent Lefevre <vincent@vinc17.org> wrote:
>
> hmm - to the best of my knowledge, the "ncurses that come with Mac OS X"
> are some version of ncurses, just like Debian/stable, Debian/testing, etc.
This is version 5.4. Recompiling ncurses 5.5 (and Mutt) fixes the
problem. I don't know if it was specific to Mac OS X.
> Are you concerned with a specific bug, or is this just a suggestion to
> use Linux instead?
A specific bug: with Mutt, the thread display could lead to garbage
(line graphics) on the screen. I could write a testcase to reproduce
the problem.
--
Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / SPACES project at LORIA
--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.or
g
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
 |
Re: OS X Terminal.app and Aptitude |
 |
 |
|
|
07-12-06 12:28 PM
Vincent Lefevre <vincent@vinc17.org> wrote:
> On 2006-07-11 23:49:23 -0000, Thomas Dickey wrote:
[vbcol=seagreen]
> This is version 5.4. Recompiling ncurses 5.5 (and Mutt) fixes the
> problem. I don't know if it was specific to Mac OS X.
ncurses 5.5 was released last fall,
so "recompiling" is not a good choice of words.
Other people installed ncurses 5.5 on Mac OS X.
ncurses 5.4 was released at the beginning of 2004.
Advising OP to not use ncurses on Mac OS X is like telling someone not
to use a program because Debian/stable has an older/less-capable version.
But I recall that you've done this before, so I'll have to disregard
similar comments from you in the future.
--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net
--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.or
g
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
 |
Re: OS X Terminal.app and Aptitude |
 |
 |
|
|
07-12-06 06:22 PM
On 2006-07-12 10:32:59 -0000, Thomas Dickey wrote:
> Vincent Lefevre <vincent@vinc17.org> wrote:
>
> ncurses 5.5 was released last fall,
> so "recompiling" is not a good choice of words.
> Other people installed ncurses 5.5 on Mac OS X.
I meant recompiling ncurses, to get version 5.5. But I wonder if Apple
modified the ncurses 5.4, because tic didn't behave like under Debian.
For instance, xterm-* were installed under the 78 subdirectory instead
of the x subdirectory.
> Advising OP to not use ncurses on Mac OS X is like telling someone not
> to use a program because Debian/stable has an older/less-capable version.
I didn't advise not to use ncurses. I advised not to use the ncurses
that come with Mac OS X.
--
Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / SPACES project at LORIA
--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.or
g
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
 |
Re: OS X Terminal.app and Aptitude |
 |
 |
|
|
07-13-06 12:20 AM
Vincent Lefevre <vincent@vinc17.org> wrote:
> I meant recompiling ncurses, to get version 5.5. But I wonder if Apple
> modified the ncurses 5.4, because tic didn't behave like under Debian.
> For instance, xterm-* were installed under the 78 subdirectory instead
> of the x subdirectory.
hex 0x78 is 'x'.
I assumed that it was a fix to make the directory-names work around the
case-insensitivity of the filesystem. (It's a nuisance, but there are
two entries that collide in that case). That wouldn't fix the general
case for collisions though since it only addresses the first character.
--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net
--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.or
g
[ Post a follow-up to this message ]
|
|
|
 |
|
|
|
|
Sponsored Links |
 |
 |
|
|
 |
All times are GMT. The time now is 02:52 AM. |
 |
|
|
 |
|
 |
|
|
 |
|
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
|
|
|
|
|
 |
|
 |
|