So we have:
- Need to produce some notification sound (possibly error and success ones), when our script reach final steps in it execution.
- Do it as simple as possible.
My not deepest googling provides me with this links:
#!/bin/bash
if [[ $1 == "" ]];then
echo -e "\tbeep [
- grep pcspkr /etc/modprobe.d/blacklist*
- X Gnome System Beep With Audio File
- "Native" ogg player -- canberra? - Ubuntu Forums
Only last link definitely shed light on my problem. And I decide to write small script that will be capable to play ubuntu native *.ogg files with it's own native library wich in turn plays this particular sounds in real time, just i belive? like ubuntu does.
So following bash snippet will help to establish my, or someone needs:
#!/bin/bash
if [[ $1 == "" ]];then
echo -e "\tbeep [
fi
if [[ $1 == "error" ]];then
sound="/usr/share/sounds/freedesktop/stereo/suspend-error.oga"
fi
if [[ $1 == "done" ]];then
sound="/usr/share/sounds/freedesktop/stereo/complete.oga"
fi
canberra-gtk-play --file="$sound" &>/dev/null
How to install it and run:
- cp or simlink it with sudo to any in your $PATH environment
- to run it: type in terminal "beep error" or "beep done"
- If you hear nice sounds all is good if not, post me back and i'll try to fix it up.
Script is available for download in my ubuntu.one account.