# Linux Gazette October, 1995

## A Publication of the Linux HomeBoy WebPage Series

#### "The Linux Gazette...making Linux just a little more fun...!"

##### Copyright (c) 1995 John M. Fisk fiskjm@ctrvax.vanderbilt.edu
The LINUX GAZETTE is now a member of the LINUX DOCUMENTATION PROJECT.
For information regarding copying and distribution of this material see the COPYING document.
Linux Home Boy Pages logo created using David Koblas' excellent program XPAINT 2.1.1

## Table of Contents

### Topics in this issue include:

- Salutations and the MailBag
- Lots More 2 Cent Tips...
- Useful Entrapment! (letter submitted by Nathan Hand)
- In-depth Guide to XF-Mail and XMailbox Installation
- Configuring XF-Mail and XMailbox
- FVWM: Introduction to Styles!
- Colophon

### News Flash!

> ### Linux Gazette joins Linux Documentation Project!

> Yup, it's true..! The Linux Gazette has now joined the other fine folks at the Linux Documentation Project. So what does this mean? Well, hopefully, it'll mean greater accessibility to the information contained in these pages. If you're into legal mumbo-jumbo, or you're the curious kind, or you really do need to know what the copyright is on this material, take a look at the COPYING document link above.

> ### New Host: Red Hat Commercial Linux!

> And speaking of accessibility... :-)

> A HUGE round of thanks needs to be extended to the folks at Red Hat Commercial Linux who stepped forward after last month's information brown-out and offered to be another host for the Linux Gazette. My deepest and sincerest thanks to Donnie Barnes, Marc Ewing, and Erik Troan and the rest of the kind folks at Red Hat Commercial Linux!

> And a CONTINUED HUGE round of thanks needs to be extended to the gracious folks at Tennessee CommerceNet who very kindly weathered the beating their server took for several days and who STILL are willing to host these pages.

> As a gentle reminder...

> The folks who are hosting the Linux Gazette put bread and butter on the table by offering the community of Linux users their products and services. In fairness to them, please patronize their webpages and services.

> Thanks!

> ### Quick button to Linux Gazette Index

> Well... in the ongoing effort to make things just a little bit easier, I've added a button to the bottom of each section that will take you directly to the Master Table of Contents for the Linux Gazette.

> Several of you have written and asked how to find back issues of the LG. Since it was obviously not obvious, I've added a quick link. It's the button entitled "LG INDEX". Hope this makes things easier!

> Also, I've added a fourth button that simply hauls you back to the "Linux HomeBoy WebPage". The epicenter of all of this stuff...

> ### And Comin' Soon... anonymous ftp!

> And what's still cookin'...?

> Well, I'm working on getting copies of the Linux Gazette ready for anonymous ftp access! Yup, no more having to stay up past your bedtime trying to get your hands on another edition of the 'ol Linux Gazette...

> Seriously, I know that a lot of you have had trouble in the past getting a connection and getting these pages copied. I'm going to try to get the first copy out in about 2 weeks. I'm doing that purposely so that any mis-information, bad links, or my lousy spelling can be corrected before putting out a "final" copy. This will be in HTML format and will include all of the images and miscellaneous files. You'll simply need to untar the archive into a chosen directory and enjoy the browse!

> There are a couple sites that have offered their ftp services, so I can't say at this point where things will finally end up. Keep an eye on comp.os.linux.announce for details...

> Thanks for being patient!

> John

### Welcome to the October edition of the Linux Gazette !

Hmmm... these things seem to be getting bigger... :-)

It's probably just because Linux just keeps getting more and more fun! Honest. I've been using Linux now for a little over a year and it's gone from a modest 60MB partition at the first installation to 600MB at this present time. I end up spending about 85% to 90% of my time running Linux and the rest using DOS, Win31, or OS/2 3.0 for things that I can't easily do under Linux. Linux is GREAT! Let me encourage the folks who have just started using Linux... keep at it! It's worth it! The more you play, tinker, read, and mess around with Linux, the more you'll come to be totally amazed at what you have available to you.

It's just too way cool!

Seriously, though, I know that a file this HUGE is going to be a problem to load up for a lot of you. I apologize. I seriously considered splitting this up onto two sections, but decided against it. Once you have this thing loaded up, SAVE IT as source or text. If you're using Netscape, use the right mouse button to call up a menu that'll even let you save the .GIF images to go with it. Now, you can read it any time. I'm going to try to keep these things to 70 - 80K in the future and simply create a "supplement" later if there's too much material. Also, once I'm able to get these out as ftp'able source, things will be much easier for everyone!

Again, I apologize for the size :-( thanks for being patient!

So what's in store for this month?

Well, there's all kinds of fun goodies to try out and tinker with. Don't let the moniker "Two Cent Tips" fool you... there are several fun things you can mess around with there. Also, don't skip over the Mailbag section. I've gotten a LOT of mail this past month with all kinds of great suggestions, tips, and pointers to great software and Web pages. Take a look!

Also, I decided to follow up last month's quick review of the great mail client XF-Mail with a more indepth look at where to find it, how to compile and install it, how to configure it, and some of the fun things that you can do with it. If you're relatively new to Linux and need a full-featured but easy to use mail client, then this is something that you definitely want to have a look at. And, for good measure, I included a section on how to use another totally too fun program called XMailbox. If you need a mail biff, look no further...! This little program does color, animation, sound, and mail client launch! It practically does your laundry...

Finally, I apologize about not including more FVWM stuff this month. I had every intention of doing a LOT of writing about it, but when drafts started tipping the scales at 100K I decided to slow down a bit. Hang in there... there WILL be more FVWM info coming!

## Salutations and the MailBag

Well, after the September edition of the Linux Gazette hit the streets, there was quite a ground swell of enthusiasm as evidenced by a rather full mailbox for the first few days.

Again, I really appreciate the fact that many of you took the time to write. I tried to reply to all of these, but if I missed yours... please be patient.

Several folks wrote about the history of the fvwm and twm window manager names. There were several letters offering suggestions, ideas, fun links, and the chance to test drive their latest software package. I've tried to include several of these below since many contain tips and ideas themselves.

Have fun and thanks for the notes!

John

Ted Stern wrote to set the record straight regarding the heritage of the fvwm name:

> From: Ted Stern <stern@amath.washington.edu>
> To: <fisk@web.tenn.com>
> subject: where the f in fvwm comes from

> as i recall from reading the very first announcement of fvwm, the f originally stood for "featherweight", since it was a much lighter- weight window manager than the much heavier twm or mwm.

> but later the author forgot what he had originally announced! so its name wasn't lost in the mists of time but rather in the misty memory of the developer.

> if you wish to verify this, the announcement should be back in the very early c.o.l.announce archives someplace, or possibly even in the c.o.l archives.

>      ted stern (206) 685-9304                   applied mathematics dept.
>      stern@amath.washington.edu                 box 352420
>      http://www.amath.washington.edu/~stern/    seattle, wa  98195-2420

lawrence weeks and jurgen botz both get an "a" for correctly identifying the origin of the twm name:

> from lawrence weeks:

> date: fri, 29 sep 1995 16:34:14 cdt
> from: lawrence weeks <weeks@cig.mot.com>
> to: <fisk@web.tenn.com>
> Subject: Linux Gazette
> Hi,

> Just want to make a quick comment regarding the most recent issue. You say that twm stands for Tabbed Window Manager. That is the current name, but it originally was Tom's Window Manager, since Tom wrote it. I would venture to say that FVWM is probably the same, e.g. something like Fred's Virtual Window Manager, but like Tom, "Fred" took his name out.

> Larry

> Lawrence Weeks "Audaces fortuna juvat." weeks@cig.mot.com

> from Jurgen Botz:

> Date: Fri, 29 Sep 1995 17:14:45 CDT
> From: Jurgen Botz <jbotz@orixa.mtholyoke.edu>
> To: <fisk@web.tenn.com>
> Subject: fvwm, twm, name trivia
> In the September _Gazette_ you write:
> > twm (which, BTW, stands for Tabbed Window Manager).

> And if you wonder what's "tabbed" about twm, the answer is nothing. Twm was actually originally called "Tom's Window Manager", after the original author, Tom, but by X11R4 so little if any of Tom's original code remained that the X folks decided to rename it without changing the acronym. Apparently they're a bit short on imagination since "tabbed" was all they could come up with...

[Actually, I'd run across this in my reading, but couldn't recall Tom's last name. Since I try to give credit where credit is due, I left this tidbit of information out since I had no last name with which to work. The A+ goes to the authors of that awesome book "X Window System User's Guide" who wrote:

> The X Consortium provides a window manager called twm. (twm originally stood for "Tom's window manager" in honor of its developer, Tom LaStrange. However, it has since been renamed to the "tab window manager")

From page 7 of this great book by the folks at O'Reilly. --John]

Marc Ewing, arguably one of the guru-est of the Linux gurus (and who, parenthetically, was the Carnegie Mellon University grad who founded the Red Hat Commercial Linux organization) offered this great idea:

> Date: Fri, 06 Oct 1995 13:48:19 CDT
> From: Marc Ewing <marc@redhat.com>
> To: <fiskjm@ctrvax.Vanderbilt.Edu>
> Subject: Tip for Linux Gazette
> John-
> Here's a little bash function that's pretty useful:

>     ========================================================
>     cds() {
>     	if [ $# -ne 1 ]; then
>     		echo "usage: cds pattern"
>     		return
>     	fi
>     	set "foo" `fgrep $1 $HOME/.dirs`
>     	if [ $# -eq 1 ]; then
>     		echo "No matches"
>     	elif [ $# -eq 2 ]; then
>     		cd $2
>     	else
>     		shift
>     		for x in $@; do
>     			echo $x
>     		done | nl -n ln
>     		echo -n "Number: "
>     		read C
>     		if [ "$C" = "0" -o -z "$C" ]; then
>     			return
>     		fi
>     		eval D="\${$C}"
>     		if [ -n "$D" ]; then
>     			#echo $D
>     			cd $D
>     		fi
>     	fi
>     }

>     cdsload() { find / -type d > $HOME/.dirs }
>     ========================================================

> First do a `cdsload', then try something like `cds bsd'. Cool huh? Readers may want to change cdsload to prune certain directories. I also left the "echo $D" commented out, but it can be useful to uncomment it.

> -Marc

Jay Sigbrandt, one of the many of you that had a bit of trouble getting the most recent LG, wrote this very helpful suggestion:

> Date: Thu, 28 Sep 1995 17:02:25 CDT
> Sender: <jay@elec.gla.ac.uk>
> From: J. Sigbrandt <jay@elec.gla.ac.uk>
> To: <fiskjm@ctrvax.Vanderbilt.Edu>, <JAY@ELEC.GLA.AC.UK>
> Subject: Saving your copy of gazette
> Hi there,

> I noticed you are asking people to save the gazette using netscape. I've been trying to access your pages today for about 2 hours without success -(traffic maybe) and I'm not even loading any of the images !!!

> If you do want to help people obtain a very nice sounding piece of Linux reading (I haven't seen much yet :( then the unix way to do it is to use the excellent batch loading software by Zippy.

> The title of the software is URL_GET and its command line based

> so you could get the software and try the following

> url_get http://www.tenn.com/fiskhtml/linux_gazette.sep.html > linux_gazette.sep.html

> However, I've noticed that your server doesn't allow an index to be accessed. If it did, one could collect the index with netscape edit it using SEARCH REPLACE, and get all the relevant files overnight.

> Good Eh ???

> Its actually much faster than Netscape, I've found and things that would take all night with the latter seem to take not time at all with url_get.

> The URL is:

> http://uts.cc.utexas.edu/~zippy/url_get.html

> (you could always tell zippy how much you liked it afterwards that shoud make him happy, and we will benefit from more of his excellent creations)

> Regards,
> Jay

[I've ftp'd the software and taken a quick look at it. I haven't had the time to test drive it yet because it requires Perl-5.001, which I haven't yet upgraded to. I DID manage to get the latest Perl sources and so will try to get that set up here soon. If any of you try out this program, let me know how it works and whether you've found that you like it. And if you do... don't forget to drop Zippy a note...! --John]

John Punin, author and maintainer of that impressive HTML editor xhtml, wrote:

> Date: Wed, 04 Oct 1995 14:57:56 CDT
> Sender: <PUNINJ@RPI.EDU>
> From: John Punin <PUNINJ@RPI.EDU>
> To: <FISK@WEB.TENN.COM>
> Subject: ASHE 1.1.2 for linux
> Hi John

> I would like to ask you for help. Somebody sent me a static binary file for xhtml-1.1.2 for linux. Could you test it and see if it works? Thanks for your help

> John Punin URL : ftp://ftp.cs.rpi.edu/pub/puninj/ASHE/contrib/bin/ASHE-1.1.2-linux

> P.S. Your web site is great. :-)

[For any of you who are the process of authoring HTML docs, you need to try this editor out, it is a HUGE help. I've written a short blurb about this in the Linux Toys page. Be forewarned that it doesn't do tables or some of the Netscape extensions. It remains, however, an awesome program and one that you really should test drive. I've given this new program a short whirl and it seems to be working well. If you try this and like it, by all means, let John Punin know! --John]

Rached Blili wrote with a request for information about DOSEMU:

> Date: Wed, 04 Oct 1995 08:26:43 CDT
> From: Rached Blili - CUG VP <rached@domingo.concordia.ca>
> To: John M. Fisk <fiskjm@ctrvax.Vanderbilt.Edu>
> Subject: RE: Linux Gazzette
> On Sat, 30 Sep 1995, John M. Fisk wrote:

>     > re: DOSEMU -- I have no personal experience using this and so therefore would have
>     > to rely on someone else to "review" it and offer ideas and suggestions.  In the
>     > future I may try and tinker around with this but I honestly don't have the time
>     > right now.  I'm admittedly a multi-OS user and simply boot to DOS to run DOS progs.

> :) thing about me is I'm getting a permamnent link soon, so I don't want to have to reboot my machine everytime the girlfrien needs to use Word. :)

> Perhaps you could call for such an article to be submitted to you?

>     >
>     > re: better biff -- HEY, you're in luck!! There's an *awesome* xbiff client that
>     > is *exactly* what you're looking for:  xmailbox.  I've been using it for some
>     > time now and LOVE it.  It uses color pixmaps, has optional animation (which *I*
>     > like) AND it can be configured to use /dev/audio on receipt of mail.  AWESOME.
>     > It's on sunsite and mirrors, I believe in the linux/system/Mail directory.  Try it!

> I found it! :) It's exactly what I was looking for! :) Though I have a slight problem. I've looked through the make file, and the config files, and even the C source. I'll be darned if I can figure out how to get it to use those .au sounds. :-/ Any ideas?

> Thanks again!

> Rached

>     ---------------------------------------------------------------------
>     Rached Blili   ---  Vice President - Concordia Computer Users' Group
>                       rached@cug.concordia.ca
>        http://cug.concordia.ca/~rached     striker @ Undernet IRC
>     ---------------------------------------------------------------------

[Well, I believe we solved the problem with getting xmailbox to play, but I'd still be interested in having someone write about using DOSEMU. I don't use this program myself, and yet there seems to be a lot of interest in it judging from the traffic on places such as comp.os.linux.setup.

Any takers...? --John]

Bart Veer wrote the following. I will quickly add that he really beat me to the punch. I'd recently discovered the technique he'll describe and plan to write more about it. For the adventureous, here's his letter:

> Date: Wed, 04 Oct 1995 07:07:31 CDT
> From: Bart Veer <bart@perihelion.co.uk>
> To: <fisk@web.tenn.com>
> Subject: Linux gazette

> I have just finished reading your September issue of the Linux gazette and rather enjoyed it. I have a few more suggestions on how to use the fvwm pager facility.

> Essentially I like using a large virtual desktop. At work my virtual desktop contains 14 screens, arranged 2x7, with most of the screens dominated by a single large window: one xemacs session, one netscape session, and various xterm windows. However I dislike having to use the mouse to move around the virtual desktop. I much prefer to keep the mouse cursor somewhere near the centre of the screen and use the SloppyFocus option of fvwm to make sure that the current large window has the keyboard focus. The following keyboard shortcuts allow me to move around the virtual desktop.

>     # Arrow Keys
>     # press arrow + control anywhere, and scroll by 1 page
>     Key Left	A	C	Scroll -100 0
>     Key Right	A	C	Scroll +100 +0
>     Key Up		A	C	Scroll +0   -100
>     Key Down	A	C	Scroll +0   +100

>     # Keyboard accelerators - rarely used, I want Emacs to get nearly everything
>     # One exception is ctrl-shift combination, which allow me to move windows in much the
>     # same way as the Emacs make keys

>     Key F8		A	CS   	GotoPage 0 0
>     Key F9		A	CS	GotoPage 1 0
>     Key F10		A	CS	GotoPage 2 0
>     Key F11		A	CS	GotoPage 3 0
>     Key F12		A	CS	GotoPage 4 0
>     Key F13		A	CS	GotoPage 5 0
>     Key F14		A	CS	GotoPage 6 0

> So, to get to a specific window in the top row of the pager I can use ctrl-shift and a function key. To navigate around the virtual desktop I use control and a cursor key.

> You may wish to experiment with these options yourself.

> Bart Veer

>     -----------------------------------------------------------------------------
>     \	  Bart  Veer		       /
>     |\  Perihelion  Distributed Software  /|       Second law of Thermodynamics
>     | \   The Maltings, Charlton Road    / |
>     | /     Shepton Mallet, Somerset     \ |       If you think things are in a
>     |/           BA4 5QE                  \|       mess now, just wait!
>     /            UK                        \
>         Tel: +44 (0)1749 344203
>         Fax: +44 (0)1749 344977      email: bart@perihelion.co.uk	      Nemesis
>     -------------------------------------------------------------------==(UDIC)==

Jay Sibbrandt later wrote to suggest the following regarding Mattias Ettrich's excellent near-WYSIWYG LaTeX editor LyX:

> Date: Sun, 08 Oct 1995 07:41:32 CDT
> Sender: <jay@elec.gla.ac.uk>
> From: J. Sigbrandt <jay@elec.gla.ac.uk>
> To: <fisk@web.tenn.com>, <jay@elec.gla.ac.uk>
> Subject: Lyx - A WYSIWYG interface to TeX
> Hi,

> I wrote to you earlier to let everybody know about URL_GET. This time I'd like to point you to another favourite program which is called Lyx. It is a What You See is What You Get type interface to TeX written by Mattias Ettrich in Germany and destined to put an end to the perpetual TeX versus the others debates.

> I'll let you check it out for yourself:

> Author (for the development versions, and source code) http://www-pu.informatik.uni-tuebingen.de/users/ettrich/

> Official Homepage (for official releases, statically linked binaries, etc) http://www.lehigh.edu/~dlj0/linux.html (if this doesn't work, try removing the linux.html at the end. These pages are way too dynamic, for my bookmarks to keep up the pace)

> Have fun,
> Regards
> Jay

> ps: don't forget to write a short note to the author if you like this stuff - i'm fed up with only seeing flames on this sh***y net.

> pps: you will see some todo lists on the above homepages. They don't include writing filters so that Lyx can read other files besides TeX. Anybody able to do this? (.tex can be inserted as ascii documents and the formatting should be easy after that)

[I've actually played around with this excellent program a couple months ago. Since I don't do a lot of writing with LaTeX I haven't kept up with it or tried to master all the intricacies. If your work requires you to use LaTeX, or TeX, you need to try out this program! Some of you might recognize this as a reincarnation of the program Lyrix, which Mattias had released earlier using the Motif libs. This newest iteration uses the XForm libs and has been released under the GNU Public License. You'll find Linux binaries/sources and documentation at M.E.'s webpage. Also, if you're interested in helping with the develpment, or simply want to try your hand at XForm development doing something worthwhile, check this page out! --John]

## Lots More 2 Cent Tips!

### Managing different versions of a program

Ok, so this one's a bit of a nothin' burger, but it can be kinda useful under the right circumstances. Suppose you want to upgrade a program to a newer version, but you either don't want to trash the old one for sentimental reasons, OR you're worried (maybe rightfully so...) that the newer version might simply be a revised list of undocumented "features" (which some might snidely call bugs... ).

Well, if you want to be able to easily play with a couple different versions of a program, and you've got the HD space for them, simply rename the old one to something like

    	xfig-2.1.3

and your newly compiled/installed program to

    	xfig-3.1.3

In this case, we're using the venerable old program xfig as an example because, frankly, it was the first to come to mind. Anyway, to use one or the other, you simply create a symlink to whichever one you want to use:

    	ln -s xfig-3.1.3 xfig

which allows you to test drive your new program, without necessarily trashing your old program. And it's easy to switch the symlink back to your old program.

Now admittedly, this is kinda limited because a LOT of programs install gobs of files all over the place... config files, lib files, data files, and so forth that may or may not work with the old version. This works best for those programs that are primarily standalone programs.

Hey, what do you expect for 2 cents... :-)

### Updating your whatis...

Ok, this one's for all you manual page readers... The other day I was looking for some documentation on one of the PBMPlus programs and wasn't sure which of the multitude of converter programs I needed. So, in the grand 'ol UN*X style I simply did one of those

    	apropos gif

thingys. Now, for all of those who haven't discovered this helpful little trick here's the skinny on it: You've already discovered how to access information online using the "man xxxx" in which the "xxxx" is the name of the program you want to read about. The program apropos takes this just a step further and lets you search a database of short descriptions looking for a keyword.

In other words, in the example above, I was looking for any manpage whose short description included the keyword "gif". I KNEW that I'd installed the entire set of manpages for the pbmplus utilities (a set of VERY useful graphics converters and manipulators) and I should have been able to find something.

Nottin. Nada. Zip, baby... zip'ola.

Hmmm... so NOW what...

Well, after a bit of rooting around, I discovered that in order to use the search program apropos you had to manually build the database. Bet you didn't know you had to do this yourself, did you? OK, now be honest... who really knew that there'd be nothing there when you typed in `apropos my_favorite_obtuse_program`...? Yeah, I know, I know... the two nerdy looking guys in the front of the room who are waving your hands in the air... I'm sure you did. So why are you reading this if you know it all...?

For the rest of the class, let's proceed...

So, how do you update? Easy! There's a useful little program that gets dropped into you /usr/lib/ directory called, what else, makewhatis. And, as luck would have it, there's no man page for it. Figures. So, I tried the old "I'm-staring-at-an-unknown-program-and-I-have-no-idea-how-to-use-it-trick", I entered:

    	/usr/lib/makewhatis --help

the universal distress signal! Guess what...? It gave some help! Well, not a LOT of help, but help nonetheless.

This is what you'll see if you do this:

    Usage: makewhatis [-c] [-u] [-w] [manpath]
           -c: build database from cat pages
           -u: update database with new pages
           -w: use manpath obtained from `man --path`
           [manpath]: man directories (default: /usr/man)

So, what you'll need to do is this: go around to each of the directories that contain manual pages and do a

    	/usr/lib/makewhatis -w
    	/usr/lib/makewhatis /usr/local/man
    	/usr/lib/makewhatis /usr/X11R6/man

and so forth. I found that in order to have the compressed pages in the /catn directories, I had to do the same as the above but add the "-c" option. If everything works correctly, you should find a nice, brand new file in each of your /man/ subdirectories called whatis. If you take a look at this, you'll discover that it's just a plain text file with a listing of the programs for which manual pages exist, together with a short one-liner about each one.

Now, if you want to search the whatis database, you simply enter:

    	apropos xterm
    	man -k xterm

either of these will work and you should now find displayed a listing of all of the manual page entries which contain the keyword "xterm".

Mucho cool, eh?

A couple final suggestions:

- make life easier on yourself, create a symlink from /usr/lib/makewhatis to someplace in your PATH like /usr/bin. That'd be a:

      		ln -s /usr/lib/makewhatis /usr/bin/makewhatis

  That way, you only have to type in the `makewhatis` command without all the pathname stuff.

- the man page for apropos does have a comment about the makewhatis program and suggests that to be useful, you can add this to your crontab file and have it periodically update your whatis database automagically. That is, after you've installed a few programs with their manpages, you'd like to have them added to the whatis database. Rather than having to remember to do this, put it in your crontab. I'm sort of a "do-it-myself-thank-you" kinda guy so I haven't. That, and the fact that I haven't figured out crontab... :-)

Have fun and keep reading!

### Printing up those 'ol manpages!

Ok, while we're on the subject of manpages...

Did you know that there's an easy way to print up your favorite manual page? Now, I know what you're thinking... this poor 'ol guy musta chewed paint chips as a kid... . Ok, hold the wisecracks until I'm done...

While manual pages were meant to provide online documentation that is readily accessible, there are times when having a printed copy is invaluable. I would strongly recommend, for example, that if you're planning on doing some serious fvwm tinkering that you consider printing up the manual page. I don't know about you, but it's often easier to read a printed copy of a manual page, AND it allows me to jot notes and ideas along the margins.

So, how do you do this? There's a great little command line option for the man program:

    	man -t fvwm

The "-t" option allows you to print a formatted copy of the manpage to stdout. Now, don't try this just yet... Why? because if you do, you'll suddenly have a new appreciation for the idea of stdout. For all of the recent DOS-converts like myself, stdout simply refers to standard output, which generally defaults to your monitor.

Cool!, you say, now I can see what it'll look like.

Ok, then try it... you'll now have a new appreciation for what postscript output looks like! Yup, in most distributions, the `man -t` print option causes the output to be formatted as postscript. So, here's how to make this useful.

If you do want to have postscript output of a manpage, either because you have access to a postscript printer or because you've gotten ghostscript working with your printer, you can simply type in:

    	man -t fvwm > fvwm.ps

Very easy. After a bit of churning and gnawing away on your hard drive, you'll find a nice, neat, new file called fvwm.ps. Now you can either print it or, view it using the great previewer ghostview. That is, you simply enter `ghostview fvwm.ps &` and up it comes!

Hey, wanna know a secret!... (Shhhh!... keep it down!...you don't have to print this stuff in postscript if you don't want to.)

Yup, this is Linux, man! You've got freedom of choice! The file that you'll need to tinker with is /usr/lib/man.config. Now, without wrenching all the darkly hidden mysteries from the craggy depths of this file, let me direct your attention to just a portion of it:

    #
    # Generated automatically from man.config.in by the
    # configure script.
    #
    # man.config
    #
    # This file is read by man to configure the default manpath (also used
    # when MANPATH contains an empty substring), to find out where the cat
    # pages corresponding to given man pages should be stored,
    # and to map each PATH element to a manpath element.

    [BIG SNIP]

    # Useful paths - note that COL should not be defined when
    # NROFF is defined as "groff -Tascii" or "groff -Tlatin1";
    # not only is it superfluous, but it actually damages the output.
    #
    TROFF		/usr/bin/groff -Tps -mandoc
    NROFF		/usr/bin/groff -Tlatin1 -mandoc
    EQN		/usr/bin/geqn -Tps
    NEQN		/usr/bin/geqn -Tlatin1
    TBL		/usr/bin/gtbl
    # COL		/usr/bin/col
    REFER		/usr/bin/grefer
    PIC		/usr/bin/gpic
    VGRIND
    GRAP
    PAGER		/usr/local/bin/less -s

What you're interested in is the line that begins with the word `TROFF`. Again, without going into all the intricacies of what's happening here, suffice it to say that when you enter the "man -t" command, what happens is that the man program calls upon the services of groff, the text-formatting program similar to TeX, to format the document and then send a copy of it to standard output.

But groff is a pretty good formatting system, in that you can specify what you want as its output. There are a bunch of options (you know... " read the manual page...") but the one that's helpful if you're interested in plain ASCII output is the "-Tascii" option. To produce plain text output simply change the line above to:

    	TROFF		/usr/bin/groff -Tascii -mandoc

See what happened? We've changed the "-T" option so that now it designates ASCII output. Now, when you're ready to print up a man page, you simply enter:

    	man -t fvwm > fvwm.txt

and there you go... plain, but nicely formatted text output. Now, if you've installed the TeX stuff, you might also want to use a DVI (device independent) format. I've got a small Panasonic KX-P4410 printer at home that does HP-IIP emulation, but the poor 'ol thing only has 512K of printer memory. That's not enough to handle most postscript output at 300dpi resolution, but is more than ample if I'm using the dvilj2p program which converts a .dvi file to something with an .lj suffix that I can simply 'cat to my printer.

To do this, you just change the "-T" option to read "-Tdvi". Real easy.

Seriously, though, if you're interested in the various output options, do check the groff manpage. Or better yet... print it up!

[addendum]
This is one of the reasons to read Usenet... :-)

After writing all this stuff above, I ran across a comp.os.linux.something posting asking about how to print manpages. A responder suggested the following:

    	man manpage | col -b > manpage.txt

This creates plain ASCII output from any manual page and is a LOT faster than trying to format it using Groff & Co. as in the example above. The col program was one that I'd not run across and so the manpage entry for it says:

    COL(1)			     UNIX Reference Manual			COL(1)

    NAME
         col - filter reverse line feeds from input

    SYNOPSIS
         col [-bfx] [-l num]

    DESCRIPTION
         Col filters out reverse (and half reverse) line feeds so the output is in
         the correct order with only forward and half forward line feeds, and re-
         places white-space characters with tabs where possible.  This can be use-
         ful in processing the output of nroff(1) and tbl(1).

         Col reads from standard input and writes to standard output.

         The options are as follows:

         -b	    Do not output any backspaces, printing only the last character
    	    written to each column position.

         -f	    Forward half line feeds are permitted (``fine'' mode).  Normally
    	    characters printed on a half line boundary are printed on the fol-
    	    lowing line.

         -x	    Output multiple spaces instead of tabs.

         -lnum  Buffer at least num lines in memory.  By default, 128 lines are
    	    buffered.

         The control sequences for carriage motion that col understands and their
         decimal values are listed in the following table:

         ESC-7	      reverse line feed (escape then 7)
         ESC-8	      half reverse line feed (escape then 8)
         ESC-9	      half forward line feed (escape then 9)
         backspace	      moves back one column (8); ignored in the first column
         carriage return  (13)
         newline	      forward line feed (10); also does carriage return
         shift in	      shift to normal character set (15)
         shift out	      shift to alternate character set (14)
         space	      moves forward one column (32)
         tab	      moves forward to next tab stop (9)
         vertical tab     reverse line feed (11)

         All unrecognized control characters and escape sequences are discarded.

         Col keeps track of the character set as characters are read and makes
         sure the character set is correct when they are output.

         If the input attempts to back up to the last flushed line, col will dis-
         play a warning message.

    SEE ALSO
         expand(1),	 nroff(1),  tbl(1)

    HISTORY
         A col command appeared in Version 6 AT&T UNIX.

    BSD Experimental		 June 17, 1991				     1

Ok, so that didn't clear things up too much, but it obviously works because I just used it to print the manual page above :-) It seems that it's used in conjunction with groff and other text formating programs. I'll quickly admit at this point that using groff is kinda like using the transmission in my car... I use it daily, but that doesn't mean that I know much about it, and I'm not sure I could fix it if it broke...

Still, I'm happy that it works. If your needs are plain ASCII output then you're in luck... give it a whirl!

### Colorful consoles with setterm

Since we're on a bit of a "freedom of choice" kick here, you need to give the nifty little program setterm a whirl. Like all good UN*X offspring it comes with nigh unto a bazillion options, but the ones we're interested right now allow you to set the console colors.

This is done using the command:

    	setterm -background blue -foreground cyan

Go ahead... try it! Now, you'll notice that the prompt has changed colors, but the rest of the screen hasn't. Not to despair, you just enter `clear` and your screen clears and the new color scheme is implemented.

Mucho cool, right?

Now, if you're using a distribution that does color "ls" directory listings, do a directory listing:

    	ls -l /home/stuff

what happened, man! The colors are GONE!!

Ok, ok, before you get in a wad... there was one tiny little point I failed to mention... :-) If you want to keep your color scheme and not just test drive it, you add the option "-store". This sets the color scheme that you've selected. Want to change it again? Re-enter the command above.

So, what are your color options? Well, to see a helpful printout of all the setterm command line options just type in `setterm` (that's without any command line options). You should see something like this go sailing by:

    setterm: usage

    setterm
      [ -term terminal_name ]
      [ -reset ]
      [ -initialize ]
      [ -cursor [on|off] ]
      [ -repeat [on|off] ]
      [ -appcursorkeys [on|off] ]
      [ -linewrap [on|off] ]
      [ -default ]
      [ -foreground black|blue|green|cyan|red|magenta|yellow|white|default ]
      [ -background black|blue|green|cyan|red|magenta|yellow|white|default ]
      [ -ulcolor black|grey|blue|green|cyan|red|magenta|yellow|white ]
      [ -ulcolor bright blue|green|cyan|red|magenta|yellow|white ]
      [ -hbcolor black|grey|blue|green|cyan|red|magenta|yellow|white ]
      [ -hbcolor bright blue|green|cyan|red|magenta|yellow|white ]
      [ -inversescreen [on|off] ]
      [ -bold [on|off] ]
      [ -half-bright [on|off] ]
      [ -blink [on|off] ]
      [ -reverse [on|off] ]
      [ -underline [on|off] ]
      [ -store ]
      [ -clear [all|rest] ]
      [ -tabs [ tab1 tab2 tab3 ... ] ]      (tabn = 1-160)
      [ -clrtabs [ tab1 tab2 tab3 ... ] ]   (tabn = 1-160)
      [ -regtabs [1-160] ]
      [ -blank [0-60] ]
      [ -dump   [1-NR_CONSOLES] ]
      [ -append [1-NR_CONSOLES] ]
      [ -file dumpfilename ]
      [ -msg [on|off] ]
      [ -msglevel [0-8] ]

Ok, the color stuff is all listed about half way down the screen -- you'll see a listing of all your color options. So, have at it!

Wanna do something REALLY fun...?

There's an easy way to set up the color schemes of any or all of your virtual terminals without ever having to enter a single command line option. (Shhhhh!!... this is seriously cool... don't let the DOS guys know you're having this much fun or they'll want to come to your house and play with your computer...)

First, you have to ask yourself a philosophical question: "why would I want to do this in the first place...?" A good reply, since you're talking to yourself anyways, is that this is a very simply means of letting you know which virtual terminal you're at! If you're like most folks, you've probably got at least two or three VT's running most of the time and then just ALT-Fn to the one you want. Thing is, it's sometimes hard to know just exactly which terminal you're at. Setting these up by color scheme so that VT1 is white on black, VT2 is white on blue, VT3 is cyan on blue, and so forth, let's you immediately know which VT you're presently working on.

Now, for the cool part.

By editing your ~/.bash_profile file, and doing a bit of wizardry, you can easily set up any color scheme for any VT you want. Just add the following to your bash_profile:

    V_TERMINAL=`tty`
    case "$V_TERMINAL" in
    	"/dev/tty1") setterm -background black -foreground white -store;;
    	"/dev/tty2") setterm -background black -foreground white -store;;
    	"/dev/tty3") setterm -background black -foreground white -store;;
    	"/dev/tty4") setterm -background black -foreground white -store;;
    	"/dev/tty5") setterm -background black -foreground white -store;;
    	"/dev/tty6") setterm -background black -foreground white -store;;
    esac

Now, see what's happening here?

At login, your ~/.bash_profile file is read. When it reaches this stanza in the file, it sets the variable V_TERMINAL to the string output of the command tty (which, BTW, indicates which virtual terminal you happen to be presently at). Now that you know which terminal you're at, you just set up a case statement that lets you define what action to take depending upon which terminal you're currently at.

As you can see, I have all terminals using plain 'ol vanilla white on black. But, I could just as easily have set different background / foreground combinations for the various VT's. Then, all I have to do it edit this portion of the file, change a couple names, and viola!, new color scheme!

Very slick.

### Still more login fun!

Keep in mind here that the above example is more than just a means of changing the colors of your VT's... it's a veritable paradigm man! Think about this for a moment...

Ok, times up.

Put your pencils down, close your books, and turn your answer sheet over...

Hmmm... getting a bit whippy here... they're probably putting more caffeine in the Folgers again... either that, or the lithium is kicking in... :-)

Now, where was I? Oh, yes... the veritable paradigm thing...think for a moment what this lets you do. It gives you a means of changing what happens depending on which VT you've logged in to. Tell this to those poor DOS dweebies and you'll make 'em cry!

For example, suppose that you wanted to play your favorite little .au jingle each time you logged in, AND, you wanted to have a different one play at each of the different terminals. Easily done! You just add a couple stanzas like:

    V_TERMINAL=`tty`
    case "$V_TERMINAL" in
    	"/dev/tty1") setterm -background black -foreground white -store;
    		cat /usr/local/sound/stoog.au > /dev/audio & ;;
    	"/dev/tty2") setterm -background black -foreground white -store;
    		cat /usr/local/sound/bigben.au > /dev/audio & ;;
    	"/dev/tty3") setterm -background black -foreground white -store;
    		cat /usr/local/sound/spam.au > /dev/audio & ;;
    	"/dev/tty4") setterm -background black -foreground white -store;;
    	"/dev/tty5") setterm -background black -foreground white -store;;
    	"/dev/tty6") setterm -background black -foreground white -store;;
    esac

Notice how this works... each of the case statements begins with the string that you're looking for, "/dev/tty3" for example. Then, there's a right parenthesis followed by the sequence of commands you want to have performed. You can separate multiple commands using a single semicolon. You indicate the end of the list of commands by using two semicolons. Remember, no typos. Syntax is important.

Now, you're all set! When you log in to VT number 1, you're greeted by the sweet strains of Curly, Moe, and Larry... then, on VT number 2, it's the majestic peels from Big Ben, and finally, on VT number three, it's a heart thrilling, orchestrated, four-part harmonized rendition of that classic Monty Python ditty "Spam, Spam, Wonderful Spam".

Want to do other cool stuff... the world's your oyster, man! You can just keep adding stuff to this. Just keep in mind, however, that moderation in all things is good advice. If your ~/.bash_profile is so heavily laden because you want to play the Star Spangled Banner at your every login followed by the entire Hallelujah Chorus, it may take you a while to get to a user prompt.

Use your discretion.

Anyway, enjoy!

### The minimalistic login

Ok, not to show favoritism to the bipolar folks who just happen to be on a bit of a manic jag...

Here's a little something for the minimalistic kind. There's an easy way to ditch all of the verbage that greets you at EVERY login... you know... all that useful information about the last time you logged in, and the cutesy MOTD thingy, and the minutia about the kernel version you've been using now for months...

If you want a simple, unadorned login without all the baggage, just add a file to your home directory and call it .hushlogin. It's that simple. To make it even easier, just do the following:

    	touch .hushlogin

The touch command creates a file in your directory. Nope, you don't have to put anything in it. If it's there, the verbage is gone and your slate is clean.

### Changing your screen font the easy way!

Finally, this one's for all you folks that decided to install the kbd package. As we saw last month, there's a handy little utility that comes with this called chvt that lets you skip from VT to VT. Now, let's see what other little goodie this comes with.

There's a VERY easy and very handy program called fontconfig that comes with this distribution. Just enter the command `fontconfig` and you'll be presented with a menu that has dozens of different screen fonts from which to choose. It's actually kinda fun messing around with this. Choose the font you like, it'll then ask you whether to make it your default font, and if you answer YES, it's all done for you!

Those of you who have installed the Slackware distribution, and probably other's as well, may have chosen to install this and been given the chance to play with your fonts at installation time. Well, it just ain't for installation any more...!

Take a peek at it and have fun!

## Useful Entrapment: "A Better Way..."

The following suggestion was offered by Nathan Hand and was a follow-up letter to last month's suggestion regarding clearing the screen at logout. I've included it here for a couple reasons:

- To recognize the fact that I clearly don't know everything, or even a small amount of everything :-) and that I'm dependent upon readers to offer corrections and suggestions for improvement
- To allow anyone who wants to submit suggestions and ideas which I'll be happy to include (within reason... :-)
- To illustrate the tremendous power and flexibility that Linux, and UN*X-like OS's bring: there are often MANY ways to accomplish the same task. Some, like Nathan's suggestion, are not only more elegant, but illustrate an example of a very useful tool

That said, take a look at what he wrote:

> Date: Sat, 07 Oct 1995 09:51:05 CDT
> Sender: <nathanh@anu.edu.au>
> From: Nathan Hand <Nathan.Hand@anu.edu.au>
> To: <fisk@web.tenn.com>
> Subject: (no subject)

> I was just browsing thru your pages and I saw the tip on aliasing "exit" to clear your screen before logging out. I'd just like to mention that there is A Better Way. Just add the following line.

>     	trap /usr/bin/clear EXIT

> To your ~/.bash_profile or whatever. The benefits are that the user can type exit, or logout, or kill -9 0, or C-D or whatever they like to log out. Putting traps on signals is very useful for many things (like saving logout times).

> btw: I enjoyed reading thru your pages. Keep up the good work. I especially liked the tips section.

Well, I tried it and you know what...? It worked!

That got me interested in the use of traps. I admit that I've never run across this idea before, although many of you have probably used this technique for years. After trying this out, I turned to the bash manpage for some info on the use of traps. If you do this, this is what you'll find:

> trap [-l] [arg] [sigspec]

> > The command arg is to be read and executed when the shell receives signal(s) sigspec. If arg is absent or -, all specified signals are reset to their original values (the values they had upon entrance to the shell). If arg is the null string this sig- nal is ignored by the shell and by the commands it invokes. sigspec is either a signal name defined in <SIGNAL.H>, or a signal number. If sigspec is EXIT (0) the command arg is executed on exit from the shell. With no arguments, trap prints the list of commands associated with each signal number. The -l option causes the shell to print a list of signal names and their corresponding numbers. An argument of -- disables option checking for the rest of the arguments. Signals ignored upon entry to the shell cannot be trapped or reset. Trapped signals are reset to their original values in a child process when it is created. The return sta- tus is false if either the trap name or number is invalid; otherwise trap returns true.

Ok, ok... I know what you're thinking... "Well, that certainly cleared things up...:-)"

Yeah, I know. Which is why you buy books!

So, I turned to a shell programming book I've been using for some time now and really like: "Shell Programming In 14 Days". Ok, so the name's a bit hooky, but the book is well written and offers clearly written explanations and exercises. It's put out by SAMS Publishing. There are a couple pages devoted to the use of traps.

Ok, if you'll all turn in your books to pages 288 - 289, let's read together...

The basic idea is that the trap command executes a command when it receives a signal from the system - either from a hardware source, terminal input, or a kill call from another process. When this happens, the type of action taken depends upon the signal, with the default action being defined by SIG_DFL, which is to terminate the process.

The basic useage of the trap command is:

    	trap 'command(s)' n

in which 'commands' is either:

- a null string which causes the trap to be ignored
- a single command which is executed when the signal is trapped
- a series of commands which are separated by a semicolon

So, what are the signals that can be trapped? The most common ones, I'm told are the following:

- 0 - program exit
- 1 - hang-up
- 2 - user interrupt (ctrl-c)
- 9 - kill signal from another process

A listing of the various signals for the system can be found in the file /usr/include/signal.h. I'll let you have a look at that.

Now, I'll admit that after this little bit of reading I'm only slightly more enlightened about the use of traps. Adding the bit of code suggested by Nathan clearly works well. I'd be very interested to hear from anyone who could shed just a bit more light on the use of traps, especially if examples of their use were included.

Thanks!

## In-depth Guide to XF-Mail and XMailbox Installation

Last month I wrote up a quick review of the truly impressive program XF-Mail, an SMTP- and POP-compliant mail client. I'd like to take a closer look at this program and another great little program called XMailbox. I'm doing this for a couple reasons.

First, I suspect that there are a LOT of folks who are in a position similar to myself: using UNIX at school/work on a mini- or mainframe, and running Linux on our PC's at home. If this is the case, it is quite likely that your internet connection is via a dial-up connection, hopefully, SLIP, CSLIP, or PPP. If this is the case, your options for getting mail into and out of your Linux box almost invariably included having to set up sendmail, sendmail+IDA, or smail.

There has been a lot of effort put into making these programs accessible to the single workstation/PC user. These are all powerful programs, and admittedly complex. While the desire to get email is generally strong enough to force folks to wrestle with setting these up, this is admittedly not a trivial task.

If you've got the knowledge and background to do this, GREAT! These programs offer unparalleled power and flexibility. If you don't have the background or knowledge, don't despair... there's an easy alternative:

XF-Mail.

Also, if you've got a dial-up connection working, you might also want to mess around with another great and fun little program:

XMailbox

What I'd like to do is take an in-depth look at both of these programs. Let me offer one caveat at this point: this is NOT meant to insult anyone's intelligence. If you're pretty comfortable with compiling your own programs, you'll probably want to skip the rest of this. I'm writing this primarily for the benefit of those DOS-converts, like myself, who may initially viewed the notion of compiling programs as a task for wizards. It's not that bad. Honest! However, until you get the hang of this, getting Linux programs working may well be a formidable (spelled it right this time... :-) task. If you're pretty adept at compiling programs, you may want to skip to the next section on Configuration, although even that is admittedly pretty straightforward. A page or two down, you'll find the links to the programs you'll need. For a lot of you, all you'll need to do is get the sources/bins and you should be all set!

OK, now who's left...?

Just a word for those of you that are left. If you are an absolute Linux newbie and the thought of compiling anything sorta gives you the heebie-jeebies, stick with me. This'll be fun. Really!

The philosophy behind Linux, and much of UN*X, is vastly different than that of DOS. While you can often find pre-compiled binaries that work simply by dropping them into a directory in your path, there are MANY instances in which this is simply not the case. You'll get an archive with the "-tar.gz" suffix and unarchive it only to discover that it'll all source code and needs to be compiled. Eventually, you'll want to be able to do this. It's often not as hard as it first seems, although admittedly, not everything compiles cleanly "out of the box".

What I'd like to do is take you through the steps necessary to set these two programs up. I think this is extremely important for a couple reasons:

- this will be good practice in compiling and setting up a couple programs that are quite well behaved and need little modification to get working.
- if you're using Linux on a home PC and have a dial-up connection, you really need to have an easy-to-use email client. You need to be connected. Seriously. You're quite handicapped and cut off if you don't.
- lastly, if you've never compiled anything under Linux, this is your golden opportunity to do so and feel pretty good about yourself!

So, let's begin.

You'll need to have a few things set up in order to do this:

- you need to have X Window up and running
- you'll need to have installed the development applications -- for those of you using Slackware, that's the stuff in the D disk sets. Other distributions will use different designations. You should have the GCC (GNU C Compiler) installed, as well as the include files and so forth. If you installed the D disk sets, you should be fine.
- you'll need to ftp some files. If you're using a browser to view this, you're probably looking at one of the easiest ftp clients to use. I'll tell you where to find things in a minute.
- you'll need to be able to use at least one of the Linux text editors such as VI, Emacs, xedit (if you're running X Window), pico, JOE, JED, or one of the many others.

If you're cool with these, you're ready!

I'll start with XF-Mail since it's the one that you'll probably want to get up and running first. You'll need the following files:

- xfmail-0.3.tar.gz (http://Burka.NetVision.net.il/xfmail/xfmail.html)
- bxform-075.tgz (http://bragg.phys.uwm.edu/xforms/)
- libXpm-3.4f.tar.gz (ftp://ftp.cc.gatech.edu/pub/linux/X11/libs/)

The first two links -- those for xfmail-0.3.tar.gz and bxform-075.tgz -- will take you to the home pages of these impressive programs. Read the info and follow the directions for getting the Linux version of these programs. The last link -- for the libXpm stuff -- will drop you off at one of the sunsite mirrors (that's GA Tech, if you're curious about this). Since versions of programs can change fairly quickly, I'll leave it up to you to get the most recent version. I'm currently using the libXpm-3.4f.tar.gz sources. By the time you get these, there may be a more recent version. Just get the most recent sources and you should be all set!

So... how'd you do? Any problems?

Now that you've gotten the files, let's get things set up. Let me add parenthetically what these files actually are. In brief:

- xfmail-0.3.tar.gz - the source code for the XF-Mail client version 0.3
- bxform-075.tgz - the binaries for the XForm toolkit libraries
- libXpm-3.4f.tar.gz - the source code + precompiled libraries for the libXpm libraries

XF-Mail needs those last two libraries in order to be compiled. As an additional benefit, there are LOTS of programs that require the libXpm libraries, and a growing number of programs are beginning to use the XForm libraries. Having set these up once you'll be all set when it comes time to compile other programs that require them.

Since I'm using Slackware 2.2.0 at the moment, my descriptions of where things will go may be just a bit different than your's if your using a different distribution. Not to fret... I'll try and be as broad as I can in terms of describing how to proceed.

Let's begin by setting up the libXpm libraries first.

Trying to compile the libXpm libraries from the sources was admittedly a bit of a bugger. I'll spare you the horrific details, but suffice it to say that nothing compiled cleanly... it kinda lacked that *OOBE quality...

(* you know... that 90's yuppie techno-wannabe Out-Of-Box-Experience)

Since the libXpm-3.4f.tar.gz archive contains precompiled libraries and the necessary header files, let's use these. The way I have my system set up, I've created a /usr/local/src directory in which I store and compile all new programs. You don't have to do this yourself, but it does help keep things organized. Now, let me quickly take you through the steps to set this stuff up:

    cp libXpm-3.4f.tar.gz /usr/local/src/ 	-copy file to /usr/local/src
    cd /usr/local/src 			-cd to /usr/local/src
    tar -xvzf libXpm-3.4f.tar.gz 		-unarchive the file
    cd xpm-3.4f/ 				-cd to the xpm-3.4f/
    ls -l 					-do directory listing and check for:
    						libXpm.a
    						libXpm.sa
    						libXpm.so.4.6
    cp libXpm.* /usr/X11R6/lib/ 		-copy library files to /usr/X11R6/lib
    cp lib/xpm*.h /usr/X11R6/include/X11/ 	-copy include files to /usr/X11R6/include/X11
    ldconfig 				-update library database

Congrats! The libXpm libraries should now be installed! Now, that wasn't too bad, eh? Eight commands and you're up and running. Just remember, no typos. Gotta put things where they belong. Now, time for a coke and quick bag 'o nachos and it's...

On to the easy stuff...:-)

Next, let's set up the bxform-075.tgz stuff. This archive contains the binaries (actually, the static libraries) for the XForm libs. It's almost as easy to set up as the libXpm libs, except you'll need to do a little bit of editing to put things where they belong.

We'll start the same way we did the last time:

    cp bxform-075.tgz /usr/local/src	-copy file to /usr/local/src
    cd /usr/local/src			-cd to /usr/local/src
    tar -xvzf bxform-075.tgz		-unarchive the file
    cd xforms/				-cd to xforms/
    ls -l					-do a directory listing.

At this point, you should see something like:

    -rw-------   1 root     users          31 Apr 14 16:57 Bugs
    -rw-------   1 root     users         588 Mar 21  1995 Copyright
    drwx------   2 root     users        4096 Sep 25 17:15 DEMOS/
    drwxr-xr-x   2 root     users        1024 Sep 25 17:14 DESIGN/
    drwxr-xr-x   2 root     users        1024 Sep 25 17:02 FORMS/
    -rw-------   1 root     users        1231 Jul 22 18:17 Makefile
    -rw-------   1 root     users        1862 Jul 22 18:17 Readme
    -rw-------   1 root     users        3070 Jul 16 00:47 changes
    drwx--x--x   2 root     users        1024 Jul 20 08:22 contrib/
    -rw-------   1 root     root          527 Oct  8 07:29 mkconfig.h
    -rw-------   1 root     users         507 Jul 22 18:17 mkconfig.h.dist

It's always a good idea to read through the README files for anything, and this is no exception. It'll inform you that the file you need to edit in order to make any modifications is the mkconfig.h file. It's another good idea to always make a backup copy of any file you modify. If things get screwed up, you should have a "clean" copy with which to fall back on. I've called my backup copy mkconfig.h.dist since it came with the distribution.

There are two modifications you may want to make. First, make a backup copy of the file by typing in `cp mkconfig.h mkconfig.h.dist`, and then you're ready to do a bit of editing. When you load up the file, you should see something that looks like:

    # Linux

    CC=gcc
    CCFLAG=-O
    LDFLAG=-O -s
    AR=ar rs
    RANLIB=touch
    XINCLUDE=-I/usr/X11R6/include
    SYSLIB=-lXpm -L/usr/X11R6/lib -lX11 -lm

    # name and header of the library
    FORMLIB=libforms.a
    FORMHEADER=forms.h

    # make shared lib: $(MKSHLIB) -o $(SHARED_LIB) *.o
    MKSHLIB=
    SHARED_LIB=

    # where the library should be installed

    LIB_DIR=/usr/lib
    LIBMODE=644

    HEADER_DIR=/usr/include
    HEADERMODE=644

    BIN_DIR=/usr/local/bin
    BINMODE=711

    MAN5_DIR=/usr/man/man5
    MAN1_DIR=/usr/man/man1
    DOC_DIR=/usr/local/lib
    MANMODE=644

You might want to consider installing the "libforms.a" library into the /usr/X11R6/lib directory and the header file, "form.h" into the /usr/X11R6/include/Xf directory. The reason for this is because this is where XF-Mail will be looking for these files. If you do this now, it'll be a bit easier during the next step. So, to do this you change the LIB_DIR= and the HEADER_DIR= lines to read:

    LIB_DIR=/usr/X11R6/lib
    LIBMODE=644

    HEADER_DIR=/usr/X11R6/include/Xf
    HEADERMODE=644

This should put everything where it belongs. Now, all that remains to finish the installation, after you've saved the modifications, is to type in:

    	make install

Viola! it's done! Another slug of coke and a few more chips and we're almost ready to start playing!

Last step... compiling XF-Mail!

From this point on, you should have smooth sailing! :-) What you'll need to do at this point is merely unarchive the file, copy a file, and optionally edit the Makefile (which orchestrates the process of compiling) and then compile the program. Then, you're GOLDEN!

As we've done previously, let's use the /usr/local/src directory as the working directory. Starting the way we've done previously:

    cp xfmail-0.3.tar.gz /usr/local/src	-copy archive file to /usr/local/src
    tar -xvzf xfmail-0.3.tar.gz		-unarchive the file
    cd xfmail/ui				-cd to the xfmail/ui directory
    cp Makefile.Linux Makefile		-copy Linux-specific Makefile to Makefile

At this point, there's really nothing much left to do besides compile the program. I'll add here that you can optionally change the directories in which the program and the manual pages are installed. Why would you want to do that...? Well, there are a couple of schools of thought regarding the installation of new programs. The one that I happen to ascribe to suggests putting all user-added programs into the /usr/local directory. This is the short answer... :-)

Now, you DON'T need to do this following step. This is totally optional, but if you'd like to change the default location of the program installation, let's take a look at the Makefile. Again, if you glance through the README file, you'll see that the authors instruct you to copy the file Makefile.Linux to Makefile (assuming that you're using Linux), which we've already done above.

When you edit the Makefile you've just created, you'll see a section near the top that looks like:

    # change the following settings according to your system configuration

    XFINC = -I/usr/X11R6/include/Xf         # where forms.h is located
    XFLIB = -L/usr/X11R6/lib -lforms        # how to link libforms.a

    LIBS =  -lX11 -lXt -lXext -lXpm -lm     # additional libraries
    INCS = -I/usr/X11R6/include             # where X include files are

    BINDIR = /usr/X11R6/bin                 # where binary should be installed
    MANDIR = /usr/X11R6/man/man1            # where to install manpage

    # if you want faces support uncomment the following lines
    FACELIB = -L../compface -lface
    FACEFLAGS = -I../compface -DFACES
    FACEDP = libface
    # NOTE: this enables support only for mailheader faces.
    # Support for faces (picons) database is builtin and could
    # be turned on or off using Faces configuration dialog.

    # end of user configurable settings

You'll notice that the section delimited by the "# change the following..." statement at the top and the "# end of user configurable settings" at the bottom is the only section of the file that you should edit. Also notice for a moment the lines that define the XForm include directory (XFINC) and the line for the XForm library directory (XFLIB). Now, you'll see why we edited the Makefile above for XForms: /usr/X11R6/include/Xf is where XF-Mail will look for the form.h header file, and /usr/X11R6/lib is where it will look for the libforms.a file. Nice work.

If you want to install the xfmail program into your /usr/local/bin directory, and the manual pages into the /usr/local/man/man1 directory, simply edit the BINDIR and the MANDIR entries:

    BINDIR = /usr/local/bin                 # where binary should be installed
    MANDIR = /usr/local/man/man1            # where to install manpage

Save the file and you're ready to go!

At this point, all that's left to do is compile the program. To compile the program simple enter:

    	make
    	make install

After you type in `make` you should see a LOT of action going on as the compiler begins the process of compiling your program. Sit back... enjoy the ride! If you've put everything where it belongs, this should be a clean compile. It'll probably take a while, depending upon your processor and system memory. Time for another coke...

If the compilation has gone well you should see no error messages. You can then type in the `make install` command and the program will be installed to whichever directory you indicated. Again, keep in mind that once you've copied the Makefile.Linux to Makefile, you don't have to do anything else except compile the program.

So, how'd it go!!

Pretty cool...eh? Congrats, you've done the hard part. Time to PLAY!!

Well, almost... there's one more quick program to set up...

Setting up XMailbox.

This one's easy 'cause we're going to use the precompiled binaries. The file you'll need is called xmailbox-2.2-bin.tgz (ftp://ftp.cc.gatech.edu/pub/linux/system/Mail/). If you follow this link you'll end up in the /system/Mail directory at the GA Tech sunsite.unc.edu mirror. Just fetch that 'ol boy and you're ready to go.

Now, if you're feeling kinda adventurous, you can also pick up the sources, which are in xmailbox-2.2-src.tgz. I'm not going to cover how to compile this since the binary distribution works fine and is quite easy to set up.

Again, using the /usr/local/src directory as our working directory, enter:

    cp xmailbox-2.2-bin.tgz /usr/local/src/		-copy file to /usr/local/src
    cd /usr/local/src				-cd to /usr/local/src
    tar -xvzf xmailbox-2.2-bin.tgz			-unarchive the file
    cd xmailbox-2.2/				-cd to xmailbox-2.2/
    ls -l						-do a directory listing

    You should see:

    -r--------   1 root     root         2916 May 17 21:48 README
    -r--------   1 root     root          514 May 17 21:48 XMailbox.ad
    -r--------   1 root     root        10436 May 17 21:48 dingdong.au
    -r--------   1 root     root        10256 May 17 21:48 ugotmail.au
    -r--------   1 root     root         2817 May 17 21:48 xmail.xpm
    -r-x------   1 root     root        17412 May 17 21:48 xmailbox*
    -r--------   1 root     root         8003 May 17 21:48 xmailbox.man
    -r--------   1 root     root         2782 May 17 21:48 xnomail.xpm

At this point, you can browse through the README file, but you'll notice that it doesn't give you a lot of information about installing the binaries, it just tells you about what you'll need to compile the program... uh... which is already done.

Well, the hard work is actually already done for us. Putting this stuff where it belongs is pretty easy actually, so let's do that. Again, I'd recommend that you consider putting the program in the /usr/local/bin directory. I'd also recommend that you create a directory for sound files if you have a sound card that Linux supports (such as SoundBlaster or GUS). I've created one called /usr/local/sound, and have put all the .au sound files there.

If you want to put files under the /usr/local directories, then you'd simply do the following:

    mkdir /usr/local/sound				-create the sound directory
    cp *.au /usr/local/sound/			-copy the sound files to sound dir
    cp xmailbox /usr/local/bin/			-copy the program to /usr/local/bin
    cp xmailbox.man /usr/local/man/man1/		-copy manual page to /usr/local/man
    cp *.xpm /usr/X11R6/include/X11/pixmaps/	-copy icons to pixmap directory
    cp XMailbox.ad /usr/X11R6/lib/X11/app-defaults/XMailbox
    						-copy the application default file
    						 to the app-defaults dir and
    						 renaming it to XMailbox

So that's it!! You're done!

NOW, it's time to PLAY!!

## Configuring XF-Mail and XMailbox

Ok, phew!... the hardest part is done. You've gotten the sources or binaries for XF-Mail and XMailbox and got them both installed. If this was your first attempt at getting a program compiled and installed -- Congrats!! Now comes the fun part.

Since we've just gotten finished installing the XMailbox binaries, and since setting this up is quite straight-forward, let's do this one first. But first, a word about what XMailbox is...

For the benefit of those who haven't heard of an biff type program, it's simply a small program that hangs around checking to see whether you've re- ceived any email. So, if you're user "fiskjohnm", a biff program simply hangs around checking the /var/spool/mail/fiskjohnm file to see whether anything's come in. There actually is a rather humble little program by that name that comes with the stock XFree86 distribution. If you're interested in the roots of name "biff" I'd refer you to the canonical source of all beginning UNIX information, "A Student's Guide to Unix". It's an absolutely must-have reference for anyone that is beginning to learn unix and is written by Harley Hahn who is one of the most enjoyable technical writers I've come across.

Biff is a program named after a dog of the same moniker. Biff belonged to a then-soon-to-be grad student, Heidi Stettner, who was working towards her grad degree in computer science at Berkeley. Since biff, the dog, was a bit of a favorite around the place, another grad student, John K. Foderero, decided to write a program in honor of the beloved pooch and came up with the idea of a program to let you know that mail had arrived. And the rest is history... If you're interested in more of the details, as well as a photo of Heidi and Biff, check out Harley Hahn's excellent book and go to pages 205 - 206. And now you know the rest of the story...

Well, now that we now know about where biff came from, the xbiff program, as I mentioned above, is a fairly humble looking program that displays an icon of a mailbox. When mail has arrived, the icon changes so that the flag is now raised. It managed to leave a bit of room for improvement.

Which is why you want to use XMailbox. XMailbox is a program written by Dimitrios P. Bouras (dimitri@ee.ubc.ca) and William K. W. Cheung (wcheung@ee.ubc.ca). It also simply lets you know that new mail has arrived, but in a much more elegant fashion. It uses color xpm (X Pixmap) icons, and has the capacity to easily use animation as well as sound if you have a Linux supported sound card. You get to choose the animation; you get to choose the sound file that's played.

Very cool.

So, let's see what you need to do to get this set up. The file you'll need to edit is the resource, or app-default, file. Since you've copied it to the app-default directory, you can either change directory to it, or else just go ahead and edit it by entering:

    	chmod 644 /usr/X11R6/lib/X11/app-defaults/XMailbox
    	vi /usr/X11R6/lib/X11/app-defaults/XMailbox

presuming that you were using the VI editor. So what was that chmod stuff... in brief, every file has a set of permissions. Without going into great detail, setting the permissions to "644" lets the owner of the file (that's you) both read and write to the file, while everyone else only gets to read it. Sometimes, the permissions are set to read-only for everyone. While this is not a bad idea, you won't be able to edit the file without first changing the permissions. You can also change the permissions back to read-only once you're done editing by issuing the above command and changing the "644" to "444".

Anyway, let's configure.

When you load up the XMailbox file, you should see something like the following:

    !--------------------
    ! XMailbox defaults
    !--------------------
    xmailbox*geometry:              +5+205
    xmailbox*volume:                65
    xmailbox*update:                30
    xmailbox*onceOnly:              true
    xmailbox*mailNumOfXpmFile:      2
    xmailbox*mailAnimUpdate:        500
    xmailbox*mailAnimOnce:          false
    xmailbox*mailapp:               xfmail
    xmailbox*mailSndFile:           /usr/local/sound/mailcall.au
    xmailbox*nomailXpmFile:         /usr/X11/include/X11/pixmaps/xnomail.xpm
    xmailbox*mailXpmFile:           /usr/X11/include/X11/pixmaps/xmail.xpm

Since this is pretty short, I'll go line by line. The first line (geometry) allows you to set the location of the icon. I won't go into a long discussion of how geometry works, since that was in last month's Gazette. As a reminder, it's always the horizontal placement followed by the vertical placement. The entry "+5+205" places the icon 5 pixels from the left side of the screen and 205 pixels from the top.

The volume entry is just that -- it can range from 0% - 100% and defaults to 33%. The next line (update) indicates how often in seconds to check for new mail. In this case, it checks it every 30 seconds. The onlyOnce field specifies that the bell or sound file is played only once upon receipt of new mail, and will not play again until you've checked your mail, and there has been a "no-mail" period. The next couple lines let you set up animation, which is very cool. So, let's do that.

If you read the manual page, all of this is described quite well. Basically, you can either create a series of pixmap images for animation, or else you can take the easy way out and use the built-in default images. I used the basic icons that came with the distribution and tinkered around with them a bit using the pixmap program. If you want to simply use the default images, at least to start with, then do the following:

1. Set the NumOfXpmFile to 2 (to use the two built-in icons)
2. Set the AnimUpdate entry to a value between 500 and 1000. This is the number of milliseconds delay between showing different icons. 500 is pretty rapid, while 1000 is pretty slow. Try 500 - 700 and see what you like.
3. Set the mailAnimOnce to false, to turn on the animation upon arrival of new mail.

So that's it! If you want to create your own set of animation icons, it's pretty easy to do. I'll let you read the manual page because in this case, the man page is quite helpful and has a very easy to understand set of instructions as to how to create a custom animation sequence. Just fire up the manual page and go to the section entitled ANIMATION.

The next entry (mailapp) indicates which mail client you want to use to read your mail. You see, not only do you get motion and sound with this little program, but when mail does come in, you have simply to click on the xmailbox icon to fire up your mail client, which in this case I've set to xfmail. Very handy... Want to use something else...? just enter whatever client you have in mind and you're all set.

The mailSndFile entry specifies the sound file to play when mail comes in. So you went to Sunsite's Multimedia (ftp://sunsite.unc.edu/pub/multimedia/sun-sounds/) directory and got a copy of the Hallelujah Chorus...? Well, great! Rejoice when there's mail! Just type in the location of the sound file. Now, it goes without saying that without a sound card, this isn't likely to do you much good. So, what do you need to get sound...? Well, I'm no multimedia guru, so looking at the manual page it seems that:

> It can also optionally play a sound through the SUN workstation's internal speaker or a PC equipped with a soundcard running Linux. The NCD audio server, the rplay sound package, the standard SUN audio driver, and Linux's Sun-compatible audio driver are supported.

Now, I've got a SoundBlaster 16 card. I compiled in sound support into my kernel and now I get sound. I'm a simple kinda guy and this works. Don't ask me how to get sound out of anything else because I probably don't have a clue! :-) If you've got a sound card, and you have a kernel that has sound support compiled in (see the first edition of the LG for info on compiling kernels and such) you should be able to do a simple

    	cat /usr/local/sound/hallelujah.au > /dev/audio

or something like this and get sound out. That's the extent of my multimedia knowledge. If it works for you, rejoice!

Anyway, put the full path name in for the sound file you want to play. If you don't put an entry in here, xmailbox will simply use the PC beeper. Here's a little trick you might try...

XMailbox comes with a couple .au files (dingdong.au and ugotmail.au). These are kinda short little clips. What I found works well is simply to create a little larger sound file by using cat to concatenate two files together so they play back to back. In this case, you could simply enter:

    	cat dingdong.au ugotmail.au > mailcall.au

This creates a sound file called "mailcall.au" which is simply the dingdong.au (doorbell) file followed by an announcer who loquaciously proclaims "You've got mail!!". So try it! Be creative! I used a sound file called bigben.au from sunsite and cat'ed it together with ugotmail.au and now, whenever mail arrives, Big Ben sounds forth and that same used-car-salesman-announcer quips, "You've got mail!!". Getting tired of the same sound file...? Simply edit the file to play a new one. Easy!

Almost done! The last two entries indicate the xpm icons to use for no new mail, and new mail respectively. There are, apparently, internal icons that xmailbox defaults to if these are not set. If you want to make custom icons, here's the place to let it know. Also, you should know that if you want animation, and want to use the internal icons, you need to leave the mailXpm entry blank. The reason for this is explained in the manual page:

> Note: If you do not specify mailXpmFile but set a value other than 1 to mailNumOfXpmFile, xmailbox will toggle between the internal "mail" and "nomail" icons.

Well, that should do it! You should be all set. Tinker around with the settings until you get things just where you want them: change the location of the icon, the sound file played, the volume, the type of animation, the xpm icons you want to use, the mail client, and so forth. One last word, since some of you may be wondering...

You might ask why this would be useful to someone who's not connected to a network. Good question, since this is what the program was initially designed for. Well, the first is simply that it's kinda fun. Once you've POP'd your mail and fire up X, you're greeted by that same guy announcing the arrival of mail. There's a colorful little icon of a mailbox opening and closing, and when you click on the icon, your mail client fires up. It's kinda cool.

The other, more practical application, has to do with how you set your SLIP, CSLIP, or PPP connection up, presuming you have a dial up connection. If this is the case, you might well have a program or shell script set up that automatically checks your mail on the mail server every N minutes, and then POP's it to your machine if something new arrives. If you dial up and maintain a connection for more than just a few minutes, this lets you know that mail arrived on the mail server, your program has picked it up and transferred it to your mail spool, and now it's ready to read.

Setting something like this up is actually a LOT easier than it would first appear. Also, as we'll see in the next section on XF-Mail configuration, XF-Mail can be configured to automatically check and retrieve your mail at regular intervals. I've written a short shell script that does something similar to this, using the little program popclient:

    #!/bin/sh
    #
    # Program:	mailcheck
    #
    # Author:	John M. Fisk
    #
    # Description:	a quick and dirty background mail checker that periodically
    #		attempts to POP mail from the server while a PPP connection
    #		is up.
    #
    #############################################################################
    # First, the variable declarations
    USERNAME=
    PASSWORD=
    MAILBOX=/var/spool/mail/root
    MAILLOG=/var/adm/popclient.log
    POPSERVER=
    CHECK_INTERVAL=15m
    #############################################################################
    #
    # Check for presence of ppp0 PID file, if it's there and the connection
    # is up, retrieve the mail.
    while [ ! -e "/var/run/ppp0.pid" ]
    do
            #first, pause for a 15 minute interval
    	sleep $CHECK_INTERVAL

    	#now, POP mail to /var/spool/mail/root; logfile is in /var/adm.  Add the
    	# -k option to keep mail on the server
    	popclient -3 -v -u $USERNAME -p $PASSWORD -o $MAILBOX $POPSERVER >& $MAILLOG

    	#proclaim success if there's new mail
    	if [ "$?" = "0" ]; then
    		echo "Hey!  There's new mail...!"
    	fi
    done
    exit 0

I simply start this program up once a connection has been made by running this little shell script in the background:

    	mailcheck &

and it just sorts hangs around and periodically checks with the mail server for any new mail. Just fill in the blanks for username, password, and the DNS name of your mail server and you should be all set. You can obvious change the interval as well. Oh, and don't forget to change the MAILBOX setting to whatever your mail spool file is called, otherwise all mail will end up going to root! Since I'll freely admit that I spend most of my time as root, this isn't a problem, but if your login name is something like "bigcheese", then your mail spool file would be /var/spool/mail/bigcheese.

Anyway, give it a whirl. And have fun!

And now, it's on to XF-Mail!

First, you might be wondering to yourself.. "So just what is this XF-Mail program...". Glad you asked.

XF-Mail was written by a couple of guys by the name of Gennady B. Sorokopud <gena@NetVision.net.il> and Ugen J. S. Antsilevich <ugen@NetVision.net.il>. XF-Mail is an X Window SMTP, POP, and MIME compliant mail client that uses the XForm libraries created by those X gurus T.C. Zhao and Mark Overmars. In their own words, XF-Mail is:

              XF-Mail - XForms based mail reader for
                      X-Windows system

                 Release 0.3-Alpha Patchelevel 0

    Copyright (c) 1995
      Gennady B. Sorokopud (gena@NetVision.net.il) &
       Ugen J. S. Antsilevich (ugen@NetVision.net.il)

     See Copyright file included in the distribution

                       OVERVIEW.

    XF-Mail is X-Windows application for receiving electronic
    mail. It was created using XForms library toolkit by T.C. Zhao
    and Mark Overmars.

    It's partially compatible with  MH  style  mail-
    boxes but it does not require any mh tools to be installed
    on the system. You can read most of your MH folders and messages
    with XF-Mail.

    XF-Mail has very friendly user interface and it's extremely easy
    in use. It implements most of the mail functionality in one program
    and it does not require any additional tools.

Guess that pretty much sums it up! It really does have a very friendly user interface and is quite easy to use. Additionally, while it can be set up to use sendmail, it can happily live without.

Cool...eh!? Sendmail-less mail!!

One of the greatest things about the XF-Mail program is that all of the user-configurable options are easily set using the GUI configuration menu. This is a HUGE plus, as the options in the Configuration Menu give you a great deal of power over how the program functions and appears. It is just too cool! So, let's begin.

To configure XF-Mail, you simply need to start it up. Fire up X, and in one of the xterms enter:

    	xfmail &

This will fire up the program. Now, depending on your hardware and software set up this may take a few seconds. If you've gotten the sources from the author's web site you may have seen the screen shots of this program, so I won't include them here. If you haven't seen them, or don't have the sources set up, you owe it to yourself to check out their site: it's at Burka.NetVision.net.il and is very nicely done. It'll give you all kinds of fun and useful info about the program as well as direct you to the Web site for the XForm libs. Check these out!

Anyway, once you've gotten this program up and running you're ready to start configuring it. Parenthetically, it's not a bad idea to use an xterm to start any program up that you've just installed. For example, you could install a program and simply add it to a button bar or menu and call it from there. The problem with this is that often, when a program first starts up, if there are any error messages these are printed to screen. If you try to start a program up from a menu or button bar you won't necessarily see these messages and then be left wondering why you program won't start. If you test drive your newly installed programs using command line in an xterm, you should see what's happening. Also, occasionally there will be a segmentation fault and the program simply won't run. Period. You'll find this out too, if you're using an xterm. Then, you can add your program to GoodStuff or the FVWM menu listing and it's all set.

If you've gotten this far, however, you shouldn't see any error messages, and the program should be up and running. Rejoice!

Now, let's see what you'll need to actually get this thing working.

There are, fortunately, only a couple things you'll need to know in order to get XF-Mail up and running. These are:

- the DNS name or the IP address of the Mail Host from which you'll get your mail.
- the port number or service of your Mail Host - e.g., "pop3" if your Mail Host uses POP3 protocol.
- your username
- your password
- the DNS or IP address of your SMTP gateway or host.

That's pretty much it, as far as essential information goes. The Mail Host information is simply the host from which you'll pop your mail. The SMTP gateway is simply the mail gateway to which you'll send your mail. These are often the same host. For example, I get my mail from the Mail Host ctrvax.vanderbilt.edu (at Vanderbilt University). The mail server there uses POP3 protocol and I use the same address for outgoing mail using SMTP.

If you have any questions about this information, do yourself a HUGE favor and simply go and ask or call the folks who are responsible for your mail service. If you're at a university or large organization, there's often a help center or desk that can usually provide you with all the information you'll need. If you have mail service through a local ISP, they should be able to help you as well. Essentially, you'll just need the address (either Domain Name Service - DNS - or Internet Protocol - IP) of the Mail Host and the SMTP gateway. Since the mail server at Vanderbilt uses the POP3 (Post Office Protocol) protocol, I use that for the "port number".

Once you have this information, and have made sure that it's correct, you're golden! Now, let's get things going. Again, if everything was installed correctly, you should see something like the screen images on the XF-Mail Web page. To start configuration, go to the menu bar and hit the Misc menu and choose Config. You will be presented with a Configuration Dialog box that let's you set a variety of things. Let's first get the essentials out of the way.

To get mail into and out of your box through the mail host and your smtp gateway, you'll need to enter this information. From the Configuration menu choose POP which presents you with the POP Configuration menu box. Here, enter the mail host (your POP server from which you'll get your mail) in the box entitled Host. To the right of this, labelled Port, enter the port number or service. If your mail host uses the POP3 protocol, simply leave this as "pop3". If it's something else, you should check with the postmaster at the mail service and make sure you know which service/port they use. Below this, enter your username and your password. Also, check the option buttons if you wish to leave your mail on the mail server and if you want XF-Mail to store your password in the configuration file so that you won't be prompted for it each time you attempt to get mail.

A Couple Caveats!!

This, and the section on setting up the SMTP gateway information, are the most critical aspects of configuring your mail client. If you enter an incorrect address for the mail host or the port number, you won't be able to get mail as it will fail to find the correct mail host. Second, keep in mind that if you store your password, while this is very convenient, it is also VERY INSECURE as the password is stored in your ~/.xfmailrc file unencrypted. If you're the only one using your system, this is no problem, but if others have access to your system, be aware that your password is quite vulnerable. Finally, as a precaution, you probably should initially NOT delete your mail from the pop server. The reason for this is simply that if anything goes wrong, you'll at least have a copy of your mail on the mail server and should be able to retrieve it later. If something does go wrong and your mail is deleted from the server, it's GHANDI, man, GHANDI!

Ok, did I scare you...? doubt it. Just be prudent and use your common sense. Keep in mind that this program is still beta and while it has undergone a lot of testing and debugging so far, it is likely to have a few "undocumented features" left. Play it safe.

Lastly, let's set up the outgoing mail. Hit the Done button after you've entered all the info for the POP Configuration, and then hit the Send button, which will allow you to set up the SMTP information. In the first box entitled SMTP Host enter the DNS or IP address of your SMTP gateway and then the smtp port number in the box to the right of this. Now, the default for the port is "smtp" which works fine for me. I can't tell you if this will work for you - you'll need to ask the friendly postmaster at the mail host you're using for this info.

You can also fill in the location of the sendmail program if you've installed it on your system. You see, you can use sendmail as the mail agent for outgoing mail if you'd like, but you don't have to. XF-Mail has built-in support for SMTP and will happily truck your mail off to the SMTP gateway all by itself. Truly groovy...! Sendmail-less mail!!

To have XF-Mail use the built-in smtp support, click on the option button entitled use SMTP. A couple other suggestions and we're almost done. First, may I recommend that you also check the Save to "sent mail" and the Offline send options. The first will save a copy of all of your outgoing mail. Why would you want to do that...? Good question.

Suppose that there's a tiny little problem with your set up. You entered the IP address of the SMTP gateway as 203.54.213.08 and it really was 203.45.213.08... you got a bit dyslexic and made a typo... coulda happened to anyone. No problem, man. Well, except that your mail was sent off into the vast oblivion since the address was wrong. Your 135 page thesis, that your advisor who's currently at a "dig" in India wanted to see today, has now gone sailing off into the vastness of nothingness...

Oops...

Keep a copy so that you can resend if need be. Also, setting the Offline send option allows you to compose mail and set it up to be sent out -- even when you're not connected! Hey, man, you can queue your mail!! Do have ANY idea how many messages are posted daily to the various comp.mail.xxxx groups asking about how to get this done under sendmail, smail, or sendmail+IDA?? You've just done it by a click of a button. Powerful, man... feel the power! :-)

Ok, I know... I know... focus! We're almost done and ready to play. Hit the Done button and when you're back at the Configuration dialog box, hit the Save button. There's just one more thing that you probably should do... Hit the Misc button in the Configuration dialog box. This presents you with a list of various options. At the bottom, click on the Open log on startup option. What this will do is log all messages to a "Log Window" which will allow you to see what's happening. Keep an eye on this, especially the first couple times you either try to retrieve mail from the server or send mail to the SMTP gateway. Now, save your changes, and hit Save once again and you're done! Let's play!!

We'll look at a couple more things that you'll probably want to configure but let's first try this baby out! You'll need to get your SLIP, CSLIP, or PPP connection up and running first. Once it's up, fire up XF-Mail and then go to the Misc menu and choose Retrieve mail. Keep an eye on the action that's going on in the "Log Window". This should let you know if everything's set up correctly and XF-Mail was able to make connection with your mail host.

No mail... no problem, man... send yourself some!

Up at the top of the screen, click on the "pen" icon on the toolbar. The astute will notice that moving the cursor onto the icon causes a short description to be printed along the status line at the bottom of the window. Very handy. Now, click on that and you'll be presented with an edit window. Now, it's just a matter of filling in the blanks. At the top of the window you can enter the information for the "From" "Subject", and "To" fields. Now, type in a short test message and when you're done, hit the "letter" icon on the top left. If you get an error message about needing to specify at least one recipient, don't forget to hit the ENTER key after you've filled in the name of the recipient. If this was done correctly, you'll see the entry move to the box below. You could also use your shiny new Address Book. Hit the Address button and the address book fires up. Enter the name on the entry line and hit the Save button. Click on the "To" button and hit RETURN. Viola!.. it's done!!

Well, almost. Remember that we've set up offline send. To get the message out you'll need to hit the Send menu item and then click on the Send all item. If you have an external modem, you should see the lights lighting up and the log window should let you know the progress of things. If all went well, you should now have new mail! Go back, retrieve it to see if things are working OK, and rejoice! You're now connected!

Now, let's do just a couple other things before finishing up here. First, there are several things that you'll want to set up. You don't have to, but it'll make using XF-Mail a lot easier and more fun.

The things you'll probably want to set up at thing point are:

- an external editor
- an external message viewer
- configure the "From:" field for outgoing messages
- decide whether you want to additionally retrieve mail from a local mail spool
- edit your .signature file if you haven't already

You'll want to set up an external editor and viewer because the built-in editor and viewer are admittedly quite limited and can handle messages only < 30 lines. That's not much. Thing is, you can set up any X editor as your viewer/editor. Keep in mind, however, that you probably don't want to use something rather, ...uhh... huge, like Xemacs. Granted, this is a great editor, but you'll be able to do three week's worth of wash AND iron all your socks before it'll finish loading. Think small! :-) I initally used xedit which is admittedly a bit... spartan...? but at least it loaded up fast. I'm currently using aXe which loads up quite nicely but is a LOT more functional.

So, to set these things up, call the Configuration menu up once again:

- use the View menu to set up the external viewer. Just enter the command necessary to fire up your editor/viewer -- just as you would in an xterm. For example, I'm using the xedit program as my external viewer still. I simply enter in `/usr/X11R6/bin/xedit` in the box and then set the number of lines to whatever I want, such as 75.

- use the Edit menu to set up the external editor. Once again, enter the command line necessary to load up your chosen editor. For example, to use the aXe editor, I've entered in `/usr/local/bin/axe -noserver -geometry 74x40+55+0` and set the number of lines to 72. Tinker around with this to get the look/feel that you want.

- use the Misc menu to set up the "From:" field. You'll need to do this in order to correctly set this for outgoing mail. Remember that most folks who want to write you back simply hit the "reply" button and so your "From:" field is important in order to get the correct address. Simply enter in your email address on the From field line.

- use the Receive menu to optinally retrieve mail from a local spool. Just enter in the directory where your mail spool exists. For example, since I spend most of my time as root, my mail spool directory is /var/spool/mail/root. The reason that I have this set up for BOTH spool and POP retrieval is because I often use the program popclient to retrieve my mail when I'm not running X or when I'm using a background shell program to periodically check my mail. I have popclient set up to deposit mail into my local mail spool directory and so XF-Mail will dutifully pick it up from there as well as from the POP server.

After making these changes, don't forget to hit the Save button to save them. Cool, eh?

To edit your .signature file hit the Misc menu once again and click on the Signature item. There's an easy to use signature editor that pops up and let's you create you .signature file and save it. I found that you cannot use the entire window for your .signature file. If you do, you'll get an error message about the signature being too large. You'll have to keep it to about 8 to 10 lines or so. Play with it and see for yourself.

Well, by now you should be pretty much all set! Keep in mind that there are LOTS of nifty configuration options and features left to play with. Let me recommend to you that you skim through the online help system. Just choose Help from the menu bar and choose the Contents item. It'll display a help window with all kinds of useful information describing what you can do with this great client.

The other place to play and tinker is in the Configuration menus. It's time to explore! Using the online help and the GUI configuration facility you can do all kinds of fun things such as:

- set up printing (Misc)
- set up automatic logging (Misc)
- optionally save all addresses (Receive)
- sound the beep (and beep volume) when mail arrives (Receive)
- set up the fonts, foreground colors, and background colors of all sorts of things (Appearance)
- set up the use of picon which are little black and white xbm (X Bitmap) images of you to include with your mail (Faces)
- set up MIME types for use with XF-Mail (MIME)
- set the sort and ordering criteria for your messages and folders (Display)
- set up periodic background mail retrieval, mail send, and trash folder emptying (Timers)
- set up the "reply quote" and "forwarding quote" (Reply/Forward)

Other fun things that you can do include:

- message view
- message edit
- message delete
- message forwarding
- message bounce
- message mark/unmark
- message print
- apply rules to incoming messages
- move messages between various folders
- uudecode message
- save message to file
- append message to file
- folder create
- folder rename
- folder delete
- scan folders ** this is a VERY useful feature that lets you search one or many folders for a text string. It's acceptably fast and marks the messages that contain the string you're looking for. You can optionally search for the string in the messages or headers and specify a case-sensitive search.
- set up your address book

Basically, using the menu options allows you to do all sorts of useful message and folder manipulation. Also, click on the Right mouse button in the messages listing. Shaa..Zzamm!... a pop-up, handy-dandy, do-it-all, context sensitive menu with all kinds of goodies at your fingertips.

Mucho cool...!

Well, I'm sure that I've left out something important, but hey... that's what the online help is for. If you do all this that I've written about, you should be well on your way to enjoying an easy email connection. Keep in mind that it's possible to easily join the XF-Mail mailing list simply by choosing the Help menu item and clicking on the Subscribe to mailing list option. If you like this client, go ahead and drop the authors a note of thanks!

Go ahead... their addresses are:
Gennady B. Sorokopud <gena@NetVision.net.il>
Ugen J. S. Antsilevich <ugen@NetVision.net.il>

Enjoy!

## FVWM: An Introduction to Styles!

Well, since the draft for this month's LG has already topped 110K, I'll admittedly keep this a bit brief. What I'd like to do is introduce the topic this month, give you some ideas about what you can do with Styles, and then let you take a look at a few examples of how things might look. Next month, I'll pick up where I left off.

Hmmm, let's see where we are right now. So far, we've covered:

- Introducing FVWM!
- FVWM: Getting stuff going...
- FVWM: Adding programs to the Popup Menus
- FVWM: Managing the Virtual Desktop
- FVWM: Quick Tips!

in the last edition of the LG. We've seen where the config files are, a couple means to launch programs, adding program items to the popup menus, some useful ways to modify and use the virtual desktop feature, and then thrown in some quick tips for good measure.

Now, let's take a brief look at the use of Styles.

The basic idea behind Styles is that it allows you to alter the way that FVWM presents and interacts with programs. Again, keep in mind that FVWM is a window manager. That means, as the name implies, that it manages the way that applications are presented and their windows are manipulated. So what does this mean in practical terms?

It means, for example, that you can configure:

- whether an application window has a titlebar
- whether an application window is decorated with borders and how thick or thin those borders are
- whether an application window has resize handles at the corner that allow you to resize the window easily
- whether an application window is added to the Window List
- whether an application has an icon and, if so, what icon file to use
- whether an application window uses the default color scheme or a custom scheme that you can designate
- whether an application window is "sticky"; that is, whether it will follow you from screen to screen
- whether an application window is always "on top" and must be explicitly "lowered"
- whether an application window is included in the list of windows that can be "circulated up"
- whether an application starts iconified or not
- what "desktop" an application starts on

do you see the pattern...? Using styles does not directly affect how an application might run -- this is done using command line options and setting application resources -- it does affect how the application is presented and how you can interact with it using fvwm.

Styles let you set characteristics such as window decorations (titlebars, borders, resize handles), colors, icons, and characteristics such as whether the window is sticky or stays on top of all other windows.

This is actually pretty cool and let's you customize to a remarkable extent. You see, the beauty of this is that you can customize for every application that you use, as well as set defaults that all windows will fall back on.

Curious about what you can do with this stuff...? or what it might look like? Take a look at:

- Sample styles

This is a series of screen dumps that will give you some idea about what the various basic style options might look like.

So, let's take a look at a sample Styles entry:

    # DEFAULT SETTINGS
    #
    #Style "*" BorderWidth 6, HandleWidth 6, Color Black/#7dffd7,Icon unknown1.xpm
    Style "*" BorderWidth 6, HandleWidth 6, Color White/#8a4510,Icon unknown1.xpm

    # SPECIFIC RESOURCES
    #
    Style "Fvwm*"      NoTitle, Sticky, WindowListSkip
    Style "Fvwm Pager" Sticky
    Style "FvwmBanner" StaysOnTop
    #
    # The orginal GoodStuff STYLES; I'm going to add Handles so that it
    # can be moved.
    #
    # Style "GoodStuff"  NoTitle, NoHandles, WindowListSkip, BorderWidth 0
    Style "GoodStuff"  NoTitle, Handles, Icon toolbox.xpm
    Style "QuikBar"    NoTitle, Handles, Sticky
    Style "xclock"     NoTitle, WindowListSkip
    Style "xload"	   NoTitle,NoBorder,NoHandles
    Style "xmailbox"   NoTitle, WindowListSkip
    Style "aXe"	   NoTitle
    Style "xcalendar"  NoTitle
    Style "*postit"	   NoTitle
    Style "xgal"	   NoTitle
    Style "fly*"       NoTitle
    Style "xbiff"      NoTitle, WindowListSkip
    Style "Maker"      StartsOnDesk 1
    Style "signal"     StartsOnDesk 3
    Style "rxvt"       Icon  term.xpm
    #Style "xterm"      Icon xterm.xpm, Color black/grey
    Style "xterm"      Icon xterm.xpm
    Style "Appointment" Icon datebook.xpm
    Style "xcalc"      Icon xcalc.xpm
    Style "xbiff"      Icon mail1.xpm
    Style "xmh"        Icon mail1.xpm, StartsOnDesk 2
    Style "xman"	   Icon xman.xpm, NoTitle
    Style "xvgr"	   Icon graphs.xpm
    Style "matlab"	   Icon math4.xpm
    Style "xmag"	   Icon mag_glass.xpm
    Style "xgraph"	   Icon graphs.xpm

You can see that the basic format is simply:

    Style "program_name"	options (can be a list separated by commas)

Pretty easy, eh?

The basic idea is to set up a default for all windows first. This is the line:

    Style "*" BorderWidth 6, HandleWidth 6, Color White/#8a4510,Icon unknown1.xpm

It puts borders and handles on all windows, sets the borderwidth to 6 pixels, sets the foreground color (the "text") to white and the background color to #8a4510 (which, for those of you who can't immediately visualize what the color #8a4510 might look like... it's Saddle Brown :-), and uses the icon "unknown1.xpm" as the default icon when there is no built-in icon and there's no specific icon assigned it.

Now, you can specify a style for each application. Keep in mind that you can specify styles for groups of applications that share similar names. For example, if you want all xclock-type applications to share a similar style pattern, you could specify a style such as:

    	Style "*clock"	NoTitle, NoBorder, NoHandles, Sticky, WindowListSkip

Then, any applcations whose name ended in "clock" would be set to this style. So, if you had xclock, oclock, xdaliclock, sunclock, etc., they would all share this same style: they would not be decorated with titlebars, borders, or handles; they would be "sticky" and follow you around from desktop to desktop; and they would not show up in the WindowList.

Two more quickie points and then I'll let you experiment on your own.

The most common styles entries are:

Icon, NoIcon
  specifies which xpm or xbm icon to use for an application.

Title, NoTitle
  specifies that an application window should be decorated with a titlebar.

Border, NoBorder
  specifies that an application window should have decorative borders as part of the window. You'll likely include this for most app windows, but would not want it, for example, for clocks.

Handles, NoHandles
  specifies that the application window border include resize handles at each of the four corners. These are generally set up so that clicking and dragging on one of these corners allows you to resize the window.

BorderWidth, HandleWidth
  specifies the size, in pixels, of the application border. If you use only Border (and not Handles) then you specify the borderwidth using the BorderWidth option. If you include Handles, then you set the borderwidth using the HandleWidth option.

Sticky, Slippery
  specifies whether an application "sticks to the screen". That is, whether it follows you from screen to screen. You'll most often use the sticky option for menu bars, clocks, and such that you want on each desktop.

StaysOnTop, StaysPut
  specifies that an application window will "stay on top" of other windows and must be explicitly lowered.

These are probably the options that you'll use most frequently. Next month, I'll attempt to go into a bit more detail about these and others. One final point: remember that the list of Styles is " OR'd ". What this means, in practical terms, is that if you don't specify a style for a particular application, then it'll simply use the defaults. If you do specify a style, then the style options are combined. If there are conflicts (you've specified a default Icon of unknown1.xpm, but explicitly set an app's Icon to, say, toolbox.xpm) then the last style specified is the one that's used.

Again, using the example above, you'll see that the default Icon is unknown1.xpm. However, if an application is specificially set to use a particular icon, then the last style specified takes precedence. Now, you understand why you need to specify the default style first and then override these options by entering in the specifics later.

Very cool!

Anyway, I'll be writing up more about this in the next edition of the LG.

Have Fun!

## Colophon

Well, congratulations. You've made it. This is the end my friend.

Thanks for hanging in there. I hope you enjoyed all of this. I had a lot of fun writing it. Once again, I want to thank all of you that have taken the time to drop a quick note of encouragement or sent your suggestions, ideas, tips, or corrections. Each edition of the LG takes on the order of 20 to 30 hours of writing to complete, not including the "tinker-time" and the time spent reading and answering mail. I truly appreciate the corrections and criticisms.

I'm not even GOING to tell you what to expect next month... :-)

It'll look a lot like what I promised to write about this month. I'd like to continue looking at what can be done with the FVWM window manager. It really is a great program and there's so much that can be done with it. Also, I'm interested in doing a section in some month's gazette about games.

I'll quickly admit that I'm a lousy game player and haven't even set up the stock Berkeley stuff... I really wasn't too enamoured by "Hunt the Wumpus..." and such. However, I have started messing around with a few new games such as fly8, zapem, and koules. For serious gamers these probably aren't the heart-pounding variety that really make you want to crush everything in your path. Still they're a fun diversion.

Anyway, I'd be interested in hearing about what sort of games there are available and how they're liked. I honestly haven't an interest in DoomII. Yes, I know that it's the pinnacle of adrenalin-pumping toxic-mega-death-type game... I have this thing about running around pistols, shotguns, bazookas, and mega-nuclear-death-blasters in an attempt to blow EVERYTHING's head off and splatter dismemebered parts all over the screen. I'm not sure that this promotes a sense of peace or community :-)

Still, I'd be interested in finding out who is playing what.

Second, I know I spent a lot of time and space writing up on XF-Mail. If you're not too keen on the idea of setting up sendmail, then this is definitely an app that you should try out.

Also, I totally skimmed over some of the cool stuff that comes with XForms. If you get the linux distribution and set it up, take a look at the stuff in the DEMO directory. There are some 50 small and large demo programs that illustrate all the things that you can do with XForms. Also, whether you realized it or not, when you installed the xform libs, you also probably installed the GUI interface builder. If you've had an interest in trying your hand at X Window programming, but needed a more modest place to start, check this out. The program is called fdesign and it's in the DESIGN subdir. Finally, at the XForm homepage, there is a 200+ page document available that describes how to program using the xform libraries. I haven't had the time to play with this yet, but hope to have a chance between semesters to do so.

Finally, let me commend to you several web pages that might be of interest:

Here are several web sites dedicated to information on FVWM, including the official FVWM home site:

  The FVWM Home Page (http://www.cs.hmc.edu/~tkelly/docs/proj/fvwm.html) by T. Kelly.
  FVWM Info (http://xenon.chem.uidaho.edu/~fvwm/) by Todd Postma. Lots of docs and links.

For those of you who might be interested in other window managers, there's a web page dedicated to the Generic Window Manager that's located at:

  The GWM HomePage (http://zenon.inria.fr/koala/gwm/)

Herng-Jeng Jou has an absolute killer homepage that is a must-have for anyone's Linux bookmarks. It's an annotated listing of freely available scientific software packages. At almost 85K, it is a HUGE service.

And before you quickly dismiss it because you don't do research using your Linux box, let me list a few of the things he's written up:

- Commercial Scientific packages
- Matlab-like packages
- Mathematics and Statistics
- Signal, Communication, Image, and Data processing
- Finite or Boundary Element
- Numerical Analysis
- Graphing and Visualization
- Scientific Data Plotting packages
- Scientific Data Plotting Libraries
- General Purpose Graphic Libraries
- Word Processing or Typesetting
- X-Window GUI builders

It is truly a tour de force and well worth the visit to HJ's page. You'll find it at:

  Some Free Scientific Software under Linux (http://lusk1.mines.edu/hjjou/linux_prg.html)

Finally, I just got a note a couple days ago from Jesper Pedersen, the author of the program Dotfile Generator. This is a Tcl/Tk based program that assists with the generation of configuration files. This program looks pretty promising and what might be of interest to many of you is that there's a module that assists with FVWM Configuration.

Now, I honestly haven't had time to do more than check out the web page and ftp the sources. Still, there are some gorgeous screen dumps of the program and a lot of information about getting it, installing it, and what it's currently capable of doing. The web page will give you all the info about what you'll need to do to test drive this interesting program.

Check out the web page at:

  http://www.imada.ou.dk:/~blackie/dotfile

NOTICE:... I just got a note from Jesper saying that the person who had been writing the module for BASH configuration had a major hard drive crash and lost all the work that had been put into it. They are now asking for anyone who might be willing to help write this module to please contact Jesper at the above URL (you'll find his email address there). Thanks!

Well, it's been fun... Keep an eye on comp.os.linux.announce in about 2 weeks, I'll be trying to get out full HTML source + GIF's + miscellaneous files for all of the Linux Gazette to date. I'm NOT going to guarentee that this'll get done in exactly two weeks as things have gotten hectic here with exams and assignments... This month's LG got done because I had a four day "Fall Break" in which I wrote all day :-) Thank the admin at MTSU (and my wife for patiently bearing with all of this...)

Also, I desperately need to do some maintenance to the Linux ToyBox and Linux Library pages. Thanks once again to all of you who've sent suggestions for inclusion in these pages. I'll see what I can do now that this month's LG is written.

See ya next month!

John

#### Got any great ideas for improvements! Send your comments, criticisms, suggestions, and ideas.

Back up to Linux HomeBoy WebPage
This page written and maintained by: