40

I could have sworn that there was once a setting for this in the gnome-terminal "Profile".

And then in some version of Ubuntu, that setting disappeared, and I had to use System ➜ Preferences ➜ Keyboard to uncheck "Cursor blinks in text fields".

Well, neither of those seems to be working now. So how do I make the cursor stop blinking?

21

Yes, there is a setting hidden in gconf.
Open gconf-editor, navigate to /apps/gnome-terminal/profiles/Default, find cursor_blink_mode and change its value to off.

  • Thanks; that did it. Although one of the valid settings (the default, actually) is supposed to be "system". Is that just broken? – Nemo Jun 20 '11 at 1:55
  • I don't think it's broken, as the cursor is supposed to blink by default, or rather by design, and not only in Terminal. There is a system wide setting for that in the Keyboard control window. Not sure if you can turn it off from there though. – mikewhatever Jun 20 '11 at 2:26
  • 1
    As I mentioned in my question, I thought I disabled it globally under the Keyboard settings... But it did not have any effect on gnome-terminal. Which makes me wonder what "system" setting cursor_blink_mode is referring to. Anyway, my problem is fixed. Thanks again. – Nemo Jun 20 '11 at 2:30
  • 1
    @Nemo "system" probably refers to the value of the cursor-blink "gsetting", which you can query like so: gsettings get org.gnome.desktop.interface cursor-blink. There are other cursor-related gsettings that you could tweak as well, like cursor-blink-timeout, cursor-size, etc. – Maxy-B Jan 5 '14 at 18:20
  • I am trying to find the possible alternatives to "off" and "system". I still want a blinking cursor in the active terminal, only not in all the other ones. – Gauthier Oct 29 '14 at 9:07
30

You can disable the blinking also from the command line (gconf-editor is not installed by default):

 gconftool-2 --set /apps/gnome-terminal/profiles/Default/cursor_blink_mode --type string off

For newer versions of gnome-terminal, the command has changed:

gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:$(gsettings get org.gnome.Terminal.ProfilesList default|tr -d \')/ cursor-blink-mode off
  • 5
    In Ubuntu 16.04 the gsettings set ... didn't worked for me. I solved it with gsettings set org.gnome.desktop.interface cursor-blink false. – mmoya Sep 1 '16 at 10:11
  • @mmoya: Hmm, it worked for me. Did you maybe rename your terminal profile from the default name (called "default")? The disadvantage of your solution is that it disables blinking for all applications, not just gnome-terminal. – mdd Sep 1 '16 at 14:20
  • I actually named it as Default, when I opened the profile settings in the UI, it had no name. Anyway it shouldn't matter as the profile uuid is get from the gsettings get ... command, should it? – mmoya Sep 2 '16 at 15:08
  • the gsettings get command gets the uuid of a profile named default (which is the default name), does it work if you change the command to Default? – mdd Sep 5 '16 at 13:12
  • I think I used default as name because the gsettings get ... works. It'd be nice to add a note to the answer saying that the command assumes the profile is called default. – mmoya Sep 5 '16 at 15:54
17

I review this post on almost every single Gnome install. Seems that the actual variable name changes every so often.

My solution: gsettings list-recursively | grep blink

Then I set the link value from True to False. As of now, it is org.gnome.desktop.interface cursor-blink, so:

gsettings set org.gnome.desktop.interface cursor-blink false

Hope this helps someone else in the future!

  • 3
    Thanks for providing a means of finding it rather than just the solution! – Luc Sep 1 '17 at 14:00
  • This solution worked for me in ubuntu 17.10 – xaxxon Oct 31 '17 at 0:51
6

You can send an escape sequence to the terminal (any POSIX compatible, I think) setting the current cursor character using tput:

tput civis    # invisible
tput cnorm    # normal       (usually an underscore)
tput cvvis    # very visible (usually a rectangle)

Just put whatever you prefer in your local runcom script: ~/.zshrc, ~/.bashrc - whatever's your poison - or in the global one in /etc if you wish for it to run for all users.

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.