Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

^H at login 1

Status
Not open for further replies.

CuthbertDibbleGrub

IS-IT--Management
Nov 7, 2003
8
0
0
GB
Hi all,

How can I influence the erase character at the login prompt?

It's fine once logged in, but is incorrectly set to ^? if used at login prompt. Evident via Telnet & other terminal emulators.

Many thanks
 
The only way you can control that (as far as I know) is by changing Backspace to Delete in the terminal emulator (or vice-versa).

Obviously you can't stty erase until after you've logged in.

Note that you can usually use Ctrl-Backspace (or Delete) instead at the login prompt to erase the characters.

Annihilannic.
 
Unfortunately this is inappropriate at login. I'd like the Solaris box to recognise ^H if I erase during login i.e. I mistype my username. Once in, ^H (backspace key) is fine.
I'd guess it's a terminal definition issue. Our Unixware servers do not act this way (using the same emulators & settings). They accept ^H during login with no problem.

 
can the stty erase be added to your logon profile.. I think I tried to set it up that way once but never got it to work right.
 
I agree with Annihilannic. I find it's better to change the setting in the terminal emulator. Set it to make the Backspace key send a Delete character. Then, it just works as expected in everything without having to do an [tt]stty erase[/tt].

Hope this helps.

 
Hmmm. I appreciate that setting our emulator to send ^? would solve it (although Telnet sends ^H too, so why should I...), but I am really after how ^? is set by the Solaris server in the first place before any .login, .profile files are executed. getty, perhaps? Once logged in, ^H is used (and hasn't been set deliberately since the server was built). Why the difference? stty erase is absent in both user and default profiles and login scripts. As I say, all our previous Ubixware/HPUX boxes didn't act this way (and still don't, using same emulator settings or Telnet).

Simply weird.
 
Well, I've trawled the in.telnetd and login man pages and configuration files and don't see anywhere you can control it, I'm afraid.

Linux seems to behave the same way as Sun. SCO OpenServer (like Unixware) will happily accept ^H as an erase character at the login prompt.

I think it's just that way for historical reasons, and you'll have to live with it!

Annihilannic.
 
God bless those Uzenet newsgroups - here's the answer I received there (and it seems to work like a dream!):

You may modify the /kernel/drv/options.conf file and replace "7f" with"8".

For example, modify -

ttymodes="2502:1805:bd:8a3b:3:1c:7f:15:4:0:0:0:11:13:1a:19:12:f:17:16";

to

ttymodes="2502:1805:bd:8a3b:3:1c:8:15:4:0:0:0:11:13:1a:19:12:f:17:16";

Reboot
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top