## Talk on the Internet ## Eric De La Cruz Lugo These days, a lot of people are very excited about chatting on the internet. Of course you can use the telephone if you don�t mind paying a lot of money for talking with a friend in Australia while you are in Mexico ("ring, ring!...Hi, Jim! This is Eric from Merida in Mexico, I just called to say hello, and good bye! Here in Mexico the cost for this call is about $2.00 USD the minute!!). You can always use an IRC client and connect to your nearest IRC server, or you can use ICQ, but in both cases you need a client program, you need to know several commands in order to find a friend, join a channel, send private messages and stuff like that. This is okay if you want to chat with people you don�t know, like the Italian fud, or planes, or rock music, and you don�t mind when you get annoying messages from annoying people that ask you annoying questions (you know what i mean). But if you only want to talk in private with a friend in real-time, you can use the "talk" command on your FreeBSD system. What is it and how does it work? Back in time, when the 4.2 BSD was released, this command was supplied as another utility to communicate with other users. In fact, before that time, AT&T created the "write" command in order to have some way to communicate in real-time with other users, but write sends one line of text at a time. This text line shows up without any previous warning. If the destination user isn't there, someone else could read the message. The "talk" command avoids this problem with a very smart solution; ring first and wait for the response. This way, both parties can assure the communication (well, just a little bit more). The talk command works like a text based phone; it copies lines from your terminal to that of another user. The output is shown in two separate windows on the screen. The top window is always the user that is in front of the screen (that means you), and the bottom window is always the other user. According with the "FreeBSD General Commands Manual" the format for the talk command is: talk person [ttyname] where the person is defined as: If you wish to talk to someone on your own machine, then person is just the person's login name. If you wish to talk to a user on another host, then person is of the form `user@host' or `host!user' or `host:user'. And ttyname is defined as: If you wish to talk to a user who is logged in more than once, the ttyname argument may be used to indicate the appropriate session. In order to obtain the ttyname you can use the finger command (read the man pages for this command). There is another thing we need to do before we can talk. We need to make sure that we and the other person which we want to talk to are prepared for receive the talk request, we do this by typing the command: % mesg y We need to do this because the mesg command controls whether other users on the local system or the Internet can send messages to you with either the write command or the talk command (read the man pages for the mesg command). In some cases, and specially with old UNIX versions, the talk communication can�t be made. The reason is that the talkd daemon uses the Talk 4.3 protocol, which is not compatible with 4.2 versions of the talk process. The subserver name for the 4.3 protocol is ntalk and this is the one used for FreeBSD. Ok, now, suppose that you want to communicate with a friend (in this case we will see a talk session between two users; Eric in Merida, Yucatan, Mexico, and, Eric in Guadalajara, Jalisco, Mexico. This session is in Spanish (but I've translated it for you). From the command prompt you type: % talk eric@itesocci.gdl.iteso.mx On the machine itesocci (in Guadalajara, Jalisco, Mexico), appears something like this to the user eric: Message from Talk_Daemon@iteso.mx at 12:09 ... talk: connection requested by eric@labna.itmerida.mx talk: respond with: talk eric@labna.itmerida.mx As we can see, we only have to respond with "talk eric@labna.itmerida.mx", so we type it: % talk eric@labna.itmerida.mx An after that we get the next screen: [No connection yet] [Waiting for your party to respond] [Connection established] Hi! -------------------------------------------------------------- Hi eric :), how are you? As you can see, this tool its very simple yet very useful. This way we can have a conversation as long as we want, and with privacy, like in a phone call (with out the long distance cost). When you are done, you can interrupt the conversation pressing the interrupt key combination (usually "ctrl-C"). This will end the talk program and drop you to the command prompt again as shown below: [Connection closing. Exiting] Hi! Am fine, and you? She is fine, and she is sending you an e-mail today in the night! Well i have to go for now, see you at 5:00 PM ok? Bye! (here you press [ctrl -C] and exit from the talk program) -------------------------------------------------------------- Hi eric :), how are you? Very well thanks, how is you sister? Ok!, see you then! Bye! % And that�s it. Pretty simple isn't it? But what if you want to talk with two or more people, and you want the same privacy? Well, in the next article, we will see another version of the talk command called "ytalk". This version has several features that the talk command doesn't, but as I said before, we will see this in the next article. Keep in touch, and enjoy talking on the Internet. References As always i strongly recommend to RTFM for the talk command. -Eric Eric De La Cruz Lugo, works for the "CONSTRUCTORA KEPLER S.A. DE C.V." a Construction company in Mexico. Right know he is working on a project in Merida, Yucatan, building a Power Plant. He is a loyal FreeBSD user and admin since 1993 at ITESO University (Guadalajara, Jalisco, Mexico). He can be reached at or .