System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

At cmd prompt, typing an at sign erases to beginning of line!

SOLVED
Go to solution
Lee Hallin
Advisor

At cmd prompt, typing an at sign erases to beginning of line!

I have a server running 11i. 

 

One logon (root) works fine..I can type username@location with no problem.

 

Using a different login, if I type username<at-sign>, it INSTANTLY erases what I have typed as soon as I type the <at-sign>.

 

I have looked at /etc/password and .profile and both have a modify dates of years ago.

 

I replaced the contents of .profile with a single echo command.  The echo executes but the bad behavior still exists.

 

Any ideas on what may be causing this behavior?

 

Thanks, Lee

2 REPLIES
Matti_Kurkela
Honored Contributor
Solution

Re: At cmd prompt, typing an at sign erases to beginning of line!

This is a very old behavior, designed back when terminals had a printer instead of a display. A printer terminal cannot (efficiently) erase any previous output, so it needs to have another way of allowing the users to correct their typos. The characters "#" and "@" were the default characters for this purpose: on HP-UX, they are still the kernel default values if terminal type cannot be identified at login time.

 

Run "stty -a". You will most likely see that "@" is currently set as the KILL character: when that character is input, the entire line is erased, just as you've experienced.

 

You may notice that other control characters (mainly INTR and ERASE) are not what you would normally expect, too.

 

You might want to check the value of the environment variable $TERM, too: often when stty settings are left to kernel defaults, you'll find that $TERM is set to "dumb" too. You'll want to set it to some value that is a better match to the capabilities of your terminal/emulator.

 

My own HP-UX .profile usually has this command as a line of defense against possibly badly-maintained global defaults. It will set the terminal control characters to known good values:

stty intr ^C kill ^U erase ^? susp ^Z

 

(Note: depending on how your terminals/terminal emulators are configured, you might want to set the erase character to ^H instead.)

MK
Lee Hallin
Advisor

Re: At cmd prompt, typing an at sign erases to beginning of line!

Matti,

Thank You, Thank You, Thank You!  That was the problem; although $TERM was set to vt100.

The .profile in root DID have the stty command but the stty was not in the other user .profile.

 

Thanks again, Lee