Notification in Linux.
Hello.
When a task finished I like Linux notify me, How can I do it? For example, I'm downloading a file via "wget" and when it is finished then Linux notify me. Thank you. |
A command line does so by asking for the next command.
But you could always do something like Code:
wget URL && echo "finished" |
You can also have a graphical notice pop up. There is usually some such utility like xmessage, zenity, or another pre-installed.
Code:
wget $url && zenity --info --text="Download Complete" || zenity --info --text="Failed to Download" |
Alternatively:
wget URL && beep Refer to this page for some caveats and alternatives to beep: http://askubuntu.com/questions/19906...pt-not-working |
Surely beep isn't a bash command?
You can play something from /usr/share/sounds using paplay, like paplay /usr/share/sounds/freedesktop/stereo/bell.oga paplay /usr/share/sounds/purple/alert.wav paplay /usr/share/sounds/gnome/default/alerts/bark.ogg or whatever you have there |
Quote:
Beep is in the Ubuntu archives. I assume it is also available for other systems. |
Code:
~ $ beep |
Quote:
if you want a desktop notification, like so many apps use, it has a command line ... erm, command: Code:
wget URL && notify-send WGET "is finished!" |
beep is in the fedora repositories but doesn't seem to be in centos7 repositories.
|
&& echo -e '\07' or && echo -e '\a'
However this won't work over SSH, but I think you could use a >> to the relevant tty |
Quote:
or if you have sms module in your system, send an SMS to your phone once it's done. :) |
All times are GMT -5. The time now is 02:57 AM. |