Saturday, December 19, 2009

Install Growl Extras: growlnotify

toolsI have Growl on my Mac for long time. I cannot remember when I got it. I think I installed it because it was recommended as one of must-haves. It is a notification application based on Growl Notification Protocol (GNTP). Many applications support GNTP and send notifications to Growl such as Browser, Mails, Chat, XMarks, ...

I am interested in script function to send notification to Growl. In this way, I have much more control in my OS to auto-generate notifications. Growl has growlnotify in Extra for this purpose. Here is the way to install it.

Download Growl to my Mac first (1.2 for this time). Growl-1.2.dmg is saved in my local ~/Download/ folder. Double click on this file from Finder, this one will be mounted a package or drive-like in Windows in my /Volumes/:

    /Volumes/Growl-1.2/

Since I have this already installed. I close the installation Finder.



Then open a Terminal and change the directory to the growlnotiy:

[MyMac]~ [user]$ cd /Volumes/Growl-1.2/Extras/growlnotify/
[MyMac]]:growlnotify [user]$ ls

The ls command is used to verify that there is install.sh file there. The script file contains installation scripts, you can use cat install.sh to display its content.

Run the installer script:

[MyMac]:growlnotify [user]$ ./install.sh

It will prompt to enter your root or admin password. After your correct password, the package will be copied to your /usr/local/bin and it is ready for use.

To test it out, type the following commands. First change the current path to your home. Then run growlnotify command:

[MyMac]:growlnotify [user]$ cd
[MyMac]:~ [user]$ growlnotify


Type anything, and press Ctrl+D to end the message. You should be able to see the message out to Growl right away. Here is an example:

[MyMac]]:growlnotify [user]$ growlnotify
ENter a notification description, following by new line, followed by Ctrl+D (End
of file). To cancel, press Ctrl+C.
This is my test notification to Growl!


No comments: