TALK(1)                    POSIX Programmer's Manual                   TALK(1)



PPRROOLLOOGG
       This manual page is part of the POSIX Programmer's Manual.  The OS
       implementation of this interface may differ (consult the corresponding
       OS manual page for details of OS behavior), or the interface may not be
       implemented on OS.

NNAAMMEE
       talk -- talk to another user

SSYYNNOOPPSSIISS
       talk _a_d_d_r_e_s_s [[_t_e_r_m_i_n_a_l]]

DDEESSCCRRIIPPTTIIOONN
       The _t_a_l_k utility is a two-way, screen-oriented communication program.

       When first invoked, _t_a_l_k shall send a message similar to:


           Message from <_u_n_s_p_e_c_i_f_i_e_d _s_t_r_i_n_g>
           talk: connection requested by _y_o_u_r___a_d_d_r_e_s_s
           talk: respond with: talk _y_o_u_r___a_d_d_r_e_s_s

       to the specified _a_d_d_r_e_s_s.  At this point, the recipient of the message
       can reply by typing:


           talk _y_o_u_r___a_d_d_r_e_s_s

       Once communication is established, the two parties can type
       simultaneously, with their output displayed in separate regions of the
       screen. Characters shall be processed as follows:

        *  Typing the <alert> character shall alert the recipient's terminal.

        *  Typing <control>-L shall cause the sender's screen regions to be
           refreshed.

        *  Typing the erase and kill characters shall affect the sender's
           terminal in the manner described by the tteerrmmiiooss interface in the
           Base Definitions volume of POSIX.1-2017, _C_h_a_p_t_e_r _1_1, _G_e_n_e_r_a_l
           _T_e_r_m_i_n_a_l _I_n_t_e_r_f_a_c_e.

        *  Typing the interrupt or end-of-file characters shall terminate the
           local _t_a_l_k utility. Once the _t_a_l_k session has been terminated on
           one side, the other side of the _t_a_l_k session shall be notified that
           the _t_a_l_k session has been terminated and shall be able to do
           nothing except exit.

        *  Typing characters from _L_C___C_T_Y_P_E classifications pprriinntt or ssppaaccee
           shall cause those characters to be sent to the recipient's
           terminal.

        *  When and only when the _s_t_t_y iieexxtteenn local mode is enabled, the
           existence and processing of additional special control characters
           and multi-byte or single-byte functions shall be implementation-
           defined.

        *  Typing other non-printable characters shall cause implementation-
           defined sequences of printable characters to be sent to the
           recipient's terminal.

       Permission to be a recipient of a _t_a_l_k message can be denied or granted
       by use of the _m_e_s_g utility. However, a user's privilege may further
       constrain the domain of accessibility of other users' terminals. The
       _t_a_l_k utility shall fail when the user lacks appropriate privileges to
       perform the requested action.

       Certain block-mode terminals do not have all the capabilities necessary
       to support the simultaneous exchange of messages required for _t_a_l_k.
       When this type of exchange cannot be supported on such terminals, the
       implementation may support an exchange with reduced levels of
       simultaneous interaction or it may report an error describing the
       terminal-related deficiency.

OOPPTTIIOONNSS
       None.

OOPPEERRAANNDDSS
       The following operands shall be supported:

       _a_d_d_r_e_s_s   The recipient of the _t_a_l_k session. One form of _a_d_d_r_e_s_s is the
                 <_u_s_e_r _n_a_m_e>, as returned by the _w_h_o utility. Other address
                 formats and how they are handled are unspecified.

       _t_e_r_m_i_n_a_l  If the recipient is logged in more than once, the _t_e_r_m_i_n_a_l
                 argument can be used to indicate the appropriate terminal
                 name. If _t_e_r_m_i_n_a_l is not specified, the _t_a_l_k message shall be
                 displayed on one or more accessible terminals in use by the
                 recipient. The format of _t_e_r_m_i_n_a_l shall be the same as that
                 returned by the _w_h_o utility.

SSTTDDIINN
       Characters read from standard input shall be copied to the recipient's
       terminal in an unspecified manner. If standard input is not a terminal,
       talk shall write a diagnostic message and exit with a non-zero status.

IINNPPUUTT FFIILLEESS
       None.

EENNVVIIRROONNMMEENNTT VVAARRIIAABBLLEESS
       The following environment variables shall affect the execution of _t_a_l_k:

       _L_A_N_G      Provide a default value for the internationalization
                 variables that are unset or null. (See the Base Definitions
                 volume of POSIX.1-2017, _S_e_c_t_i_o_n _8_._2, _I_n_t_e_r_n_a_t_i_o_n_a_l_i_z_a_t_i_o_n
                 _V_a_r_i_a_b_l_e_s for the precedence of internationalization
                 variables used to determine the values of locale categories.)

       _L_C___A_L_L    If set to a non-empty string value, override the values of
                 all the other internationalization variables.

       _L_C___C_T_Y_P_E  Determine the locale for the interpretation of sequences of
                 bytes of text data as characters (for example, single-byte as
                 opposed to multi-byte characters in arguments and input
                 files). If the recipient's locale does not use an _L_C___C_T_Y_P_E
                 equivalent to the sender's, the results are undefined.

       _L_C___M_E_S_S_A_G_E_S
                 Determine the locale that should be used to affect the format
                 and contents of diagnostic messages written to standard error
                 and informative messages written to standard output.

       _N_L_S_P_A_T_H   Determine the location of message catalogs for the processing
                 of _L_C___M_E_S_S_A_G_E_S.

       _T_E_R_M      Determine the name of the invoker's terminal type. If this
                 variable is unset or null, an unspecified default terminal
                 type shall be used.

AASSYYNNCCHHRROONNOOUUSS EEVVEENNTTSS
       When the _t_a_l_k utility receives a SIGINT signal, the utility shall
       terminate and exit with a zero status. It shall take the standard
       action for all other signals.

SSTTDDOOUUTT
       If standard output is a terminal, characters copied from the
       recipient's standard input may be written to standard output. Standard
       output also may be used for diagnostic messages. If standard output is
       not a terminal, _t_a_l_k shall exit with a non-zero status.

SSTTDDEERRRR
       None.

OOUUTTPPUUTT FFIILLEESS
       None.

EEXXTTEENNDDEEDD DDEESSCCRRIIPPTTIIOONN
       None.

EEXXIITT SSTTAATTUUSS
       The following exit values shall be returned:

        0    Successful completion.

       >0    An error occurred or _t_a_l_k was invoked on a terminal incapable of
             supporting it.

CCOONNSSEEQQUUEENNCCEESS OOFF EERRRROORRSS
       Default.

       _T_h_e _f_o_l_l_o_w_i_n_g _s_e_c_t_i_o_n_s _a_r_e _i_n_f_o_r_m_a_t_i_v_e_.

AAPPPPLLIICCAATTIIOONN UUSSAAGGEE
       Because the handling of non-printable, non-<space> characters is tied
       to the _s_t_t_y description of iieexxtteenn, implementation extensions within the
       terminal driver can be accessed.  For example, some implementations
       provide line editing functions with certain control character
       sequences.

EEXXAAMMPPLLEESS
       None.

RRAATTIIOONNAALLEE
       The _w_r_i_t_e utility was included in this volume of POSIX.1-2017 since it
       can be implemented on all terminal types. The _t_a_l_k utility, which
       cannot be implemented on certain terminals, was considered to be a
       ``better'' communications interface. Both of these programs are in
       widespread use on historical implementations.  Therefore, both
       utilities have been specified.

       All references to networking abilities (_t_a_l_king to a user on another
       system) were removed as being outside the scope of this volume of
       POSIX.1-2017.

       Historical BSD and System V versions of _t_a_l_k terminate both of the
       conversations when either user breaks out of the session. This can lead
       to adverse consequences if a user unwittingly continues to enter text
       that is interpreted by the shell when the other terminates the session.
       Therefore, the version of _t_a_l_k specified by this volume of POSIX.1-2017
       requires both users to terminate their end of the session explicitly.

       Only messages sent to the terminal of the invoking user can be
       internationalized in any way:

        *  The original ``Message from <_u_n_s_p_e_c_i_f_i_e_d _s_t_r_i_n_g> ...''  message
           sent to the terminal of the recipient cannot be internationalized
           because the environment of the recipient is as yet inaccessible to
           the _t_a_l_k utility. The environment of the invoking party is
           irrelevant.

        *  Subsequent communication between the two parties cannot be
           internationalized because the two parties may specify different
           languages in their environment (and non-portable characters cannot
           be mapped from one language to another).

        *  Neither party can be required to communicate in a language other
           than C and/or the one specified by their environment because
           unavailable terminal hardware support (for example, fonts) may be
           required.

       The text in the STDOUT section reflects the usage of the verb
       ``display'' in this section; some _t_a_l_k implementations actually use
       standard output to write to the terminal, but this volume of
       POSIX.1-2017 does not require that to be the case.

       The format of the terminal name is unspecified, but the descriptions of
       _p_s, _t_a_l_k, _w_h_o, and _w_r_i_t_e require that they all use or accept the same
       format.

       The handling of non-printable characters is partially implementation-
       defined because the details of mapping them to printable sequences is
       not needed by the user. Historical implementations, for security
       reasons, disallow the transmission of non-printable characters that may
       send commands to the other terminal.

FFUUTTUURREE DDIIRREECCTTIIOONNSS
       None.

SSEEEE AALLSSOO
       _m_e_s_g, _s_t_t_y, _w_h_o, _w_r_i_t_e

       The Base Definitions volume of POSIX.1-2017, _C_h_a_p_t_e_r _8, _E_n_v_i_r_o_n_m_e_n_t
       _V_a_r_i_a_b_l_e_s, _C_h_a_p_t_e_r _1_1, _G_e_n_e_r_a_l _T_e_r_m_i_n_a_l _I_n_t_e_r_f_a_c_e

CCOOPPYYRRIIGGHHTT
       Portions of this text are reprinted and reproduced in electronic form
       from IEEE Std 1003.1-2017, Standard for Information Technology --
       Portable Operating System Interface (POSIX), The Open Group Base
       Specifications Issue 7, 2018 Edition, Copyright (C) 2018 by the
       Institute of Electrical and Electronics Engineers, Inc and The Open
       Group.  In the event of any discrepancy between this version and the
       original IEEE and The Open Group Standard, the original IEEE and The
       Open Group Standard is the referee document. The original Standard can
       be obtained online at http://www.opengroup.org/unix/online.html .

       Any typographical or formatting errors that appear in this page are
       most likely to have been introduced during the conversion of the source
       files to man page format. To report such errors, see
       https://www.kernel.org/doc/man-pages/reporting_bugs.html .



IEEE/The Open Group                  2017                              TALK(1)
