views:

75

answers:

4

Just like a "net send" on Windows, if I remember what net send does correctly. I just want to say something like:

<command> <IP address> "Hey what's up?"

and the message "Hey what's up?" should show up on the other guy's machine. Ideally this shouldn't require installation of any packages not already present in typical UNIX/Linux distributions.

Any ideas?

Thanks!

+3  A: 

Look up "talk," "ntalk" and "ytalk." Those are the closest. Fortunately, most Unix machines have no such daemon running by default, and even Windows had the sensibility to disable this service by default after they realized how annoying it is.

bowenl2
thanks I'll take a look at those!
mindthief
+1  A: 

smbclient -M destination-host -U my-host -n my-host

more info here: http://www.yolinux.com/TUTORIALS/unix_for_dos_users.html

hope it helps

also, try the "talk" command. (talkd is worth looking into too)

stephenmurdoch
as a test, I tried sending a message to localhost. It fails with this message:$smbclient -M 127.0.0.1 -U 127.0.0.1 -n 127.0.0.1Error connecting to 127.0.0.1 (Connection refused)Connection to 127.0.0.1 failed. Error NT_STATUS_CONNECTION_REFUSEDI tried variants of this, like using localhost instead of the IP, and it fails in a similar manner. This method does seem promising though.
mindthief
@mindthief: First, the remote machine need to have a running a samba server (and there must be no firewall blocking access). This is what was missing in your test. Second, the samba server must be configured to let pop-ups through, which is not the default.
Gilles
+1  A: 

given your strict requirements (default install etc) this comes closest:

DISPLAY=otherip:0.0 xterm -e "/bin/echo \"Hey what's up?\"; /bin/sleep 9999"
mvds
and don't forget to throw in a pair of `xeyes`, while you're at it!
mvds
does this require X server to be running? I tried using localhost as the destination (maybe this isn't valid?) and got this message:DISPLAY=127.0.0.1:0.0 xterm -e "/bin/echo \"Hey what's up?\"; /bin/sleep 9999"xterm Xt error: Can't open display: 127.0.0.1:0.0Being able to also get the xeyes going would be SWEET!! So if you know how to get this to work, I'd be happy to hear about it! Thanks!
mindthief
@mindthief: This requires the user on the other machine to have given you the permission to execute application on his X display (there is a per-session password, which is managed via the `xauth` command). It also requires that TCP connections to the X server be activated, which is not the default on most unices nowadays. (And it won't work if a firewall blocks the connection, either.) So the remote guy doesn't need any special software but must have made a configuration change and given you the permission to annoy him.
Gilles
@mindthief: sorry, this was more kind of a joke on how to ever get something like this going on stock installs of unix/X environments. Trick the other user into executing `xhost +` so it allows any connection, that always worked for me (in the late '90s at least)
mvds
A: 

Unix was multiuser from the start, so you'd have to specify which user on the target machine you want to message. Then the command would once have been rwrite, but it's all but disappeared. talk (or ytalk, ntalk, etalk) would let the other person reply, but these days instant messaging goes via a centrally managed identity (AIM, Jabber, Skype, etc.) rather than on a machine-to-machine basis.

Gilles
thanks for the background! I'll look into talk, etc.
mindthief