开发者

Sound notification in Ubuntu terminal [duplicate]

This question already has answers her开发者_如何学编程e: In a bash script/command how can I make a PC beep noise, or play a sound file? (9 answers) Closed 4 years ago.

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?


Install the tool 'beep'.

$ sudo apt-get install beep 

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

$ bundle install; beep 


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"
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜