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
[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
[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!
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:
Post a Comment