Random,  Ubuntu

Gnome notifications from your Terminal!

Its pretty easy to get your terminal to notify you using Gnome’s libnotify system and a short python script. Python’s pynotify package (available as Debian/Ubuntu package: python-notify) I use this short script occasionally to notify me when a long compile is done like this:

[code lang=”bash”] make && echo "Done compiling!" | notifier [/code]

Short python script in my $PATH called “notifier”

[code lang=”python”]
import pynotify
import sys

pynotify.init("Quick Notify")
input = sys.stdin.readline()
msg = pynotify.Notification("Shell Notification:", input)


Leave a Reply to kase Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.