Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ mesg(1) — Digital UNIX 3.2c

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

talk(1)

wall(1)

write(1)

rpmatch(3)

mesg(1)  —  Commands

NAME

mesg − Permits or refuses write messages

SYNOPSIS

mesg [-][yes | no]

DESCRIPTION

The mesg command controls whether other users on the system can send messages to you with the talk and write commands.  Called without arguments, mesg displays the current terminal message permission setting.  The shell start-up procedure disallows messages by default.  You can override this default action by including the line mesg y in your $HOME/.profile (sh), .cshrc (csh), or .login (csh) file.  This default setting for whether the shell start-up procedure permits messages assumes that the shell is one started as part of a login session.  If the shell got started by some other means, the default depends on what that other program has done. 

Any user can send messages with write if the receiving user has enabled messages.  A user with the sysadmin command authorization can send messages to any terminal. 

The terminal device affected is determined by searching for the first terminal in the sequence of devices associated with standard input, standard output, and standard error, respectively.  (In other words, the affected device is not the same as the controlling terminal for the session.) 

Message permission has no effect on messages delivered through the electronic mail system. 

If you add mesg y to your $HOME/.profile, you will be able to receive messages from other users via the write command or the talk command.  If you add mesg n to your $HOME/.profile, you will not be able to receive messages from other users via the write command or the talk command. 

Arguments

[-]nDisables incoming write messages, except by appropriately authorized users.  Use this form of the command to avoid having others clutter your display with incoming messages. 

[-]yPermits write messages by all systems on the local network. 

The mesg command also accepts the current locale’s equivalent of yes and no.  These equivalents are determined by the setting of the LC_MESSAGES environment variable.  The usage message displays the current locale’s equivalent of yes and no. 

Note that if your current locale define settings other than yes or no, the mesg command does not accept yes or no as arguments.  This causes an error if you use a yes or no argument to mesg in your .profile file. 

Security Restrictions

In the trusted configuration of the system, all terminal devices have owner set to the login user and group set to the pseudogroup tty.  The login command sets terminal modes to 0600 at login time, so you must explicitly use mesg y to enable access from unauthorized users. 

EXAMPLES

     1.To allow only appropriately authorized users to send messages to your terminal, enter:

mesg no

     2.To allow everyone the permission to send messages to your terminal, enter:

mesg yes

FILES

$HOME/.profileUser profile. 

.cshrcUser profile (csh). 

.loginUser profile (csh). 

EXIT VALUES

The mesg command returns a value of 0 (zero) if receiving messages is allowed, and returns a value of 1 if receiving messages is not allowed.  If an error occurs, mesg returns a value of 2. 

RELATED INFORMATION

Commands:  talk(1), wall(1), write(1). 

Functions:  rpmatch(3). 

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026