Previous Table of Contents Next


Module 132
talk

DESCRIPTION

The external talk command lets you talk to another user. You "call" a user with talk. Once the other user responds by using talk user the conversation is established. Each character you type is displayed on the top half of your screen and the bottom half of the other user's screen. As the other user replies, his characters are displayed on the bottom half of your screen.

To discontinue the conversation simply type a Ctrl-D at the beginning of a line. To find out who is logged on for you to talk with, use the who command.

COMMAND FORMAT

The format of the talk command follows.

     talk username [ ttyname ]

Arguments

The following list describes the arguments that may be passed to the talk command.

username The login name of the user you wish to communicate with via talk. If the system you are using is connected to a network, username may have a different format. See the following section, Calling other Users.
ttyname The tty device name of the user you wish to talk with using talk. If the same user is logged in more than once, you must distinguish which of the login sessions you want to communicate with. Use the who command to display a list of users who are logged in to the system. If necessary, add the tty number to the command line for talk. The ttyname format is /dev/ttyXX.

FURTHER DISCUSSION

Once the communications link has been established you can use the following special characters to control the screen.

Ctrl-L Redraw the screen. Useful if it gets garbled.
intr Interrupt the talk session. Causes immediate termination.
erase Erases the previous character. The stty erase character.
kill Erases the entire current line. The stty kill character.

BSD (Berkeley)
werase Erases the previous word. The stty werase character.

The stty command is used to set the erase, kill, and werase characters.

Permission to talk

A user may deny incoming communications by using the mesg command. If a user has set message receiving to no, then you are not allowed to write or talk to the user. Certain commands, vi and pr, do not allow communications while they are executing.

Calling other users

The following table describes methods for calling other users.

user The name of a user on the local system you are logged in on. The most desirable format is user@host, which is the Internet address format.
host!user
user@host

NOTE:  
If the system you use is not connected to a network, you do not need to use the host notation when calling other users.



Example

The following screens show an example of using talk.

Your terminal (username = mylogin)

     cj> who
     mylogin tty005     Aug 20  9:05
     jack    tty019     Aug 20 10:21
     jill    ttyp01     Aug 20  8:14
     jimmy   ttyp03     Aug 20  7:53
     cj> talk jil
     [No connection yet]

changes to

     [Waiting for your party to respond on tty005]

At jill's terminal.

     cj>
     Message from mylogin
     talk: connection requested by mylogin
     talk: respond with: talk mylogin
     talk luwis

Your screen changes to:

     _





     ---------------[Talking to jill on tty005]---------------

At this point you have contacted jill and she has decided to respond to your talk request. Now your screen is cleared and divided in half. The top is your talking half and the bottom is your listening half.

If jill is slow to respond, you receive the following message:

     [Ringing your party again on tty005 (1st retry)]

This may occur three times before talk gives up and displays:

     [Your party would not respond]

RELATED COMMANDS

Refer to the mail, mesg, who and write commands described in modules 86, 88, 159, and 161.

RELATED FILES

The talk command uses the /etc/hosts file to locate the recipient's host system's address on a network. The /etc/utmp file is accessed by talk to locate the recipient's tty.

APPLICATIONS

The talk command is useful to carry on conversations between two users. You can visually talk to another user to exchange information immediately. Both users can type simultaneously thus speeding up the conversation compared to the line-oriented write command. Although talk is not as personal as verbal communications, it allows users to communicate without having to be within hearing range.

In some environments one user may be in Texas while the other is in California. Another benefit of talk is to provide examples of text to a user. If you have ever tried to step someone through typing in code or even a command line, you know how difficult it may be to convey your message. By using talk you can simply type the code or command and have the other user look at it.

TYPICAL OPERATION

In this activity you use the talk command to communicate with another user on your system. You must first find someone you know who will talk back via talk. But this usually is not too difficult. Begin at the shell prompt.

1.  Type who and press Return to list who is currently logged on to the system. Select a user you wish to talk to via your terminal.
2.  Type talk user and press Return where user is the user you selected to talk to on your computer. Now wait for the user to respond. If the user does not respond within a given time (usually 30 seconds), talk will inform you that the user is not responding and stop trying to call.
3.  Once the user has responded you can begin typing as you wish.
4.  When you are ready to stop talking, send the other user a message such as, Nice talking, but I've got to get back to work! and press Return.
5.  Now press Ctrl-D to disconnect from talk.
6.  Turn to Module 47 to continue the learning sequence.


Previous Table of Contents Next