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)) {
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.
Fixed in libgpm-1.20.1-alt0.3rc1 (using libtinfo), but libgpm remains dirty.
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).
Apparently, the bug remains unfixed. Can be reproduced via $ TERM=Eterm links 2>~/tmp/log command.
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).
Yes, links works in Eterm.