Answer the question
In order to leave comments, you need to log in
Growl @ Mac OS X Lion - want to receive messages from the corresponding Windows service over the network?
A program on a Windows PC that is always running reports events using the Windows Messaging Service. Simply put, it sends NET SEND messages. I would like to quickly receive these messages on a working computer running Mac OS X Lion. Ideally, in Growl. I agree to the installation of a separate program. Google the second day - to no avail.
Maybe one of the colleagues solved this, or a similar problem?
Answer the question
In order to leave comments, you need to log in
Crap. I'm a fool! I did not notice the most obvious and simple solution. There is also growlnotify, and with it, dancing with AppleScript and access rights is not needed. Everything is very simple and logical.
In short, your task is solved like this:
1) Install growlnotify from the Growl offsite.
2) Create a file /usr/local/bin/growlnotify.sh with the following content: 3) In a terminal, 4) Open the /etc/smb.conf file and add the line 5) Point 5 from the previous message to the [global] section.
All!
#!/bin/bash
cat $1 | /usr/local/bin/growlnotify -t $2
chmod +x /usr/local/bin/growlnotify.sh
message command = /usr/local/bin/growlnotify.sh %s %f
Can you theorize? Google found a readme for a certain program from 2003 MacXPop, where the following is written:
Open /etc/smb.conf
Under the [global] section add or edit the following lines to match (for further information on the smb.conf file see man pages, man smb.conf):
netbios name = Example-Mac (where Example -Mac is your Mac's Netbios name)
message command = /usr/local/bin/MacXPop %s %f &
I decided to test the theory anyway:
(The message from the DAE_MACPRO_7 virtual machine, sent by the sent program, replacing "net send", arrived at the DAE-MACPRO host).
There is one big "but". I'm not well versed in the Unix permissions system, but apparently the SMB user "nobody" used does not have the ability to run scripts (i.e. the osascript program). Because of this, I had to force SMB to use my user, which (I suspect) is unacceptable from a security point of view. If anyone has any ideas how to solve or get around this problem - write!
Step by step:
1) Download my script and put it, for example, on your desktop. By the way, the source code can be viewed using AppleScript Editor.app.
2)Open /etc/smb.conf with a text editor.
3) In the [global] section, add the line
message command = osascript /Users/ваш_юзер/Desktop/netsendreceiver.scptd %s %f
4) A little lower, change
guest account = nobody
to
guest account = ваш_юзер
(Actually, this is the whole snag).
5) Then go to the system settings, check the box next to "File sharing", click the "Options" button in the same place and check the box "Share files and folders using SMB (Windows)". This should start the SMB server. (Probably, this can also be done through the terminal).
Look like that's it.
Tested on Snow Leopard.
There is a Python module that seems to support GNTP (Growl Notification Transport Protocol). Haven't tried it myself.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question