Results 1 to 10 of 10

Thread: How do i send MB beep from bash

  1. #1
    Join Date
    Jan 2009
    Location
    Denmark
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    How do i send MB beep from bash

    Hey guys.

    I have a PC (ubunt 12.04 lts) where i have added a passive CPU cooler. On this PC i have installed sensors to see the CPU temp

    Code:
    sensors |grep temp
    I then wanted to make a small bash script that checks every minut, to see what the temprature is. So it it reaches 60 celcius a motherboard beep (from the script) is played to notify me about the temprature.

    But how does one send a MB beep from within bash? Is it even possible?

    Or is their some other fancy program who can solve this in a easy matter.

    Thanks on advance.
    Kind regards.

  2. #2
    Join Date
    Jun 2011
    Location
    The Shadow Gallery
    Beans
    6,807

    Re: How do i send MB beep from bash

    Code:
    sudo apt-get install beep
    http://manpages.ubuntu.com/manpages/...n1/beep.1.html

    I am guessing this might do what you want
    Feel Free to Bitcoin Tip: 135Rp4pwwYTHEJ4u8bxKaDQiC91N9LUoV2

    Backtrack - Giving machine guns to monkeys since 2006
    Kali-Linux - Adding a grenade launcher to the machine guns since 2013

  3. #3
    Join Date
    Nov 2011
    Location
    /dev/root
    Beans
    Hidden!

    Re: How do i send MB beep from bash

    So you want your computer to shout "Help, I'm getting too hot!"

    That can be done in a little more fancy way using espeak

    Code:
    espeak "Help, I'm getting too hot"
    Install from the repos

    Code:
    sudo apt-get install espeak
    Or would you prefer a primitive beep, that would work without the speakers on? Then use haqking's beep.

  4. #4
    Join Date
    Dec 2009
    Location
    germany
    Beans
    1,020
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: How do i send MB beep from bash

    Quote Originally Posted by sudodus View Post
    So you want your computer to shout "Help, I'm getting too hot!"

    That can be done in a little more fancy way using espeak

    Code:
    espeak "Help, I'm getting too hot"
    Install from the repos

    Code:
    sudo apt-get install espeak
    Or would you prefer a primitive beep, that would work without the speakers on? Then use haqking's beep.
    hi
    beep don't work on my box - audio connected.
    but thanks for the hint of espeak - haven't know it before ( 12.04 LTS it is installed by default). espeak works on my box - even when music is playing.
    cheers

    got a couple of errors:
    ALSA lib audio/pcm_bluetooth.c:1614audioservice_expect) BT_GET_CAPABILITIES failed : Input/output error(5)
    ALSA lib audio/pcm_bluetooth.c:1614audioservice_expect) BT_GET_CAPABILITIES failed : Input/output error(5)
    ALSA lib audio/pcm_bluetooth.c:1614audioservice_expect) BT_GET_CAPABILITIES failed : Input/output error(5)
    ALSA lib pcm_dmix.c:957snd_pcm_dmix_open) The dmix plugin supports only playback stream
    ALSA lib pcm_dmix.c:1018snd_pcm_dmix_open) unable to open slave
    Cannot connect to server socket err = No such file or directory
    Cannot connect to server socket
    jack server is not running or cannot be started

    but it don't hassle me - it works
    Last edited by rnerwein; December 21st, 2012 at 07:15 PM. Reason: forgot the error messages
    "What is the robbing of a bank compared to the FOUNDING of a bank?" Berthold Brecht

  5. #5
    Join Date
    Nov 2011
    Location
    /dev/root
    Beans
    Hidden!

    Re: How do i send MB beep from bash

    Quote Originally Posted by rnerwein View Post
    hi
    beep don't work on my box - audio connected.
    but thanks for the hint of espeak - haven't know it before ( 12.04 LTS it is installed by default). espeak works on my box - even when music is playing.
    cheers

    got a couple of errors:
    ...
    but it don't hassle me - it works
    The same for me. I redirect the error output to /dev/null.

    Maybe you'd be interested in the german voice:

    Code:
    espeak -v de "Ach du lieber Augustin" 2>/dev/null

  6. #6
    Join Date
    Apr 2011
    Location
    Maryland
    Beans
    1,461
    Distro
    Kubuntu 12.04 Precise Pangolin

    Re: How do i send MB beep from bash

    Quote Originally Posted by sudodus View Post
    So you want your computer to shout "Help, I'm getting too hot!"

    That can be done in a little more fancy way using espeak

    Code:
    espeak "Help, I'm getting too hot"
    Install from the repos

    Code:
    sudo apt-get install espeak
    Or would you prefer a primitive beep, that would work without the speakers on? Then use haqking's beep.
    Ha! This is awesome (or I'm just easily amused). I've wasted the last 15 minutes or so playing with this, making my computer say all kinds of crazy things. Not sure how much it helped the OP, but it sure made my night!

  7. #7
    Join Date
    Jun 2011
    Location
    The Shadow Gallery
    Beans
    6,807

    Re: How do i send MB beep from bash

    Quote Originally Posted by drmrgd View Post
    Ha! This is awesome (or I'm just easily amused). I've wasted the last 15 minutes or so playing with this, making my computer say all kinds of crazy things. Not sure how much it helped the OP, but it sure made my night!
    I know i did the same earlier, I can confirm there is no adult filter....LOL
    Feel Free to Bitcoin Tip: 135Rp4pwwYTHEJ4u8bxKaDQiC91N9LUoV2

    Backtrack - Giving machine guns to monkeys since 2006
    Kali-Linux - Adding a grenade launcher to the machine guns since 2013

  8. #8
    Join Date
    Jun 2009
    Location
    0:0:0:0:0:0:0:1
    Beans
    4,357
    Distro
    Xubuntu 13.04 Raring Ringtail

    Re: How do i send MB beep from bash

    you could record a wav file to use google text to speach and play hte audio file with the aplay command
    Laptop: ASUS A54C-NB91 (Storage: WD3200BEKT + MKNSSDCR60GB-DX); Desktop: Custom Build - Images included; rPi Server
    Putting your Networked Printer's scanner software to shame PHP Scanner Server
    I frequently edit my post when I have the last post

  9. #9
    Join Date
    Jan 2006
    Beans
    Hidden!
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: How do i send MB beep from bash

    in C:
    Code:
    printf("\a");
    I am infallible, you should know that by now.
    "My favorite language is call STAR. It's extremely concise. It has exactly one verb '*', which does exactly what I want at the moment." --Larry Wall
    (02:15:31 PM) ***TimToady and snake oil go way back...
    42 lines of Perl - SHI - Home Site

  10. #10
    Join Date
    May 2009
    Beans
    Hidden!

    Re: How do i send MB beep from bash

    maybe you'll want to modprobe the module "pcspkr" to make "beep" or "\a" work. Or remove it from blacklist. occasionally other progs might beep then, too, which can be annoying and is reason for why it is blacklisted by default. more modern pc's might work differently with the beeper (i.e. route it via soundcard, so mixer levels might need to be set with alsamixer).

    "aplay" is also an option, in case you want the sound via your soundcard - just feed it with a .wav of something annoying that you won't overhear.

Tags for this Thread

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
  •