Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have a user of name x in tty1 and y in tty2. Now x wants to write some message to y and vice-versa. Now I typed in tty1 terminal write y tty2 It is showing

write:write:you have write permission turned off

write:y has messages disabled

Same thing is showing when y's sending message to x instead it is 'x' in the last line. What should I do?

share|improve this question

2 Answers 2

up vote 6 down vote accepted

It seems that y has turned off messages.

In y's terminal, type:

$ mesg
is n

meaning y does not allow others to write to y's terminal. Then you should try:

$ mesg y

Note

This option y in above command is different with y user in your case.

From man mesg:

NAME
       mesg - control write access to your terminal

SYNOPSIS
       mesg [y|n]

DESCRIPTION
       Mesg  controls the access to your terminal by others.  It's typically used to allow or disallow other users to write to your terminal
       (see write(1)).

OPTIONS
       y      Allow write access to your terminal.

       n      Disallow write access to your terminal.

       If no option is given, mesg prints out the current access state of your terminal.
share|improve this answer
    
It is showing Usage:mesg[y|n] and the prompt is coming then. –  saptarshi nag Jun 8 at 16:35
    
@saptarshinag: you must type mesg y <enter>. y is an option of mesg, not your user. –  cuonglm Jun 8 at 16:37
    
Oh i see,sorry for my mistake –  saptarshi nag Jun 8 at 16:46
    
It works! but after logout and again logging in one of the terminal the first message is still showing,i.e,write:write:you have write permission turned off...it is working though.Thanks! –  saptarshi nag Jun 8 at 16:53
    
@saptarshinag: Becasue in your system, message is not turn on by default. What is your OS? –  cuonglm Jun 8 at 17:24

You cannot do anything (unless you are the root user).

Each user can enable/disable other users ability to send messages to them using the command mesg. This command can be put into your .bashrc or .login file (depending on shell).

The default if you do nothing is to protect the user from these interrupting messages from other users.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.