.\" Copyright (c) 1983, 1990 The Regents of the University of California.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\"    must display the following acknowledgement:
.\"	This product includes software developed by the University of
.\"	California, Berkeley and its contributors.
.\" 4. Neither the name of the University nor the names of its contributors
.\"    may be used to endorse or promote products derived from this software
.\"    without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\"     from: @(#)talk.1	6.6 (Berkeley) 4/22/91
.\"	$Id: talk.1,v 1.15 2000/07/30 23:57:02 dholland Exp $
.\"
.Dd November 24, 1999
.Dt TALK 1
.Os "Linux NetKit (0.17)"
.Sh NAME
.Nm talk
.Nd talk to another user
.Sh SYNOPSIS
.Nm talk
.Ar person
.Op Ar -x
.Op Ar ttyname
.Sh DESCRIPTION
.Nm Talk
is a visual communication program which copies lines from your
terminal to that of another user.
.Pp
Options available:
.Bl -tag -width ttyname
.It Ar person
If you wish to talk to someone on your own machine, then
.Ar person
is just the person's login name.  If you wish to talk to a user on
another host, then
.Ar person
is of the form
.Ql user@host
( or 
.Ql host.user
or
.Ql host!user
or
.Ql host:user
).
.It Ar -x
If you wish to talk to a user who has dot character in username, the
.Ar -x
argument will force
.Ql user@host
form of the
.Ar person
and talk will take dots as part of user name.
.It Ar ttyname
If you wish to talk to a user who is logged in more than once, the
.Ar ttyname
argument may be used to indicate the appropriate terminal
name, where
.Ar ttyname
is of the form
.Ql ttyXX
or
.Ql pts/X .
.El
.Pp
When first called,
.Nm talk
contacts the talk daemon on the other user's machine, which sends the
message
.Bd -literal -offset indent -compact
Message from TalkDaemon@his_machine...
talk: connection requested by your_name@your_machine.
talk: respond with: talk your_name@your_machine
.Ed
.Pp
to that user. At this point, he then replies by typing
.Pp
.Dl talk \ your_name@your_machine
.Pp
It doesn't matter from which machine the recipient replies, as
long as his login name is the same.  Once communication is established,
the two parties may type simultaneously; their output will appear
in separate windows.  Typing control-L (^L)
.\".Ql ^L
will cause the screen to
be reprinted. The erase, kill line, and word erase characters
(normally ^H, ^U, and ^W respectively)
will behave normally.  To exit, just type the interrupt character
(normally ^C);
.Nm talk
then moves the cursor to the bottom of the screen and restores the
terminal to its previous state.
.Pp
As of netkit-ntalk 0.15
.Nm talk
supports scrollback; use esc-p and esc-n to scroll your window, and
ctrl-p and ctrl-n to scroll the other window. These keys are now
opposite from the way they were in 0.16; while this will probably be
confusing at first, the rationale is that the key combinations with 
escape are harder to type and should therefore be used to scroll one's
own screen, since one needs to do that much less often.
.Pp
If you do not want to receive talk requests, you may block them using the
.Xr mesg 1
command.  By default, talk requests are normally not blocked.
Certain commands, in particular
.Xr nroff 1 ,
.Xr pine 1 ,
and
.Xr pr 1 ,
may block messages temporarily in order to
prevent messy output.
.Pp
.Sh FILES
.Bl -tag -width /var/run/utmp -compact
.It Pa /etc/hosts
to find the recipient's machine
.It Pa /var/run/utmp
to find the recipient's tty
.El
.Sh SEE ALSO
.Xr mail 1 ,
.Xr mesg 1 ,
.Xr who 1 ,
.Xr write 1 ,
.Xr talkd 8
.Sh BUGS
The protocol used to communicate with the talk daemon is braindead.
.Pp
Also, the version of
.Xr talk 1
released with
.Bx 4.2
uses a different and even more braindead protocol that is completely
incompatible. Some vendor Unixes (particularly those from Sun) have
been found to use this old protocol.
.Pp
Old versions of
.Nm talk
may have trouble running on machines with more than one IP address,
such as machines with dynamic SLIP or PPP connections. This problem is
fixed as of netkit-ntalk 0.11, but may affect people you are trying to
communicate with.
.Sh HISTORY
The
.Nm
command appeared in
.Bx 4.2 .
