Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I do not have an internal speaker in my computer. Usually, I rely on the window manager to play a beep through my soundcard when there's a terminal bell, but since I upgraded, that is not working.

I've read that this might be because of compiz, and I tried adding the following to my /etc/pulse/default.ca, but it is not working:

load-sample-lazy x11-bell /usr/share/sounds/gnome/default/alerts/drip.ogg
load-module module-x11-bell sample=x11-bell

Can anyone give me a hint here?

share|improve this question

2 Answers 2

To fix this problem persistently:

  • Run gconf-editor and use it to change desktop | gnome | peripherals | keyboard | bell_mode from off to on
  • Add pactl upload-sample /usr/share/sounds/gnome/default/alerts/glass.ogg bell.ogg to the file ~/.xprofile
  • Add [ "$DISPLAY" ] && xset b 100 to the file ~/.bashrc

The simplest way to activate this solution is to reboot.

Further, to implement this solution immediately for a terminal window that is already open, run the pactl command and run the xset command in the terminal window in question.

share|improve this answer
up vote 0 down vote accepted

I've got it figured out. For some reason, maybe it's Unity startup, the X11 bell is disabled by default.

Using the PulseAudio config in my question above, and the following commands issued in a terminal, it works:

xset b on && xset b 100

However, when you reboot, it'll be disabled again, so here's what I did:

  1. Create a file called /home/[youruser]/bin/bellon and put the following text in it:

    #!/bin/sh
    xset b on && xset b 100
    
  2. Type chmod +x /home/[youruser]/bin/bellon

  3. Open the startup applications control panel
  4. Click Add on the right
  5. In the "name" field, put bellon
  6. In the "command" field, put /home/[youruser]/bin/bellon
  7. Click the add button in the dialog.
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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