outsource from india chennai india programmers freelance php coder freelance outsource scripts programming complicated perl patterns php module installation
outsource from india perl installation and configuration php installation linux system administration US$15,US$19,US$11,US$10 cheap programmer
india outsource outsource india chennai india programmers php perl mysql freelance freelance programmer
SHOWCASE of php and perl scripts CONTACT US for php custom perl scripts
HOME
 
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:

  • ESC-[10;xx] selects the bell frequency in Hertz. The value should be in the range 21-32766, otherwise the result is undefined. If the `xx' argument is missing, the default value (750Hz) will apply, as in `ESC-[10].
  • ESC-[11;xx] selects the bell duration, in milli-seconds. If you specify more than 2 seconds, the default applies (125ms). Once again, if the `xx' argument is missing (ESC-[11]) the default value will be used.

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
Linux HOWTO full list
   This document, LDP HOWTO-INDEX, is copyrighted (c) 1995 - 2002 by Tim Bynum, Guylhem Aznar, Joshua Drake and Greg Ferguson. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is available at http://www.gnu.org/copyleft/fdl.html. If you have questions, please contact the LDP.
Web Design Copyright © 1999-2003. Chrisranjana Software Solutions Pvt Ltd. syndicate rss feed