Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Shell doesn't beep

  1. #1
    Join Date
    Jan 2006
    Beans
    336
    Distro
    Ubuntu 16.04 Xenial Xerus

    Shell doesn't beep

    I'm trying to implement a simple timer in bash using:
    Code:
    me@mylaptop:~$ sleep 5; echo -e "Time's up\a"
    but I can't hear the beep sound.
    Thanks for your help

  2. #2
    Join Date
    Apr 2006
    Location
    /home
    Beans
    1,058

    Re: Shell doesn't beep

    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 msz34rq33
    UbuntuForums member #98464 | Ubuntu Help & Support
    Never run any command unless you understand exactly what it will do. [link]

  3. #3
    Join Date
    Jan 2006
    Beans
    336
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Shell doesn't beep

    I have tried the following statements and they should be both valid according this excellent book I've been reading.
    Code:
    laptop:~$ sleep 3; echo -e "Time's up\a"
    Time's up
    laptop:~$ sleep 3; echo "Time's up" $'\a'
    Time's
    As seen the code properly executes but I still can't hear a beep.
    I'm using an LG (S1 Express Dual) laptop. I checked the BIOS settings but could not find anything to enable the beeper.

  4. #4
    Join Date
    Nov 2009
    Location
    USA
    Beans
    Hidden!
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Shell doesn't beep

    Have you tried opening terminal and entering the command
    Code:
    alsamixer
    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.

  5. #5
    Join Date
    Jan 2006
    Beans
    336
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Shell doesn't beep

    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.

  6. #6
    Join Date
    Jan 2006
    Beans
    336
    Distro
    Ubuntu 16.04 Xenial Xerus

    Shell beep

    I'm trying to make the Shell produce a timed beep sound.
    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:~$
    Although I've raised the 'beep' volume in alsamixer, both of the above lines failed to produce the beep.
    Thank you for any help.

  7. #7
    Join Date
    Nov 2008
    Beans
    Hidden!

    Re: Shell beep

    Check your /etc/modprobe.d/blacklist.conf for the line
    Code:
    blacklist pcspkr
    if it is present, change it to
    Code:
    #blacklist pcspkr
    and try your code again. If your pc speaker is not blacklisted, then your issue is elsewhere. Hope that helps.

  8. #8
    Join Date
    Jan 2006
    Beans
    336
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Shell beep

    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.

  9. #9
    Join Date
    Feb 2007
    Location
    Romania
    Beans
    Hidden!

  10. #10
    Join Date
    Nov 2008
    Beans
    Hidden!

    Re: Shell beep

    Sorry, I should have mentioned that you need to restart, or as sisco31 pointed out, just simply load the module that had been blacklisted.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •