Carl Johnson wrote: > Tom <deb...@virta.be> writes: > > Sometimes after some bad output in console... > > <broken terminal> > >>> How I can turn such a terminal to its primary state? > >> > >> "Ctrl+C" and sometimes "Ctrl+Z". > > > > Or "reset"?
'reset' should work. It sends an escape sequence to the terminal emulator that triggers it to initialize itself. But the terminal already needs to be in a relatively sane operating mode in order to enter and invoke it. If it isn't, then it won't. > Sometimes it won't recognize CR either, but I have found that ^J > (Control-J) always works in those cases. In that case "^Jreset^J" > should work. Hmm... Those address problems with the tty driver being configured with output post processing disabled, echo turned off, raw mode turned on, etc. AFAIK it isn't possible to get into that state by "bad output" to the console. I read bad output and think that someone did something such as 'cat /bin/sh' or some such and the binary characters to the terminal confused the terminal emulator. (It is almost always a terminal emulator these days. How many people use an actual hardware terminal anymore? [If you feel compelled to answer, please do so in another thread. :-) ]) Therefore I reason that if it is an unusable terminal state due to binary output to the terminal then I think the solution must require some reset of the terminal emulator. Bob
signature.asc
Description: Digital signature