Visible bell mini-Howto: Defining a visible bell

Rate this post

prev-8410501 next-1403867 toc-6815982

You can add the entry for the vb capability in your own termcap file. Dennis Henriksen ( suggested to insert the following line in the termcap entry for console:


The trailing backslash is used to escape the newline in the database. Dennis’ code does the following (his own words):

  • Save the cursor position (Just a safety precaution)
  • Change the background color several times between normal and reverse
  • Restore the cursor position.

Some warnings about modifying termcap:

  • Check what your TERM variable looks like: it used to be « console », but it depends on your distribution and kernel version. Actually, it is due to change to « linux ».
  • Check if the vb field is already there, distributors are reading docs and upgrading their software all the time.
  • Some applications don’t use termcap but the terminfo database. They won’t sense your vb entry. Terminfo is more powerful than termcap, as well as more difficult.

prev-8410501 next-1403867 toc-6815982

Lire aussi...  Next Linux 2.4 Kernel: some tips by Alan Cox LG #57