Tuesday, August 02, 2005

Fix a hosed Linux terminal

Are you seeing this:
[⎼⎺⎺├@▒1▒ ·]#
[⎼⎺⎺├@▒1▒ ·]# ⎽├├≤ ␋␌▒␌⎺┼

Instead of this?
[root@a1a ~]#
[root@a1a ~]# ls

Your screen can get hosed if you cat a binary file or for some reason your screen recieved a ^n character. This trash on your screen is called graphics mode. You can fix it by typing:

echo ^O

-while you are typing, it will look like garbage on the screen. Don't worry.
-to print a control O you can type: echo ctl-v ctl-o

More 2 Cent Tips... | Linux Gazette: "To force it back you need to have a shell or other program to send the
^o to the stricken display. I often switch to another virtual terminal
and do an 'echo -e '\017' >/dev/tty2'"
Post a Comment