LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-06-2006, 08:31 PM   #1
fdvj
LQ Newbie
 
Registered: Dec 2006
Posts: 1

Rep: Reputation: 0
How do I echo a message to a terminal on another IP address


Hi. Im using SUSE. I've recently learned how to send messages between terminals with echo and tty. This is what I know (please correct if I'm wrong...im a real newbie on linux):

I open the second terminal (the one I want to send the message to) and use tty to gets its name

I go back to my first terminal (the one Im sending the message from) and type this:

echo "message" > address_given_by_tty

It works great, mostly because its in the same machine. What I want to know is how do I echo a message to a remote terminal on another machine (I know its reduntant the "remote", but anyhow) in the same LAN. More specifically, how do I echo a message to a terminal in another machine by its IP address. Thanks.
 
Old 12-06-2006, 08:45 PM   #2
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
You can use the write command to send messages locally which is probably betther than using your method (read "man write" for more details). Unfortunately AFAIK it only works locally. To send messages to a remote host you could try talk or rwall. These utilities may not be installed on you system but there should be packages available.
 
Old 12-06-2006, 09:05 PM   #3
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 65
Instead of doing the echo and re-directing to the other user's tty, you can use the write command. See the write manpage for more info. A user can specify if they want to receive messages in a given tty using the mesg command. "mesg n" turns off messages, "mesg y" turns them on.

Between machines is a different matter. Assuming you have an account on it, you could log into the remote machine with ssh and use write in the ssh session.

If that's not good for you for some reason, the best thing to do is use an IM setup. Jabber is an open protocol and you can get free clients and servers.
 
1 members found this post helpful.
Old 12-07-2006, 06:41 AM   #4
vimalkumar_k
LQ Newbie
 
Registered: Nov 2006
Posts: 14

Rep: Reputation: 0
Hi...
we usually annoy other users in the network in a different way:

ssh to their machine ... n then
echo "message to be displayed" >> /dev/console

OR

set a crontab there ...

OR

init 0 (shutdown their computer)
 
Old 12-07-2006, 09:48 AM   #5
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 65
Assuming you can ssh to the machine, and allow X forwarding with your sshd config, and have ssh set the Xauthority file, you could also ssh and execute xmessage, or kdialog or something. That's bound to really annoy the users

For all of these ssh-based alert, you've got a scalability problem. ssh handshakes make quite a lot of load on both parties, so if you're sending to a large number of machines fro one machine, the sender will get hammered quite heavily.
 
Old 05-13-2013, 08:04 AM   #6
rAllcorn@quest.uucpnet.n
LQ Newbie
 
Registered: Mar 2011
Posts: 2

Rep: Reputation: 1
Have you tried the TALK command?

UNIX and LINUX has a command utility for "talking" between terminals, sort of like a text-based chat.

The server service (in case it's not installed on your system) is "talkd"
and the client service is "talk". Install them both, on both systems.

You might also want to install "fingerd" and "finger" ...
These give you a quick reference to identify a user, their contact info and the terminal(s) they are currently logged on to.

Hope this help!
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Ethernet to Serial Terminal Echo andig Linux - Newbie 1 01-22-2006 05:25 PM
Ethernet to serial Terminal Echo on thin Client andig Linux - Software 0 01-19-2006 11:21 PM
gmplayer message at start-"echo 1024 > /proc/sys/dev/rtc/max-user-freq" Mutation_1101 Slackware 7 01-11-2006 07:46 PM
Prevent Terminal Echo Using Python (for Passwords) taylor_venable Programming 4 07-05-2005 11:52 PM
behaviour of echo with ? (the question mark) in gnome-terminal fsbooks Programming 1 01-08-2004 12:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:22 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration