Previous Next Contents

3. Per-console Beep Configuration

As of Linux 1.3.43, Martin Mares added configurability to the bell sound in console.c. You can change the duration and pitch of the console beep on a per-console basis, by writing escape sequences to the tty. You can apply your configuration in your own ~/.profile or ~/.login, to have a different beep (or no beep) associated to each console.

The escape sequences work as follow:

To print the escape sequences, you can try for example (50Hz, 1s) "echo -e "\33[10;50]\33[11;1000]"" with bash (where "-e" means `understand escape sequences'. With tcsh "echo "\033[10;50]\033[11;1000]" will have the same effect.

Note that a new `setterm' command might support bell configuration of command line, as these control codes are marked as `setterm-commands'. However, no `setterm' version I know of supports these codes.

If you run Linux-1.3.43 or newer, you may be satisfied with the escape sequences and avoid reading further. If you run an older kernel (I do it myself, on a small 386), or if you want the visual bell, have a good reading.


Previous Next Contents