Bug 1086 - xterm-like terminals with special names are not detected
: xterm-like terminals with special names are not detected
Status: CLOSED FIXED
: Sisyphus
(All bugs in Sisyphus/libgpm)
: unstable
: all Linux
: P4 major
Assigned To:
:
:
:
:
:
  Show dependency tree
 
Reported: 2002-07-13 19:12 by
Modified: 2003-08-25 15:18 (History)


Attachments
0001086-gpm-cvs-xterms-with-other-names-hack.patch (deleted)
2002-07-17 18:20, imz
no flags Details


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2002-07-13 19:12:13
I mean those, which set TERM=Eterm or TERM=rxvt or smth else.

libgpm doesn\'t detect that these terms are xterm-like, and so doen\'t work the way it should. (In Eterm, Midnight Commander doesn\'t react upon mouse button press on a menu.)
libgpm in these cases even reports some error which spoils MC screen:

*** debug [liblow.c(202)]:
                                               VC: 0
                                                    *** err [liblow.c(261)]:
                                                                            strncmp/isdigit/consolename failed
                                                                                                              *** err [liblow.c(370)]:
                                                                                                                                      Oh, oh, it\'s an error! possibly I die!


If MC is started like this:

TERM=xterm mc

it works well, no error messages appear.

---
Run mc in an Eterm. Press Ctrl-O several times, you will see the garbage.

---
libgpm-1.20.1-alt0.1rc1

The bug is not suprising: if we look in liblow.c from gpm, we see that checking for xterm is done as follows:

   if ((term=(char *)getenv(\"TERM\")) && !strncmp(term,\"xterm\",5)) {


------- Comment #1 From 2002-07-17 18:20:54 -------
Here is a patch to fix it -- as dirty as the original code. ldv has an idea and
a code sample on how to do it the other way, but in another place.
------- Comment #2 From 2002-07-17 18:20:54 -------
Here is a patch to fix it -- as dirty as the original code. ldv has an idea and
a code sample on how to do it the other way, but in another place.
------- Comment #3 From 2002-07-19 14:01:56 -------
Fixed in libgpm-1.20.1-alt0.3rc1 (using libtinfo),
but libgpm remains dirty.
------- Comment #4 From 2002-07-19 14:01:56 -------
Fixed in libgpm-1.20.1-alt0.3rc1 (using libtinfo),
but libgpm remains dirty.
------- Comment #5 From 2002-07-20 06:47:02 -------
altair: rpm -q libgpm mc      
libgpm-1.20.1-alt0.3rc1
mc-4.5.99a-alt2

It is much better now: pressing Ctrl-O multiple times in mc in Eterm doesn\'t make a lot of garbage appear on the screen. Now it appears only once on startup:

$ mc
*** err [liblow.c(286)]:
                        strncmp/isdigit/consolename failed
                                                          *** err [liblow.c(395)]:
                                                                                  Oh, oh, it\'s an error! possibly I die! 


And mouse still doesn\'t work in mc in Eterm: start mc, try to press on a menu, it doesn\'t react. in \'TERM=xterm mc\' mouse works (in Eterm).
------- Comment #6 From 2002-07-20 06:47:02 -------
altair: rpm -q libgpm mc      
libgpm-1.20.1-alt0.3rc1
mc-4.5.99a-alt2

It is much better now: pressing Ctrl-O multiple times in mc in Eterm doesn\'t make a lot of garbage appear on the screen. Now it appears only once on startup:

$ mc
*** err [liblow.c(286)]:
                        strncmp/isdigit/consolename failed
                                                          *** err [liblow.c(395)]:
                                                                                  Oh, oh, it\'s an error! possibly I die! 


And mouse still doesn\'t work in mc in Eterm: start mc, try to press on a menu, it doesn\'t react. in \'TERM=xterm mc\' mouse works (in Eterm).
------- Comment #7 From 2002-10-26 17:45:54 -------
Apparently, the bug remains unfixed.
Can be reproduced via
$ TERM=Eterm links 2>~/tmp/log
command.
------- Comment #8 From 2002-10-26 17:45:54 -------
Apparently, the bug remains unfixed.
Can be reproduced via
$ TERM=Eterm links 2>~/tmp/log
command.
------- Comment #9 From 2002-10-26 17:53:05 -------
Really fixed in libgpm-1.20.1-alt0.5rc1.
All libgpm users (except mc) should work as expected in Eterm.
Unfortunately, mc crashes now (#0001473).
------- Comment #10 From 2002-10-26 17:53:05 -------
Really fixed in libgpm-1.20.1-alt0.5rc1.
All libgpm users (except mc) should work as expected in Eterm.
Unfortunately, mc crashes now (#0001473).
------- Comment #11 From 2002-10-27 20:36:55 -------
Yes, links works in Eterm.
------- Comment #12 From 2002-10-27 20:36:55 -------
Yes, links works in Eterm.