[Next] [Previous] [Up] [Top] [Contents] [Index]
Chapter 9: Working Environment
You can specify your terminal type to UNIX if the default is not suitable. To do so, enter the command for the C shell family:
% set term=termtype
or for the Bourne shell family:
$ TERM=termtype; export TERM
where termtype is the name of a terminal type supported on the system. vt100, vt220 and xterms are acceptable terminal types. If you always use the same kind of terminal, you may want to put this command in your .login or .profile. Note that the standard Fermi files attempt to set this variable correctly.
In Section 2.4 we listed some terminal control functions. Recall that you can display the settings with the stty command:
% stty -a
The format on each machine is different but should indicate approximately the same information. The following is the output from a Silicon Graphics workstation. The settings reflect the FUE defaults.
|
In this display the second and third lines display the FUE default control characters. The character ^ indicates the control key (e.g., ^C represents <Ctrl-c>). Your reference books will most likely tell you to delete a character with the # key and delete a line with the @ key, but this is not correct at Fermilab. Use the character indicated as erase in the stty output for single character deletion, and kill for whole line deletion. The Fermi UNIX Environment defaults for these operations are the delete key and <Ctrl-x>, respectively.
You can display a description of all of the options reported by stty with the command:
% man stty
If you don't like the FUE defaults, you can also set these functions with the stty command. The form for setting them is:
% stty control-char c
where:
is one of the functions in the table in section 2.4.
is the representation of the key to be used for that function. A control character is specified preceded by a caret: ^x represents <Ctrl-x>.
Example:
% stty kill '^y'
There are two special representations: ^? is interpreted as the delete key and ^- is interpreted as undefined. You must include the quotes as shown in the example so that special characters are not interpreted incorrectly. You must be careful not to have two functions represented by the same key.
There are many other options that can be set with stty. Others that might be of interest are echoe which specifies that deleted characters are erased, and -tabs which specifies that the tab character be translated into the appropriate number of spaces. Refer to the man pages for more information.