Today I uninstalled the GUI packages on my home CentOS installation. Now, when the machine starts, I get the login prompt. It acts finicky. Sometimes pressing enter just once after answering each prompt works. Other times, no. When I manage to get logged in, I can only enter commands in bash by entering one character at a time -- that is:

l, enter
o, enter
c, enter
a, enter
l, enter
e, enter

Does anyone have some insight for this?

UPDATE: This is the result of stty -a:

speed 38400 baud; rows 64; columns 160; 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 cdtrdsr
-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

None of the settings that differ from stty sane make a difference, though.

  • Did it act strangely before? (Don't assume; if you don't know, say so.) What reason do you have to suspect that this is related to character encoding? – user Jan 9 '13 at 8:13
  • I don't know if the multi-user mode acted strange before. In the GUI, the 'terminal window' application always functioned normally. I thought maybe it was encoding (or even keymaps) because the keys were being interpreted differently. – tuespetre Jan 9 '13 at 14:14
  • I suspect that two programs are reading from the terminal at the same time, but I don't know which ones that would be. When you have a chance, run ps on the console, or log in remotely and run ps -t tty1. – Gilles 'SO- stop being evil' Jan 9 '13 at 21:49
  • bash and ps were the results. – tuespetre Jan 10 '13 at 2:24
  • ctrl+alt+f2 switched to tty2 and it does not have the issue. Now, how to fix what is up with tty1? Hmmm.... – tuespetre Jan 10 '13 at 2:39

Edit2: http://unixhelp.ed.ac.uk/CGI/man-cgi?stty can help with regard to the stty output. I'd particularly look at your "min = 1" and the different echo* settings

You may wish to try some invocatoin of stty (your example looks a bit like a "stty cbreak" or "raw" mode). Try entering : stty sane

once fixed (if it works) you'll have an easier time to investigate

Edit1: After you added your stty -a settings, I'll show you what differs between yours and mine.

(note that I do mine on an old AIX xterm, so of course there are many differences! But it could point out the relevant one... I let you do the work to see which could be the culpript, as I don't have time right now, sorry!)

To do that, I listed all the keywords stty shows us in "WELIST", and then added a " " in front of every lines of each stty, and displayed them with :

for i in $( cat WELIST) ; do
   I_Have=$(grep "[ -]$i " IHAVE)
   You_Have=$(grep "[ -]$i " YOUHAVE)
   if [ "$I_Have" = "$You_Have" ]
      printf "%-20s : %s\n" "$I_Have"   "BOTH"
      if [ -z "$I_Have" ]
         printf "%-20s : %s\n" "$You_Have" "ONLY you"
      if [ -z "$You_Have" ]
         printf "%-20s : %s\n" "$I_Have"   "ONLY me"
      printf "%-20s : %s\n" "$I_Have"   "me"
      printf "%-20s : %s\n" "$You_Have" "you"

and it gives:

 brkint              : me
-brkint              : you
 bs0                 : ONLY you
 cdtrdsr             : ONLY you
-clocal              : BOTH
 179 columns         : me
 columns 160         : you
 cr0                 : ONLY you
 cread               : BOTH
-crtscts             : ONLY you
 cs8                 : BOTH
-cstopb              : BOTH
 discard = ^O        : ONLY me
 dsusp = ^Y          : ONLY me
 echo                : BOTH
-echoctl             : me
 echoctl             : you
-echoe               : me
 echoe               : you
-echok               : me
 echok               : you
-echoke              : me
 echoke              : you
-echonl              : BOTH
-echoprt             : BOTH
 eof = ^D            : BOTH
 eol = <undef>       : BOTH
 eol2 = <undef>      : BOTH
 erase = ^?          : BOTH
 eucw 1:1:0:0        : ONLY me
 ff0                 : ONLY you
 flush = ^O          : ONLY you
-flusho              : ONLY me
-hupcl               : me
 hupcl               : you
 icanon              : BOTH
 icrnl               : BOTH
-iexten              : me
 iexten              : you
-ignbrk              : BOTH
-igncr               : BOTH
-ignpar              : BOTH
-imaxbel             : BOTH
-inlcr               : BOTH
-inpck               : BOTH
 intr = ^C           : BOTH
 isig                : BOTH
-istrip              : BOTH
-iuclc               : BOTH
 iutf8               : ONLY you
-ixany               : BOTH
-ixoff               : BOTH
 ixon                : BOTH
 kill = ^U           : BOTH
 line = 0            : ONLY you
 lnext = ^V          : BOTH
 min = 1             : ONLY you
 nl0                 : ONLY you
-noflsh              : BOTH
-ocrnl               : BOTH
-ofdel               : BOTH
-ofill               : BOTH
-olcuc               : BOTH
 onlcr               : BOTH
-onlret              : BOTH
-onocr               : BOTH
 opost               : BOTH
-parenb              : BOTH
-parext              : ONLY me
-parmrk              : BOTH
-parodd              : BOTH
-pending             : ONLY me
 quit = ^\           : BOTH
 reprint = ^R        : ONLY me
 60 rows             : me
 rows 64             : you
 rprnt = ^R          : ONLY you
 scrw 1:1:0:0:       : ONLY me
 speed 38400 baud    : BOTH
 start = ^Q          : BOTH
 stop = ^S           : BOTH
 susp = ^Z           : BOTH
 swtch = <undef>     : ONLY you
 tab0                : ONLY you
 tab3                : ONLY me
 time = 0            : ONLY you
-tostop              : BOTH
 vt0                 : ONLY you
 werase = ^W         : BOTH
-xcase               : BOTH
  • Thank you, I will try stty sane when I am able to later today. I did try stty cbreak and stty raw via ssh and they didn't behave the same as the problem, but we will see. – tuespetre Jan 9 '13 at 14:15
  • 2
    Just read man stty, I will be sure to do stty -a on the problem terminal to see what all settings were in effect and share it here if the problem is fixed. – tuespetre Jan 9 '13 at 14:17
  • You can also try the reset command. – jofel Mar 11 '13 at 10:26
  • @jofel and@tuespetre: if you want to try "reset", please, depending on your OS, check what it does first : in bash : use type -all reset to see what alias/function/command it will start, and check those to make sure it will do what you want it to. On some OS, if root, you would reboot your system... on linux, however, it would try to reset the terminal to sane settings. But always beware ^^ (see bhami.com/rosetta.html for a quick glance at how different OS have very different command sets, and some share the same name but have very different meanings) – Olivier Dulac Mar 11 '13 at 15:29
  • @OlivierDulac Thanks for the hint. tuespetre wrote in his that CentOS is used, therefore it should be safe. – jofel Mar 12 '13 at 11:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.