Automatic Setups for Different Terminals

If you work at several kinds of terminals, terminal setup can be tough. For instance, my X terminal sends a backspace character when I push the upper-right key, but the same key on another terminal sends a delete character-I want stty erase () to set the right erase character automatically. Maybe you want a full set of calendar programs started when you log in to the terminal at your desk, but not when you make a quickie login () from somewhere else.

Here are some ideas for changing your login sequence automatically. Some examples are for the C shell and use that shell's switch () and if (). Examples for Bourne-type shells use case () and if (). If you use the other type of shell, the idea still applies; just switch the syntax.

- JP