9.6 Setting Terminal Parameters

   

A variety of terminals having different capabilities are used with HP-UX systems. Many of these terminals have different keyboards and key mappings. As an example, different keys may be used for the delete and backspace characters on different types of terminals. HP-UX provides the facility to change and modify control key mappings with the Set Terminal Type ( stty ) command. This command can be used to map a certain control character to a key sequence. The stty command with no arguments shows current control commands and their respective key mappings. It also shows current baud rate, start/stop bits, parity, flow control, and other information when invoked with the -a option.

 $  stty -a  speed 9600 baud; line = 0; rows = 24; columns = 132 min = 4; time = 0; intr = ^C; quit = ^\; erase = ^H; kill = ^U eof = ^D; eol = ^@; eol2 = <undef>; swtch = <undef> stop = ^S; start = ^Q; susp = <undef>; dsusp = <undef> werase = <undef>; lnext = <undef> parenb -parodd cs7 -cstopb hupcl -cread -clocal -loblk - crts -ignbrk brkint ignpar -parmrk -inpck istrip -inlcr -igncr icrnl -iuclc ixon -ixany ixoff -imaxbel -rtsxoff -ctsxon ienqak isig icanon -iexten -xcase echo echoe echok -echonl -noflsh -echoctl -echoprt -echoke -flusho -pendin opost -olcuc onlcr -ocrnl -onocr -onlret -ofill -ofdel - tostop $ 

If you want to set the underscore character ( _ ) as the backspace key, you can use the following command. After that, you can use the underscore key to work as the backspace key.

 $  stty erase _  $  stty -a  speed 9600 baud; line = 0; rows = 24; columns = 132 min = 4; time = 0; intr = ^C; quit = ^\; erase = _; kill = ^U eof = ^D; eol = ^@; eol2 = <undef>; swtch = <undef> stop = ^S; start = ^Q; susp = <undef>; dsusp = <undef> werase = <undef>; lnext = <undef> parenb -parodd cs7 -cstopb hupcl -cread -clocal -loblk - crts -ignbrk brkint ignpar -parmrk -inpck istrip -inlcr -igncr icrnl -iuclc ixon -ixany ixoff -imaxbel -rtsxoff -ctsxon -ienqak isig icanon -iexten -xcase echo echoe echok -echonl -noflsh -echoctl -echoprt -echoke -flusho -pendin opost -olcuc onlcr -ocrnl -onocr -onlret -ofill -ofdel - tostop $ 

As you can see in the fourth line of the output, the new setting shown by the stty command, the value of erase is changed. Usually, people establish such settings in the startup files. If a setting is needed for all system users, the system administrator sets it as /etc/profile .


   
Top


HP Certified
HP Certified: HP-UX System Administration
ISBN: 0130183741
EAN: 2147483647
Year: 2000
Pages: 390
Authors: Rafeeq Rehman

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net