LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 04-26-2013, 03:12 AM   #1
simopal6
Member
 
Registered: Jun 2006
Location: Italy
Distribution: Slackware 13.1
Posts: 217

Rep: Reputation: 30
Can't backspace password (e.g. su and ssh password) on Xterm


Hi guys,
I have a problem with inserting passwords in Xterm. I used to use KDE and Konsole, and never had any problems; recently, I switched to Fluxbox and xterm, and since then I haven't been able to use the backspace key when typing passwords, that is, when I try, I always get a wrong password error, as if it didn't delete the previous characters but add new ones. My idea is that the password-reading program is not able to decode the characters representing backspace, but I really don't know how these things work.

I thought it could be a problem related to Termcap, since on Xterm I use the "xterm-256color" terminal and on Konsole I probably used something else, but I made some tests and I think that's not the issue: in fact, using any terminals (i.e. "linux", "xterm-256color" and "xterm"), when I use Xterm I experience this problem, whereas when I switch to a non-X console (by pressing Ctrl-Alt-F2, for example), using the same terminals, it works correctly.

So, it seems to be something related to Xterm. Also, this only happens when typing passwords; otherwise, the backspace key works fine.

Does anybody have any idea about this?
Thank you!
 
Old 04-26-2013, 01:58 PM   #2
jdkaye
Senior Member
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 4,779

Rep: Reputation: Disabled
This link may be of use to you even though it's a Mac site. http://hints.macworld.com/article.ph...40930002324870 Go down to the post entitled "There is another way".
jdk
 
1 members found this post helpful.
Old 04-27-2013, 05:24 AM   #3
simopal6
Member
 
Registered: Jun 2006
Location: Italy
Distribution: Slackware 13.1
Posts: 217

Original Poster
Rep: Reputation: 30
Thanks, that did it!

"stty -a" showed that erase code is ^?, but on Xterm backspace sends ^H (on the regular Linux console it correctly sends ^?). If I use "stty erase ^H", then everything works, and I'm able to use backspace when typing passwords.

What I don't understand is why backspace normally works on Xterm then, if the character it sends is ^H.

Apart from this, how can I make the change permanent? I'm now editing .bashrc so that if $TERM is "xterm" then it calls "stty erase ^H", but is there a cleaner way?

Thanks!
 
Old 04-27-2013, 09:21 AM   #4
jdkaye
Senior Member
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 4,779

Rep: Reputation: Disabled
Salve,
Since I never had that problem, I've never looked for a solution. If you do a search for that problem I'm sure there are solutions out there. That's how I found the solution I posted here.
Buona Domenica,
jdk
 
Old 04-28-2013, 03:16 AM   #5
simopal6
Member
 
Registered: Jun 2006
Location: Italy
Distribution: Slackware 13.1
Posts: 217

Original Poster
Rep: Reputation: 30
Ok, grazie
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] SSH: Asks for password: Permission denied (keyboard-interactive,password). tulicloure Linux - Newbie 7 02-14-2012 09:48 AM
ssh keeps asking for password chaitrapavan Linux - Newbie 2 04-12-2011 03:43 PM
ssh without password fernfrancis Linux - Newbie 3 07-06-2010 02:06 AM
SSH not asking for password abefroman Linux - Server 5 01-10-2009 10:16 AM
backspace key in xterm via ssh jeffreybluml Linux - Newbie 7 08-20-2006 04:01 PM


All times are GMT -5. The time now is 07:54 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration