43

It happens often that my cursor on gnome-terminal disappears, forcing me to work on a new tab/window. It seems like a random occurrence. Does anyone else experience this? What about other X terminal emulators? How can I fix this (or maybe it's just a bug)?

update: A simple work-around is to switch away from the terminal and switch back.

update 2: I don't experience this any more, maybe because I'm using GNOME 3 version of the terminal.

65

If running Ctrl+Q (as described in another answer) doesn't work, it's possible that your TTY has been mangled by some other program you've run. Try running the reset command and then the clear command (or Ctrl+L, its equivalent) to initialize your terminal.

1
  • Sometimes after I run this one program (k9s, awesome kubectl terminal UI), this happens. The reset command worked, thanks! – Oliver Oct 9 '20 at 13:37
37

You may have inadvertently hit the VT320 escape sequence to hide the cursor. If so, then neither Ctrl+Q, nor reset, nor clear, nor Ctrl+L will help.

What worked for me was to use the following command to send the VT320 "unhide" command sequence:

echo -en "\e[?25h"

4
  • 1
    I just hit this, thanks for the answer. I wonder how it happened in the first place, but oh well (: – jwd Apr 29 '19 at 21:37
  • 1
    This is by far the most likely(and useful) explanation. Switch off software flow control in the other instances, so ctrl-q/ctrl-s do nothing. – Graham Nicholls Aug 24 '19 at 16:14
  • 1
    thanks this was direct and worked perfectly :D – Martin Castle Aug 6 '20 at 11:07
  • I guess this escape sequence may show up when we are copying/pasting text from one terminal emulator window to another. – Esmu Igors Jan 21 at 15:24
7

Could it be that you inadvertently press Ctrl+S, sending XOFF to your terminal and thus locking it?

Next time it happens, try pressing Ctrl+Q to unlock it.

3
  • No, that's not it. – tshepang Feb 4 '11 at 15:44
  • 1
    Aha, that's what happened to me! Thanks to you that I'm learning about Ctrl-Q now! – imz -- Ivan Zakharyaschev Apr 27 '11 at 12:29
  • Reading extra comments: I always wondered why did my terminal randomly lock. This might be it : D – arod May 23 '18 at 13:42
1

Press (CTRL+G) or (CTRL+A)then (Ctrl+L) to initialise terminal. This worked for me, first selecting the group then initialise.

0

This occurred on my PC with Ubuntu 18.04 (GNOME terminal 3.28.2). I tried the command reset, clear as well as Ctrl+L and these did not enable the cursor for me.

I gave in and used the mouse with the menu item 'Terminal|Reset and Clear' and this worked.

0

reinstalling gnome,gnome-terminal, and gnome-core solved it for me.

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.