6

I have a problem with my Ubuntu server. I start a new remote ssh session (from windows putty or ubuntu client) to my server. After a while (I think it is when I hide the console window), my input is not shown in the console. But when I type for example "ls", I get the listing.

This means that the input was sended, but I don't see it. I can only close the console and start a new ssh session. But the next annoying point is, that when I start a new screen and I have this problem there, it don't go away after reconnecting. I have to restart the screen bash.

Does anyone have an idea whats going wrong? It seems that it is a problem on the server, because I tried with windows and linux with the same result.

thanks plucked

20

This can happen after a program dies leaving a terminal in an abnormal state. To fix it temporary you "reset" the terminal with:

$ reset
| improve this answer | |
  • If reset fixes your problem, then you probally are running an application which messes with your terminal settings. – fpmurphy Aug 26 '09 at 15:18
  • In the rare cases where the icrnl line setting has been disabled, it is advisable to type Control-J reset Control-J. (you can ignore the spaces). Return typically sends CR, which is converted to NL on input if icrnl is enabled. If it's not, then typing something and pressing Return does not send the command to the shell. – ΤΖΩΤΖΙΟΥ Oct 30 '09 at 1:08
  • After running reset, I get this message: "reset: unknown terminal type xterm-256color Terminal type?" Could you clarify how to handle this? – user5198077 Apr 22 at 22:42
2

While @rkthkr's answer worked for me, it has the unfortunate side-effect of changing my terminal window dimensions from what they were - which in some cases, I suppose this may also have been corrupted and also in need of a reset.

With this in mind, I'm using:

$ stty sane

From man stty:

   sane   same as cread -ignbrk brkint -inlcr -igncr icrnl  -iutf8  -ixoff
          -iuclc  -ixany  imaxbel 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, all special characters to their default values

In my particular case, using pv -c (pipe viewer) consistently caused my input to go hidden. For now, I've actually scripted a stty sane command after my command that uses pv -c to ensure that my terminal remains functional.

| improve this answer | |
  • This is happening far too often for me. Is there anything wrong with adding stty sane to PROMPT_COMMAND? – jozxyqk Jul 12 '17 at 18:48
0

When you can't see the command that you are typing, can you see the prompt and the cursor?

If not, the next time that happens, try the clear command, then try typing something and see if you can see it.

If this helps, then it probably means that your prompt is hidden below the bottom of the window for some reason. Either resize the window or scroll back down (you may have scrolled up in the window buffer somehow).

| improve this answer | |
  • I don't see the cursor and clear doesn't help )o: – plucked Aug 26 '09 at 11:28
  • Do you see the prompt? Did clear clear the screen? – Paused until further notice. Aug 26 '09 at 12:56

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.