---
name: "softbeep"
section: "1"
platform: "linux"
package: "softbeep"
version: "0.3-18"
release: "Debian 5.0 (Lenny)"
platforms: ["linux"]
url: "https://new.carta.tech/softbeep"
---

# softbeep(1)

Software Bell for Linux

## NAME

softbeep - Software Bell for Linux

## SYNOPSIS

softbeep **\[program\]**

## COPYRIGHT

**softbeep** is Copyright (C) 2002 Lennart Poettering mz736f667462656570@poettering.de

## DESCRIPTION

This Linux utility program may be used for redirecting beeps of the internal PC speaker to your sound card. It is implemented entirely in user space by using LD\_PRELOAD. It catches four different types of beeps, which can be produced on a Linux system:

- 1\.

  BELL-characters (#7) written to your TTYs, which should normally result in a beep executed by your terminal emulator

- 2\.

  Calls to gdk\_bell() by GTK/Gnome based programs

- 3\.

  Calls to XBell() by Xlib based programs

- 4\.

  Calls to beep() by curses based programs

These together catch most of the beeps of most of the programs I use.

To redirect the beep to the sound card, just run

**softbeep foo**

If you omit **foo** then a sub shell will be spawned where all children processes will have their beep redirected.

Two environment variables SB\_REMOVE\_BEL and SB\_RUN may be used for adjusting **softbeep**  to your needs. When SB\_REMOVE\_BEL is set to "yes" every caught BELL character written to a TTY is dropped, otherwise it is passed to the next layer. SB\_RUN  specifies the program to run when a beep occurs. You may adjust these parameters to your needs in the top of the script **softbeep**. **sb-beep** (a short script playing a wave file via [**esdplay**(1)](/esdplay/1.md), which is shipped with the EsounD distribution) is used for emitting a beep by default. You might want to adjust this script to your individual needs, e.g. for playing different wave files for different programs. You can also set the SB\_PLAYER environment variable to change the program used to play the sound file.

## NOTES

**softbeep** has not been tested intensively with multi threaded programs yet; maybe it works seamlessly, maybe it does not.

Processes with access to several different TTYs at the same time may not be handled correctly. This is a minor bug since there are only very few programs which make use of more than one TTY at once.

SUID/SGID programs like [**xterm**(1)](/xterm/1.md) do not work with **softbeep**. This is a limitation of LD\_PRELOAD (due to security considerations) and not a bug in **softbeep**! Solution for [**xterm**(1)](/xterm/1.md): For catching all the beeps of [**xterm**(1)](/xterm/1.md) you should preload the library to the shell running inside of the [**xterm**(1)](/xterm/1.md), which is not SUID/SGID.

[**ssh**(1)](/ssh/1.md) is a SUID/SGID program on several installations. I currently do not know a way how to work around this.

## AUTHOR

This man page was written by Helge Kreutzmann kreutzm@itp.uni-hannover.de for the Debian GNU/Linux project but may be used by others.

## SEE ALSO

[**esdplay**(1)](/esdplay/1.md), **/usr/share/doc/softbeep/README.gz**
