How do I make the cursor stop blinking when in a TTY? (or anywhere else).
BONUS Points for one universal setting that stops the cursor blinking almost everywhere.
|
How do I make the cursor stop BONUS Points for one universal setting that stops the cursor blinking almost everywhere. |
||||
|
|
|
This gives you a solid yellow block (nonblinking) as a cursor:
For more info check these references: Linuxgazette and EmacsWiki as well as the file |
|||||||||||||
|
|
There is a standard control sequence to turn off cursor blinking on terminals.
However many terminals do not implement this setting, so read on. There is a more widely implemented standard terminal setting for switching cursor visibility between high visibility, normal visibility and invisibility. Some terminals don't make a difference between normal and high, and there's no guarantee that one or the other will or will not blink. In terminfo, emit the These setting will not survive a terminal reset, so you may find that it doesn't survive the launching of many full-screen applications. You can overcome this difficulty by adding the cursor configuration changing sequence to your terminal's reset string.
Some terminals and other applications give you more options:
See also Juri Linkov (Jurta)'s No Blinking page for how to turn off blinking in Lesstif, Tk, Gtk (Gnome), Qt (KDE), Firefox, and more. |
||||
|
|
|
I found this to be easier if you have root permissions:
I put it in the machine startup script like |
||||
|
|
|
In the linux tty you can use the escape sequence
The last command will generate the new terminfo under |
||||
|
|
|
Put
to your PS1 variable and you'll stop blinking constantly. E.G:
|
|||||
|
|
I put
in /etc/rc.local and created a systemd service for it using online instructions. However, I noticed that sometimes after boot the cursor is still blinking. It would be good to know the correct way to permanently turn off cursor blinking via sysfs on a modern systemd system, does anyone have any tips? Some distributions have /etc/sysfs.conf but I am running Arch and don't find this file in sysfsutils or elsewhere. As a temporary fix I ran the following command
Some experimentation showed that the '255c' at the end works better than '127c' listed above, it produces a white rather than grey cursor. |
|||
|
|
|
|||||||||||||
|
|
For Linux console: Alternative 1Add
Alternative 2A better alternative is to put
Alternative 3Another alternative is keeping the hardware cursor (instead of using a software cursor) and stop blinking of the hardware cursor and make it a block cursor. To do so:
However, with this option, the cursor does not become bright white. I guess this is only possible with using the software cursor. After following any of these alternatives, you will obtain a white, non-blinking, block cursor. |
||||
|
|