Bug 166396

Summary: Console output shows up as console input when outputting certain esc sequences
Product: [Applications] konsole Reporter: Peter Schorn <peter.schorn>
Component: generalAssignee: Konsole Developer <konsole-devel>
Status: RESOLVED NOT A BUG    
Severity: normal    
Priority: NOR    
Version: 1.6.6   
Target Milestone: ---   
Platform: Mandriva RPMs   
OS: Linux   
Latest Commit: Version Fixed In:

Description Peter Schorn 2008-07-12 20:44:14 UTC
Version:           1.6.6 (using KDE 3.5.9)
Installed from:    Mandriva RPMs

Get the file cr.txt (is in http://www.schorn.ch/cr.txt.zip) and do 'cat cr.txt' in Konsole. Some of the content of cr.txt which contains a lot of non VT100 escape sequences will show up as output while a certain part will become part of the next input (just type <ret> after cat finishes). Conceivably some issue with the VT102 terminal emulation.
Comment 1 Robert Knight 2008-07-13 02:10:45 UTC
This is expected behaviour.  The file cr.txt contains the escape code ESC-Z (Escape followed by 'Z') which causes the terminal emulator to report its type (DEC Vt model) back to the terminal.  The shell isn't expecting this so it just prints the returned string as though it were input from the users' keyboard.  You can see the same result in xterm, gnome-terminal and the Linux console although possibly with different values for the type string.

See the "C1 (8-Bit) Control Characters" section on 
http://rtfm.etla.org/xterm/ctlseq.html
Comment 2 Robert Knight 2008-07-13 02:12:52 UTC
Short way of reproducing the effect:  echo -e "\EZ"