Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Send Growl notifications to Macs from Linux boxes' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Send Growl notifications to Macs from Linux boxes
Authored by: baba on Aug 17, '09 09:45:58AM
I can't recall where I found this or how much I altered it, but it's useful especially when running long processes. I can just minimize the terminal window and wait for growl to let me know it's done.

#!/usr/bin/sh
# Run any commands as entered
# Report output to remote machine via growl.

$*
myDesktop='foo.bar.edu'
status=$?
condition=""
msg="$PWD: \n"`echo "$*"`

if [ $status -eq 0 ]; then
    condition="Finished"
    else
    condition="**Error**"
fi

title=`echo "$HOSTNAME: $condition"`
# growl errors to dev/null
echo $msg | ssh $myDesktop /usr/local/bin/growlnotify -t "$title" 2> /dev/null



[ Reply to This | # ]