5.2. Instant Messaging
Although various forms of chat have been widespread among computer users for decades, a very rich and easy-to-use kind of chat called instant messaging (IM ) has become popular with the growth of Internet use. AOL Instant Messenger (AIM) , Yahoo! Messenger , and MSN Messenger are just a few versions of this medium. Although each service provides its own client (and prefers that you use their client, so they can send advertisements your way), you can get access to all the most popular IM systems through open source programs such as Gaim, Kopete, and a variety of Jabber clients. These are very full-featured clients that have a number of powerful features that in terms of functionality put them ahead of the clients that the commercial services foist on you (although the open source clients are missing some of the eye candy in the commercial clients).
Unfortunately, instant messaging has as many different protocols as there are commercial services. None of the protocols communicates with the others. This is because each instant messaging provider wants to force people to use its client and receive its ads. And since the services are offered for free, one could make a good case for their right to recoup their costs this way. At least one popular service (Yahoo!) offers a Linux client, and it's quite decent.
But this is an age where digital recorders can zip right through the ads on TV. In the same way, open source clients can serve up instant messaging plain and simple, without pushing weather updates or pictures of last month's pop star in your face. Most important, open source clients let you use a single program to control all your accounts; you don't need to run multiple programs in the background and enter configuration information in each one. Eventually, commercial providers may give in and standardize on the Extensible Messaging and Presence Protocol (XMPP ) , which is the stiff-sounding name Jabber had to adopt to be accepted as a bona fide standard (more specifically, a set of RFCs put out by an IETF committee). For now, use a multi-protocol client.
All these clients are intuitive to use, but there are some neat tricks you should be aware of. This section shows how to use Gaim, the most popular messaging program among Linux users. Kopete, a KDE client, is probably the next most popular.
Most Linux distributions put Gaim right on your desktop, usually somewhere under a menu item for Internet services. If you see a menu item labeled something such as "instant messaging," it probably runs Gaim (or Kopete ). Naturally, if Gaim is installed, you can run gaim from the command line. And if it isn't installed, it's easy to get from http://gaim.sourceforge.net and install yourself.
Here we'll cover Version 1.2.1 for Linux. A new version was expected at the time of this writing that would have different pull-down menus and other interface changes, but would offer the same functions overall.
5.2.1. Initial Configuration
This book doesn't deal with how to set up an instant messaging account; for that you have to go to the web site provided by the service you want to use and follow its simple procedure. After you get an account (which involves finding a screen name no one has taken yetnot always so easy), you have to configure Gaim to know about it. Gaim should show you an Accounts screen the first time it runs (see Figure 5-4). If Gaim shows you its Buddy List screen instead, press Ctrl-A to show the Accounts screen, or pull down the Tools menu and select Accounts.
Figure 5-4. Gaim's Accounts screen
Press the Add button, and fill out the information on the Add Account screen that pops up:
There are also a variety of options in this dialog box. For instance, if you need to connect through a proxy, you can specify the protocol after pressing the "Show more options" button. You can also get access to this option (and scads of others) from the Buddy List screen, by pulling down the Tools menu and choosing Preferences, or simply by pressing Ctrl-P. Note that the Preferences menu sets a default for all accounts, and that you can override the default for individual accounts.
If you have a desktop or laptop that's usually Internet connected, it's extremely convenient to have Gaim remember your password and log you in automatically. But if you don't use instant messaging often, or are afraid of nosy people getting their hands on your system while you're logged in, you may decide to leave these options unchecked.
We haven't yet done anything special to give you a real personality on the Internet (we do that later under "Advanced Configuration"), but you have accomplished enough to communicate.
When you're done, save your account. Back in the Accounts screen, click the Online box. If you have Internet connectivity, it will log you in and you're ready to go. If the login fails, click Modify and check all the items you entered. Did you choose the right protocol? Try re-entering your password.
At this point, using Gaim is straightforward. Most people allow IM only with people they know, and only after explicitly adding them to a list of accounts called a buddy list. If you have already added buddies in another client, most services store the information, and they'll show up in Gaim's buddy list.
To add new buddies, pull down the Buddies menu . First add a few groups such as Work, Family, and Political Debaters. (You'll appreciate having groups after a few weeks, when you realize how many people you want to chat with. Some authors of this book chat with family members who are in the next room. Hey, isn't it better than shouting?)
Then add buddies to these groups. How do you find the buddies? Like signing up for an IM account, that's an "out of band" procedurea computer science term meaning "It's up to you to do it and we don't care how." Most people exchange account names through email or written slips of paper. But one convenient search method for AIM/ICQ is through Tools Account Actions Search for Buddy by Email.
To start a conversation, double-click on somebody from the buddy list who's logged in. To start a multiperson chat with two or more buddies who use the same service, pull down the Buddies menu and choose "Join a chat." Here you can pick the service you're using and any name you like; then invite other buddies in one at a time by pressing the Invite button, choosing a buddy from the pull-down menu, and entering a bit of text to let her know what you're inviting her to. You can carry on separate chats with buddies on different services (for instance, AOL and MSN) but you can't combine buddies from two different services in a single chat because each service uses its own protocol.
One of the most valuable features of instant messagingmaking it a real business tool, not just a pastimeis the ability to save the text from chats so you can refer later to your "speech acts" (the promises you made). During the chat, choose Conversations Save As and you can save the text in HTML format. What you save is what has already appeared in the window; if more text you want is added later, you have to resave it. It may be convenient for you to make all chats or instant messages logged by default; you can do this through the Logging item on the Preferences menu, but you will probably end up saving a lot of trash you dont care about.
The HTML in the logs is ugly, but it's sufficiently human-readable for you to extract the text you want later. If timestamps are just a lot of junk to you, turn off timestamping under the Options drop-down menu.
The little boxes with A in them show different types of formatting (italic, bold, and even color) that you can apply: use a mouse to highlight the text you want to change, and click the button. Instead of a button, you can change highlighted text to bold with Ctrl-B or to italic with Ctrl-I, put a strike-through line through it with Ctrl-S, or underline it with Ctrl-U. If something is highlighted and you want to remove the formatting, click the button or Ctrl key again to undo the action.
Long before IM, users of text-only programs such as email, Net news, and Internet Relay Chat (IRC) exercised a great deal of ingenuity making up the famous little strings such as :-) and :-< that are known as smileys or emoticons. Running in a graphical environment, IM adds another dimension by providing sets of graphical smileys. And if you're bold or uncivilized enough to use a smiley, you might as well replace the defaults in Gaim with a bold or uncivilized set downloaded from the Gaim web site. (Choose the Themes link on the right side of the main page.) Download a tarball that looks intriguingunfortunately, you get to see only one representative smiley until you install the themeand unpack the tarball into its constituent .png files in the smileys subdirectory of your Gaim configuration directory, usually ~/.gaim/smileys.
You can type or paste a URL into a chat, and it will automatically turn into a link. But if you want more sophisticated formatting, where an arbitrary piece of text such as My Home Page turns into a link, press the little button with a metal chain link. You can then enter both a URL and the text that appears in your message to link to the URL. Sending a file from your system to your buddy is as easy as choosing Conversation Send File. However, the transfer does not take place until the buddy accepts your request.
5.2.3. Advanced Configuration
You wouldn't leave home without your shadow, and you should similarly feel that your IM experience would be incomplete without a number of personalized items to present to the world:
We'll also discuss some other customizations you'll find useful in this section, including how to find out what your buddies are doing.
Buddy information can be entered and changed from Tools Account Actions Set User Info. Note that this information (and all the items set in this section) is tied to the Gaim client youre working in. If you use Gaim on a different system or run a different IM client, you have to re-enter all the information to make it appear to buddies. Consider typing a small summary of your work and including a URL that points to a web page with more information.
Like other IM clients, Gaim lets you attach a picture to your account, so it will show up when people include you in their buddy lists and chat with you. When you configure your account using the Add Account or Modify Account dialog, click the Open button next to the "Buddy icon" label and drill through your file hierarchy till you find an image you like. You can also pull up, in the file manager on your desktop, a folder containing the picture you want to use as your icon, and drag the icon from the desktop folder to the Modify Accounts window. Gaim supports lots of popular formats, including JPEG, GIF, and PNG. Depending on the support available in the GTK+ libraries, Gaim converts the file's format to a format your service accepts if necessary.
AIM imposes quite restrictive size limits on the image you use, and Gaim does not tell you that you have exceeded the limits. For many services, furthermore, you must be careful to provide a perfect square, because the image may otherwise be stretched and come out quite unflattering. The GIMP (described in Chapter 9) is useful for adjusting pictures to fit requirements, once you have determined what they are.
Now create a series of apt Away messages that you can put up when you leave your terminal. From the Tools Preferences dialog, choose "Away messages and press the Add button to bring up a dialog that lets you add and save a new message. (Or use Tools Away New Away Message.) For each message, assign a title that will appear in your menus, and in the larger box underneath the title type the actual text that buddies will see.
When you leave your desk, you can choose an appropriate Away message from Tools Away Custom, and its very helpful to your associates to do so. But setting a message can often be too much trouble to remember, so Gaim sets one automatically when your terminal is idle for a while. We recommend you replace the boring default (if you don't think it's boring, look at what it says) with a message of your own choice. Do this from the Preferences dialog, reached by pressing Ctrl-P. The Away/Idle item in this dialog lets you set the default Away message, as well as how long the terminal has to be idle before it appears.
If your Away message is set through the idle timer just described, Gaim automatically replaces it with an Available message when you move the mouse or start typing again. If you have set an Away message explicitly, you need to explicitly indicate when you've returned by choosing Tools Away Back. The Available message shown when youre at your terminal can be set through Tools Account Actions Set Available message.
Gaim automatically checks your spelling and underlines misspelled words as you type. Because a rebellious air of reckless informality has always hung over instant messaging, it strikes us as the tool where accurate spelling is least important. The feature works quite well and adapts to the user's locale (that is, the language and nationality you chose when installing your distribution), but it can be turned off in the Message Text box under Preferences if you like.
A more useful feature for busy and bumbling typists is text replacement. This is provided as one of the many plug-ins you can enable in the Preferences dialog. Click on Plugins and enable "Text replacement." Then type in abbreviations you'd like to use for common phrases. For instance, one author of this book has defined the string newrl to expand to Running Linux, 5th Edition to make it easy to refer to that book. You must enter the string as a separate word for Gaim to recognize and expand it.
We described earlier how to let buddies know your changes in presence. Gaim can also display their presence, but by default it does not pop up a message (as some IM clients do) to let you know every time a buddy has arrived or left. You can add this feature through the guifications plug-in. Download it from http://guifications.sourceforge.net, install it, and enable it in the Preferences dialog box under Plugins.
Even without the guifications feature, you have fine-grained control over presence notifications: you can tell Gaim to notify you when a particular buddy has logged in, logged out, gone idle, returned, and so forth. Thus, you may choose on a particular day to be told when somebody logs in or returns, because you're in a hurry to reach him to discuss a particular task. The mechanism for doing all this is called a buddy pounce .
To use this feature, choose Tools Buddy Pounce New Buddy Pounce. In the dialog that appears, you can indicate exactly whom you want to track, what changes in presence you want to be notified about, and how you want to be notified. The buddy is not informed of any of this snooping unless you choose "Send a message." You could use that feature to have a box such as "Please call home right away appear on the buddy's screen at the moment his or her presence changes.