Ok,
I try, this time more complete
open a Terminal, type:
sudo pico /etc/smb.conf
Hit enter, if asked for a password, type the password you use to login to your computer, password will not be echoed on the terminal, type blind. This might happen later again in other command where sudo is used.
pico is a simple editor, which comes with osx, there are better ones, but this one will do.
now, move to somewhere in the /etc/smb.conf [global] section with the keyboard and insert:
message command = /usr/local/bin/smbpopup %s %m ; rm %s
Save the file, press CTRL-X, confirm saving the changes.
You now should be back in the shell
just in case, if /usr/local and /usr/local/bin does not exist type:
sudo mkdir /usr/local
sudo mkdir /usr/local/bin
now, again start pico, this time with
sudo pico /usr/local/bin/smbpopup
Paste the following:
#!/bin/sh
# log the event in the system.log
logger smbpopup: $1 $2
# get the text out of the message file
MSG=$( cat $1 )
# call program which actually displays the message
/usr/sbin/alert SMB
Message_From$2: "$MSG"
# end pasting...
Press CTRL-X, save the changes
do a chmod a+x to make it executable by:
sudo chmod a+x /usr/local/bin/smbpopup
download the "alert" program (to your desktop)
replace the "_" with "/" in the line below !
http:
_www.biermann.org_philipp_OSXalert.tar.gz
CTRL-CLick the downloaded file, choose "open with BomArchiveHelper"
The archive is unpacked, and a file without an icon called "alert" appears on your desktop.
Again, in the terminal, do a:
sudo mv ~/Desktop/alert /usr/sbin
and a:
sudo chown root:wheel /usr/sbin/alert
and a:
sudo chmod u+s /usr/sbin/alert
Note, the program needs root permissions, otherwise, it cannot connect to the windowserver and therefore, it cannot display the popup - if you do not want to trust the program, make a backup of your files before using it - The sourcecode is availible, if you want to build it yourself.
Stop and Start the Windows filesharing in the system pref pane.
If everything has been setup you can send a message with:
echo "my Message" | smbclient -M ip.of.the.pc