Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9247811
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T09:49:40+00:00 2026-06-18T09:49:40+00:00

I need to send growl notifications from a bash script, but I don’t have

  • 0

I need to send growl notifications from a bash script, but I don’t have the ability to install either the growlnotify command line tool, or the perl module that could do similar. I can write arbitrary bash scripts, and after doing a quick inventory of what is available on this linux machine, it seems I have netcat.

Can I send a growl notification in such a manner? I’ve been tinkering with something like this:

echo -ne "GNTP/1.0 NOTIFY NONE MD5:04cf1ad341ea8e51d7bb314424276c38.6162636465666768\r\nApplication-Name: test Notification-Name testtest Notification-Title: blah \r\n\r\n" | nc -v 127.0.0.1 23053

But it’s unclear to me how the protocol actually works. I’m assuming that when clients subscribe to another computer, they’re basically registering themselves to a list of computers for the server to connect to (over 23053), send a formatted message, maybe wait for a reply, and then disconnect. Since my bash script would contain the list (or more likely, accept the list as an argument) of machines to send to, this subscription step could be skippable (unless there are magic values I need to pass!).

I don’t believe that I’m performing the hash correctly, or else I’ve not got the client machine set up to receive incoming notifications correctly.

What’s missing here?

I get back the following error message when I run this or similar commands:

GNTP/1.0 -ERROR NONE
Error-Code: 400
Error-Description: Invalid key hash
Origin-Machine-Name: SOMETHING
Origin-Software-Name: Growl/Win
Origin-Software-Version: 2.0.9.1
Origin-Platform-Name: Microsoft Windows NT 6.1.7601 Service Pack 1
Origin-Platform-Version: 6.1.7601.65536
X-Message-Daemon: Growl/Win
X-Timestamp: 2/5/2013 11:54:28 AM
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T09:49:41+00:00Added an answer on June 18, 2026 at 9:49 am

    For network notifications, you need to use a password, which must be salted and hashed in a particular way. Additionally, the computer that will be sending notifications must also have first sent registration command with one or more notification types defined.

    To do the password salting/hashing, you’d do something like this:

    # Hexify the salt:
    HEXSALT=`echo -n $SALT | xxd -p`
    
    # Md5 the password+salt
    KEYBASIS=`echo -n "$PASSWORD$SALT" | $MD5SUM`
    KEYBASIS=${KEYBASIS:0:32}
    KEY=`echo -n "$KEYBASIS" | xxd -r -p | $MD5SUM`
    KEY=${KEY:0:32}
    

    Note that the salt can be completely arbitrary (and can change, message to message), as long as it’s at least 4 characters in size. Then, you build the registration message:

    # Now we need to build the message string.
    MESSAGE="GNTP/1.0 REGISTER NONE MD5:$KEY.$HEXSALT
    Application-Name: My Application
    Application-Icon: http://somesite.come/whatever.png
    Notifications-Count: 2
    
    Notification-Name: startup
    Notification-Display-Name: Starting
    Notification-Enabled: False
    
    Notification-Name: downtime
    Notification-Display-Name: Shutting Down
    Notification-Enabled: True
    
    "
    MESSAGE=`echo -ne "$MESSAGE" | $UNIX2DOS`
    echo "$MESSAGE"
    

    In theory the icon can be sent in the message, I’ve never managed to get it to work. Icons should be at least 64×64 or they look weird in Growl for Windows, I’ve not checked with Growl for Mac or Apple’s Notification Center. Then to send the message, something like:

    echo "$MESSAGE" | nc -v $ipaddress 23053
    

    Though you could probably eliminate netcat entirely and use bash’s TCP facilities (/dev/tcp)… I just have never used that before, don’t know how. Finally, to send a notice, you’d do this:

    MESSAGE="GNTP/1.0 NOTIFY NONE MD5:$KEY.$HEXSALT
    Application-Name: $APPLICATION
    Notification-Name: $NAME
    Notification-Title: $TITLE
    Notification-Text: $TEXT
    Notification-Sticky: $STICKY
    Notification-Priority: $PRIORITY
    
    "
    MESSAGE=`echo -ne "$MESSAGE" | $UNIX2DOS`
    echo "$MESSAGE"
    

    App-name and Not-name have to match what was send in registration. Priority has to be between -2 and 2. “Sticky” is True/False.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to send growl notifications from PHP. The receiving computer is OSX
We need send h264 from flash to Wowza and after to vlc by RTSP
I need send certain attributes(say, human readable user name) from server to client after
I need to send an HTML report with images from an application. The report
I need to send some arguments from the iPhone to a php in the
I need to send emails from my web application (on account creation, password reset,
I have the below code which right now does just what i need (send
I need send image from android app to webservice .net soap. method for send
I need send data (ArrayList, Array, String, etc) from my Activity to my Service
I have a php script which is responsible for reading some request parameters from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.