[SERVER-6938] Mongo shell should not use CHA escape sequence Created: 05/Sep/12 Updated: 10/May/22 |
|
| Status: | Backlog |
| Project: | Core Server |
| Component/s: | Shell |
| Affects Version/s: | 2.2.0 |
| Fix Version/s: | None |
| Type: | Question | Priority: | Major - P3 |
| Reporter: | dongde | Assignee: | DO NOT USE - Backlog - Platform Team |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | move-sa, platforms-re-triaged | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
OS:CentoS 5.5 MongoDB version 2.2 |
||
| Attachments: |
|
||||
| Issue Links: |
|
||||
| Participants: | |||||
| Description |
|
The Cursor Horizontal Absolute escape sequence (ESC [ nnn G) is not an original VT100 escape sequence, so terminal programs with a strict VT100 mode may not interpret it. This can cause repaint glitches, including "echoes" of typed text. It would be better to use only VT100 escape sequences to do cursor positioning in Unix mode. Original report: ex: |
| Comments |
| Comment by Steven Vannelli [ 10/May/22 ] |
|
Moving this ticket to the Backlog and removing the "Backlog" fixVersion as per our latest policy for using fixVersions. |
| Comment by Victor Hooi [ 12/Jun/14 ] |
|
tl;dr - Seems fine with latest SecureCRT (7.2.5) I've tested this with SecureCRT 7.2.5 on both OSX 10.9.3 and Windows 8.1. My TERM was set to "vt100". I connected to a remote Ubuntu 14.04 x64 box running Mongo 2.6.1. I wasn't able to reproduce the echoing typed text issue. I've attached screenshots for both. |
| Comment by dongde [ 07/Sep/12 ] |
|
I changed emulation type in SecureCRT to vt220 , xterm ,vt100 ... and enabled EMACS, it is still not work . |
| Comment by Tad Marshall [ 06/Sep/12 ] |
|
In addition, you might want to enable EMACS mode (in the same dialog) and select "Send escape for meta key" to make keystrokes like Meta-B (Alt+B) work. |
| Comment by Tad Marshall [ 06/Sep/12 ] |
|
I downloaded SecureCRT for Linux version 7.0.1 and I was able to duplicate your issue. Changing the emulation type in SecureCRT from VT100 to any of VT220, Linux or Xterm (in Options/Session Options/Terminal/Emulation) made it work properly for me. It looks like the CHA – Cursor Horizontal Absolute escape sequence (ESC [ <position> G) we are using to position the cursor horizontally on the line is not an original VT100 sequence, but is a later addition. We didn't notice this because it works with Gnome Terminal, aterm, rxvt, konsole, yaquake and xterm. If you set SecureCRT to VT220, Linux or Xterm emulation then it should work with SecureCRT as well. |
| Comment by Tad Marshall [ 06/Sep/12 ] |
|
We have had reports of issues with SecureCRT and apparently it can be fixed by changing the emulation setting, though I'm not sure why a setting labeled "VT100" would not work. See The output of your keyboard debugging test is the same as on my machine, so apparently the escape sequence we are using for cursor positioning is not working in SecureCRT with the settings you are using. |
| Comment by dongde [ 06/Sep/12 ] |
|
My terminal program is secureCRT . |
| Comment by dongde [ 06/Sep/12 ] |
|
Dear Tad , Thanks for response the question. I am running bash shell with terminal type VT100 . and following your instructions and shows below message : |
| Comment by Tad Marshall [ 05/Sep/12 ] |
|
What terminal program are you using? Is it configured to be in a VT100-compatible mode? Are you running the bash shell, or something else (e.g. EMACS command window)? What do you get for "echo $TERM" at the (bash or other) shell prompt? At the mongo shell prompt, can you press ctrl-^ (the Ctrl key and 6) and type your command, ending with Enter, then press ctrl-C and paste the result into this ticket? This puts the keyboard into a debugging mode that shows what keystrokes we are seeing; ctrl-C will exit the mode. |