old-www/LDP/LG/issue01to08/linux_gazette.oct.html

3354 lines
126 KiB
HTML

<HTML>
<HEAD>
<TITLE>Linux Gazette October, 1995</TITLE>
</HEAD>
<BODY>
<H1><IMG ALIGN=MIDDLE SRC="./gx/homeboy_icon.gif">Linux Gazette October, 1995
</H1>
<H2>A Publication of the Linux HomeBoy WebPage Series</H2>
<H4>&quot;The Linux Gazette...<I>making Linux just a little more fun...!</I>&quot;
</H4>
<H5>Copyright (c) 1995 John M. Fisk <I>fiskjm@ctrvax.vanderbilt.edu</I><BR><BR>
The LINUX GAZETTE is now a member of the LINUX DOCUMENTATION PROJECT.<BR>
For information regarding copying and distribution of this material see the
<A HREF="./copying.html">COPYING</A> document.<BR>
Linux Home Boy Pages logo created using <EM>David Koblas'</EM> excellent
program XPAINT 2.1.1 </H5>
<HR>
<H2><A NAME="toc">Table of Contents</A></H2>
<H3>Topics in this <EM></EM> issue include:</H3>
<UL>
<LI><A HREF="#mail">Salutations and the MailBag</A>
<LI><A HREF="#tips"><I>Lots</I> More 2 Cent Tips...</A>
<LI><A HREF="#trap">Useful Entrapment! (letter submitted by Nathan Hand)</A>
<LI><A HREF="#xfmail_install">In-depth Guide to XF-Mail and XMailbox
Installation</A>
<LI><A HREF="#xfmail_setup">Configuring XF-Mail and XMailbox</A>
<LI><A HREF="#fvwm_styles">FVWM: Introduction to Styles!</A>
<LI><A HREF="#colophon">Colophon</A>
</UL>
<HR>
<H3><IMG ALIGN=BOTTOM SRC="./gx/news.gif"><I>News Flash!</I>
<IMG ALIGN=BOTTOM SRC="./gx/news_mirror.gif"></H3>
<BLOCKQUOTE>
<P>
<H3><IMG ALIGN=BOTTOM SRC="./gx/info.gif">Linux Gazette joins Linux
Documentation Project!</H3>
Yup, it's true..! The Linux Gazette has now joined the other fine folks at
the <B>Linux Documentation Project</B>. 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 <I>really do</I> need to know what the copyright is on this
material, take a look at the COPYING document link above.
<P>
<H3><IMG ALIGN=BOTTOM SRC="./gx/info.gif">New Host: Red Hat Commercial Linux!</H3>
And speaking of accessibility... :-)
<P>
A HUGE round of thanks needs to be extended to the folks at
<A HREF="http://www.redhat.com">Red Hat Commercial Linux</A> 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 <B>Donnie Barnes, Marc Ewing, and Erik Troan</B> and the
rest of the kind folks at Red Hat Commercial Linux!
<P>
And a CONTINUED HUGE round of thanks needs to be extended to the gracious
folks at <A HREF="http://www.tenn.com">Tennessee CommerceNet</A> who very
kindly weathered the beating their server took for several days and who
STILL are willing to host these pages.
<P>
As a gentle reminder...
<P>
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.
<P>
Thanks!
<P>
<H3><IMG ALIGN=BOTTOM SRC="./gx/info.gif">Quick button to Linux Gazette Index</H3>
<P>
Well... in the ongoing effort to make things just a <I>little</I> 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.
<P>
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 &quot;LG INDEX&quot;. Hope this makes things easier!
<P>
Also, I've added a fourth button that simply hauls you back to the
&quot;Linux HomeBoy WebPage&quot;. The epicenter of all of this stuff...
<P>
<H3><IMG ALIGN=BOTTOM SRC="./gx/info.gif">And Comin' Soon... anonymous ftp!</H3>
And what's still cookin'...?
<P>
Well, I'm working on getting copies of the Linux Gazette ready for
<B>anonymous ftp access!</B> Yup, no more having to stay up past your
bedtime trying to get your hands on another edition of the 'ol Linux
Gazette...
<P>
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 &quot;final&quot; 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!
<P>
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
<B>comp.os.linux.announce</B> for details...
<P>
Thanks for being patient!
<P>
John
</BLOCKQUOTE>
<HR>
<H3>Welcome to the October edition of the <B>Linux Gazette !</B></H3>
<P>
Hmmm... these things seem to be getting <I>bigger</I>... :-)
<P>
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.
<P>
It's just <B>too way cool!</B>
<P>
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 &quot;supplement&quot; 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!
<P>
Again, I apologize for the size :-( thanks for being patient!
<P>
<B>So what's in store for this month?</B>
<P>
Well, there's all kinds of fun goodies to try out and tinker with. Don't let the
moniker &quot;Two Cent Tips&quot; 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!
<P>
Also, I decided to follow up last month's quick review of the great mail client
<B>XF-Mail</B> 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 <B>XMailbox</B>. 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...
<P>
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!
<P>
<HR>
<!--SECTION 1: MAIL -->
<!-- -->
<H2><A NAME="mail"><IMG ALIGN=MIDDLE SRC="../gx/mail.gif">Salutations and the
MailBag </A></H2>
<P>
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.
<P>
Again, I <I>really</I> 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.
<P>
Several folks wrote about the history of the <B>fvwm and twm</B> 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.
<P>
Have fun and thanks for the notes!
<P>
John
<P>
<IMG ALIGN=BOTTOM SRC="../gx/letter.gif"> <B>Ted Stern</B> wrote to set the record
straight regarding the heritage of the fvwm name:
<BLOCKQUOTE>
<P>
From: Ted Stern &lt;stern@amath.washington.edu&gt;<BR>
To: &lt;fisk@web.tenn.com&gt;<BR>
subject: where the f in fvwm comes from<BR><BR>
<P>
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.
<P>
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.
<P>
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.
<PRE>
ted stern (206) 685-9304 applied mathematics dept.
stern@amath.washington.edu box 352420
http://www.amath.washington.edu/~stern/ seattle, wa 98195-2420
</PRE>
</BLOCKQUOTE>
<P>
<IMG ALIGN=BOTTOM SRC="../gx/letter.gif"> <B>lawrence weeks</B> and <B>jurgen
botz</B> both get an &quot;a&quot; for correctly identifying the origin of the twm
name:
<BLOCKQUOTE>
<P>
<B>from lawrence weeks:</B>
<P>
date: fri, 29 sep 1995 16:34:14 cdt<BR>
from: lawrence weeks &lt;weeks@cig.mot.com&gt;<BR>
to: &lt;fisk@web.tenn.com&gt;<BR>
Subject: Linux Gazette<BR><BR>
Hi,<BR><BR>
<P>
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.
<P>
Larry
<P>
Lawrence Weeks "Audaces fortuna juvat." weeks@cig.mot.com
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>
<B>from Jurgen Botz:</B>
<P>
Date: Fri, 29 Sep 1995 17:14:45 CDT<BR>
From: Jurgen Botz &lt;jbotz@orixa.mtholyoke.edu&gt;<BR>
To: &lt;fisk@web.tenn.com&gt;<BR>
Subject: fvwm, twm, name trivia<BR><BR>
In the September _Gazette_ you write:<BR>
&gt; twm (which, BTW, stands for Tabbed Window Manager).<BR>
<P>
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...
</BLOCKQUOTE>
<P>
<I>[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 &quot;X Window System User's Guide&quot;
who wrote:</I>
<BLOCKQUOTE>
<P>
The X Consortium provides a window manager called twm. (twm originally stood
for &quot;Tom's window manager&quot; in honor of its developer, Tom LaStrange.
However, it has since been renamed to the &quot;tab window manager&quot;)
</BLOCKQUOTE>
<P>
<I>From page 7 of this great book by the folks at O'Reilly.</I> --John]
<P>
<IMG ALIGN=BOTTOM SRC="../gx/letter.gif"> <B>Marc Ewing</B>, arguably one of the guru-est
of the Linux gurus (and who, parenthetically, was the Carnegie Mellon University
grad who founded the <A HREF="http://www.redhat.com/">Red Hat Commercial Linux</A>
organization) offered this great idea:
<BLOCKQUOTE>
<P>
Date: Fri, 06 Oct 1995 13:48:19 CDT<BR>
From: Marc Ewing &lt;marc@redhat.com&gt;<BR>
To: &lt;fiskjm@ctrvax.Vanderbilt.Edu&gt;<BR>
Subject: Tip for Linux Gazette<BR><BR>
John-<BR><BR>
Here's a little bash function that's pretty useful:<BR><BR>
<PRE>
========================================================
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 }
========================================================
</PRE>
<P>
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.
<P>
-Marc
</BLOCKQUOTE>
<P>
<IMG ALIGN=BOTTOM SRC="../gx/letter.gif"><B>Jay Sigbrandt</B>, one of the many of you
that had a <I>bit</I> of trouble getting the most recent LG, wrote this very
helpful suggestion:
<BLOCKQUOTE>
Date: Thu, 28 Sep 1995 17:02:25 CDT<BR>
Sender: &lt;jay@elec.gla.ac.uk&gt;<BR>
From: J. Sigbrandt &lt;jay@elec.gla.ac.uk&gt;<BR>
To: &lt;fiskjm@ctrvax.Vanderbilt.Edu&gt;, <JAY@ELEC.GLA.AC.UK><BR>
Subject: Saving your copy of gazette<BR><BR>
Hi there,<BR><BR>
<P>
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 !!!
<P>
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.
<P>
The title of the software is URL_GET and its command line based
<P>
so you could get the software and try the following
<P>
url_get http://www.tenn.com/fiskhtml/linux_gazette.sep.html &gt;
linux_gazette.sep.html
<P>
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.
<P>
Good Eh ???
<P>
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.
<P>
The URL is:
<P>
<A HREF="http://uts.cc.utexas.edu/~zippy/url_get.html">
http://uts.cc.utexas.edu/~zippy/url_get.html</A>
<P>
(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)
<P>
Regards,<BR>
Jay<BR>
</BLOCKQUOTE>
<I>[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...!</I> --John]
<P>
<IMG ALIGN=BOTTOM SRC="../gx/letter.gif"> <B>John Punin</B>, author and maintainer of
that impressive HTML editor xhtml, wrote:
<BLOCKQUOTE>
<P>
Date: Wed, 04 Oct 1995 14:57:56 CDT<BR>
Sender: <PUNINJ@RPI.EDU><BR>
From: John Punin <PUNINJ@RPI.EDU><BR>
To: <FISK@WEB.TENN.COM><BR>
Subject: ASHE 1.1.2 for linux<BR><BR>
Hi John<BR><BR>
<P>
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
<P>
John Punin
<A HREF="ftp://ftp.cs.rpi.edu/pub/puninj/ASHE/contrib/bin/ASHE-1.1.2-linux/">
URL : ftp://ftp.cs.rpi.edu/pub/puninj/ASHE/contrib/bin/ASHE-1.1.2-linux</A>
<P>
P.S. Your web site is great. :-)
</BLOCKQUOTE>
<I>[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!</I> --John]
<P>
<IMG ALIGN=BOTTOM SRC="../gx/letter.gif"><B>Rached Blili</B> wrote with a request for
information about <B>DOSEMU</B>:
<BLOCKQUOTE>
<P>
Date: Wed, 04 Oct 1995 08:26:43 CDT<BR>
From: Rached Blili - CUG VP &lt;rached@domingo.concordia.ca&gt;<BR>
To: John M. Fisk &lt;fiskjm@ctrvax.Vanderbilt.Edu&gt;<BR>
Subject: RE: Linux Gazzette<BR><BR>
On Sat, 30 Sep 1995, John M. Fisk wrote:<BR><BR>
<PRE>
&gt; re: DOSEMU -- I have no personal experience using this and so therefore would have
&gt; to rely on someone else to "review" it and offer ideas and suggestions. In the
&gt; future I may try and tinker around with this but I honestly don't have the time
&gt; right now. I'm admittedly a multi-OS user and simply boot to DOS to run DOS progs.
</PRE>
<P>
:) 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. :)
<P>
Perhaps you could call for such an article to be submitted to you?
<PRE>
&gt;
&gt; re: better biff -- HEY, you're in luck!! There's an *awesome* xbiff client that
&gt; is *exactly* what you're looking for: xmailbox. I've been using it for some
&gt; time now and LOVE it. It uses color pixmaps, has optional animation (which *I*
&gt; like) AND it can be configured to use /dev/audio on receipt of mail. AWESOME.
&gt; It's on sunsite and mirrors, I believe in the linux/system/Mail directory. Try it!
</PRE>
<P>
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?
<P>
Thanks again!
<P>
Rached
<PRE>
---------------------------------------------------------------------
Rached Blili --- Vice President - Concordia Computer Users' Group
rached@cug.concordia.ca
http://cug.concordia.ca/~rached striker @ Undernet IRC
---------------------------------------------------------------------
</PRE>
</BLOCKQUOTE>
<P>
<I>[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.
<P>
Any takers...?</I> --John]
<P>
<IMG ALIGN=BOTTOM SRC="../gx/letter.gif"><B>Bart Veer</B> 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:
<BLOCKQUOTE>
<P>
Date: Wed, 04 Oct 1995 07:07:31 CDT<BR>
From: Bart Veer &lt;bart@perihelion.co.uk&gt;<BR>
To: &lt;fisk@web.tenn.com&gt;<BR>
Subject: Linux gazette<BR><BR>
<P>
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.
<P>
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.
<PRE>
# 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
</PRE>
<P>
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.
<P>
You may wish to experiment with these options yourself.
<P>
Bart Veer
<PRE>
-----------------------------------------------------------------------------
\ 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)==
</PRE>
</BLOCKQUOTE>
<P>
<IMG ALIGN=BOTTOM SRC="../gx/letter.gif"> <B>Jay Sibbrandt</B> later wrote to suggest
the following regarding <B>Mattias Ettrich's</B> excellent near-WYSIWYG LaTeX editor
<B>LyX</B>:
<BLOCKQUOTE>
<P>
Date: Sun, 08 Oct 1995 07:41:32 CDT<BR>
Sender: &lt;jay@elec.gla.ac.uk&gt;<BR>
From: J. Sigbrandt &lt;jay@elec.gla.ac.uk&gt;<BR>
To: &lt;fisk@web.tenn.com&gt;, &lt;jay@elec.gla.ac.uk&gt;<BR>
Subject: Lyx - A WYSIWYG interface to TeX<BR><BR>
Hi,<BR><BR>
<P>
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.
<P>
I'll let you check it out for yourself:
<P>
Author (for the development versions, and source code)
<A HREF="http://www-pu.informatik.uni-tuebingen.de/users/ettrich/">
http://www-pu.informatik.uni-tuebingen.de/users/ettrich/</A>
<P>
Official Homepage (for official releases, statically linked binaries, etc)
<A HREF="http://www.lehigh.edu/~dlj0/linux.html">
http://www.lehigh.edu/~dlj0/linux.html</A>
(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)
<P>
Have fun,<BR>
Regards<BR>
Jay <BR>
<P>
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.
<P>
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)
</BLOCKQUOTE>
<P>
[<I>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!
</I> --John]
<P>
<A HREF="#toc"><IMG ALIGN=BOTTOM SRC="./gx/toc.gif"></A>
<A HREF="mailto: fiskjm@ctrvax.vanderbilt.edu"><IMG ALIGN=BOTTOM SRC="./gx/sendmail.gif"></A>
<A HREF="./gazette_toc.html"><IMG ALIGN=BOTTOM SRC="./gx/index.gif"></A>
<A HREF="./linux/linux.html"><IMG ALIGN=BOTTOM SRC="./gx/home.gif"></A>
<BR><BR>
<HR>
<!--SECTION 2 -->
<!-- -->
<H2><A NAME="tips"><IMG ALIGN=BOTTOM SRC="../gx/text.gif"><I>Lots</I> More 2 Cent
Tips!</A></H2>
<H3><IMG ALIGN=BOTTOM SRC="./gx/opus.gif">Managing different versions of a program
</H3>
<P>
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 &quot;features&quot; (which some might snidely call <B>bugs...
</B>).
<P>
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
<PRE>
xfig-2.1.3
</PRE>
and your newly compiled/installed program to
<PRE>
xfig-3.1.3
</PRE>
In this case, we're using the venerable old program <B>xfig</B> 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:
<PRE>
ln -s xfig-3.1.3 xfig
</PRE>
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.
<P>
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.
<P>
Hey, what do you expect for 2 cents... :-)
<P>
<H3><IMG ALIGN=BOTTOM SRC="./gx/opus.gif">Updating your <EM>whatis...</EM></H3>
<P>
Ok, this one's for all you manual page readers... The other day I was looking for
some documentation on one of the <B>PBMPlus</B> 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
<PRE>
apropos gif
</PRE>
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 &quot;man xxxx&quot; in which the &quot;xxxx&quot; is the name
of the program you want to read about. The program <B>apropos</B> takes this just
a step further and lets you search a database of short descriptions looking for a
keyword.
<P>
In other words, in the example above, I was looking for any manpage whose short
description included the keyword &quot;gif&quot;. 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 <EM>should</EM> have been able to find something.
<P>
Nottin. Nada. Zip, baby... zip'ola.
<P>
Hmmm... so NOW what...
<P>
Well, after a bit of rooting around, I discovered that in order to use the search
program <B>apropos</B> you had to <EM>manually</EM> build the database. Bet you
didn't know you had to do this <EM>yourself</EM>, did you? OK, now be honest...
who really knew that there'd be nothing there when you typed in <KBD>apropos
my_favorite_obtuse_program</KBD>...? 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...?
<P>
For the rest of the class, let's proceed...
<P>
So, how do you update? Easy! There's a useful little program that gets dropped
into you /usr/lib/ directory called, what else, <B>makewhatis</B>. And, as luck
would have it, there's no man page for it. Figures. So, I tried the old
&quot;I'm-staring-at-an-unknown-program-and-I-have-no-idea-how-to-use-it-trick&quot;,
I entered:
<PRE>
/usr/lib/makewhatis --help
</PRE>
the universal distress signal! Guess what...? It gave some help! Well, not a
LOT of help, but help nonetheless.
<P>
This is what you'll see if you do this:
<PRE>
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)
</PRE>
<P>
So, what you'll need to do is this: go around to each of the directories that
contain manual pages and do a
<PRE>
/usr/lib/makewhatis -w
/usr/lib/makewhatis /usr/local/man
/usr/lib/makewhatis /usr/X11R6/man
</PRE>
and so forth. I found that in order to have the compressed pages in the /cat<I>n</I>
directories, I had to do the same as the above but add the &quot;-c&quot; option.
If everything works correctly, you should find a nice, brand new file in each of
your /man/ subdirectories called <B>whatis</B>. 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.
<P>
Now, if you want to search the whatis database, you simply enter:
<PRE>
apropos xterm
man -k xterm
</PRE>
either of these will work and you should now find displayed a listing of all of
the manual page entries which contain the keyword &quot;xterm&quot;.
<P>
Mucho cool, eh?
<P>
A couple final suggestions:
<UL>
<LI>make life easier on yourself, create a symlink from /usr/lib/makewhatis
to someplace in your PATH like /usr/bin. That'd be a:
<PRE>
ln -s /usr/lib/makewhatis /usr/bin/makewhatis
</PRE>
<P>
That way, you only have to type in the <KBD>makewhatis</KBD>
command without all the pathname stuff.
<P>
<LI>the man page for <B>apropos</B> 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 &quot;do-it-myself-thank-you&quot; kinda guy so I
haven't. That, and the fact that I haven't figured out crontab...
:-)
</UL>
Have fun and keep reading!
<P>
<P>
<H3><IMG ALIGN=BOTTOM SRC="./gx/opus.gif">Printing up those 'ol manpages!</H3>
<P>
Ok, while we're on the subject of manpages...
<P>
Did you know that there's an <I>easy</I> way to print up your favorite manual
page? Now, I know what you're thinking... <I>this poor 'ol guy musta chewed
paint chips as a kid... </I>. Ok, hold the wisecracks until I'm done...
<P>
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
<B>fvwm</B> 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.
<P>
So, how do you do this? There's a great little command line option for the
man program:
<PRE>
man -t fvwm
</PRE>
The &quot;-t&quot; 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 <B>stdout</B>. For all of the
recent DOS-converts like myself, stdout simply refers to <I>standard output</I>,
which generally defaults to your monitor.
<P>
Cool!, you say, now I can see what it'll look like.
<P>
Ok, then try it... you'll now have a new appreciation for what <B>postscript</B>
output looks like! Yup, in most distributions, the <KBD>man -t</KBD> print
option causes the output to be formatted as postscript. So, here's how to make
this useful.
<P>
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 <B>ghostscript</B> working
with your printer, you can simply type in:
<PRE>
man -t fvwm > fvwm.ps
</PRE>
Very easy. After a bit of churning and gnawing away on your hard drive, you'll
find a nice, neat, new file called <B>fvwm.ps</B>. Now you can either print it
or, view it using the great previewer <B>ghostview</B>. That is, you simply
enter <KBD>ghostview fvwm.ps &amp;</KBD> and up it comes!
<P>
Hey, wanna know a secret!... (Shhhh!... keep it down!...<I>you don't have to print
this stuff in postscript if you don't want to.</I>)
<P>
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:
<PRE>
#
# 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.
#
<B>TROFF /usr/bin/groff -Tps -mandoc</B>
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
</PRE>
What you're interested in is the line that begins with the word <KBD>TROFF</KBD>.
Again, without going into all the intricacies of what's happening here, suffice
it to say that when you enter the &quot;man -t&quot; command, what happens is that
the man program calls upon the services of <B>groff</B>, the text-formatting program
similar to TeX, to format the document and then send a copy of it to standard
output.
<P>
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... &quot; read the manual
page...&quot;) but the one that's helpful if you're interested in plain ASCII output
is the &quot;-Tascii&quot; option. To produce plain text output simply change the
line above to:
<PRE>
TROFF /usr/bin/groff -Tascii -mandoc
</PRE>
See what happened? We've changed the &quot;-T&quot; option so that now it designates
ASCII output. Now, when you're ready to print up a man page, you simply enter:
<PRE>
man -t fvwm > fvwm.txt
</PRE>
and there you go... plain, but nicely formatted text output. Now, if you've installed
the <B>TeX</B> stuff, you might also want to use a <B>DVI</B> (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 <B>dvilj2p</B> program which converts a .dvi file to
something with an .lj suffix that I can simply 'cat to my printer.
<P>
To do this, you just change the &quot;-T&quot; option to read &quot;-Tdvi&quot;.
Real easy.
<P>
Seriously, though, if you're interested in the various output options, do check
the groff manpage. Or better yet... print it up!
<P>
[addendum]<BR>
This is one of the reasons to read Usenet... :-)
<P>
After writing all this stuff above, I ran across a comp.os.linux.<I>something</I>
posting asking about how to print manpages. A responder suggested the following:
<PRE>
man <I>manpage</I> | col -b > <I>manpage</I>.txt
</PRE>
This creates plain ASCII output from any manual page and is a <I>LOT</I>
faster than trying to format it using Groff & Co. as in the example above.
The <B>col</B> program was one that I'd not run across and so the manpage
entry for it says:
<PRE>
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
</PRE>
Ok, so that didn't clear things up <I>too</I> 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...
<P>
Still, I'm happy that it works. If your needs are plain ASCII output then you're
in luck... give it a whirl!
<P>
<H3><IMG ALIGN=BOTTOM SRC="./gx/opus.gif">Colorful consoles with <I>setterm</I></H3>
<P>
Since we're on a bit of a &quot;freedom of choice&quot; kick here, you need to
give the nifty little program <B>setterm</B> 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.
<P>
This is done using the command:
<PRE>
setterm -background blue -foreground cyan
</PRE>
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 <KBD>clear</KBD>
and your screen clears and the new color scheme is implemented.
<P>
Mucho cool, right?
<P>
Now, if you're using a distribution that does color &quot;ls&quot; directory
listings, do a directory listing:
<PRE>
ls -l /home/stuff
</PRE>
what happened, man! The colors are GONE!!
<P>
Ok, ok, before you get in a wad... there was one <I>tiny</I> little point I
failed to mention... :-) If you want to <I>keep</I> your color scheme and
not just test drive it, you add the option &quot;-store&quot;. This sets the
color scheme that you've selected. Want to change it again? Re-enter the
command above.
<P>
So, what <I>are</I> your color options? Well, to see a helpful printout of
all the setterm command line options just type in <KBD>setterm</KBD> (that's
without any command line options). You should see something like this go
sailing by:
<PRE>
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] ]
</PRE>
<P>
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!
<P>
<B>Wanna do something REALLY fun...?</B>
<P>
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 <I>your</I>
computer...)
<P>
First, you have to ask yourself a philosophical question: &quot;why would I
want to do this in the first place...?&quot; 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.
<P>
Now, for the cool part.
<P>
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
<B>bash_profile</B>:
<PRE>
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
</PRE>
Now, see what's happening here?
<P>
At login, your ~/.bash_profile file is read. When it reaches this stanza in the
file, it sets the variable <B>V_TERMINAL</B> to the string output of the command
<B>tty</B> (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 <B>case</B>
statement that lets you define what action to take depending upon which terminal
you're currently at.
<P>
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 <I>viola!</I>, new color scheme!
<P>
Very slick.
<P>
<H3><IMG ALIGN=BOTTOM SRC="./gx/opus.gif">Still <I>more</I> login fun!</H3>
<P>
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 <I>paradigm</I> man! Think about this
for a moment...
<P>
Ok, times up.
<P>
Put your pencils down, close your books, and turn your answer sheet over...
<P>
Hmmm... getting a bit <I>whippy</I> here... they're probably putting more caffeine
in the Folgers again... either that, or the lithium is kicking in... :-)
<P>
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 <I>this</I> to those poor DOS dweebies and
you'll make 'em cry!
<P>
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:
<PRE>
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
</PRE>
Notice how this works... each of the case statements begins with the string
that you're looking for, &quot;/dev/tty3&quot; 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 <I>single</I> semicolon.
You indicate the end of the list of commands by using two semicolons. Remember,
no typos. Syntax is important.
<P>
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 <B>Monty Python</B>
ditty <B>&quot;Spam, Spam, Wonderful Spam&quot;</B>.
<P>
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 <I>entire</I>
Hallelujah Chorus, it may take you a while to get to a user prompt.
<P>
Use your discretion.
<P>
Anyway, enjoy!
<H3><IMG ALIGN=BOTTOM SRC="./gx/opus.gif">The <I>minimalistic login</I></H3>
<P>
Ok, not to show favoritism to the bipolar folks who just happen to be on a bit of
a manic jag...
<P>
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...
<P>
If you want a simple, unadorned login without all the baggage, just add a file to
your home directory and call it <B>.hushlogin</B>. It's that simple. To make it
even easier, just do the following:
<PRE>
touch .hushlogin
</PRE>
The <B>touch</B> 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.
<H3><IMG ALIGN=BOTTOM SRC="./gx/opus.gif">Changing your screen font the <I>easy</I>
way!</H3>
<P>
Finally, this one's for all you folks that decided to install the <B>kbd</B> package.
As we saw last month, there's a handy little utility that comes with this called
<B>chvt</B> that lets you skip from VT to VT. Now, let's see what other little
goodie this comes with.
<P>
There's a VERY easy and very handy program called <B>fontconfig</B> that comes with
this distribution. Just enter the command <KBD>fontconfig</KBD> 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!
<P>
Those of you who have installed the <B>Slackware</B> 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...!
<P>
Take a peek at it and have fun!
<P>
<A HREF="#toc"><IMG ALIGN=BOTTOM SRC="./gx/toc.gif"></A>
<A HREF="mailto: fiskjm@ctrvax.vanderbilt.edu"><IMG ALIGN=BOTTOM SRC="./gx/sendmail.gif"></A>
<A HREF="./gazette_toc.html"><IMG ALIGN=BOTTOM SRC="./gx/index.gif"></A>
<A HREF="./linux/linux.html"><IMG ALIGN=BOTTOM SRC="./gx/home.gif"></A>
<BR><BR>
<HR>
<!--SECTION 3 -->
<!-- -->
<H2><A NAME="trap"><IMG ALIGN=BOTTOM SRC="../gx/text.gif">Useful Entrapment: &quot;A
Better Way...&quot;</A></H2>
<P>
The following suggestion was offered by <B>Nathan Hand</B> 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:
<UL>
<LI>To recognize the fact that I <I>clearly</I> 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
<LI>To allow anyone who wants to submit suggestions and ideas which I'll
be happy to include (within reason... :-)
<LI>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
</UL>
<P>
That said, take a look at what he wrote:
<BLOCKQUOTE>
<P>
Date: Sat, 07 Oct 1995 09:51:05 CDT<BR>
Sender: &lt;nathanh@anu.edu.au&gt;<BR>
From: Nathan Hand &lt;Nathan.Hand@anu.edu.au&gt;<BR>
To: &lt;fisk@web.tenn.com&gt;<BR>
Subject: (no subject)<BR><BR>
<P>
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.
<PRE>
trap /usr/bin/clear EXIT
</PRE>
<P>
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).
<P>
btw: I enjoyed reading thru your pages. Keep up the good
work. I especially liked the tips section.
</BLOCKQUOTE>
<P>
Well, I tried it and you know what...? It worked!
<P>
That got me interested in the use of <B>traps</B>. 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 <B>bash</B> manpage for some
info on the use of <B>traps</B>. If you do this, this is what you'll find:
<BLOCKQUOTE>
<P>
trap [-l] [arg] [sigspec]
<BLOCKQUOTE>
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.
</BLOCKQUOTE>
</BLOCKQUOTE>
<P>
Ok, ok... I know what you're thinking... &quot;Well, <I>that</I> certainly cleared
things up...:-)&quot;
<P>
Yeah, I know. Which is why you buy books!
<P>
So, I turned to a shell programming book I've been using for some time now
and really like: &quot;<B>Shell Programming In 14 Days</B>&quot;. 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 <B>SAMS Publishing</B>. There
are a couple pages devoted to the use of traps.
<P>
Ok, if you'll all turn in your books to pages 288 - 289, let's read together...
<P>
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 <B>SIG_DFL</B>, which
is to terminate the process.
<P>
The basic useage of the trap command is:
<PRE>
trap 'command(s)' n
</PRE>
in which 'commands' is either:
<UL>
<LI>a null string which causes the trap to be ignored
<LI>a single command which is executed when the signal is trapped
<LI>a series of commands which are separated by a semicolon
</UL>
So, what are the signals that can be trapped? The most common ones, I'm told
are the following:
<UL>
<LI>0 - program exit
<LI>1 - hang-up
<LI>2 - user interrupt (ctrl-c)
<LI>9 - kill signal from another process
</UL>
A listing of the various signals for the system can be found in the file
/usr/include/signal.h. I'll let <I>you</I> have a look at that.
<P>
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.
<P>
Thanks!
<P>
<A HREF="#toc"><IMG ALIGN=BOTTOM SRC="./gx/toc.gif"></A>
<A HREF="mailto: fiskjm@ctrvax.vanderbilt.edu"><IMG ALIGN=BOTTOM SRC="./gx/sendmail.gif"></A>
<A HREF="./gazette_toc.html"><IMG ALIGN=BOTTOM SRC="./gx/index.gif"></A>
<A HREF="./linux/linux.html"><IMG ALIGN=BOTTOM SRC="./gx/home.gif"></A>
<BR><BR>
<HR>
<!--SECTION 4 -->
<!-- -->
<H2><A NAME="xfmail_install"><IMG ALIGN=BOTTOM SRC="../gx/text.gif">In-depth Guide to
XF-Mail and XMailbox Installation</A></H2>
<P>
Last month I wrote up a quick review of the truly impressive program <B>XF-Mail</B>,
an SMTP- and POP-compliant mail client. I'd like to take a closer look at this
program and another great little program called <B>XMailbox</B>. I'm doing this for
a couple reasons.
<P>
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 <B>sendmail, sendmail+IDA, or smail</B>.
<P>
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.
<P>
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:
<P>
<B>XF-Mail</B>.
<P>
Also, if you've got a dial-up connection working, you might also want to mess around
with another great and fun little program:
<P>
<B>XMailbox</B>
<P>
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 <I>that</I> 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!
<P>
OK, now who's left...?
<P>
Just a word for those of you that are left. If you are an absolute Linux newbie and
the thought of compiling <I>anything</I> sorta gives you the heebie-jeebies, stick
with me. This'll be fun. Really!
<P>
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 &quot;-tar.gz&quot; 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 &quot;out of the box&quot;.
<P>
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:
<UL>
<LI>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.
<LI>if you're using Linux on a home PC and have a dial-up connection, you
<I>really</I> 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.
<LI>lastly, if you've never compiled anything under Linux, this is your
golden opportunity to do so and feel pretty good about yourself!
</UL>
So, let's begin.
<P>
You'll need to have a few things set up in order to do this:
<UL>
<LI>you need to have X Window up and running
<LI>you'll need to have installed the development applications -- for those
of you using <B>Slackware</B>, that's the stuff in the <B>D</B> disk
sets. Other distributions will use different designations. You
should have the <B>GCC (GNU C Compiler)</B> installed, as well as the
include files and so forth. If you installed the D disk sets, you
should be fine.
<LI>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.
<LI>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.
</UL>
If you're cool with these, you're ready!
<P>
I'll start with <B>XF-Mail</B> since it's the one that you'll probably want to get up
and running first. You'll need the following files:
<UL>
<LI><A HREF="http://Burka.NetVision.net.il/xfmail/xfmail.html">
xfmail-0.3.tar.gz (http://Burka.NetVision.net.il/xfmail/xfmail.html)
</A>
<LI><A HREF="http://bragg.phys.uwm.edu/xforms">bxform-075.tgz
(http://bragg.phys.uwm.edu/xforms/)</A>
<LI><A HREF="ftp://ftp.cc.gatech.edu/pub/linux/X11/libs/">libXpm-3.4f.tar.gz
(ftp://ftp.cc.gatech.edu/pub/linux/X11/libs/)</A>
</UL>
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
<B>libXpm-3.4f.tar.gz</B> 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!
<P>
So... how'd you do? Any problems?
<P>
Now that you've gotten the files, let's get things set up. Let me add
parenthetically what these files actually are. In brief:
<UL>
<LI>xfmail-0.3.tar.gz - the source code for the XF-Mail client version 0.3
<LI>bxform-075.tgz - the binaries for the XForm toolkit libraries
<LI>libXpm-3.4f.tar.gz - the source code + precompiled libraries for the
libXpm libraries
</UL>
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.
<P>
Since I'm using <B>Slackware 2.2.0</B> at the moment, my descriptions of where things
will go may be just a <I>bit</I> 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.
<P>
<B>Let's begin by setting up the libXpm libraries first.</B>
<P>
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 <I>*OOBE</I> quality...
<P>
(* you know... that 90's yuppie techno-wannabe <I>Out-Of-Box-Experience</I>)
<P>
Since the <B>libXpm-3.4f.tar.gz</B> 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:
<PRE>
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
</PRE>
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...
<P>
<B>On to the easy stuff...:-)</B>
<P>
Next, let's set up the <B>bxform-075.tgz</B> stuff. This archive contains the
binaries (actually, the static libraries) for the <B>XForm</B> 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.
<P>
We'll start the same way we did the last time:
<PRE>
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.
</PRE>
<P>
At this point, you should see something like:
<PRE>
-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
</PRE>
<P>
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 <B>mkconfig.h</B> 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
&quot;clean&quot; copy with which to fall back on. I've called my backup copy
<B>mkconfig.h.dist</B> since it came with the distribution.
<P>
There are two modifications you may want to make.
First, make a backup copy of the file by typing in <KBD>cp mkconfig.h
mkconfig.h.dist</KBD>, and then you're ready to do a bit of editing. When you
load up the file, you should see something that looks like:
<PRE>
# 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
</PRE>
<P>
You might want to consider installing the &quot;libforms.a&quot; library into
the /usr/X11R6/lib directory
and the header file, &quot;form.h&quot; 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 <B>LIB_DIR=</B> and the <B>HEADER_DIR=</B> lines to read:
<PRE>
LIB_DIR=/usr/X11R6/lib
LIBMODE=644
HEADER_DIR=/usr/X11R6/include/Xf
HEADERMODE=644
</PRE>
<P>
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:
<PRE>
make install
</PRE>
<P>
<I>Viola!</I> it's done! Another slug of coke and a few more chips and we're
almost ready to start playing!
<P>
<B>Last step... compiling XF-Mail!</B>
<P>
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!
<P>
As we've done previously, let's use the /usr/local/src directory as the working
directory. Starting the way we've done previously:
<PRE>
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
</PRE>
<P>
At this point, there's really nothing much left to do besides compile the program.
I'll add here that you can <I>optionally</I> 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... :-)
<P>
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.
<P>
When you edit the Makefile you've just created, you'll see a section
near the top that looks like:
<PRE>
# 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
</PRE>
<P>
You'll notice that the section delimited by the &quot;# change the
following...&quot; statement at the top and the &quot;# end of user configurable
settings&quot; 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.
<P>
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:
<PRE>
BINDIR = /usr/local/bin # where binary should be installed
MANDIR = /usr/local/man/man1 # where to install manpage
</PRE>
<P>
Save the file and you're ready to go!
<P>
At this point, all that's left to do is compile the program. To compile the
program simple enter:
<PRE>
make
make install
</PRE>
<P>
After you type in <KBD>make</KBD> 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...
<P>
If the compilation has gone well you should see no error messages. You can then
type in the <KBD>make install</KBD> 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.
<P>
So, how'd it go!!
<P>
Pretty cool...eh? Congrats, you've done the hard part. Time to PLAY!!
<P>
Well, almost... there's <I>one</I> more quick program to set up...
<P>
<B>Setting up XMailbox.</B>
<P>
This one's easy 'cause we're going to use the precompiled binaries. The file
you'll need is called <A HREF="ftp://ftp.cc.gatech.edu/pub/linux/system/Mail">
xmailbox-2.2-bin.tgz (ftp://ftp.cc.gatech.edu/pub/linux/system/Mail/)</A>.
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.
<P>
Now, if you're feeling kinda adventurous, you can also pick up the sources, which
are in <B>xmailbox-2.2-src.tgz</B>. I'm not going to cover how to compile this
since the binary distribution works fine and is quite easy to set up.
<P>
Again, using the /usr/local/src directory as our working directory, enter:
<PRE>
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
</PRE>
<P>
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.
<P>
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.
<P>
If you want to put files under the /usr/local directories, then you'd simply do the
following:
<PRE>
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
</PRE>
<P>
So that's it!! You're done!
<P>
NOW, it's time to PLAY!!
<P>
<A HREF="#toc"><IMG ALIGN=BOTTOM SRC="./gx/toc.gif"></A>
<A HREF="mailto: fiskjm@ctrvax.vanderbilt.edu"><IMG ALIGN=BOTTOM SRC="./gx/sendmail.gif"></A>
<A HREF="./gazette_toc.html"><IMG ALIGN=BOTTOM SRC="./gx/index.gif"></A>
<A HREF="./linux/linux.html"><IMG ALIGN=BOTTOM SRC="./gx/home.gif"></A>
<BR><BR>
<HR>
<!--SECTION 5 -->
<!-- -->
<H2><A NAME="xfmail_setup"><IMG ALIGN=BOTTOM SRC="../gx/text.gif">Configuring
XF-Mail and XMailbox</A></H2>
<P>
Ok, phew!... the hardest part is done. You've gotten the sources or binaries for
<B>XF-Mail</B> and <B>XMailbox</B> and got them both installed. If this was your
first attempt at getting a program compiled and installed -- Congrats!! Now comes
the fun part.
<P>
Since we've just gotten finished installing the <B>XMailbox</B> binaries, and since
setting this up is quite straight-forward, let's do this one first. But first, a
word about what XMailbox is...
<P>
For the benefit of those who <I>haven't</I> heard of an <B>biff</B> 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 &quot;fiskjohnm&quot;, 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 &quot;biff&quot; I'd refer you to the canonical source of all beginning
UNIX information, <B>&quot;A Student's Guide to Unix&quot;</B>. It's an absolutely
must-have reference for anyone that is beginning to learn unix and is written by
<B>Harley Hahn</B> who is one of the most enjoyable technical writers I've come
across.
<P>
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 <I>rest</I> of the story...
<P>
Well, now that we now know about where <B>biff</B> came from, the <B>xbiff</B>
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.
<P>
Which is why you want to use <B>XMailbox</B>. XMailbox is a program written by
<B>Dimitrios P. Bouras (dimitri@ee.ubc.ca)</B> and <B>William K. W. Cheung
(wcheung@ee.ubc.ca)</B>. 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.
<P>
Very cool.
<P>
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:
<PRE>
chmod 644 /usr/X11R6/lib/X11/app-defaults/XMailbox
vi /usr/X11R6/lib/X11/app-defaults/XMailbox
</PRE>
presuming that you were using the VI editor. So what was that <B>chmod</B> stuff...
in brief, every file has a set of permissions. Without going into great detail,
setting the permissions to &quot;644&quot; 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 &quot;644&quot; to &quot;444&quot;.
<P>
Anyway, let's configure.
<P>
When you load up the XMailbox file, you should see something like the following:
<PRE>
!--------------------
! 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
</PRE>
<P>
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
&quot;+5+205&quot; places the icon 5 pixels from the left side of the screen and 205
pixels from the top.
<P>
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 &quot;no-mail&quot; period. The
next couple lines let you set up animation, which is very cool. So, let's do that.
<P>
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 <B>pixmap</B> program.
If you want to simply use the default images, at least to start with, then do the
following:
<OL>
<LI>Set the NumOfXpmFile to 2 (to use the two built-in icons)
<LI>Set the AnimUpdate entry to a value between 500 and 1000. This is the
number of <I>milliseconds</I> delay between showing different icons.
500 is pretty rapid, while 1000 is pretty slow. Try 500 - 700 and
see what you like.
<LI>Set the mailAnimOnce to false, to turn on the animation upon arrival of
new mail.
</OL>
<P>
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 <B>ANIMATION</B>.
<P>
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 <B>xfmail</B>. Very handy... Want to
use something else...? just enter whatever client you have in mind and you're all set.
<P>
The mailSndFile entry specifies the sound file to play when mail comes in. So you
went to <A HREF="ftp://sunsite.unc.edu/pub/multimedia/sun-sounds/">Sunsite's
Multimedia (ftp://sunsite.unc.edu/pub/multimedia/sun-sounds/)</A>
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:
<BLOCKQUOTE>
<P>
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.
</BLOCKQUOTE>
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
<PRE>
cat /usr/local/sound/hallelujah.au > /dev/audio
</PRE>
or something like this and get sound out. That's the extent of my multimedia
knowledge. If it works for you, rejoice!
<P>
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. <I>Here's a little
trick you might try...</I>
<P>
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 <B>cat</B> to concatenate two files together so they play
back to back. In this case, you could simply enter:
<PRE>
cat dingdong.au ugotmail.au > mailcall.au
</PRE>
This creates a sound file called &quot;mailcall.au&quot; which is simply the
dingdong.au (doorbell) file followed by an announcer who loquaciously proclaims
&quot;You've got mail!!&quot;. 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,
&quot;You've got mail!!&quot;. Getting tired of the same sound file...? Simply edit
the file to play a new one. Easy!
<P>
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:
<BLOCKQUOTE>
<P>
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.
</BLOCKQUOTE>
<P>
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...
<P>
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.
<P>
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.
<P>
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 <B>popclient</B>:
<PRE>
#!/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
</PRE>
<P>
I simply start this program up once a connection has been made by running this
little shell script in the background:
<PRE>
mailcheck &
</PRE>
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 &quot;bigcheese&quot;, then your mail spool file would be
/var/spool/mail/bigcheese.
<P>
Anyway, give it a whirl. And have fun!
<P>
And now, it's on to <B>XF-Mail</B>!
<P>
First, you might be wondering to yourself.. &quot;<I>So just what is this XF-Mail
program...</I>&quot;. Glad you asked.
<P>
XF-Mail was written by a couple of guys by the name of
<A HREF="mailto:gena@NetVision.net.il">Gennady B. Sorokopud
&lt;gena@NetVision.net.il&gt;</A> and
<A HREF="mailto:ugen@NetVision.net.il">Ugen J. S. Antsilevich
&lt;ugen@NetVision.net.il&gt;</A>.
XF-Mail is an X Window SMTP, POP, and MIME compliant mail client that uses the
<B>XForm</B> libraries created by those X gurus T.C. Zhao and Mark Overmars. In
their own words, XF-Mail is:
<PRE>
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.
</PRE>
<P>
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 <I>can</I> be set
up to use <B>sendmail</B>, it can happily live without.
<P>
<B>Cool...eh!? Sendmail-less mail!!</B>
<P>
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.
<P>
To configure XF-Mail, you simply need to start it up. Fire up X, and in one of the
xterms enter:
<PRE>
xfmail &
</PRE>
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
<A HREF="http://Burka.NetVision.net.il/xfmail/xfmail.html">
Burka.NetVision.net.il</A> 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
<B>XForm</B> libs. Check these out!
<P>
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 <I>could</I> 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.
<P>
If you've gotten this far, however, you shouldn't see any error messages, and the
program should be up and running. Rejoice!
<P>
Now, let's see what you'll need to actually get this thing working.
<P>
There are, fortunately, only a couple things you'll need to know in order to get
XF-Mail up and running. These are:
<UL>
<LI>the DNS name or the IP address of the Mail Host from which you'll get
your mail.
<LI>the port number or service of your Mail Host - e.g., &quot;pop3&quot;
if your Mail Host uses POP3 protocol.
<LI>your username
<LI>your password
<LI>the DNS or IP address of your SMTP gateway or host.
</UL>
<P>
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.
<P>
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 &quot;port number&quot;.
<P>
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 <B>Misc</B> menu and choose
<B>Config</B>. 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.
<P>
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
<B>POP</B> which presents you with the <B>POP Configuration</B> menu box. Here,
enter the mail host (your POP server from which you'll get your mail) in the box
entitled <B>Host</B>. To the right of this, labelled <B>Port</B>, enter the
port number or service. If your mail host uses the POP3 protocol, simply leave
this as &quot;pop3&quot;. 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 <B>username</B> and your <B>password</B>. 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.
<P>
<B>A Couple Caveats!!</B>
<P>
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 <I>initially</I> 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!
<P>
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 &quot;undocumented
features&quot; left. Play it safe.
<P>
Lastly, let's set up the outgoing mail. Hit the <B>Done</B> button after you've
entered all the info for the POP Configuration, and then hit the <B>Send</B>
button, which will allow you to set up the SMTP information. In the first box
entitled <B>SMTP Host</B> 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 &quot;smtp&quot; 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.
<P>
You can also fill in the location of the <B>sendmail</B> program if you've
installed it on your system. You see, you <I>can</I> 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...! <I>Sendmail-less mail!!</I>
<P>
To have XF-Mail use the built-in smtp support, click on the option button entitled
<B>use SMTP</B>. A couple other suggestions and we're almost done. First, may
I recommend that you also check the <B>Save to &quot;sent mail&quot;</B> and the
<B>Offline send</B> options. The first will save a copy of all of your outgoing
mail. Why would you want to do <I>that...</I>? Good question.
<P>
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 <I>really</I> 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 &quot;dig&quot; in India wanted to see today, has now gone
sailing off into the vastness of nothingness...
<P>
Oops...
<P>
Keep a copy so that you can resend if need be. Also, setting the <B>Offline
send</B> option allows you to compose mail and set it up to be sent out -- even
when you're not connected! Hey, man, you can <B>queue</B> your mail!! Do have
<I>ANY</I> idea how many messages are posted <I>daily</I> 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! :-)
<P>
Ok, I know... I know... focus! We're almost done and ready to play. Hit the
<B>Done</B> button and when you're back at the <B>Configuration</B> dialog box, hit
the <B>Save</B> button. There's just one more thing that you probably should do...
Hit the <B>Misc</B> button in the Configuration dialog box. This presents you with
a list of various options. At the bottom, click on the <B>Open log on startup</B>
option. What this will do is log all messages to a &quot;Log Window&quot; 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 <B>Save</B> once again and you're
done! Let's play!!
<P>
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 <B>Misc</B>
menu and choose <B>Retrieve mail</B>. Keep an eye on the action that's going on
in the &quot;Log Window&quot;. This should let you know if everything's set up
correctly and XF-Mail was able to make connection with your mail host.
<P>
No mail... no problem, man... send yourself some!
<P>
Up at the top of the screen, click on the &quot;pen&quot; 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 &quot;From&quot; &quot;Subject&quot;, and &quot;To&quot; fields. Now, type
in a short test message and when you're done, hit the &quot;letter&quot; 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 <B>Address</B> button and
the address book fires up. Enter the name on the entry line and hit the <B>Save
</B> button. Click on the &quot;To&quot; button and hit RETURN.
<I>Viola!</I>.. it's done!!
<P>
Well, almost. Remember that we've set up offline send. To get the message out
you'll need to hit the <B>Send</B> menu item and then click on the <B>Send all</B>
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!
<P>
Now, let's do just a couple other things before finishing up here. First, there are
several things that you'll <I>want</I> to set up. You don't have to, but it'll
make using XF-Mail a lot easier and more fun.
<P>
The things you'll probably <I>want</I> to set up at thing point are:
<UL>
<LI>an external editor
<LI>an external message viewer
<LI>configure the &quot;From:&quot; field for outgoing messages
<LI>decide whether you want to additionally retrieve mail from a local
mail spool
<LI>edit your .signature file if you haven't already
</UL>
<P>
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 &lt; 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 <I>probably don't</I> want to use something rather,
...uhh... huge, like <B>Xemacs</B>. 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 <B>xedit</B> which is admittedly
a bit... spartan...? but at least it loaded up fast. I'm currently using <B>aXe</B>
which loads up quite nicely but is a LOT more functional.
<P>
So, to set these things up, call the Configuration menu up once again:
<UL>
<LI>use the <B>View</B> 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 <B>xedit</B>
program as my external viewer still. I simply enter in
<KBD>/usr/X11R6/bin/xedit</KBD> in the box and then set the number
of lines to whatever I want, such as 75.
<P>
<LI>use the <B>Edit</B> 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 <B>aXe</B> editor, I've entered in
<KBD>/usr/local/bin/axe -noserver -geometry 74x40+55+0</KBD>
and set the number of lines to 72. Tinker around with this to
get the look/feel that you want.
<P>
<LI>use the <B>Misc</B> menu to set up the &quot;From:&quot; 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
&quot;reply&quot; button and so your &quot;From:&quot; field is
important in order to get the correct address. Simply enter in
your email address on the <B>From field</B> line.
<P>
<LI>use the <B>Receive</B> 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 <B>popclient</B> 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.
<P>
</UL>
<P>
After making these changes, don't forget to hit the <B>Save</B> button to save them.
Cool, eh?
<P>
To edit your .signature file hit the <B>Misc</B> menu once again and click on the
<B>Signature</B> 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.
<P>
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 <B>Help</B> from the
menu bar and choose the <B>Contents</B> item. It'll display a help window with all
kinds of useful information describing what you can do with this great client.
<P>
The other place to play and tinker is in the <B>Configuration</B> 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:
<UL>
<LI>set up printing (Misc)
<LI>set up automatic logging (Misc)
<LI>optionally save all addresses (Receive)
<LI>sound the beep (and beep volume) when mail arrives (Receive)
<LI>set up the fonts, foreground colors, and background colors of all sorts
of things (Appearance)
<LI>set up the use of <I>picon</I> which are little black and white xbm
(X Bitmap) images of you to include with your mail (Faces)
<LI>set up MIME types for use with XF-Mail (MIME)
<LI>set the sort and ordering criteria for your messages and folders
(Display)
<LI>set up periodic background mail retrieval, mail send, and trash folder
emptying (Timers)
<LI>set up the &quot;reply quote&quot; and &quot;forwarding quote&quot;
(Reply/Forward)
</UL>
<P>
Other fun things that you can do include:
<UL>
<LI>message view
<LI>message edit
<LI>message delete
<LI>message forwarding
<LI>message bounce
<LI>message mark/unmark
<LI>message print
<LI>apply rules to incoming messages
<LI>move messages between various folders
<LI>uudecode message
<LI>save message to file
<LI>append message to file
<LI>folder create
<LI>folder rename
<LI>folder delete
<LI>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.
<LI>set up your address book
</UL>
<P>
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. <I>Shaa..Zzamm!</I>... a pop-up, handy-dandy, do-it-all, context sensitive
menu with all kinds of goodies at your fingertips.
<P>
Mucho cool...!
<P>
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 <B>Help</B> menu
item and clicking on the <B>Subscribe to mailing list</B> option. If you like this
client, go ahead and drop the authors a note of thanks!
<P>
Go ahead... their addresses are:<BR><BR>
<A HREF="mailto:gena@NetVision.net.il">Gennady B. Sorokopud
&lt;gena@NetVision.net.il&gt;</A><BR>
<A HREF="mailto:ugen@NetVision.net.il">Ugen J. S. Antsilevich
&lt;ugen@NetVision.net.il&gt;</A>
<P>
Enjoy!
<P>
<A HREF="#toc"><IMG ALIGN=BOTTOM SRC="./gx/toc.gif"></A>
<A HREF="mailto: fiskjm@ctrvax.vanderbilt.edu"><IMG ALIGN=BOTTOM SRC="./gx/sendmail.gif"></A>
<A HREF="./gazette_toc.html"><IMG ALIGN=BOTTOM SRC="./gx/index.gif"></A>
<A HREF="./linux/linux.html"><IMG ALIGN=BOTTOM SRC="./gx/home.gif"></A>
<BR><BR>
<HR>
<!--SECTION 6 ------------------------------------------------------------------>
<H2><A NAME="fvwm_styles"><IMG ALIGN=BOTTOM SRC="../gx/text.gif">FVWM: An
Introduction to Styles!</A></H2>
<P>
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 <B>Styles</B>, 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.
<P>
Hmmm, let's see where we are right now. So far, we've covered:
<UL>
<LI><A HREF="./linux_gazette.sep.html#fvwm">Introducing FVWM!</A>
<LI><A HREF="./linux_gazette.sep.html#fvwm_start">FVWM: Getting stuff going...</A>
<LI><A HREF="./linux_gazette.sep.html#fvwm_menus">FVWM: Adding programs to the Popup Menus</A>
<LI><A HREF="./linux_gazette.sep.html#fvwm_virtual">FVWM: Managing the Virtual Desktop</A>
<LI><A HREF="./linux_gazette.sep.html#fvwm_quicktips">FVWM: Quick Tips!</A>
</UL>
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.
<P>
Now, let's take a brief look at the use of <B>Styles</B>.
<P>
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
<I>window manager</I>. That means, as the name implies, that it manages the
<I>way</I> that applications are presented and their windows are manipulated.
So what does this mean in practical terms?
<P>
It means, for example, that you can configure:
<UL>
<LI>whether an application window has a titlebar
<LI>whether an application window is decorated with borders and how
thick or thin those borders are
<LI>whether an application window has resize handles at the corner that
allow you to resize the window easily
<LI>whether an application window is added to the Window List
<LI>whether an application has an icon and, if so, what icon file to use
<LI>whether an application window uses the default color scheme or a
custom scheme that you can designate
<LI>whether an application window is &quot;sticky&quot;; that is, whether
it will follow you from screen to screen
<LI>whether an application window is always &quot;on top&quot; and must
be explicitly &quot;lowered&quot;
<LI>whether an application window is included in the list of windows that
can be &quot;circulated up&quot;
<LI>whether an application starts iconified or not
<LI>what &quot;desktop&quot; an application starts on
</UL>
do you see the pattern...? Using styles does not directly affect <I>how an
application might run</I> -- this is done using command line options and setting
application resources -- it <I>does</I> affect how the application is <B>presented</B>
and how you can <B>interact</B> with it using fvwm.
<P>
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.
<P>
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 <I>every</I> application that
you use, as well as set defaults that all windows will fall back on.
<P>
Curious about what you can do with this stuff...? or what it might look like?
Take a look at:
<UL>
<LI><A HREF="./styles.html">Sample styles</A>
</UL>
This is a series of screen dumps that will give you some idea about what the
various basic style options might look like.
<P>
So, let's take a look at a sample <B>Styles</B> entry:
<PRE>
# 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
</PRE>
<P>
You can see that the basic format is simply:
<PRE>
Style &quot;<I>program_name</I>&quot; options (can be a list separated by commas)
</PRE>
<P>
Pretty easy, eh?
<P>
The basic idea is to set up a default for all windows first. This is the line:
<PRE>
Style &quot;*&quot; BorderWidth 6, HandleWidth 6, Color White/#8a4510,Icon unknown1.xpm
</PRE>
It puts borders and handles on all windows, sets the borderwidth to 6 pixels, sets
the foreground color (the &quot;text&quot;) 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
&quot;unknown1.xpm&quot; as the default icon when there is no built-in icon and
there's no specific icon assigned it.
<P>
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:
<PRE>
Style "*clock" NoTitle, NoBorder, NoHandles, Sticky, WindowListSkip
</PRE>
Then, any applcations whose name ended in &quot;clock&quot; 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 &quot;sticky&quot; and follow you around from desktop to
desktop; and they would not show up in the WindowList.
<P>
Two more quickie points and then I'll let you experiment on your own.
<P>
The most common styles entries are:
<DL>
<DT><B>Icon, NoIcon</B>
<DD>specifies which xpm or xbm icon to use for an application.
<P>
<DT><B>Title, NoTitle</B>
<DD>specifies that an application window should be decorated with a
titlebar.
<P>
<DT><B>Border, NoBorder</B>
<DD>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.
<P>
<DT><B>Handles, NoHandles</B>
<DD>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.
<P>
<DT><B>BorderWidth, HandleWidth</B>
<DD>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.
<P>
<DT><B>Sticky, Slippery</B>
<DD>specifies whether an application &quot;sticks to the screen&quot;.
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.
<P>
<DT><B>StaysOnTop, StaysPut</B>
<DD>specifies that an application window will &quot;stay on top&quot; of
other windows and must be explicitly lowered.
<P>
</DL>
<P>
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 &quot; OR'd &quot;. 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
<I>last style specified</I> is the one that's used.
<P>
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 <I>first</I> and then override these options by entering
in the specifics later.
<P>
Very cool!
<P>
Anyway, I'll be writing up more about this in the next edition of the LG.
<P>
Have Fun!
<P>
<A HREF="#toc"><IMG ALIGN=BOTTOM SRC="./gx/toc.gif"></A>
<A HREF="mailto: fiskjm@ctrvax.vanderbilt.edu"><IMG ALIGN=BOTTOM SRC="./gx/sendmail.gif"></A>
<A HREF="./gazette_toc.html"><IMG ALIGN=BOTTOM SRC="./gx/index.gif"></A>
<A HREF="./linux/linux.html"><IMG ALIGN=BOTTOM SRC="./gx/home.gif"></A>
<BR><BR>
<HR>
<!--SECTION 7 ------------------------------------------------------------------>
<H2><A NAME="colophon"><IMG ALIGN=BOTTOM SRC="../gx/text.gif">Colophon</A></H2>
<P>
Well, congratulations. You've made it. This is the end my friend.
<P>
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 &quot;tinker-time&quot; and the time spent
reading and answering mail. I truly appreciate the corrections and criticisms.
<P>
I'm not even GOING to tell you what to expect next month... :-)
<P>
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.
<P>
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 &quot;Hunt the
Wumpus...&quot; and such. However, I have started messing around with a few
new games such as <B>fly8, zapem, and koules</B>. 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.
<P>
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 <B>DoomII</B>. Yes,
I <I>know</I> 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 :-)
<P>
Still, I'd be interested in finding out who is playing what.
<P>
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.
<P>
Also, I totally skimmed over some of the cool stuff that comes with <B>XForms</B>.
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 <B>fdesign</B> 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.
<P>
<B>Finally, let me commend to you several web pages that might be of interest:</B>
<DL>
<DT>Here are several web sites dedicated to information on <B>FVWM</B>, including the
official FVWM home site:
<DD>
<P>
<A HREF="http://www.cs.hmc.edu/~tkelly/docs/proj/fvwm.html">The FVWM
Home Page (http://www.cs.hmc.edu/~tkelly/docs/proj/fvwm.html)</A>
by T. Kelly.<BR>
<A HREF="http://xenon.chem.uidaho.edu/~fvwm/">FVWM Info
(http://xenon.chem.uidaho.edu/~fvwm/)</A> by Todd
Postma. Lots of docs and links.<BR>
<P>
<DT>For those of you who might be interested in other window managers, there's
a web page dedicated to the <B>Generic Window Manager</B> that's located
at:
<DD> <P>
<A HREF="http://zenon.inria.fr/koala/gwm/">The GWM HomePage
(http://zenon.inria.fr/koala/gwm/)</A>
<P>
<DT><B>Herng-Jeng Jou</B> has an absolute <I>killer</I> 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.
<P>
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:
<UL>
<LI>Commercial Scientific packages
<LI>Matlab-like packages
<LI>Mathematics and Statistics
<LI>Signal, Communication, Image, and Data processing
<LI>Finite or Boundary Element
<LI>Numerical Analysis
<LI>Graphing and Visualization
<LI>Scientific Data Plotting packages
<LI>Scientific Data Plotting Libraries
<LI>General Purpose Graphic Libraries
<LI>Word Processing or Typesetting
<LI>X-Window GUI builders
</UL>
<P>
It is truly a <I>tour de force</I> and well worth the visit to HJ's page.
You'll find it at:
<P>
<DD><A HREF="http://lusk1.mines.edu/hjjou/linux_prg.html">Some Free Scientific
Software under Linux (http://lusk1.mines.edu/hjjou/linux_prg.html)</A>
<P>
<DT>Finally, I just got a note a couple days ago from <B>Jesper Pedersen</B>,
the author of the program
<B>Dotfile Generator</B>. 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 <B>FVWM Configuration</B>.
<P>
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.
<P>
Check out the web page at:
<P>
<DD> <A HREF="http://www.imada.ou.dk:/~blackie/dotfile/">
http://www.imada.ou.dk:/~blackie/dotfile</A>
</DL>
<P>
<B>NOTICE:</B>... I just got a note from Jesper saying that the person who had been
writing the module for BASH configuration had a <I>major hard drive crash</I>
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!
<P>
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 &quot;Fall Break&quot; in which
I wrote all day :-) Thank the admin at MTSU (and my wife for patiently bearing with
all of this...)
<P>
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.
<P>
See ya next month!
<P>
John
<P>
<A HREF="#toc"><IMG ALIGN=BOTTOM SRC="./gx/toc.gif"></A>
<A HREF="mailto: fiskjm@ctrvax.vanderbilt.edu"><IMG ALIGN=BOTTOM SRC="./gx/sendmail.gif"></A>
<A HREF="./gazette_toc.html"><IMG ALIGN=BOTTOM SRC="./gx/index.gif"></A>
<A HREF="./linux/linux.html"><IMG ALIGN=BOTTOM SRC="./gx/home.gif"></A>
<BR><BR>
<HR>
<!-- END OF FILE ---------------------------------------------------------------->
<H4>Got any <I>great</I> ideas for improvements! Send your
<A HREF="mailto:fiskjm@ctrvax.vanderbilt.edu">comments, criticisms, suggestions, and ideas.</A>
</H4>
<BR>
<IMG ALIGN=BOTTOM SRC="./gx/small_homeboy.gif"><A HREF="./linux/linux.html">Back up to Linux
HomeBoy WebPage</A><BR>
<BR>
<I>This page written and maintained by:</I><BR>
<ADDRESS>
<A HREF="./jmf.html">John M. Fisk</A> at<A HREF="mailto:fiskjm@ctrvax.vanderbilt.edu">
fiskjm@ctrvax.vanderbilt.edu</A>
</ADDRESS>
</BODY>
</HTML>