2

If I repeatedly execute

echo -e "\a"

it will only sound on regular intervals rather than every time I execute the command.

I've tried shortening the duration using xset but this doesn't seem to impact anything.

Running enlightenment17 on archlinux 64-bit using xterm to issue the commands

2
2

Works for me?

I tried this on my Fedora 19 laptop and I get a continuous stream of beeps.

$ while [ 1 ] ; do echo -e "\a";done

There are a couple of areas that come to mind when you do something like this that might cause a delay. Two such areas are the keyboard buffer and the sound system needing to drive the speaker.

Xset controls?

Another area that I would consider a source of the delay would be the bell controls under xset. See the man page for xset.

excerpt

   b       The b option controls bell volume, pitch and duration.  This 
           option accepts up to three numerical parameters, a preceding 
           dash(-), or a 'on/off' flag. If no parameters are given, or the 
           'on' flag is used, the system defaults will be used.  If the dash 
           or 'off' are given, the bell will be turned  off. If  only  one  
           numerical parameter is given, the bell volume will be set to that 
           value, as a percentage of its maximum.  Likewise, the second 
           numerical parameter specifies the bell pitch, in hertz, and the 
           third numerical parameter specifies the duration in milliseconds.  
           Note that  not  all  hardware can vary the bell characteristics.  
           The X server will set the characteristics of the bell as closely 
           as it can to the user's specifications.

Example

You can query xset's current settings using the q command like so:

$ xset q
...
  bell percent:  50    bell pitch:  400    bell duration:  100
...

To change the values you use xset b:

$ xset b 10 100 10

You can play with the values to get different effects.

What if I'm using Gnome-terminal or Konsole?

If you're using a terminal emulator from a desktop environment such as GNOME, it might use settings from that desktop environment. For example, for Gnome-terminal, perhaps you need to change these settings within GNOME itself. Sure enough if you use the application dconf-editor you can browse to this location and change these settings as well.

      ss of dconf-editor

The above hierarchy is as follows: org -> gnome -> settings -> peripherals -> keyboard. You can also get the hierarchy like this:

$ dconf dump /|grep keyboard
[org/gnome/settings-daemon/peripherals/keyboard]

NOTE: You can also dump these settings via the command line using the command line tool gsettings.

$ gsettings list-recursively |grep org.gnome.settings-daemon.peripherals.keyboard |grep -E "bell|delay"
org.gnome.settings-daemon.peripherals.keyboard bell-custom-file ''
org.gnome.settings-daemon.peripherals.keyboard bell-duration 100
org.gnome.settings-daemon.peripherals.keyboard bell-mode 'on'
org.gnome.settings-daemon.peripherals.keyboard bell-pitch 400
org.gnome.settings-daemon.peripherals.keyboard delay uint32 500
org.gnome.settings-daemon.peripherals.keyboard bell-custom-file ''
org.gnome.settings-daemon.peripherals.keyboard bell-duration 100
org.gnome.settings-daemon.peripherals.keyboard bell-mode 'on'
org.gnome.settings-daemon.peripherals.keyboard bell-pitch 400
org.gnome.settings-daemon.peripherals.keyboard delay uint32 500

References

1
  • I've already been using xset to change the duration and that doesn't affect it. It still only activates about once every 0.2 seconds – lightandlight Jan 16 '14 at 0:18
0

It's probably a feature of your terminal emulator.

For example, PuTTY has the following default settings:

  • Control the bell overload behaviour
    • Bell is temporarily disabled when over-used [ON]
    • Over-use means this many bells [5]
    • ... in this many seconds [2]
  • The bell is re-enabled after a few seconds of silence
    • Seconds of silence required [5]

The idea, as I understand it, is to prevent a rogue program from creating continuous annoying beeps.

I don't know what other terminal emulators have similar features.

3
  • 1
    I'm using xterm, the man page doesn't suggest that there are any of these settings, however it would make sense if there were – lightandlight Jan 16 '14 at 1:16
  • There's something called "bell urgency", visible as "Enable Bell Urgency" in xterm's middle-click menu and as the BellIsUrgent resource. I'm not sure whether that's relevant. – Keith Thompson Jan 16 '14 at 1:31
  • 2
    @KeithThompson No, urgency is unrelated, it tells xterm to set the ICCCM urgency hint which tells the window manager to draw the user's attention to the window (e.g. make its border flash, bring it forward, …). – Gilles 'SO- stop being evil' Jan 16 '14 at 1:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.