| |
|
| '
Making the beep function beep.
The old-fashioned PC beep function does not work automatically in Ubuntu.
And some modern PCs do not have an internal speaker anymore.
But if the internal speaker is present and if you want an alarm sound without using your external speakers, the beep function is the thing to use.
However, activating the beep function requires some expertise. I will list some tricks to get it working in Ubuntu.
- Try in terminal window if command beep works. If it does, you are lucky. If not, go to 2)
- In most Ubuntu versions, the beep function is blacklisted. To un-blacklist the beep function, open file /etc/modprobe.d/blacklist.conf as administator:
sudo gedit /etc/modprobe.d/blacklist.conf
Find the line with:
blacklist pcspkr
and outcomment this line.
Save file after this change. Restart computer
Try in terminal window if command beep works. If it does, your beep function is working OK. If not, go to 3)
- To start the beep function give the command:
sudo modprobe pcspkr
Try in terminal window if command beep works. If it works, go to 5), if not go to 4)
- Sometimes the beep function is not installed. In that case, it can be installed with the command:
sudo apt-get update
sudo apt-get install beep
Try in terminal window if command beep works. If it works, go to 5). If not, try 3) and re-try beep command. If the PC speaker does not give a beep, I cannot help you. Maybe the PC does not have a PC speaker.
- It is annoying to have to give this command everytime after starting up. It can be put in am executable bash file and executed at start-up:
Bash file:
#!/bin/bash
sudo modprobe pcspkr || true
Give this bash-file as name: start-beep.sh and make the file executable.
Add the command to the set of commands to be executed at start up (Applications -> System Tools -> Startup Applications Preferences).
Try if the beep command works after a reboot. If not, try 6) or 7)
- The bell mode (beep) can be set with the dconf-editor.
Open the dconf-editor and go to:
org | gnome | settings-daemon | peripherals | keyboard
Look at the bell-mode. If bell-mode is off, change it to on.
Try if the beep command works, and still works after a reboot. If not, try 7)
- An alternative method to execute the file start-beep.sh at start up is to add a start-up command to crontab.
To do so, open the crontab file:
sudo crontab -e
Add the lines:
# execute at boot
@reboot path-to-file/start-beep.sh
Save changes (with CTRL O).
Try if the beep command works after a reboot. If not, I cannot help you.
|
|