|
|
|
|
|
|
| Author |
Message |
Thomas Dickey *nix forums Guru Wannabe
Joined: 24 Feb 2005
Posts: 262
|
Posted: Wed Jul 12, 2006 11:10 pm Post subject:
Re: OS X Terminal.app and Aptitude
|
|
|
Ian Brandt <ian@ianbrandt.com> wrote:
| Quote: | Thomas Dickey wrote:
- 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 have
a hunch that your locale on Debian is set to a UTF-8 flavor and that aptitude
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)
I checked my Terminal settings and the encoding is set to UTF-8. I
tried changing my Terminal font from Bitstream Vera Sans Mono to the
included VT-100 and Courier fonts to see if it could be a bug in the
font, but no change.
|
hmm - but the line-drawing characters were all double-width when drawn
with UTF-8. tack doesn't know about UTF-8 (yet), and will send just the
strings that are in the terminfo. ncurses is sending the UTF-8 strings
to work with terminals that require that.
I suspect that if you set your locale to en_US then the lines would be
drawn properly. Terminal may simply be drawing the lines without using
a font (which is what xterm can do), since many fonts do not contain
line-drawing characters.
| Quote: | b) Terminal works for UTF-8 text, but not line-drawing (chooses
an incorrect set of glyphs for mapping the line-drawing text).
Is one of the terminfo settings related to how double byte characters
are sent to the terminal? Feeling my way around tack I found the
alternate character set tests. Sure enough when set to nsterm many of
the characters are rendered as '?'. Set to our running macosx copy of
OS X's included /usr/share/terminfo/78/xterm-color I see that all the
alternate characters are drawn correctly.
|
That's acsc, enacs, rmacs and smacs.
I didn't notice before, but nsterm's acsc string does look odd.
Several of the console emulators (Linux, FreeBSD for instance) have
mappings that use existing fonts to obtain line-drawing characters from
character codes that are always available in the 128-255 range. Looks
like nsterm was designed for that. vt100-style mapping uses the enacs,
smacs and rmacs strings to initialize and switch to/from an alternate
character set that's not always available by a direct mapping.
Anyway, nsterm's acsc string is odd since it doesn't seem to match
the other ones I'm familiar with.
| Quote: | During that process I also noticed that blink worked when I was set to
nsterm, so I've added 'enter_blink_mode=\E[5m' to macosx with success.
I'm starting to get more familiar with tack, and I see that the
solution here is to get a proper terminfo definition made and
disseminated for Terminal.app. A couple questions related to that quest:
Many tests say a capability is "...not present" or "...not defined".
Examples...
(flash) Flash is not defined. (flash) Done
(cnorm) Cursor-normal is not defined. (cnorm) Done
(hs) Has-status line is not defined. (hs) Done
Would the advisable strategy be to enable these in the terminfo and
see if Terminal.app will then pass the tests? Finding that it
|
To do that, you have to have an idea what string might be recognized.
For flash
flash=\E[?5h\E[?5l,
or
flash=\E[?5h$<100/>\E[?5l,
might work. The usual problem with flash on different terminal emulators
is that they don't honor the delay time.
For cnorm, the most common ones use the vt320 sequences
cvvis=\E[?25h,
cnorm=\E[?25h,
Status line is harder - very few terminal emulators do this (aside from
the kludges that map title-string escapes onto the terminfo, which don't
follow the expected pattern).
| Quote: | supports blink makes me wonder what other capabilities it might
support, though not having comprehensive knowledge of the individual
capabilities themselves I don't know whether you necessarily want them
defined just because Terminal supports them.
|
It would be interesting to read Terminal's source - but I suppose that's
part of the code that Apple doesn't publish.
| Quote: | Also, since the menu issues in Aptitude are my only known remaining
bug, any guidance on particular tests/capability settings that might
relate to the rendering issues in the screen shots I posted? A lot of
the drawing and alignment related tests seemed to pass, so nothing is
jumping out at me.
|
I'd focus on the locale - thinking that Terminal's not going to handle
UTF-8 properly.
--
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.org |
|
| Back to top |
|
 |
Ian Brandt *nix forums beginner
Joined: 09 Jan 2005
Posts: 9
|
Posted: Wed Jul 12, 2006 10:10 pm Post subject:
Re: OS X Terminal.app and Aptitude
|
|
|
Thomas Dickey wrote:
| Quote: | 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".
|
Correct, bash on Debian. You're right, the default .bashrc contains:
# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
xterm-color)
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[
00m\]\$ '
;;
*)
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
;;
esac
# Comment in the above and uncomment this below for a color prompt
#PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m
\]\$ '
# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}:
${PWD/$HOME/~}\007"'
;;
*)
;;
esac
Adding 'macosx' to the cases cleared that up.
| Quote: | - 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 have
a hunch that your locale on Debian is set to a UTF-8 flavor and that aptitude
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)
|
I checked my Terminal settings and the encoding is set to UTF-8. I
tried changing my Terminal font from Bitstream Vera Sans Mono to the
included VT-100 and Courier fonts to see if it could be a bug in the
font, but no change.
| Quote: | b) Terminal works for UTF-8 text, but not line-drawing (chooses
an incorrect set of glyphs for mapping the line-drawing text).
|
Is one of the terminfo settings related to how double byte characters
are sent to the terminal? Feeling my way around tack I found the
alternate character set tests. Sure enough when set to nsterm many of
the characters are rendered as '?'. Set to our running macosx copy of
OS X's included /usr/share/terminfo/78/xterm-color I see that all the
alternate characters are drawn correctly.
During that process I also noticed that blink worked when I was set to
nsterm, so I've added 'enter_blink_mode=\E[5m' to macosx with success.
| Quote: | - 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 \^?
|
On the Mac stty is:
$ stty -a
speed 9600 baud; 40 rows; 100 columns;
lflags: icanon isig iexten echo echoe -echok echoke -echonl echoctl
-echoprt -altwerase -noflsh -tostop -flusho pendin -nokerninfo
-extproc
iflags: -istrip icrnl -inlcr -igncr ixon -ixoff ixany imaxbel -ignbrk
brkint -inpck -ignpar -parmrk
oflags: opost onlcr -oxtabs -onocr -onlret
cflags: cread cs8 -parenb -parodd hupcl -clocal -cstopb -crtscts -dsrflow
-dtrflow -mdmbuf
cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = <undef>;
eol2 = <undef>; erase = ^?; intr = ^C; kill = ^U; lnext = ^V;
min = 1; quit = ^\; reprint = ^R; start = ^Q; status = ^T;
stop = ^S; susp = ^Z; time = 0; werase = ^W;
When I ssh to Debian it's:
$ stty -a
speed 9600 baud; rows 40; columns 100; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;
eol2 = <undef>;
swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase
= ^W; lnext = ^V; flush = ^O;
min = 1; time = 0;
-parenb -parodd cs8 -hupcl -cstopb cread -clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl
ixon -ixoff -iuclc ixany imaxbel
-iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0
bs0 vt0 ff0
isig icanon iexten echo echoe -echok -echonl -noflsh -xcase -tostop
-echoprt echoctl echoke
Looks like they were consistently ^?. Leaving all that alone and
changing to key_backspace=\177 in our macosx terminfo fixed up my
backspace issues in Aptitude after recompiling.
I'm starting to get more familiar with tack, and I see that the
solution here is to get a proper terminfo definition made and
disseminated for Terminal.app. A couple questions related to that quest:
Many tests say a capability is "...not present" or "...not defined".
Examples...
(flash) Flash is not defined. (flash) Done
(cnorm) Cursor-normal is not defined. (cnorm) Done
(hs) Has-status line is not defined. (hs) Done
Would the advisable strategy be to enable these in the terminfo and
see if Terminal.app will then pass the tests? Finding that it
supports blink makes me wonder what other capabilities it might
support, though not having comprehensive knowledge of the individual
capabilities themselves I don't know whether you necessarily want them
defined just because Terminal supports them.
Also, since the menu issues in Aptitude are my only known remaining
bug, any guidance on particular tests/capability settings that might
relate to the rendering issues in the screen shots I posted? A lot of
the drawing and alignment related tests seemed to pass, so nothing is
jumping out at me.
Thanks,
Ian
P.S. My current nsterm/macosx diff:
$ infocmp nsterm macosx
comparing nsterm to macosx.
comparing booleans.
bw: T:F.
km: F:T.
mir: F:T.
xon: T:F.
comparing numbers.
ncv: 37, NULL.
comparing strings.
acsc:
'+\335\,\334-\366.\3770#`\327a\:f\241g\261h#i\360jjkkllmmnno\370p\370q\321rrssttuuvvwwxxy\262z\263{\271|\255}\243~\245',
'``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~'.
clear: '\E[H\E[J', '\E[H\E[2J'.
dch: NULL, '\E[%p1%dP'.
dch1: NULL, '\E[P'.
el1: '\E[1K', NULL.
enacs: '\E(B\E)0', '\E)0'.
is2: NULL, '\E7\E[r\E[m\E[?7h\E[?1;3;4;6l\E[4l\E8\E>'.
ka1: '\EOq', NULL.
ka3: '\EOs', NULL.
kb2: '\EOr', NULL.
kc1: '\EOp', NULL.
kc3: '\EOn', NULL.
kdch1: NULL, '\E[3~'.
kent: '\EOM', NULL.
kf1: '\EOP', '\E[11~'.
kf10: NULL, '\E[21~'.
kf11: NULL, '\E[23~'.
kf12: NULL, '\E[24~'.
kf13: NULL, '\E[25~'.
kf14: NULL, '\E[26~'.
kf15: NULL, '\E[28~'.
kf16: NULL, '\E[29~'.
kf17: NULL, '\E[31~'.
kf18: NULL, '\E[32~'.
kf19: NULL, '\E[33~'.
kf2: '\EOQ', '\E[12~'.
kf20: NULL, '\E[34~'.
kf3: '\EOR', '\E[13~'.
kf4: '\EOS', '\E[14~'.
kf5: NULL, '\E[15~'.
kf6: NULL, '\E[17~'.
kf7: NULL, '\E[18~'.
kf8: NULL, '\E[19~'.
kf9: NULL, '\E[20~'.
kfnd: NULL, '\E[1~'.
kich1: NULL, '\E[2~'.
kmous: NULL, '\E[M'.
knp: NULL, '\E[6~'.
kpp: NULL, '\E[5~'.
kslt: NULL, '\E[4~'.
op: '\E[0m', '\E[m'.
rmam: '\E[?7l', NULL.
rmcup: NULL, '\E[2J\E[?47l\E8'.
rmir: NULL, '\E[4l'.
rs2: '\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h',
'\E7\E[r\E8\E[m\E[?7h\E[?1;3;4;6l\E[4l\E>'.
sgr:
'\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?%p9%t\016%e\017%;',
NULL.
sgr0: '\E[m\017', '\E[m'.
smam: '\E[?7h', NULL.
smcup: NULL, '\E7\E[?47h'.
smir: NULL, '\E[4h'.
--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org |
|
| Back to top |
|
 |
Thomas Dickey *nix forums Guru Wannabe
Joined: 24 Feb 2005
Posts: 262
|
Posted: Wed Jul 12, 2006 10:00 pm Post subject:
Re: OS X Terminal.app and Aptitude
|
|
|
Vincent Lefevre <vincent@vinc17.org> wrote:
| Quote: | 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.org |
|
| Back to top |
|
 |
Vincent Lefevre *nix forums addict
Joined: 19 Mar 2005
Posts: 83
|
Posted: Wed Jul 12, 2006 6:20 pm Post subject:
Re: OS X Terminal.app and Aptitude
|
|
|
On 2006-07-12 10:32:59 -0000, Thomas Dickey wrote:
| Quote: | Vincent Lefevre <vincent@vinc17.org> wrote:
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.
|
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.
| Quote: | 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.org |
|
| Back to top |
|
 |
Thomas Dickey *nix forums Guru Wannabe
Joined: 24 Feb 2005
Posts: 262
|
Posted: Wed Jul 12, 2006 11:00 am Post subject:
Re: OS X Terminal.app and Aptitude
|
|
|
Vincent Lefevre <vincent@vinc17.org> wrote:
| Quote: | On 2006-07-11 23:49:23 -0000, Thomas Dickey wrote:
Vincent Lefevre <vincent@vinc17.org> wrote:
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.
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.org |
|
| Back to top |
|
 |
Vincent Lefevre *nix forums addict
Joined: 19 Mar 2005
Posts: 83
|
Posted: Wed Jul 12, 2006 1:30 am Post subject:
Re: OS X Terminal.app and Aptitude
|
|
|
On 2006-07-11 23:49:23 -0000, Thomas Dickey wrote:
| Quote: | Vincent Lefevre <vincent@vinc17.org> wrote:
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.
|
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.
| Quote: | 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.org |
|
| Back to top |
|
 |
Thomas Dickey *nix forums Guru Wannabe
Joined: 24 Feb 2005
Posts: 262
|
Posted: Wed Jul 12, 2006 12:10 am Post subject:
Re: OS X Terminal.app and Aptitude
|
|
|
Vincent Lefevre <vincent@vinc17.org> wrote:
| Quote: | 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.
| Quote: | 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.org |
|
| Back to top |
|
 |
Thomas Dickey *nix forums Guru Wannabe
Joined: 24 Feb 2005
Posts: 262
|
Posted: Wed Jul 12, 2006 12:00 am Post subject:
Re: OS X Terminal.app and Aptitude
|
|
|
Ian Brandt <ian@ianbrandt.com> wrote:
| Quote: | 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)
| Quote: | Thomas Dickey wrote:
First off thank you for such a helpful response!
"pretty garbled" could be more than one thing...
Here are some screen shots:
http://www.flickr.com/photos/44533716@N00/sets/72157594195837848/
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.
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'.
|
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.
| Quote: | xterm-color is almost certainly technically incorrect because it's
unlikely that Terminal was designed to match that set of data.
I agree.
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.
I'll try to learn my way around tack's tests and follow up with a
meaningful log.
Since xterm-color was not designed to match Terminal, any
differences here aren't going to be applied to ncurses. (In
articular, 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
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".
| Quote: | - 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 have
a hunch that your locale on Debian is set to a UTF-8 flavor and that aptitude
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).
| Quote: | - 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.org |
|
| Back to top |
|
 |
Vincent Lefevre *nix forums addict
Joined: 19 Mar 2005
Posts: 83
|
Posted: Tue Jul 11, 2006 11:40 pm Post subject:
Re: OS X Terminal.app and Aptitude
|
|
|
On 2006-07-11 12:09:45 -0700, Ian Brandt wrote:
[...]
| Quote: | 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.
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.org |
|
| Back to top |
|
 |
Ian Brandt *nix forums beginner
Joined: 09 Jan 2005
Posts: 9
|
Posted: Tue Jul 11, 2006 7:20 pm Post subject:
Re: OS X Terminal.app and Aptitude
|
|
|
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!
| Quote: | "pretty garbled" could be more than one thing...
|
Here are some screen shots:
<http://www.flickr.com/photos/44533716@N00/sets/72157594195837848/>
| Quote: | 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.
|
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'.
| Quote: | xterm-color is almost certainly technically incorrect because it's
unlikely that Terminal was designed to match that set of data.
|
I agree.
| Quote: | 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.
|
I'll try to learn my way around tack's tests and follow up with a
meaningful log.
| Quote: | Since xterm-color was not designed to match Terminal, any
differences here aren't going to be applied to ncurses. (In
articular, 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
|
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.org |
|
| Back to top |
|
 |
Thomas Dickey *nix forums Guru Wannabe
Joined: 24 Feb 2005
Posts: 262
|
Posted: Tue Jul 11, 2006 11:10 am Post subject:
Re: OS X Terminal.app and Aptitude
|
|
|
Ian Brandt <ian@ianbrandt.com> wrote:
| Quote: | 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...
| Quote: | 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.
| Quote: | 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_.
| Quote: | $ 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
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.org |
|
| Back to top |
|
 |
Ian Brandt *nix forums beginner
Joined: 09 Jan 2005
Posts: 9
|
Posted: Tue Jul 11, 2006 12:00 am Post subject:
OS X Terminal.app and Aptitude
|
|
|
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=``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
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.org |
|
| Back to top |
|
 |
Google
|
|
| Back to top |
|
 |
|
|
The time now is Sat Nov 22, 2008 7:42 am | All times are GMT
|
|
Car salvage | Libros de historia | Free Advertising | Mobile Phones | Best Credit Cards
|
|
Copyright © 2004-2005 DeniX Solutions SRL
|
|
|
|
Other DeniX Solutions sites:
Unix/Linux blog |
electronics forum |
medicine forum |
science forum |
|
|
Privacy Policy
|
Powered by phpBB © 2001, 2005 phpBB Group
|
|