Send Notifications From One Mac to the Next Over the LAN?
December 1, 2008 7:09 PM   Subscribe

Is it possible to send a notification from one of my Macs to another over my LAN? (I have Growl if that helps.)

I have two Macs and would like to be able to send a notification from one Mac (Mac Mini) to the other Mac (MacBook Pro). I've read that I can use Terminal and "mail username@hostname", but that doesn't seem to work. (However, I did discover that I can send real emails using that.)

I need this to be as live as possible. I want to be able to hit a button on the Mac Mini and see the notification on the MBP in seconds. Otherwise, I would just use email.

The method doesn't have to use Growl, but I need to know when the notification arrives.

Thanks for any help you can provide!
posted by 47triple2 to Computers & Internet (20 answers total) 2 users marked this as a favorite
 
Can you keep both machines logged in to iChat and use Bonjour?
posted by bcwinters at 7:41 PM on December 1, 2008


Response by poster: That would be a last resort. I'd rather use background processes or something that opens when "the button" is hit on the sender and activates something (probably via LaunchD) on the receiver.
posted by 47triple2 at 7:52 PM on December 1, 2008


Mac is not my world at all, but your question intrigued me enough to do a little digging. Here's what I've come up with that you might want to look into:

From a terminal window, type "smbclient -M " and end with Ctrl-D

I don't know what the requirements are for either the source or the target, but I hope I've given you enough information to at least get you looking in the right place. I hope you find what you're looking for!

posted by ElDiabloConQueso at 8:15 PM on December 1, 2008


Grrrr... I'm not paying attention tonight. Second line should read:

From a terminal window, type smbclient -M [target machine netbios name] [message] and end with Ctrl-D
posted by ElDiabloConQueso at 8:16 PM on December 1, 2008


Response by poster: ElDiabloConQueso, it appears as if the smbclient method only works with sending messages to Windows machines.

Otherwise, that would be exactly what I'm looking for!
posted by 47triple2 at 8:42 PM on December 1, 2008


The following is a theoretical solution, as I don't have time to test it right now. Growl is supposed to be able to send notifications to a remote Mac over the LAN.

Look in the Network tab of the Growl preference pane for the settings. You'll have to configure both Macs to listen for and accept well as send notifications. Caveat here is that I've never been able to actually get this feature to work, but it's supposed to.

You can create an Automator application to Display Growl Notification. Enter the text you'd like displayed and save as an application to your Applications folder, then use your favorite launcher/hotkey manager to launch this application to display your notification. Theoretically, of course, the notification should show up on your remote machine as well.

If you decide to try this, please let us know if you get it working.
posted by al_fresco at 8:47 PM on December 1, 2008


Additionally, in your Automator application, you could use the action to Ask For Text, and have this action passed on to the Display Growl Notification, so that you have some control over the message you're sending.

Theoretically, of course.
posted by al_fresco at 8:50 PM on December 1, 2008


Best answer: I am lurking in this thread because I could use this, also. I have tried and failed to get an Automator/Growl combo to do this, but as al_fresco said it is SUPPOSED to work, so I'll encourage your exploration in that direction! (because I totally gave up.)

I do know you need to enable "Remote Apple Events" in Sharing Prefs in order for the machine to be listening.
posted by rokusan at 8:52 PM on December 1, 2008


Response by poster: al_fresco, thanks for the suggestion. However, I have tried the growl forwarding method (I thought it was a stroke of genius...) but growl forwarding does not work. The best I get is the Mini seeing the MBP in it's "Forward notifications to other computers" section.

In addition, google searching shows that a lot of people have problems with getting growl forwarding to work.


If anybody on here has gotten Growl forwarding to work, please share how you set it up. :)
posted by 47triple2 at 8:59 PM on December 1, 2008


I think you might find netcat a useful command line tool for this job.

Here's a straight forward guide for you to try.

http://www.g-loaded.eu/2006/11/06/netcat-a-couple-of-useful-examples/
posted by aereoperro at 9:13 PM on December 1, 2008


Sounds like you need Remote Growl.
posted by O9scar at 10:26 PM on December 1, 2008


Response by poster: netcat would work, but Terminal has to be left open for it to run.

Remote growl sounds like it should do the trick, but the download link is broken. Does anybody know of a mirror I could download it from? Thanks!
posted by 47triple2 at 10:50 PM on December 1, 2008


Note that RemoteGrowl was posted in 2004, and doesn't appear to have been updated since. I wonder if these directions are even still relevant in Leopard (of Tiger, for that matter).

More quasi-useful information: I actually had remote notifications working for a while (I have a G4 iMac set up as a music server, and wanted Growl to send track changes to other machines on our home network) but it was using a user-submitted alpha version of Growl that someone posted to the forums. I stopped using it and re-installed a stable version of Growl when the alpha started crashing and using 100% CPU after an OS update. Unfortunately, that also spelled the end of remote notification.
posted by al_fresco at 10:59 PM on December 1, 2008


This Archive.Org Save of the RemotGrowl site kept the download link intact, in case you want to give it a shot. As al_fresco mentioned, it may not be relevant given when the program was made.
posted by genial at 5:53 AM on December 2, 2008


With a little google-fu, I found an app that handles the WinPopup functionality on OS X:
MacXPop simulates the "WinPopup" application that Windows uses to display "net send" messages from Macs and Windows machines.

How does it work? MacXPop is merely an application that handles incoming messages to the smb daemon. The Mac OS X smb daemon already has the ability to receive "net send" messages. However, there is no built in "WinPopup" equivalent to display these messages. That's where MacXPop comes in. It does not run as a daemon, but rather is a simple application that the smb daemon launches only to display a message on the screen, then ends.

- http://www.macupdate.com/info.php/id/13684/macxpop
Of course, I can't vouch for it... I'm the fat guy in the bad suit (Windows), not the lean artsy type in the hip outfit (Mac).
posted by ElDiabloConQueso at 7:29 AM on December 2, 2008


Well RemoteGrowl seems to be available here.

I've done what you describe before (can't find the source though) in Perl, and there are a number of modules that handle Growl for you (e.g. here, I think you can just use the example code). If you want a gui for it, you could make a little applescript that that runs your perl with "do shell script".

Off the top of my head you could also do something like sharing a folder on the mbp, attaching a folder action applescript (e.g. one that prints the contents of the file in the folder), and then dumping files into the folder from the mini to trigger messages. Not pretty...

This seems like a natural for iChat though. I see you aren't keen on it, but running the Growl daemon in the background isn't really any different from a minimized chat client.
posted by hugo at 7:42 AM on December 2, 2008


Best answer: On further thought, rokusan had a good idea with Remote Apple Events. You should be able to do it with an applescript along the lines of:

tell application "GrowlHelperApp" on machine "eppc://192.168.0.2"
register as application "myapp" all notifications {"message"} default notifications {"message"}
notify with name "message" title "title" description "description" application name "myapp"
end tell

Obviously after enabling remote apple events on the mbp (replace 192.xxx with its IP).
posted by hugo at 7:52 AM on December 2, 2008 [3 favorites]


Response by poster: And And Hugo is the winner!

The only caveat being that the first line of the script should read:
tell application "GrowlHelperApp" of machine "eppc://192.168.0.2""

Also, you don't need to use the number address, one can simply use "johndoe.local".

Thanks for the help everybody!
posted by 47triple2 at 8:55 AM on December 2, 2008


I figured I was on the right track, but I gave up, not knowing about communicating with GrowlHelperApp directly. Brilliant, hugo.

I knew lurking would pay off!
posted by rokusan at 5:59 PM on December 2, 2008


cute script hugo! :)
posted by jeffburdges at 10:11 AM on May 7, 2009


« Older How much notice am I required to give to my...   |   Budget dresses? Newer »
This thread is closed to new comments.