How to echo a message to an IP#

Matt Graham danceswithcrows at usa.net
Mon Jul 4 12:59:21 MST 2011


From: joe at actionline.com
> How can I echo a message to another computer on my wireless system?

In general, you don't do this, because it's insecure.  Usually, talkd hasn't
even been started, and people can always do "mesg n" to turn off messaging. 
There are ways around this; read on for one of them.

> When I do a 'shutdown' it sends a notification message to every computer
> on my system. What command or syntax could I use to send some other kind
> of alert or message from one computer to another on the same network?

The quick and easy way to do that is this, executed as root:

ssh other.machine 'echo -e "\nSome message\n" | wall'

...then, every user logged in to a terminal on other.machine will see "\nSome
message\n" show up.  There are other ways, notably the "smbclient -M
NETBIOSNAME" method that the SMB protocol defines.  For that to work, you have
to have Samba set up appropriately on all your machines, and you have to have
something like LinPopUp in place too.  That's

message command = /usr/bin/linpopup "%f" "%m" %s; rm %s

...in the [global] section of your smb.conf , of course.  wall should work
everywhere without further setup, but it won't generally be GUI-fied.

Note that there are security considerations here, as usual.

-- 
Matt G / Dances With Crows
The Crow202 Blog:  http://crow202.org/wordpress/
There is no Darkness in Eternity/But only Light too dim for us to see



More information about the PLUG-discuss mailing list