Command line Gnome Notification 2
From the “it’s almost certainly been done better somewhere else” department, here is my script to fire off a Gnome Notification after a shell command finishes.
a python script:
#!/usr/bin/python
from pynotify import *
import sys
def notify(message=""):
n = Notification("Command Line Completed", message)
n.show()
init("cli notify")
if len(sys.argv) > 1:
notify(sys.argv[1])
else:
notify()
Then just add it to your path and you can append it onto some command:
echo monkey && mynotify.py "some message"
You then get a notification like so:

Trackbacks
Use the following link to trackback from your own site:
http://blogs.divisibleprime.com/ronin/articles/trackback/940

Nice one, have been looking for something simple like this for ages. How about making a sound optionally as well?
Thanks for the article
Just to add: Take a look at
/usr/share/doc/python-notify/examples/(if you are using Ubuntu/Debian) for more basic sample code and advanced functions such as custom positioning, image support, using buttons, markup, etc.If you don’t want to use python, look in to
notify-sendwhich is part of thelibnotify-binpackage.Resources:
libnotifynotify-send