Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 21185 - gnome-teminal (GNOME 2.2.1) sets $TERM wrong
Summary: gnome-teminal (GNOME 2.2.1) sets $TERM wrong
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GNOME (show other bugs)
Hardware: x86 Linux
: High minor
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-05-18 09:00 UTC by Tomasz Sterna
Modified: 2004-02-29 07:59 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tomasz Sterna 2003-05-18 09:00:11 UTC
gnome-terminal sets $TERM as "xterm" but it sends "xterm-xfree86" codes.
It's noticable with ncurses where Home and End keys does not work.

Reproducible: Always
Steps to Reproduce:
1.
2.
3.




I've added the following code to my ~/.bashrc as a workaround:

if [ "x$COLORTERM" == "xgnome-terminal" ]; then
        export TERM=xterm-xfree86
fi
Comment 1 foser (RETIRED) gentoo-dev 2003-05-18 10:25:45 UTC
hmm yeah i've seen this behaviour too, never looked into it. Can you give me some additional info on why we would want xterm-xfree86 ? Links to documents or something.

I can easily fix this in the ebuild if i want to, but i need to know the exact implications.
Comment 2 Tomasz Sterna 2003-05-18 17:48:26 UTC
$ showkey -a
[I press "Home"]
^[OH     27 0033 0x1b
         79 0117 0x4f
         72 0110 0x48

$ infocmp xterm | grep -i home
        el=\E[K, enacs=\E)0, home=\E[H, ht=^I, hts=\EH, il=\E[%p1%dL,

so ncurses thinks "Home" is "Esc[H" under xterm, but gnome-terminal sends "Esc[OH", just like:

$ infocmp xterm-xfree86 | grep -i home
        flash=\E[?5h$<100/>\E[?5l, home=\E[H, hpa=\E[%i%p1%dG,
        kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, khome=\EOH,

and it's khome that is "Esc[OH", and it works.
Example app that works fine with "xterm-xfree86" but not "xterm" is ECE ( http://freshmeat.net/projects/ece/ )
Comment 3 foser (RETIRED) gentoo-dev 2003-05-19 08:29:47 UTC
yes i am aware of what the difference is, but i wonder why gnome-terminal has been doing it wrong (?) all this time. With links to documents i meant documents explaining the difference between xterm and xterm-xfree86 .
Comment 4 foser (RETIRED) gentoo-dev 2004-02-29 07:59:31 UTC
Sorry for the wait here.

I can't reproduce this anymore, seems it got fixed along the way somewhere in ncurses or gnome-terminal maybe.

Closing WORKSFORME . If this is still a problem, please reopen.