PDA

View Full Version : strange problems on TTY



freeaks
28th September 2012, 10:07 AM
hi there,
i'm having strange problems on my root term,
- autocompletion doesn't work anymore, pressing tab key gives me a tab space.
- i cannot access history using up and down arrow keys, it print stuff like " [~A " on screen
- and finaly i can see me typing my password in clear while login in

i've setup my system to boot in multi-user.target, so when my machine boot up i'm in a terminal.
it was working fine before and suddenly i got this weird behavior .. password in clear, no more auto-completion, and arrow key show [~A instead of history..
i have no idea what's going on and how can i solve this..

does this kind of problem look familiar to you?
anyone ?

tnx

jpollard
28th September 2012, 11:03 AM
I've only seen that when the terminal mode gets set to echo during the startup of the agetty process attached. Usually this also shows up with double characters when typing normally.

You might try using "stty" to see what the modes are. Mine (working normally) show up as:


$ tty
/dev/tty2
$ stty -a
speed 38400 baud; rows 67; columns 240; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;
eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;
werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 hupcl -cstopb cread -clocal -crtscts
-ignbrk brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff
-iuclc -ixany imaxbel iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt
-echoctl echoke

TEDickey
28th September 2012, 09:50 PM
hi there,
i'm having strange problems on my root term,
- autocompletion doesn't work anymore, pressing tab key gives me a tab space.
- i cannot access history using up and down arrow keys, it print stuff like " [~A " on screen
- and finaly i can see me typing my password in clear while login in

i've setup my system to boot in multi-user.target, so when my machine boot up i'm in a terminal.
it was working fine before and suddenly i got this weird behavior .. password in clear, no more auto-completion, and arrow key show [~A instead of history..
i have no idea what's going on and how can i solve this..

does this kind of problem look familiar to you?
anyone ?

tnx

The "[~A" issue could be a mismatch between the $TERM and actual terminal state. That is, something could have changed your cursor keys to/from normal (or application) mode.

See for example http://invisible-island.net/ncurses/ncurses.faq.html#cursor_appmode.

If the terminal description's complete and applicable to the terminal, then the reset command (which uses the terminal description) will (re)initialize the terminal so that the sense of application/normal mode is consistent.

The comment about echoed password while "loggin in" doesn't make sense either for terminfo setting or stty settings - unless you're referring to running an application after logging into the computer. stty settings are more likely to explain that. Typing "stty sane" can help with that (though again, the settings may not match).