Hi, I have a strange problem.
My audible bell in the terminal doesn't work. Beep doesn't work either. I've googled all over but haven't found a fix. I've checked my terminal settings to make sure it's turned on. I tried running cmus, and it worked. All of my sound works, but the audible bell doesn't. Help!
Linux Mint Olivia, iMac 8,1
Audible bell not working
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Audible bell not working
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: Audible bell not working
The PC speaker driver (pcspkr) by default is blacklisted and not loaded. Loading it won't help most likely, as I think many laptops don't have a PC speaker. In any case, PulseAudio captures the bell event and plays a sample through your sound card for it and doesn't pass it on to the PC speaker. So the issue here is that there is no sample loaded, which is the case by default. This can be remedied easily.
You didn't mention which edition of Linux Mint you are using (Cinnamon, MATE, Xfce, or KDE) so I can only give you the commands to do this from the terminal.
Here goes. You'll need to edit the file /etc/pulse/default.pa as root. Do that with the command:
Scroll to the very end of the file (it's a long file) and append these two lines:
You can then save and close this file (Ctrl+O, Enter, Ctrl+X). Then restart PulseAudio and wait till your volume control icon reappears (this can take some seconds):
Now running either of the following commands should give you a sound for the bell:
The sample I'm using for the bell, /usr/share/sounds/freedesktop/stereo/bell.oga, is installed on your system by default so I'm just using this one as it is convenient. You may of course use another sample for the bell if you so prefer. Any sample that you can play with the paplay command would be suitable.
You didn't mention which edition of Linux Mint you are using (Cinnamon, MATE, Xfce, or KDE) so I can only give you the commands to do this from the terminal.
Here goes. You'll need to edit the file /etc/pulse/default.pa as root. Do that with the command:
Code: Select all
sudo nano /etc/pulse/default.pa
Code: Select all
load-sample-lazy bell /usr/share/sounds/freedesktop/stereo/bell.oga
load-module module-x11-bell sample=bell
Code: Select all
pulseaudio -k
Code: Select all
xkbbell
Code: Select all
echo $'\a'
Re: Audible bell not working
Awesome! My terminal bell works great now. Thank you so much!
Beep still doesn't do anything though. I looked at my devices with amixer and noticed I had a mixer control labeled 'Beep' so I unmuted it and turned its volume all the way up. Still nothing.
Any idea? (I'm running the cinnamon edition, although I use i3 as my WM more.)
Beep still doesn't do anything though. I looked at my devices with amixer and noticed I had a mixer control labeled 'Beep' so I unmuted it and turned its volume all the way up. Still nothing.
Any idea? (I'm running the cinnamon edition, although I use i3 as my WM more.)
Re: Audible bell not working
I'm not familiar with the beep command, just figured out how to make the audible bell working after reading your post and starting wondering about it I tried installing beep and enabling pcspkr (`sudo modprobe pcspkr`) but can't get any sound with `beep`. Perhaps somebody else will know, but from what I've read while investigating this I didn't find anything for this except the below.
One trick you can use is create an alias for the beep command. For example with the command:
You can then run the `beep` command and it will play the same sample as for the audible bell. To make this stick:
- open your file manager;
- press Ctrl+H to display hidden files;
- edit or create the file .bashrc;
- add the above line to it.
One trick you can use is create an alias for the beep command. For example with the command:
Code: Select all
alias beep='paplay /usr/share/sounds/freedesktop/stereo/bell.oga'
- open your file manager;
- press Ctrl+H to display hidden files;
- edit or create the file .bashrc;
- add the above line to it.
Re: Audible bell not working
Adjusting default.pa as described above partially worked. Note in LinuxMint 18.3, the necessary lines are already in the file and point to a supplied bell file; they just needed uncommenting.
Additionally, in GNOME Terminal, Edit->Profile Preferences and make sure "Terminal bell" checkbox is enabled.
xfce-terminal won't ring my bell, and I can't find a setting.
I'm not sure about other terminals.
Additionally, in GNOME Terminal, Edit->Profile Preferences and make sure "Terminal bell" checkbox is enabled.
xfce-terminal won't ring my bell, and I can't find a setting.
I'm not sure about other terminals.