I'm trying to implement a simple timer in bash using:
but I can't hear the beep sound.Code:me@mylaptop:~$ sleep 5; echo -e "Time's up\a"
Thanks for your help
I'm trying to implement a simple timer in bash using:
but I can't hear the beep sound.Code:me@mylaptop:~$ sleep 5; echo -e "Time's up\a"
Thanks for your help
It could be that the beeper is disabled. Have you checked your BIOS?
If you tell me what kind of computer you have I'd better be able to help you.
Edit: I don't know if it would help, but you could also try taking the \a out of the quotes. That could be causing the problem.
Last edited by Nano Geek; July 16th, 2010 at 02:44 AM.
The former asjdfwejqrfjcvm msz34rq33UbuntuForums member #98464 | Ubuntu Help & Support
Never run any command unless you understand exactly what it will do. [link]
I have tried the following statements and they should be both valid according this excellent book I've been reading.
As seen the code properly executes but I still can't hear a beep.Code:laptop:~$ sleep 3; echo -e "Time's up\a" Time's up laptop:~$ sleep 3; echo "Time's up" $'\a' Time's
I'm using an LG (S1 Express Dual) laptop. I checked the BIOS settings but could not find anything to enable the beeper.
Have you tried opening terminal and entering the command
then checking to see if the internal speaker is muted? I think it is labeled something like "beep", but I can't remember for sure. It's one of the ones at the end of the list and I remember it being fairly obvious that was what it was for.Code:alsamixer
I just checked 'alsamixer'. There is a setting for 'beep' and another for 'internal'. I tried them both, alone and together, but still no beep from the shell.
PS after raising the 'beep' level the system started to beep on shutdown.
Last edited by SteelCore; July 16th, 2010 at 08:36 AM.
I'm trying to make the Shell produce a timed beep sound.
Although I've raised the 'beep' volume in alsamixer, both of the above lines failed to produce the beep.Code:me@my-laptop:~$ sleep 1; echo -e "Time's up\a" Time's up me@my-laptop:~$ sleep 1; echo "Time's up" $'\a' Time's up me@my-laptop:~$
Thank you for any help.
Check your /etc/modprobe.d/blacklist.conf for the line
if it is present, change it toCode:blacklist pcspkr
and try your code again. If your pc speaker is not blacklisted, then your issue is elsewhere. Hope that helps.Code:#blacklist pcspkr
Thanks for the reply. The pcspkr was blacklisted and I commented the line but still no sound from the code.
Last edited by SteelCore; July 16th, 2010 at 05:22 PM.
Load the module:
Code:sudo modprobe pcspkr
Sorry, I should have mentioned that you need to restart, or as sisco31 pointed out, just simply load the module that had been blacklisted.
Bookmarks