Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sound notification in Ubuntu terminal [duplicate]

When running commands such as bundle install (for Ruby apps), I'd like to hear a small sound (or popup) notification when the command finishes. How can I do this?

like image 655
user94154 Avatar asked Nov 25 '10 01:11

user94154


People also ask

How do I change my bell sound terminal?

In the Terminal app on your Mac, choose Terminal > Settings, then click Profiles. In the profiles list on the left, select a profile. Click Advanced. Below Bell, select the type of alert you want.

What is System sound Ubuntu?

Sound in Ubuntu is based on PulseAudio. On both phone and PC, its user interface includes a “Sound” panel in System Settings (which also covers vibrations on the phone), volume notification bubbles, and the sound menu. For help with using sound in Ubuntu, see Ubuntu Help online.

How do I use notify in Linux?

Sending notifications from the Linux terminal To send notifications from the Linux terminal, use the notify-send command. It's often already installed as a part of your desktop, but you can run which notify-send to confirm. If it's not installed yet, install it with your package manager of choice.


2 Answers

Install the tool 'beep'.

$ sudo apt-get install beep 

Now you append "; beep" to whatever command you run.

$ bundle install; beep 
like image 91
maletor Avatar answered Sep 21 '22 07:09

maletor


To get a pop-up notification, you can use notify-send. This gives you a notification using the same bubble pop-up as you see the OS using for new mail, etc. It is non-modal, so it will only last for a set amount of time though. You can extend the amount of time with the -t option.

Zenity will give you a modal pop-up than you can clear manually. Use something like:

zenity --info --text="message text"
like image 42
Nerdfest Avatar answered Sep 21 '22 07:09

Nerdfest