Sometimes you do "more" or a file that isn't supposed to be viewed (for example a binary file). The result is a garbaged display and you have to disconnect the session and reconnect. It would be very convenient to have a "Reset Terminal" feature resetting the terminal modes and clearing the screen.
Just a thought that would make my life easier 🙂
[size=1][ February 06, 2003, 11:39 AM: Message edited by: Mattias Sandstrom ][/size]
I agree to a terminal reset menu option. It's a good idea and wouldn't be hard to implement.
Meanwhile, there's an easier quicker answer to your problem...
First of all, a little background... The condition you describe is something that will be exhibited by any terminal that properly implements line-draw characters. In line-draw mode, many normal lower-case alphabetic characters are replaced by line-draw characters. The particularly troublesome part is that it takes only a single character (control-n) to kick the terminal into this mode, and this character is commonly found in binary files and may be accidentally catted to the terminal.
The good part is that it also takes only a single character to exit this mode (control-o). You may ask... How do I get the host, then, to send me a control-o to exit this mode! Well, on many UNIX systems, typing 'reset' at the command line will suffice, as this command will often (but not always) have the ability to reset the line-draw mode. If this fails, type the following at the command-line
echo ^v^o
where ^v is where you hold down the control key and press the 'v' key and ^o is where you hold down the control key and press the 'o' key. It is important to know here that pressing ^v will not cause a ^V to appear in the command, while ^o will. The reason for this is that most control characters are either interpreted or ignored by your shell. The ^V character (also known as lnext - see stty man page for details) instructs the shell to accept the next character as-is. The effect of this command is that it will echo a ^o character to the terminal, throwing it out of line-draw mode.
This info is UNIX specific and may not apply to your situation. It may be possible to get a ^o to your terminal in some other way. I'll let you know when I have a reset terminal function ready.
Good luck!!
Hi Brian,
it works on recent Linux:es and Solaris 8. Does not work on Solaris 7, but that is a minor issue. I can live with that for the moment. Thanks for your tips.
When you say 'it works' do you mean the 'reset' command or the ^v^o thing?
It may be important to note here that the 'lnext' key may not always be ^v. It is configurable, but if you run the 'stty -a' command, you will be able to see what value is set for lnext. UNIX standard seems to be ^v, but I've seen some odd systems where it is not!
"reset" works on Linux and echo on Solaris 8 (obviously, reset is not a standard command on Solaris - hardly surprising... 😀 )
It's there. RC14. Options->Reset Terminal
See if that works for you!
Solaris 7 - Works! (telnet/vt100)
Solaris 8 - Works! (telnet/vt100)
RedHat 7.3 - Works! (SSH/xterm)
RedHat 8.0 - Works! (SSH/xterm)
Excellent!
/msa