HOME
TOPICS
ABOUT ME
MAIL

 
There's a much better clock for Linux than XClock.
  technofile
Al Fasoldt's reviews and commentaries, continuously available online since 1983

Linux rclock program tells the time, of course, but also alerts you to new mail


Dec. 24, 1999

By Al Fasoldt
Copyright ©1999, Al Fasoldt

   The most famous clock in the world? It might be Big Ben in London -- unless you're a longtime Unix computer user.
   In that case, the most famous clock might be the one that comes with every X Window system, XClock. It's nothing but a resizeable analog clock -- one with hands, in other words -- that you can put anywhere on your screen.
   The X Window system is the underpinning for all the graphical interfaces of the Unix world. Because Linux works like Unix does, the X Window system plays the same role on Linux PCs, too. If you have a Linux PC, you probably have the X Window system, and you almost surely have XClock. (Type XClock and press Enter in a terminal window and you'll find out right away.)
   But it's time for a change. There's a much better clock than XClock. It's rclock, spelled just like that. (A lot of Linux and Unix programs have all-lower-case names, so you'll just have to get used to it. If a name looks odd that way, just give it time. It won't after a while.)
   All clocks tell time, so I can't tell you rclock does a better job of that than XClock does.
   What rclock does do is predictably modern, because it rings alarms that you can set easily, and unpredictably clever, because rclock tells you when you have mail.
   Say again?
   I'll admit I thought this was crazy at first, too. How could a clock tell you if you had mail? And WHY would you want a clock to do that?
   Let's deal with the second part first. You'd want something to notify you of mail, wouldn't you? Mail can come in at any time, night or day. Knowing that you have new e-mail waiting is important, so a program that notifies you is vital. Unix and Linux have dozens of programs that just do that. (One of the most famous is called biff.)
   I think the issue of mail notification is a kind of demarcation line between Linux users and Windows users. Somehow, perhaps because they have a subconscious realization that their computer might not be running properly anyway in another few minutes, Windows users don't seem to care about being notified about new mail. (Maybe they're just too busy rebooting. If anyone knows the answer, write to me.) But Linux users and their cousins on the Unix side care a lot, especially if they are using standard Unix-based mail systems.
   By this I mean mail systems that pick up and send mail waiting in directories on each computer. I don't mean to say these systems have to run under Unix; by "Unix-based" I mean systems that were developed under the Unix model.
   (Windows users probably can't follow this very well because Windows is a single-user operating system and wasn't designed to do mail this way, so let me explain briefly. Under the Unix model I'm referring to, any program can write or read e-mail. You don't even need a program to do it, in fact; you could write mail from a command line. The only requirement is that mail you want to send out be addressed properly and be copied into a specified folder. Likewise, anything at all in Unix and Linux can read mail; it just has to know where to find it, and this is known to all programs through a convention of the operating system. Just as important is the idea that mail is just text; it's not encoded in some oddball way. (If it IS encoded in some oddball way, it has to be decoded by another program before your common, ordinary, anything-will-read-the-mail mail program can read it. Got it so far?)
   This is all possible because a separate program does the real work. It picks up waiting mail and sends it out to the world at large, another program goes out and gets incoming mail from a computer out on the Internet. In some ways this system is intricate and hard to set up (I know because I suffered through the task of doing it) and in some ways it's as simple as looking in the mirror. But once you get it working, nothing else comes close. You have a real Internet PC. Or, if you have a network and you tell the two mail programs to get mail for everyone on the network, you have a real Internet mail server.
   Best of all, this method works with practically every program you can run under Unix or Linux. I do my mail using Netscape Messenger. It works perfectly. All Netscape Messenger has to do to get the mail is check the directory where mail is deposited by the other programs and copy new mail to the directory it uses. All it has to do to send the mail is copy waiting letters to the directory watched by the program that sends mail. These two programs (fetchmail to get mail and sendmail to send it) work around the clock, whether my mail program, Netscape Messenger, is running or not, so this means I can send mail using any program, at any time, and can choose to read the mail with any program. (I can just type the word MAIL in a terminal window to do this, too.)
   Since fetchmail retrieves all new mail from the Internet every five minutes, I could have new mail at any time. A program that notifies me when I have new messages makes sense, right?
   That's why this little feature in rclock is so handy. It tells me I have new mail by reversing its display. The normal display of black numbers and hands on a white background in my main color scheme changes to one with white numbers and hands on a black background.
   I use rclock as the main desktop clock under KDE, placing rclock in the upper right corner and making it "sticky" so that it stays visible no matter which desktop I'm using. (I have eight separate desktops.) When rlock reverses its display, I know I have new mail. Otherwise, I can continue to work on other things without needing to check the mail manually every few minutes.