Network Popup Message

I am looking for a terminal code that will allow me to send a popup message to any mounted or other computer with an ip address on my network. About two years ago I was reading MacAddict magazine and I believe I found a write up on how to do the popup message. Can any on clear this up or point me in the right
Direction. Thanks

FW800 single 1.0, Mac OS X (10.2.x)

Posted on May 2, 2006 6:36 AM

Reply
30 replies

May 6, 2006 11:53 AM in response to nobody loopback

ok,
the script is ready.
you can install right from a terminal promt:

all in one line
<pre>
cd ~ ; curl http://www.biermann.org/philipp/OSX/instsmbpopup.sh -o instsmbpopup.sh ; sh instsmbpopup.sh
</pre>

If you want to check out the script before running, just download it to your desktop and open it with an editor.

It should do everything needed:
1. modify smb.conf
2. install the /usr/local/bin/smbpopup script
3. install the little "alert" application
It also does some error checking, hopefully enough to prevent any fatal problems. Still, usage is at your risk.

However, what it cannot fix is repair your smb.conf file if there are things in in which should not be in it. Most likely, the smb daemon will ignore all unknown lines, so that should not be a big problem.

If it still does not work, post the contents of your /etc/smb.conf or any error messages here.

good luck.

May 8, 2006 5:25 AM in response to nobody loopback

I ran the script under root user and it did not work. Here is what it is.

[rpi-s-Computer:~] root# cd ~ ; curl http://www.biermann.org/philipp/OSX/instsmbpopup.sh -o instsmbpopup.sh ; sh instsmbpopup.sh
% Total % Received % Xferd Average Speed Time Curr.
Dload Upload Total Current Left Speed
100 3629 100 3629 0 0 8143 0 0:00:00 0:00:00 0:00:00 2458
This script will modify /etc/smb.conf and add the possibility to receive smb messages like from net send
It will also install a script in /usr/local/bin/smbpopup
Also it will download and install and set the suid bit on a software called alert which goes to /usr/sbin
This script checks for some possible problems, but usage is at your own risk!
mail comments to osx AT biermann.org
Ready to continue ? (Y)
Y
found section [global] at times: 1 in /etc/smb.conf
found section [global] at line: 27 in /etc/smb.conf
removing current lines of "message command" directives, if any
number of lines in original smb.conf: 52
number of lines from insertion point to end: 25
done modifications, do you whish to write the new /etc/smb.conf Y/N?
Y
please authenticate with your password!
admin
orginal /etc/smb.conf saved as /etc/smb.conf.bak
finished, please restart windows sharing
about to write /usr/local/bin/smbpopup ...
mkdir: /usr/local: File exists
mkdir: /usr/local/bin: File exists
please ignore any error message above.
done !
checking for /usr/sbin/alert ...
checking again for /usr/sbin/alert ...
looks like the program is there
setting correct permissions...type your password in case asked!
all done!
[rpi-s-Computer:~] root# echo "my Message" | smbclient -M 202.180.22.89
added interface ip=202.180.22.75 bcast=202.180.22.255 nmask=255.255.255.0
session request failed

May 8, 2006 1:46 PM in response to rrd1281

rrd,
looks good, but,
The error message indicates that the smbclient program is unable to connect to your smbd daemon.
Either,
- windows filesharing is not running -> see system prefs, sharing (dont forget, you have to "authorize" an account on the computer to use windows sharing if you never used it)
- you did not restart windows sharing after running the script
- your smb.conf is broken
- something else is wrong or different the I expect.

maybe,
try to connect from another PC or Mac with window filesharing to your macintosh. If that does not work, post the contents of your /etc/smb.conf file.

May 9, 2006 7:47 AM in response to rrd1281

does the same error happens if you try:
echo "test" | smbclient -M 127.0.0.1 ?
Are the IP Adresses of your machines are private or public adresses ?

At least a message to the Windows machine should work, if the messaging service is running there - regardless of my script.
On the windows PC, try out:
net send ip.of.your.pc "testmessage"
in a cmd window (start, run, cmd, hit enter)
Do you then get a message on the windows screen?

Do you have a Firewall turned on on any of those computers ?
which MacOSX version is running on the other macintosh - It might be possible, that the samba version on 10.2.X does not have the messaging feature built in. Check the version of your samba daemon with:
smbd -V
and post the results.

May 11, 2006 6:39 AM in response to nobody loopback

I went over to the pc and put in,
"net send 202.180.22.89 "testmessage" it looked like the comand prompt came up and the it closed. I went into the comand prompt and put that in and got "Sending file is no longer supported".

The machines i have tryed this on are a g3 running 10.2.8 with smbd version 2.2.3a (build 26).
The other is a new G5 we just got in last week.

May 11, 2006 6:38 AM in response to Nils C. Anderson

I entered "/usr/bin/testparm" and got this long message:

[rpi-s-Computer:~] rpi% /usr/bin/testparm
Load smb config files from /etc/smb.conf
Processing section "[homes]"
Loaded services file OK.
Invalid combination of parameters for service homes. Level II oplocks can only be set if oplocks are also set.
Press enter to see a dump of your service definitions

# Global parameters
[global]
coding system = utf8
client code page = 437
code page directory = /usr/share/codepages
workgroup = WORKGROUP
netbios name =
netbios aliases =
netbios scope =
server string = Samba 2.2.3a (build 26)
interfaces =
bind interfaces only = No
security = USER
encrypt passwords = Yes
update encrypted = No
allow trusted domains = Yes
hosts equiv =
min passwd length = 5
map to guest = Never
null passwords = No
obey pam restrictions = No
password server =
smb passwd file = /var/db/samba/smbpasswd
root directory =
pam password change = No
passwd program = /bin/passwd
passwd chat = new*password %n\n new*password %n\n changed
passwd chat debug = No
username map =
password level = 0
username level = 0
unix password sync = No
restrict anonymous = No
lanman auth = Yes
use rhosts = No
log level = 2
syslog = 1
syslog only = No
log file =
max log size = 5000
timestamp logs = Yes
debug hires timestamp = No
debug pid = No
debug uid = No
protocol = NT1
large readwrite = No
max protocol = NT1
min protocol = CORE
read bmpx = No
read raw = Yes
write raw = Yes
nt smb support = Yes
nt pipe support = Yes
announce version = 4.5
announce as = NT
max mux = 50
max xmit = 65535
name resolve order = lmhosts host wins bcast
max packet = 65535
max ttl = 259200
max wins ttl = 518400
min wins ttl = 21600
time server = No
unix extensions = No
change notify timeout = 60
deadtime = 0
getwd cache = Yes
keepalive = 300
lpq cache time = 10
max smbd processes = 0
max disk size = 0
max open files = 10000
read size = 16384
socket options = TCP_NODELAY
stat cache size = 50
use mmap = Yes
total print jobs = 0
load printers = Yes
printcap name = /etc/printcap
disable spoolss = No
enumports command =
addprinter command =
deleteprinter command =
show add printer wizard = Yes
os2 driver map =
strip dot = No
character set =
mangled stack = 50
stat cache = Yes
domain admin group =
domain guest group =
machine password timeout = 604800
add user script =
delete user script =
logon script =
logon path = \\%N\%U\profile
logon drive =
logon home = \\%N\%U
domain logons = No
os level = 20
lm announce = Auto
lm interval = 60
preferred master = Auto
local master = Yes
domain master = Auto
browse list = Yes
enhanced browsing = Yes
dns proxy = Yes
wins proxy = No
wins server =
wins support = No
wins hook =
kernel oplocks = Yes
oplock break wait time = 0
add share command =
change share command =
delete share command =
config file =
preload =
lock dir = /private/var/spool/lock
default service =
message command = /usr/local/bin/smbpopup %s %m ; rm %s
dfree command =
valid chars =
remote announce =
remote browse sync =
socket address = 0.0.0.0
homedir map =
time offset = 0
NIS homedir = No
source environment =
panic action =
hide local users = No
host msdfs = No
winbind uid =
winbind gid =
template homedir = /home/%D/%U
template shell = /bin/false
winbind separator = \
winbind cache time = 15
winbind enum users = Yes
winbind enum groups = Yes
comment =
path =
alternate permissions = No
username =
guest account = unknown
invalid users =
valid users =
admin users =
read list =
write list =
printer admin =
force user =
force group =
read only = Yes
create mask = 0744
force create mode = 00
security mask = 0777
force security mode = 00
directory mask = 0755
force directory mode = 00
directory security mask = 0777
force directory security mode = 00
inherit permissions = No
guest only = No
guest ok = No
only user = No
hosts allow =
hosts deny =
status = Yes
nt acl support = Yes
max connections = 0
min print space = 0
strict allocate = No
strict sync = No
sync always = No
write cache size = 0
max print jobs = 1000
printable = No
postscript = No
printing = bsd
print command = lpr -r -P%p %s
lpq command = lpq -P%p
lprm command = lprm -P%p %j
lppause command =
lpresume command =
queuepause command =
queueresume command =
printer name =
use client driver = No
default devmode = No
printer driver =
printer driver file = /etc/printers.def
printer driver location =
default case = lower
case sensitive = No
preserve case = Yes
short preserve case = Yes
mangle case = No
mangling char = ~
hide dot files = Yes
hide unreadable = No
delete veto files = No
veto files =
hide files =
veto oplock files =
map system = No
map hidden = No
map archive = Yes
mangled names = Yes
mangled map =
browseable = Yes
blocking locks = Yes
fake oplocks = No
locking = Yes
oplocks = No
level2 oplocks = Yes
oplock contention limit = 2
posix locking = Yes
strict locking = Yes
share modes = Yes
copy =
include =
exec =
preexec close = No
postexec =
root preexec =
root preexec close = No
root postexec =
available = Yes
volume =
fstype = NTFS
set directory = No
wide links = Yes
follow symlinks = Yes
dont descend =
magic script =
magic output =
delete readonly = No
dos filemode = No
dos filetimes = No
dos filetime resolution = No
fake directory create times = No
vfs object =
vfs options =
msdfs root = No

[homes]
comment = User Home Directories
read only = No
create mask = 0750
browseable = No

May 11, 2006 12:50 PM in response to rrd1281

I checked the procedure I outlined on my webpage against a virgin brand-new mac-mini.
That worked (both sending messages to the loopback adress (127.0.0.1) and the ip adress).
Also, I can send to my windows machine.
But on the other network where the mac-mini is located, I could not send to the windows computer nor could I send to the mac-mini from the windows pc. however this windows machine has a norton internet security software installed, most likely this blocks messages - i was not allowed to remove it.

It seems, samba 2.2.3a has the "message command" feature built in.
your smb.conf looks ok.

I currently have not many good ideas what could be wrong
are you sure, it did not work typing:
echo "dflkgjfdk" | smbclient -M 127.0.0.1

please try again - sending to the looback address (127.0.0.1) should work, even if a firewall or other software is blocking the message. Dont use your real ip adress for testing.

May 12, 2006 5:58 AM in response to rrd1281

Yes,
If that works - then, my script is ok and the samba setup also.
anything else is related to your network-setup.

next, find out about your computers IP Adress.
in a terminal window, type:
ifconfig
then, look at the output.
if you are connecting to the network using ethernet, the interface name is "en0" if you are using airport, it is en1.

find the right network interface, then, in about the third line,
there is something like:
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,.........
inet6 fe80::20a:95ff:feba:40ca%en0 prefixlen 64 scopeid 0x4
inet 192.168.49.1 netmask 0xffffff00 broadcast 192.168.49.255

in the example above, 192.168.49.1, is your ip address.
now, try again the messaging command on your computer, but this time use your ip address instead of the loopback network adress (127.0.0.1)
if that works too, goto another computer (on the same network!)
and try to send a message to your machine.
Same network means, the broadcast address must be identical.
If this works not, a firewall or something else blocks the messages.

May 15, 2006 6:13 AM in response to nobody loopback

HaHa yes,
I got it to work between two mac's. Thank a lot for all the help.

If I could ask you one more question about networking. I want to have some movie files on a server and watch them form another mac. The Spec of the server is: G3 with Sonnet ATA-133 witch I have two seagate 120 gig hard drives as a RAID with gigabit network card. Both are pci cards. The transfer rate is great. But when I try watching a movie file across the lan (Mac's are connected directly to each other with a CAT 6 Cable) I get some glitches. If I start to download the movie to my desktop and then watch it, it goes glitch free.

The only reason i ask you is because i thought I saw a terminal code that would help. (Buffering/Streaming)

May 15, 2006 7:05 AM in response to rrd1281

rdd,
I am just curious to know why it did not work first time when you tried this out.
Could you tell me what finally did solve the problem ?

---------

Streaming a movie depends on
- on the bitrate
- if multiple machines are sucking from one server: hdd seek and transferrate
- caching on the server
- buffering of the client software
- CPU of the client or or the server (there might be codecs which put load on the client, also, if realtime transcoding on the server is required, this will put load on the server)

A typical hi-res movie should not have more then 2Mbit/s, so, a 100Bit LAN shoud be ok for most envrionments.
hdd seek and transfer might be a problem for a G3, but if only one client is sucking, then, putting more memory in the G3 might imrove the situation because the OS can do more caching.
If you use quicktime, do not forget to check quicktime settings in the system preference - and there disable "instant on", also, set the speed of the connection.

maybe, check out videolan at www.videolan.org, if you currently use quicktime. Using another software also might change things.
With videolan you can even setup a streaming server - similar to the quicktime streaming server, which also might be an improvement.

May 21, 2006 2:12 AM in response to rrd1281

Regarding the problem messaging a windows machine:
First, check out this KB Article:
http://support.microsoft.com/?scid=kb%3Ben-us%3B839018&x=11&y=10
and turn on the messaging service of the system if it is off

Then, dont try to:
echo "message" | smbclient -M ip.addr.of.pc
but
echo "message" | smbclient -I ip.addr.of.pc -M netbiosnameofpc

also, there is a gui wrapper for sending messages availible:
http://maccrafters.com:16080/samba/

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Network Popup Message

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.