GNOME Bugzilla – Bug 157448
Incompatibilities between gnome-terminal and real xterm
Last modified: 2014-01-06 13:34:04 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
gnome-terminal uses vte not libzvt
ping?
Hans, things have changed a bit in the meanwhile. Care to test and update your list? Thanks.
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.
any news for this report?
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
thank for reply
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).
(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.
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 ***
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!
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
Okay, then. Let's just forget about it :)