LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 10-31-2003, 03:48 PM   #1
devinWhalen
Member
 
Registered: Apr 2003
Location: Toronto, Canada
Distribution: Red Hat, openBSD,Mandrake,freeBSD,SunOS
Posts: 168

Rep: Reputation: 30
Sending messages to people on the same server


Hey,

I want to send a message to someone who is connected to the same server as me. So let's say, I am at home and they are at home but we are both working on the same server which is at work. (this is all through the shell obviously) I want to send a message to them and them only. I always just use: wall $msg but this sends it to everyone. I know about 'talk' but, they need to accept right? Is there a command to just send message to their terminal. Could you give me an example please?

Thanks

Later
 
Old 10-31-2003, 04:01 PM   #2
inode100
Member
 
Registered: Oct 2003
Location: London - England, UK
Posts: 63

Rep: Reputation: 15
Don't know of any thing else, but why not just use talk ? If he/she wants to reply they will - eh ?

inode
 
Old 10-31-2003, 04:08 PM   #3
dorian33
Member
 
Registered: Jan 2003
Location: Poland, Warsaw
Distribution: LFS, Gentoo
Posts: 587

Rep: Reputation: 32
use 'write' but it also can be blocked by the user (like 'wall' does)
only root can send the message unconditionally with (for instance) 'echo blah blah > /dev/<user_console>'
 
Old 10-31-2003, 04:35 PM   #4
jim mcnamara
Member
 
Registered: May 2002
Posts: 964

Rep: Reputation: 34
The guy on the receiving end has to

mesg y

before it will work. This can be in a standard .profile or .bashrc file

talk is frequently disabled by sysadmins, write usually is not.
 
Old 11-03-2003, 09:54 AM   #5
devinWhalen
Member
 
Registered: Apr 2003
Location: Toronto, Canada
Distribution: Red Hat, openBSD,Mandrake,freeBSD,SunOS
Posts: 168

Original Poster
Rep: Reputation: 30
thanks for your help, I will read the manuals on mesg and talk

Later
 
Old 11-03-2003, 11:55 AM   #6
SlickWilly
Member
 
Registered: Dec 2002
Posts: 327

Rep: Reputation: 30
Something I learned way back in the dark ages before talk became popular was this.

When you log in you get assigned a tty (virtual terminal) - which is what is used to send you stdout output. Another user can (usually, unless your dist has been hardened to lock tty's) send output to that terminal as if it were coming from the machine.

So, if you don't have talk enabled (common on the later dists - and talk has been known to have vunerabilities which is *why* it's turned off by default), you can do this :

find the tty of your user. Example type 'w'

[root@fseng root]# w
18:51:15 up 1:50, 1 user, load average: 0.00, 0.00, 0.00
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
root pts/0 xxx.xxx.xxx.xxx 5:07pm 0.00s 0.09s 0.01s w
steve pts/1 xxx.xxx.xxx.xxx 5:08pm 0.00s 0.07s 0.01s -bash

I'm root and I want to talk to steve.

type :

echo "Hi steve! Wanna go for lunch?" >/dev/pts/1

and it'll write it to his terminal directly.

Note that this is rather disgusting behaviour if your user steve is, for instance, in the middle of editing a file as it'll write it directly to his screen and mess up whatever it was he was doing at the time. It's not destructive, just annoying...

It's also rather neat for chatting up the girl infront of you in class without her knowing who it is.. :P

Slick.
 
Old 11-03-2003, 12:12 PM   #7
devinWhalen
Member
 
Registered: Apr 2003
Location: Toronto, Canada
Distribution: Red Hat, openBSD,Mandrake,freeBSD,SunOS
Posts: 168

Original Poster
Rep: Reputation: 30
Hey SlickWilly,

Thanks for that one. I am going to have to use that. You really are slick

Later
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sending messages in LAN?? Umanga Linux - Newbie 1 10-26-2004 01:32 AM
Sending messages tired Linux - Newbie 2 08-11-2004 02:37 AM
Sending messages over SSH jeucken Linux - Networking 1 12-15-2003 01:54 PM
Sendmail. Any way to block people from sending mail as me ForumKid Linux - Software 1 08-28-2003 12:32 PM
Sending messages across a network... kierl Linux - General 3 04-07-2003 01:11 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration