After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 157448 - Incompatibilities between gnome-terminal and real xterm
Incompatibilities between gnome-terminal and real xterm
Status: RESOLVED DUPLICATE of bug 600659
Product: vte
Classification: Core
Component: general
0.26.x
Other Linux
: Normal normal
: ---
Assigned To: VTE Maintainers
VTE Maintainers
Depends on:
Blocks:
 
 
Reported: 2004-11-05 14:20 UTC by Hans de Goede
Modified: 2014-01-06 13:34 UTC
See Also:
GNOME target: ---
GNOME version: 2.29/2.30



Description Hans de Goede 2004-11-05 14:20:36 UTC
There are number of incompatibilities between gnome-terminal and xterm for
convience I'm listing them all here, lett me know if you want any in a seperate bug.

Key (esc) sequence incompatibility:
-in gnome-terminal (GT) the home and end keys always send the esc sequences for
 application keypad mode (terminfo smkx) (ESC O H, ESC O F) independent of
 application keypad mode is on (smkx) or off (rmkx). GT is aware of the
 application keypad mode, this works ok for the cursor keys. When application
 keypad mode is off GT should send ESC [ H and ESC [ F, (just like the cursor
 keys work)
-GT by default sends ASCII DEL instead of CTRL-H (^H), which is
 the official xterm default. If you change backspace to CTRL-H in the 
 compatibility settings, then the stty settings still assume ASCII-DEL causing
 backspace to fail under certain circumstances, for example trying to correct
 a typo in a search string in less.
-The ESC sequences send for cursor keys with modifier differ from those send by 
 the official xterm.

Also there is a drawing problem with lynx which is not there with the official
xterm, reproducing this probably requires a pretty rescent ncurses + terminfo,
see: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=134300
Comment 1 Tomas Mraz 2004-11-12 08:21:25 UTC
gnome-terminal uses vte not libzvt
Comment 2 Hans de Goede 2005-02-23 15:29:49 UTC
ping?
Comment 3 Behdad Esfahbod 2007-11-28 12:49:11 UTC
Hans, things have changed a bit in the meanwhile.  Care to test and update your list?  Thanks.
Comment 4 Hans de Goede 2007-11-28 21:59:50 UTC
Okay, these 2 problems still are present:
-in gnome-terminal (GT) the home and end keys always send the esc sequences for
 application keypad mode (terminfo smkx) (ESC O H, ESC O F) independent of
 application keypad mode is on (smkx) or off (rmkx). GT is aware of the
 application keypad mode, this works ok for the cursor keys. When application
 keypad mode is off GT should send ESC [ H and ESC [ F, (just like the cursor
 keys work)
-GT by default sends ASCII DEL for backsoace \, if you change backspace to CTRL-H
 in the  compatibility settings, then the stty settings still assume ASCII-DEL
 causing backspace to fail under certain circumstances, for example try "cat"
 (without  arguments) as command. I've even tried creating a new tab after
 changing the settings, which doesn't help.
Comment 5 Fabio Durán Verdugo 2010-12-13 02:44:05 UTC
any news for this report?
Comment 6 Hans de Goede 2010-12-13 12:15:15 UTC
Hi,

(In reply to comment #5)
> any news for this report?

I've just retested this with GNOME Terminal 2.32.0, VTE: 0.26.1 and both issues reported in comment #4 still happen.

I can probably write a patch for the home/end key behavior wrt application keypad mode. Would that help?

Regards,

Hans
Comment 7 Fabio Durán Verdugo 2010-12-13 15:12:48 UTC
thank for reply
Comment 8 Egmont Koblinger 2014-01-05 22:03:35 UTC
Home/End: see bug 600659.

ASCII DEL: Yup, but for me most other terminals do likewise (XTerm, urxvt, konsole, pterm(putty), st(suckless) -- the only exception I've found where it sends a ^H (and sets stty erase accordingly) is enlightenment's brand new Terminology).
Comment 9 Hans de Goede 2014-01-05 23:13:28 UTC
(In reply to comment #8)
> Home/End: see bug 600659.
> 
> ASCII DEL: Yup, but for me most other terminals do likewise (XTerm, urxvt,
> konsole, pterm(putty), st(suckless) -- the only exception I've found where it
> sends a ^H (and sets stty erase accordingly) is enlightenment's brand new
> Terminology).

Right, wrt backspace the defacto standard seems to have become ASCII DEL, this is also what the real xterm now a days defaults too. With that no longer being an issue, I guess this bug can be closed as a dup of 600659 where some progress seems to be made wrt home/end issues.
Comment 10 Egmont Koblinger 2014-01-05 23:32:26 UTC
I kinda like that there are two backspaces, one "local" and one "remote" (not sure about the right terminology, if any).

Suppose there's a command running for a long time (e.g. "sleep 20"), and as soon as it finishes you'd like to run a slightly different command (e.g. "sleep 21").

You might press Up (appears as ^[[A), then Ctrl+H (appears as ^H), then 1 and Enter. This backspace will be interpreted when the shell gets the control and will remove the "0" from the "20".

On the other hand, the usual backspace would be an immediate backspace, removing the Up key's escape from the buffer.

*** This bug has been marked as a duplicate of bug 600659 ***
Comment 11 Egmont Koblinger 2014-01-06 11:44:17 UTC
I'm no longer sure I was right about the bs/del key, as per https://phab.enlightenment.org/T720.  I also just noticed that the original report was not about an incorrect default, but about not reflecting the change in stty. I agree, if backspace=Ctrl+H is chosen, "stty erase" should be set to ^H accordingly.

Hans, I'm afraid we're getting lost among irrelevant stuff in this ticket. Would you be so kind as to open a new bug with this issue only? (Just copy-pasting the middle bullet point, and a relevant title would do I think.) I don't want to steal karma from you for finding this issue :) Thanks!
Comment 12 Hans de Goede 2014-01-06 13:01:53 UTC
Hi,

(In reply to comment #11)
> Hans, I'm afraid we're getting lost among irrelevant stuff in this ticket.
> Would you be so kind as to open a new bug with this issue only? (Just
> copy-pasting the middle bullet point, and a relevant title would do I think.) I
> don't want to steal karma from you for finding this issue :) Thanks!

You mean the stty thing? That is correct by default now. It might be wrong when picking the now non default ^H, but changing it there would mean making it different from terminfo, and the setting can be changed on the fly, while the stty default is only done when opening a new tab ...

Not sure this is worth a bug report, I think just sticking with erase = ^? as default is fine. If anything one could consider removing the preference for sending ^H instead of ^? since things have pretty much settled on using ^? everywhere, so the preference is of little value now IMHO.

Feel free to file a new bug for this, from my pov this bug is resolved except for the home/end issue which is tracked in bug 600659 now.

Regards,

Hans
Comment 13 Egmont Koblinger 2014-01-06 13:34:04 UTC
Okay, then. Let's just forget about it :)