Linuxdoc Linux Questions
Click here to ask our community of linux experts!
Custom Search
Next Previous Contents

4. Per-console Beep Configuration

As of Linux 1.3.43, Martin Mares added the ability to configure the pitch and duration of the beep, by modifying console.c. Each console can be configured to feature a different duration and/or pitch of the bell sound; the task is accomplished by using escape sequences to the console device. You can configure your own ~/.profile or ~/.login file to select a different beep sound associated to each console (or no beep at all, if needed).

The escape sequences work as follow:

To select, for example, a 50Hz pitch for one-second duration, you can "echo -e "\\33[10;50]\\33[11;1000]"" with bash (where "-e" means `understand Escape sequences'. If you use tcsh the same command spells "echo "\\033[10;50]\\033[11;1000]"".

Although I don't know of any version of the setterm command that supports such configuration, a future version of the command might well support a command-line option to configure the bell sound.

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, or if you want the visual bell, you'll enjoy the rest of this document.


Next Previous Contents