Created: 2012-03-25 13:18
Updated: 2013-10-20 01:27
License: mit


gravatar notifier.


gratifier is a wrapper for desktop notification utilities that allows you to display notifications with avatar image as notification icon.

Avatar images are fetched from and cached in ~/.gratifier/gravatars directory.

It supports following notification utilities:

  • notify-send on Linux with libnotify (Ubuntu, other Gnome based desktop)
  • kdialog on Linux with KDE
  • growlnotify on OSX


Step 1: Download

$ curl -skL >~/bin/gratifier
$ chmod +x ~/bin/gratifier

* Make sure ~/bin is in your $PATH or put gratifier script somewhere else on your $PATH.

Step 2: Symlink

gratifier is a very thin wrapper around existing notification utility - it passes all its command-line arguments down to the actual utility. The only thing it adds is a proper command-line switch and image path for displaying avatar.

Now, you must create a symlink to the gratifier script. The name of this symlink should include the name of your desktop notification utility.

Here are some examples:

# Gnome/Unity
$ ln -s ~/bin/gratifier ~/bin/gratifier.notify-send

$ ln -s ~/bin/gratifier ~/bin/gratifier.kdialog

$ ln -s ~/bin/gratifier ~/bin/gratifier.growlnotify

# Some funky symlink names:
$ ln -s ~/bin/gratifier ~/bin/growlnotify-avatar
$ ln -s ~/bin/gratifier ~/bin/my-kdialog-with-gravatar

Thanks to this symlink:

  • gratifier doesn't need to guess what utility you have installed (or choose one if you have let's say both notify-send and kdialog on Linux)

  • it gives you clear indication what utility it wraps thus saving you from confusion about command-line args you need to pass to it


Following usage examples are assuming you have notify-send as your notifier. Adjust script name and arguments to your environment.

No avatar

Just invoke the script like in old, pre-gratifier days:

$ gratifier.notify-send "Hey you!"

Avatar via email address

If you have email address of user that triggered notification invoke gratifier with GRAVATAR_EMAIL env variable like this:

$ gratifier.notify-send "Notification title" "Notification body"

Avatar via nickname

You may want to use gratifier as a notifier for some app that doesn't have information about email addresses of the users (for example IRC client like irssi).

If you only have nickname of user that triggered notification invoke gratifier with NICKNAME env variable like this:

$ NICKNAME=joe gratifier.notify-send "Notification title" "Notification body"

If it happens that app displaying notification doesn't know the email address of user "joe" but you know it just edit ~/.gratifier/nicknames/joe file and specify his email there. This file will be created for you on first notification displayed for a nickname. Also, if you don't know joe's email but you have got his photo you can specify path to the image in the same file.


Report bugs and request new features at


Cookies help us deliver our services. By using our services, you agree to our use of cookies Learn more