UNIX Power Tools

UNIX Power ToolsSearch this book
Previous: 41.12 Finding Out What Characters Your Terminal's Special Keys SendChapter 42Next: 42.2 Fixing a Hung Terminal or Job
 

42. Problems with Terminals

Contents:
Making Sense Out of the Terminal Mess
Fixing a Hung Terminal or Job
Why Changing TERM Sometimes Doesn't Work
Checklist for Resetting a Messed Up Terminal
Checklist: Screen Size Messed Up?
Screen Size Testing Files
termtest: Send Repeated Characters to Terminal
Errors Erased Too Soon? Try These Workarounds

42.1 Making Sense Out of the Terminal Mess

When you're sitting in front of a terminal, it's sometimes hard to realize that you're face to face with about twenty-five years of accumulated history, with hack piled upon hack to deal with evolutions in hardware.

When you type at a terminal, you are really dealing with four things:

  1. The shell, utility, or application that interprets and responds to what you type.

  2. The UNIX kernel, or more specifically, the serial line driver, which may perform some low-level conversions on what you type before it's even passed to the program you think you're talking to.

  3. The terminal, which has behavior of its own - and may locally interpret or respond to some of what you type instead of, or as well as, passing it through to the system.

  4. The communication link between the terminal and the system.

Some of the confusion about UNIX terminal handling comes from the fact that there are mechanisms for dealing with each of these layers. Let's take the list in the reverse order this time:

The point of this long excursion is to suggest that when you are trying to figure out problems with terminals, you owe it to yourself to know about all the levels where the problems can occur. (For example, article 8.20 is about backslash handling.)

Are the terminal and computer system properly configured? Has the cable come loose? Is the terminal type set correctly so that programs know how to make that particular terminal do their bidding? Has an interrupted program sent out unfinished commands that left the terminal in an inconsistent or unusual state? Is it really a terminal problem, or is it just that things aren't working quite the way you expect?

- TOR


Previous: 41.12 Finding Out What Characters Your Terminal's Special Keys SendUNIX Power ToolsNext: 42.2 Fixing a Hung Terminal or Job
41.12 Finding Out What Characters Your Terminal's Special Keys SendBook Index42.2 Fixing a Hung Terminal or Job

The UNIX CD Bookshelf NavigationThe UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System