Operating System - HP-UX
1827470 Members
2554 Online
109965 Solutions
New Discussion

VT Terminal Configuration

 
SOLVED
Go to solution
Robert Milne
Frequent Advisor

VT Terminal Configuration

Hello again !
Could anyone please point me to the right resources/help for configuring VT terminals (VT220 & VT320) in the HP-UX11i environment. Most importantly keyboard mapping how-to, most specifcally the Backspace key (CTRL-H).

Thanks again.

Rob.
"For every pleasure there's a tax."
5 REPLIES 5
Stefan Farrelly
Honored Contributor
Santosh Nair_1
Honored Contributor

Re: VT Terminal Configuration

Use the command stty erase to set the backspace key, i.e.:

stty erase ^H

should do the trick. Set this in your .profile if necessary.

-Santosh
Life is what's happening while you're busy making other plans
Sanjay_6
Honored Contributor

Re: VT Terminal Configuration

Wodisch
Honored Contributor
Solution

Re: VT Terminal Configuration

Hello Robert,

it is fairly important to set the $TERM environment variable correctly, as many programs use this to *learn* about your terminal equipment.
Usually you do this autmagically using commands like "tset" or "ttytype", which in turn use definition/config files like "/etc/ttytype". And in there you have lines for each and every *terminal* device - which today will be networked TELNET sessions, most often. So you would insert lines for ALL YOUR PSEUDO DEVICES for TELNET and RLOGIN, plus lines for your really serially connected terminals. Each line consists of the terminal type name (for TERMINFO) and the "basename" part of the device, e.g. for a VT220 on MUX 2 port 3 it should look like:
vt220 tty1p2
since instances are counted starting with 0, the second MUX will be number "1", and the third port will be number "2".
Now to activate this, you would have to insert a line like this in your stations "/etc/profile" (I do assume you use POSIX- or Korn-shells):
...
eval $(tset -shQ)
...
without the ellipsis, of course. :-)
If you now login on a serial terminal, your TERM variable should be set correctly.
Then try "untic" to display the settings you get from TERMINFO that way. In there you will find so called Escape-Code-Sequences for clearing the screen, moving the cursor, definitions wht your terminals send to your UNIX station when you press some function- or cursor-key, and such.
That has to match your setup in the terminal itself! No point in setting up the terminal to use "DELETE" for the *backspace* key, when HP expects this key to send the code \010 (which is 8 = backspace)!

Hence the next command in your "/etc/profile" just following the one above, would be like:
stty erase ^h kill ^u susp ^z intr ^c echoe echok -istrip
This would set your correction key to "backspace" ("^h" reads control-H), ignore-the-whole-input-line key to Control-U (read: undo), the key for Job-Control to Control-Z, and the interrupt key (to abort processes running in the foreground) to Control-C, while echoing *space*backspace*space* for every correction key you type (so the *wrong* keys really disappear), and sending a new-line, whenever your press Control-U (to show you that the input line has been discarded and you have to retype everything).

Tell me, if you read that far and/or need more information :-)

HTH,
Wodisch (who managed to write and compile TERMINFO entries and burn according terminal (E)EPROMs for many years)
Robert Milne
Frequent Advisor

Re: VT Terminal Configuration

Thanks all and Wodisch for your help !

Yes, the $TERM variable is important, but having the system determine it using tset or whatever from either my old VT's or my PC terminal emulator, it doesn't always get it right and/or doesn't find the corresponding vt in the provided config files. If I force TERM to vt220 it seems to work OK. What other VT's are supported ?

On the clue for the stty settings I noticed when you do a stty -a on the DEC UNIX box it actually returns erase = ^? So when entering this into HP-UX it works ! Interestingly stty -a shows this on HP to be erase = DEL
Interestingly the backspace key on a VT keyboard is actually labelled as a
Thanks for all.
Rob.
"For every pleasure there's a tax."