/var/run/utmp
to find user
Enhanced write
nwrite [-i
minutes]
[-a]
user
[.ttyname]
[user
[.ttyname] ...]
nwrite copies lines from your terminal to the terminals of one or more users. When called, it begins copying lines you type to the recipient's terminal(tty). Before sending the first line of text, nwrite prepends the message
Message from <name> on <tty> [to user [users ...]] at <time> ...
Communication continues until an end of file is read from the terminal or an interrupt is sent. At that point nwrite writes `EOF' (or `EOF (sendername)' if whoeof is set) on the other terminal and exits.
If you want to write to a user who is logged in more than once, the ttyname argument may be used to indicate the appropriate terminal name, OR, you can let nwrite find the first writable tty, and write to that. Additionally, you can use the -i option to specify a number of minutes; ttys more idle than the number you specify will be ignored when looking for ttys to write to.
Permission to write may be denied or granted by use of the mesg command. At the outset writing is allowed. Certain commands, in particular nroff and pr(1) disallow messages in order to prevent messy output.
To control how incoming nwrites look to you, create a ~/.nwriterc with lines of the form:
option value
Where value is either 0 or 1 (meaning no and yes) and option is one of:
headersDisplay "user> " before each incoming line.
beepCause the terminal to beep when the message header comes through.
nodelayDo not wait for the first line of input before displaying the message header.
boldTakes the following string values:
neverno bolding (default)
headermessage header only
tagmessage header and "login>" line tags
allbold everything
showtargUsed to control the behavior of the message header. Takes the following string values:
nevernever show recipient list
multionly if more than one recipient (default)
alwaysalways show recipients
whoeofWhen sending EOF, append username to differentiate between many Users at once like this: "EOF (user)".
Note that your home directory must be world executable and the .nwriterc itself must be world readable.
headers 1
nodelay 0
beep 0
bold header
showtarg multi
-a
arguments are zeroed so that the process table entry does not reveal who you are writing to. (Not available on all systems.)
-i <minutes>
Ignore ttys more idle than <minutes> minutes.
/var/run/utmp
to find user
/etc/nwrite.rc
to set system default preferences
~user/.nwriterc
to obtain target's preferences
11 releases since Debian 2.2 (Potato); the text changed 1 time.