Turn off gtk cursor blink (Shallow Thoughts)

Akkana's Musings on Open Source Computing and Technology, Science, and Nature.

Sat, 28 Jul 2007

Turn off gtk cursor blink

It's a small thing, but xchat's blinking text cursor has irritated me for a while. It's not so much the blink itself that bothers me, but that it makes the mouse pointer flicker. (I have no idea why blinking the cursor should make the X mouse pointer flicker, but it was pretty clear that they were in sync.) I've also seen fingers pointed at cursor blink as a laptop battery eater (one more reason the CPU has to wake up every second or so when it might otherwise have been idling) though I've seen no numbers on how significant that might be (probably not very, on most laptops). Anyway, there are reasons enough to look into turning off the blink.

Xchat is a gtk application, of course. There are lots and lots of pages on the web telling developers about gtk's gtk-cursor-blink property (and related properties like gtk-cursor-blink-timeout) and what they do in at a library level, so it's clearly possible. But I found nothing about where a user should set these properties to make gtk find them.

Here's the answer. Add to $HOME/.gtkrc-2.0 (or any other file loaded by $HOME/.gtkrc-2.0):

gtk-cursor-blink = 0

I had to restart X (maybe shutting down all gtk apps would have been enough) before I saw any effect.

While I was searching, I did find a nice page on How to disable blinking cursors in lots of different apps. Its gtk section didn't seem to do anything here (maybe it only works if a gnome desktop is running), but it's a good page nontheless, full of useful advice for turning off cursor blink in other programs.

Tags: ,
[ 20:50 Jul 28, 2007    More linux | permalink to this entry | ]

Comments via Disqus:

blog comments powered by Disqus