old-www/LDP/LG/issue22/issue22.html

7921 lines
329 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE> Linux Gazette Index Page </TITLE>
<META NAME="robots" CONTENT="noindex, nofollow">
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#0020F0"
ALINK="#FF0000" >
<center><H2><IMG SRC="../gx/newlogo.jpg"
ALT="Linux Gazette... making Linux just a little more fun!">
</H2>
<H5>Copyright &copy; 1996-97 Specialized Systems Consultants, Inc.</H5>
</center>
<P> <HR> <P>
<!--==================================================================-->
<center>
<H1>Welcome to Linux Gazette!<img src="../gx/tm.gif" alt="(tm)"></H1>
</center>
<P> <HR> <P>
<!--==================================================================-->
<H1>Published by:</H1>
<center>
<H1><A HREF="http://www.ssc.com/lj/">
<img src="../gx/ljlogo.gif" alt="Linux Journal"></A></H1>
</center>
<P><HR> <P>
<H1>Sponsored by:</H1>
<table>
<tr>
<td><H1><A HREF="http://www.infomagic.com/"><img ALIGN="bottom" HSPACE="70"
src=../gx/infologo.gif alt="InfoMagic"></A></H1></td>
<td>
<H1><A HREF="http://www.suse.com/"><img ALIGN="bottom" src=../gx/suse.gif alt="S.u.S.E."></A></H1></td>
<td>
<H1><A HREF="http://www.redhat.com/"><img HSPACE="70" src=../gx/redhat.gif alt="Red Hat"></A></H1></td>
</tr>
</table>
<P>
Our sponsors make financial contributions toward the costs of
publishing <I>Linux Gazette</I>. If you would like to become a sponsor
of <I>LG</I>, e-mail us at <A
HREF="mailto:sponsor@ssc.com">sponsor@ssc.com</A>.
<P> <HR> <P>
<!--=================================================================-->
<H1 align="center">Table of Contents <BR>October 1997 Issue
#22</H1>
<P> <HR> <P>
<table><tr>
<td rowspan=4>
<UL>
<LI><A HREF="../index.html">The Front Page</A>
<LI><A HREF="./lg_mail22.html">The MailBag</A>
<ul>
<li><a HREF="./lg_mail22.html#help">Help Wanted -- Article Ideas</a>
<li><a HREF="./lg_mail22.html#gen">General Mail</a>
</ul>
<LI><A HREF="./lg_tips22.html">More 2 Cent Tips</A>
<ul>
<li><a href="./lg_tips22.html#netscape">Netscape and Seyon
questions</a>
<li><a href="./lg_tips22.html#mailtips">Keeping track of tips</a>
<li><a href="./lg_tips22.html#tree">Displaying File Tree</a>
<li><a href="./lg_tips22.html#video">Making Changing X video modes
easier</a>
<li><a href="./lg_tips22.html#code">Tree Program</a>
<li><a href="./lg_tips22.html#find">Finding what you want with
find</a>
<li><a href="./lg_tips22.html#kermit">Minicom kermit help</a>
<li><a href="./lg_tips22.html#postscript">Postscript printing</a>
<li><a href="./lg_tips22.html#realaudio">Realaudio without
X-windows</a>
<li><a href="./lg_tips22.html#dynamic">Connecting to dynamic IP via
ethernet</a>
<li><a href="./lg_tips22.html#commandx">Running commands from X w/out
XTerm</a>
<li><a href="./lg_tips22.html#asciiftp">Ascii problems with FTP</a>
<li><a href="./lg_tips22.html#rhq">Red Hat Questions</a>
</ul>
<LI><A HREF="./lg_bytes22.html">News Bytes</A>
<ul>
<li><a HREF="./lg_bytes22.html#general">News in General</a>
<li><a HREF="./lg_bytes22.html#software">Software Announcements</a>
</ul>
<LI><A HREF="./lg_answer22.html">The Answer Guy</A>, by James T. Dennis
<ul>
<li><a HREF="./lg_answer22.html#fax">Faxing and Dialing-Out on the Same
Line</a>
<li><a HREF="./lg_answer22.html#286">Linux and the 286</a>
<li><a HREF="./lg_answer22.html#ext2fs">Accessing ext2fs from Windows
95</a>
<li><a HREF="./lg_answer22.html#chattr">chattr +i</a>
<li><a HREF="./lg_answer22.html#sendmail">Linux sendmail problem</a>
<li><a HREF="./lg_answer22.html#fetch">POP3 vs. /etc/passwd</a>
<li><a HREF="./lg_answer22.html#make">Problem with make</a>
<li><a HREF="./lg_answer22.html#swap">Swap partition and Modems</a>
<li><a HREF="./lg_answer22.html#rhmotif">Redhat 4.2/Motif</a>
<li><a HREF="./lg_answer22.html#email">E-mail adjustment needed</a>
<li><a HREF="./lg_answer22.html#realbios">REALBIOS?</a>
<li><a HREF="./lg_answer22.html#lib">X-Windows Libraries</a>
<li><a HREF="./lg_answer22.html#pc">PC Emulation</a>
<li><a HREF="./lg_answer22.html#vbasic">Visual Basic for Linux</a>
<li><a HREF="./lg_answer22.html#hardware">Linux 4.2 software and Hardware
compatablity problems</a>
<li><a HREF="./lg_answer22.html#mvusr">Moving /usr subdirectory to
another drive..</a>
<li><a HREF="./lg_answer22.html#cppx">C++ Integrated Programming
Enviroment for X...</a>
<li><a HREF="./lg_answer22.html#lynx">LYNX-DEV new to LYNX</a>
</ul>
<LI><A HREF="./gm.html">Graphics Muse</A>, by Michael J. Hammel
<LI><A HREF="./bench.html">Linux Benchmarking: Part 1 -- Concepts</a>,
The first article in a series, by Andr&eacute; D. Balsa
<LI><A HREF="./words.html">New Release Reviews</A>, by Larry Ayers
<ul>
<li><A HREF="./words.html"> Word Processing vs. Text Processing?</a>
<li><A HREF="./new_emacs.html"> A New GNU Version of Emacs</A>
<li><A HREF="./notes-mode.html">Notes-Mode for Emacs</A>
</ul>
<LI><A HREF="./using_m4.html">Using m4 To Write HTML</a>, by Bob Hepple
<LI><A HREF="./conn.html">An Introduction to The Connecticut Free Unix Group</a>, by Lou Rinaldi
<LI><A HREF="./haters.html">Review: The Unix-Hater's Handbook</a>, by Andrew Kuchling
<LI><A HREF="./lg_backpage22.html">The Back Page</A>
<ul>
<li><a HREF="./lg_backpage22.html#authors">About This Month's Authors</a>
<li><a HREF="./lg_backpage22.html#notlinux">Not Linux</a>
</UL>
</UL>
</a>
</td>
</tr><tr>
<td align=center>
<A HREF="lg_answer22.html">
<img src="../gx/wizard2.gif" border=0 alt="">
</a>
<A HREF="lg_answer22.html"><i>The Answer Guy</i></a>
</td>
</tr><tr>
<td align=center>
<A HREF="gm.html">
<IMG SRC="../gx/hammel/banner-3.gif" border=0 alt="">
</a>
</td>
</tr><tr>
<td align=center>
<img src="../gx/fisk/attndant.gif" border=0 alt="">
<I>The Weekend Mechanic will be back next month</I>
</td>
</tr><tr>
</table>
<P> <HR><P>
<!--=============================================================-->
<A HREF="./issue22.txt">TWDT 1 (text)</A><BR>
<A HREF="./issue22.html">TWDT 2 (HTML)</A><BR>
are files containing the entire issue: one in text format, one in HTML.
They are provided
strictly as a way to save the contents as one file for later printing in
the format of your choice;
there is no guarantee of working links in the HTML version.
<!--=============================================================-->
<P> <HR><P>
Got any <I>great</I> ideas for improvements! Send your
<A HREF="mailto:gazette@ssc.com">comments, criticisms, suggestions
and ideas.</A>
<P><hr><p>
This page written and maintained by the Editor of <I>Linux Gazette</I>,
<A HREF="mailto: gazette@ssc.com"> gazette@ssc.com</A>
<H4>&quot;Linux Gazette...<I>making Linux just a little more fun!</I>&quot;</H4>
<HR>
<center>
<table width="100%" cellpadding=7><tr><td>
<H2><a NAME="mail"><IMG SRC="../gx/mailbox.gif" ALIGN=MIDDLE ALT=" ">
The Mailbag!</a> </H2>
Write the Gazette at <A HREF="mailto:gazette@ssc.com"> gazette@ssc.com</A>
</td><td>
<H3>Contents:</H3>
<ul>
<li><a HREF="./lg_mail22.html#help">Help Wanted -- Article Ideas</a>
<li><a HREF="./lg_mail22.html#gen">General Mail</a>
</ul>
</td></tr></table>
</center>
<a name="help"></a>
<p><hr><p>
<!-- =================================================================== -->
<center><H3> Help Wanted -- Article Ideas </H3></center>
<P> <HR> <P>
<!--====================================================================-->
<IMG ALT=" " SRC="../gx/envelope.gif">
Date: Mon, 25 Aug 1997 15:02:14 -0700<BR>
From: cooldude <a href="mailto:cooldude@digitalcave.com">cooldude@digitalcave.com</a><br>
Subject: how do
<p>how do i setup a linux server from scratch?
<BR>
my freind has the t1 connection and im gonna admin it with his ermission
need ta know A. S.A.P.
<BR>
=)
<BR>
thanks
<P> <HR> <P>
<!--====================================================================-->
<IMG ALT=" " SRC="../gx/envelope.gif">
Date: Mon, 1 Sep 97 18:59:51 UT<BR>
From: Richard Wang <a href="mailto:rzlw1@classic.msn.com">rzlw1@classic.msn.com</a><br>
Hi,
<BR>
I have just set up a system for RedHat Linux, but I am finding getting real
support for
this system is very difficult. In fact, I cannot even setup my webpage via
SLIP from
the manuals I have. Redhat seems to go against it'scompetitor Caldera, and I
am
finding it hard to find the right manuals and guides for this system.
<BR>
Do you have an online help person, who I can log to ?
<BR>
Looking forward to your reply,
<p>
Richard Wang<BR>
Cambridge<BR>
United Kingdom<BR>
<P> <HR> <P>
<!--====================================================================-->
<IMG ALT=" " SRC="../gx/envelope.gif">
Date: Wed, 17 Sep 1997 19:49:55 -0700<BR>
From: Garry Jackson <a href="mailto:gjackson@home.com">gjackson@home.com</a><br>
Subject: Linux Problem.
<p>
I'm a linux newbie and I'm having major problems. I have a monitor that
is kapible of 800X600 and I don't know anything else about it. I Also
have a Trio 32/64. I cannot get Xwindows to go so what should I do.
<P>
Also I'm have a problem with my SB16 PNP and I can't get that to work
and I can't get a Supra 28.9 PnP and a SN-3200 witch is a NE-200 clone
if you could give me any tips on getting this stuff work It would be
thanked.
<P>
Garry Jackson
<P> <HR> <P>
<!--====================================================================-->
<IMG ALT=" " SRC="../gx/envelope.gif">
Date: Wed, 3 Sep 1997 19:28:20 -0400
<BR>
From: Prow <a href="mailto:Prowlyr@mindspring.com">Prowlyr@mindspring.com</a><br>
Subject: Just some really basic help please.
<p>
I want to learn about unix but really dont know where to start. Can I get
a free version somewhere to get me started? Do you know of a good Unix for
dummies site that might help? Would greatly appreciate any reply via
e-mail. Thanx in advance.
<P> <HR> <P>
<!--====================================================================-->
<IMG ALT=" " SRC="../gx/envelope.gif">
Date: Tue, 09 Sep 1997 00:49:50 +0200
<BR>
From: Michael Stumpf <a href="mailto:ms@astat.de">ms@astat.de</a><br>
Subject: Linux Kernel
<p>I'm searching information about the status of the current kernel
(release and/or developer).
Do you have a web-address from an up-to-date site ?
I used to look at "http://www.linuxhq.com" for this, but it seems that
it is forever down.
<P>
tia
<P> Michael
<P> <HR> <P>
<!--====================================================================-->
<IMG ALT=" " SRC="../gx/envelope.gif">
Date: Sat, 27 Sep 1997 11:02:04 -0400<br>
From: Dave Runnels
<a href="mailto:drunnels@panix.com">drunnels@panix.com</a><br>
Subject: 3com509b problems
<br>
<p>
I recently added a 3com509b Ethernet card to my Win95/Linux machine. I
run the machine in PnP mode and the RedHat 4.2 install process won't
recognize the card. RedHat's solution was to disable PnP for the
machine. While this might be fine for Linux, I am forced to use Win95
for a number of things and turning off PnP (which works great for me on
Win95) will be a real pain in the ass.
<p>
Is there a way I might have my cake and eat it too? I do know which IRQ
the card is being assigned to.
<p>
Thanks, Dave
<P> <HR> <P>
<!--====================================================================-->
<IMG ALT=" " SRC="../gx/envelope.gif">
Date: Mon, 22 Sep 1997 10:06:04 +0200
<br>From: Erwin Penders <a href="mailto:ependers@cobweb.nl">ependers@cobweb.nl
</a><br>
Subject: email only<p>
Hi,
<p>
My name is Erwin Penders an i'm working for a local ISP in the
Netherlands.
I don't know if i send this mail to the right place, but i have a question
about a
Linux problem.
I want to know how to set up an email-only account (so you can call the
ISP,
make a connection and send/receive email) without the possiblity for WWW,
Telnet etc. The main problem is that i don't know how to set up the
connection
(the normal accounts get a /etc/ppp/ppplogin).... . .
<p>
Can anybody help me with this problem !?
<p>
Thanks,
<p>
Erwin Penders<br>
(CobWeb)
<P> <HR> <P>
<!--====================================================================-->
<IMG ALT=" " SRC="../gx/envelope.gif">
Date: Sat, 20 Sep 1997 22:00:38 +0200<br>
From: Richard Torkar
<a href="mailto:richard.torkar@goteborg.mail.telia.com">
richard.torkar@goteborg.mail.telia.com</a><br>
Subject: Software for IDE cd-r?
<br><p>
First of all Thanks for a great e-zine!
<p>
And then to my question... (You didn't really think that I wrote to you
just to be friendly did you? ;-)
<p>
Is there any software written for IDE cd-r for example Mitsumi CR2600TE?
<p>
I found two programs; Xcdroast and CDRecord for Linux, but unfortunately
they don't support IDE cd-r :-(
<p>
I haven't found anything regarding this problem and I've used darned
near all search tools on the net...
Any answer would be appreciated. If the answer is no, can I solve this
problem somehow?
<p>
Regards,<br>
Richard Torkar from the lovely land of ice beers .. ;-)
<P> <HR> <P>
<!--====================================================================-->
<IMG ALT=" " SRC="../gx/envelope.gif">
Date: Thu, 18 Sep 1997 16:03:04 -0400 (EDT)<br>
From: Eric Maude <a href="mailto:sabre2@mindspring.com">
sabre2@mindspring.com</a><br>
Subject: Redhat Linux 4.3 Installation Help<br><p>
I am trying to install Redhat Linux 4.3 on a Windows 95 (not OSR 2)
machine.
I do want to set this machine up as dual boot but that's not really my
problem. I have been totally unable to set up Linux because I am unable to
set up the Non-MS DOS partition that Linux requires. I am pretty new to
Linux. I would appreciate anyone that could give me detailed step by step
instructions on how I go about setting up Redhat Linux. I would call
Redhat
directly but I am at work during their operating hours and not near the
machine I need help with this! Please, somebody help me out!!
<p>
Thanks!!
<a name="gen"></a>
<P> <hr> <P>
<!-- =================================================================== -->
<center><H3> General Mail </H3></center>
<P> <HR> <P>
<!--====================================================================-->
<IMG ALT=" " SRC="../gx/envelope.gif">
Date: Fri, 29 Aug 1997 11:02:39 -0300<BR>
From: Mario Storti <a href="mailto:mstorti@minerva.unl.edu.ar">mstorti@minerva.unl.edu.ar</a><br>
Subject: acknowledge to GNU software<BR>
<p>
(Sorry if this is off-topic)
<p>
From now on I will put a mention to the GNU (and free in general)
software I make use in the "acknowledgment" section of my (scientific)
papers. I suggest to do the same to all those who are working on
scientific applications. Since Linux is getting stronger every day in
the scientific community, this could represent an important support,
specially when requesting funding. Even better would be to make a
database with all these "acknowledgments" in a Web site or something
similar. Do anyone know of something like this that is already
working? Any comments?
<p>
Mario
<P> <HR> <P>
<!--====================================================================-->
<IMG ALT=" " SRC="../gx/envelope.gif">
Date: Sun, 07 Sep 1997 23:58:16 -0500
<BR>From: mike shimanski <a href="mailto:mshiman@xnet.com">mshiman@xnet.com</a><br>
Subject: Fun
<p>
I just discovered Linux in July and am totally pleased. After years
of Dos, Win 3.1, OS/2 and Win95, ( I won't discuss my experience with
Apple), I think I found an operating system I can believe in.I cannot
make this thing crash!
<p> The Linux Gazette has been a rich source of information and makes
being a newbe a great deal easier.I want to thank you for the time and
effort you put into this publication. It has made my induction into the
Linux world a lot easier.
<p> Did I mention I am having way too much fun exploring this operating
system? Am I wierd or what?
<p> Again, thanks for a great resource.
<p> Mike Shimanski
<P> <HR> <P>
<!--====================================================================-->
<IMG ALT=" " SRC="../gx/envelope.gif">
Date: Sat, 06 Sep 1997 18:01:52 -0700
<BR>From: George Smith
<a href="mailto:gbs@swdc.stratus.com">gbs@swdc.stratus.com</a><br>
Subject: Issue 21
<P>
THANKS! Thanks! Thank You!
<P>
Issue 21 was great! I loved it! I most appreciate the ability to
download it to local disk and read it without my network connection
being live and with the speed of a local disk. Please keep offering
this feature - I wish everyone did. BTW, I am a subscriber to the
Linux Journel from issue 1 and enjoy it immensely also.
<P>
Thanks again.
<P> <HR> <P>
<!--====================================================================-->
<IMG ALT=" " SRC="../gx/envelope.gif">
Date: Wed, 03 Sep 1997 19:34:29 -0500
<BR>
From: Mark C. Zolton <a href="mailto:trustno1@kansas.net">trustno1@kansas.net</a><br>
Subject: Thank you Linux Gazzette
<P>
Hello There,
<P>
I just wanted to thank you for producing such a wonderful publication.
As a relative newbie to Linux, I have found your magazine of immense use
in answering the plethora of questions I have. Keep up the good work.
Maybe oneday I'll be experienced enough to write for you.
<P>
Mark
<P> <HR> <P>
<!--====================================================================-->
<IMG ALT=" " SRC="../gx/envelope.gif">
Date: Mon, 1 Sep 1997 00:09:53 -0500 (CDT)
<BR>From: Arnold Hennig <a href="mailto:amjh@qns.com">amjh@qns.com</a><br>
Subject: Response to req. for help - defrag
<BR><p>
I saw the request for information about the (lack of) need for defragging
in issue 20, and have just been studying the disk layout a bit anyway.
<P>
Hope the following is helpful:
<P>
In reference to the question titled "Disk defrag?" in issue 20 of the
Linux Gazette:
<P>
I had the same question in the back of my mind once I finally Linux up and
running after some years of running a DOS based computer. After I was
asked the same question by someone else, I poked around a bit and did find
a defrag utility buried someplace on sunsite. The documentation pretty
much indicated that with the ext2 file system it is rarely necessary to
use the utility (he wrote it prior to the general use of ext2fs). He gave
a bit of an explanation and I found some additional information the other
day following links that (I believe) originated in the Gazette.
<P>
Basically, DOS does not keep a map of the disk usage in memory, and each
new write simply starts from the next available free cluster (block),
writes till it gets to the end of the free space and then jumps to the
next free space and continues. After it reaches the end of the disk or at
the next reboot, the "next free cluster" becomes the "first free cluster",
which is probably where something was deleted, and may or may be an
appropriate amount of free space for the next write. There is no planning
ahead for either using appropriate sized available spaces or for
clustering related files together. The result is that the use of space on
the disk gets fragmented and disorganized rather quickly, and the defrag
utilities are a necessary remedy.
<P>
In fairness to DOS, it was originally written for a computer with precious
little memory, and this method of allocating write locations didn't strain
the resources much.
<P>
The mounting requirement under unices allows the kernel to keep a map of
the disk usage and allocate disk space more intelligently. The Ext2
filesystem allocates writes in "groups" spread across the area of the
disk, and allocates files in the same group as the directory to which they
belong. This way the disk optimization is done as the files are written
to disk, and a separate utility is not needed to accomplish it.
<P>
Your other probable source of problems is unanticipated shutdowns (power
went out, Dosemu froze the console and you don't have a way to dial in
through the modem to kill it - it kills clean, btw ;-), or your one year
old niece discovered the reset button). This will tend to cause lost
cluster type problems with the files you had open at the time, but the
startup scripts almost universally run fsck, which will fix these
problems. You WILL notice the difference in the startup time when you have
had an improper shutdown.
<P>
So, yes, you may sleep with peace of mind in this respect.
<P>
Arnold M.J. Hennig
<P> <HR> <P>
<!--====================================================================-->
<IMG ALT=" " SRC="../gx/envelope.gif">
Date: Wed, 3 Sep 1997 16:19:17 -0600 (MDT)
<br>
From: Mark Midgley <a href="mailto:midgley@pht.com">midgley@pht.com</a><br>
Subject: Commercial Distribution
<P>
Mo'Linux, a monthly Linux distribution produced by Pacific HiTech, Inc.
includes current Linux Gazette issues. They are copied in whole,
according to the copyright notice.
<P>
Mark
<P> <HR> <P>
<!--====================================================================-->
<IMG ALT=" " SRC="../gx/envelope.gif">
Date: Thu, 11 Sep 1997 12:26:53 -0400
<br>
From: Brian Connors <a href="mailto:connorbd@bc.edu">connorbd@bc.edu</a><br>
Subject: Linux and Mac worlds vs Microsoft?
<P>
Michael Hammel made an interesting comment in the September letters
column about aligning with Mac users against Microsoft. The situation's
not nearly as rosy as all that, what with Steve Jobs' latest activity in
the Mac world. As a Mac diehard, I'm facing the prospect of a good
platform being wiped out by its own creator, whether it's really his
attention or not. IMHO the Linux world should be pushing for things like
cheap RISC hardware (which IBM and Motorola have but aren't pushing) and
support from companies like Adobe. I know that in my case, if the MacOS
is robbed of a future, I won't be turning to Windows for anything but
games...
<P> <HR> <P>
<!--====================================================================-->
<IMG ALT=" " SRC="../gx/envelope.gif">
Date: Thu, 11 Sep 1997 22:59:19 +0900<br>
From: mark stuart
<a href="mailto:mark@www.hotmail.com">mark@www.hotmail.com</a><br>
Subject: article ideas<br><p>
why not an issue on linux on sparc and alpha(especially for scientific
applications)
and also how about an issue on SMP with linux?
<P> <HR> <P>
<!--====================================================================-->
<IMG ALT=" " SRC="../gx/envelope.gif">
Date: Sat, 27 Sep 1997 01:57:09 -0700 (PDT)
<br>From: Ian Justman <a href="mailto:ianj@chocobo.org">ianj@chocobo.org</a><br>
<p>
Except for the SNA server, all I've got to say about Linux with all the
necessary software is: "Eat your heart out, BackOffice!"
<p>
--Ian.
<P> <HR> <P>
<!--====================================================================-->
<IMG ALT=" " SRC="../gx/envelope.gif">
Date: Wed, 24 Sep 1997 21:49:28 -0700<br>
From: Matt Easton <a href="mailto:measton@lausd.k12.ca.us">
measton@lausd.k12.ca.us</a><br>
Subject: Thanks<br><p>
Thank you for Linux Gazette. I learn a lot there; and also feel more
optimistic about things not Linux after visiting.
<P> <HR> <P>
<!--====================================================================-->
<IMG ALT=" " SRC="../gx/envelope.gif">
Date: Fri, 26 Sep 1997 13:24:29 -0500<br>
From: "Samuel Gonzalez, Jr." <a href="mailto:buzz@pdq.net">buzz@pdq.net</a>
<br>Subject: Excellent Job<br><p>
Excellent job !!!<p>
Sam
<P> <hr> <P>
<!--================================================================-->
<center>Published in Linux Gazette Issue 22, October 1997</center>
<!--====================================================================-->
<P> <hr> <P>
<A HREF="./index.html"><IMG SRC="../gx/indexnew.gif" ALT="[ TABLE OF
CONTENTS ]"></A>
<A HREF="../index.html"><IMG SRC="../gx/homenew.gif" ALT="[ FRONT
PAGE ]"></A>
<A HREF="./lg_tips22.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>
<P>
<h5>This page written and maintained by the Editor of <I>Linux Gazette</I>,
<A HREF="mailto: gazette@ssc.com">gazette@ssc.com</A><BR>
Copyright &copy; 1997 Specialized Systems Consultants, Inc. </H5>
<P>
<p><hr><p>
<H4>&quot;Linux Gazette...<I>making Linux just a little more fun!</I>
&quot;</H4>
<P> <hr> <P>
<!-- QUICK TIPS SECTION ================================================== -->
<center>
<H1><A NAME="tips"><IMG ALIGN=MIDDLE ALT="" SRC="../gx/twocent.gif">
More 2&#162; Tips!</A></H1> <BR>
Send Linux Tips and Tricks to <A HREF="mailto:gazette@ssc.com">
gazette@ssc.com
</A></center>
<p><hr><p>
<H3>Contents:</H3>
<ul>
<li><a href="./lg_tips22.html#netscape">Netscape and Seyon
questions</a>
<li><a href="./lg_tips22.html#mailtips">Keeping track of tips</a>
<li><a href="./lg_tips22.html#tree">Displaying File Tree</a>
<li><a href="./lg_tips22.html#video">Making Changing X video modes
easier</a>
<li><a href="./lg_tips22.html#code">Tree Program</a>
<li><a href="./lg_tips22.html#find">Finding what you want with
find</a>
<li><a href="./lg_tips22.html#kermit">Minicom kermit help</a>
<li><a href="./lg_tips22.html#postscript">Postscript printing</a>
<li><a href="./lg_tips22.html#realaudio">Realaudio without
X-windows</a>
<li><a href="./lg_tips22.html#dynamic">Connecting to dynamic IP via
ethernet</a>
<li><a href="./lg_tips22.html#commandx">Running commands from X w/out
XTerm</a>
<li><a href="./lg_tips22.html#asciiftp">Ascii problems with FTP</a>
<li><a href="./lg_tips22.html#rhq">Red Hat Questions</a>
</ul>
<P> <hr> <P>
<!--================================================================-->
<a name="netscape"></a>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
Netscape and Seyon questions
</H3>
<P>
Date: Mon, 8 Sep 1997 11:23:51 -0600 (MDT)<br>
From: "Michael J. Hammel" <a href="mailto:mjhammel@long.emass.com">mjhammel@long.emass.com</a>
<P>
Lynn Danielson asked:<p>
<p>I downloaded Netscape Communicator just a few weeks ago from
the Netscape site. I'm not sure older versions of Netscape are still
available. I'm probably wrong, but I was under the impression that
only the most current beta versions were freely available.
<P>
Answer:<p>
A quick search through Alta-Vista for Netscape mirrors showed a couple of
different listing for mirror sites. I perused a few and found most either
didn't have anything or had non-English versions, etc. One site I did find
with all the appropriate pieces is:
<P>
<a href="ftp://ftp.adelaide.edu.au/pub/WWW/Netscape/pub/">
ftp://ftp.adelaide.edu.au/pub/WWW/Netscape/pub/
</a>
<P>
Its a long way to go to get it (Australia), but thats all I could find. If
you want to go directly to the latest (4.03b8) Communicator directory, try:
<P>
<a href="ftp://ftp.adelaide.edu.au/pub/WWW/Netscape/pub/communicator/4.03/4.03b8/english/unix/">
ftp://ftp.adelaide.edu.au/pub/WWW/Netscape/pub/communicator/4.03/4.03b8/english/unix/
</a>
<P>
I did notice once while trying to download from Netscape that older
versions were available, although I didn't try to download them. I noticed
this while looking for the latest download of Communicator through their
web sites. Can't remember how I found that, though.
<P>
The 3.x version is available commercially from Caldera. I expect that the
4.x versions will be as well, though I don't know if Caldera keeps the beta
versions on their anonymous ftp sites.
<P>
BTW, the Page Composer is pretty slick, although it has no interface for
doing Javascript. It has a few bugs, but its the best WYSIWYG interface
for HTML composition on Linux that I've seen. Its better than Applix's
HTML Editor, although that one does allow exporting to non-HTML stuff.
Collabra Discussions sucks. The old news reader was better at most things.
I'd still like to be able to mark a newsgroup read up to a certain point
instead of the all-or-nothing bit.
<P>
For anyone who is interested - 4.x now supports CSS (Cascading Style
Sheets) and layers. Both of these are *very* cool. They are the future of
Web design and, IMHO, a very good way to create Multimedia applications for
distribution on CDs. One of C|Net's web pages (I think) has some info on
these items, including a demo of layers (moves an image all over the screen
*over* the underlying text - way cool). The only C|Net URL I ever remember
is www.news.com, but you can get to the rest of their sites from there.
<P>
-- Michael J. Hammel
<P> <hr> <P>
<!--================================================================-->
<a name="mailtips"></a>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
Keeping track of tips
</H3>
<P>
Date: Tue, 26 Aug 1997 16:29:13 +0200
<br>
From: Ivo Saviane <a href="mailto:saviane@astrpd.pd.astro.it">saviane@astrpd.pd.astro.it</a>
<P>
<p>Dear LG,
<p>it always happens to me that I spend a lot of time finding out how to
do a certain thing under Linux/Unix, and then I forget it. The next time
I need that information I will start all the `find . ...', `grep xxx *' process
again and waste the same amount of time!
<p>
To me, the best way to avoid that is to send a mail to myself telling how
to do that particular operation. But mail folders get messy and, moreover,
are not useful to other users who might need that same information.
<p>
Finally I found something that contributes solving this problem. I set up
a dummy user who reads his mail and puts it in www readable form. Now it is
easy for me to send a mail to news@machine as soon as I learn something,
and be sure that I will be able to find that information again just
clicking on the appropriate link. It would also be easy to set up a grep
script and link it to the same page.
<p>
The only warning is to put a meaningful `subject: ' to the mail, since
this string will be written besides the link.
<p>
I am presently not aware of something similar.
At least, not that simple. It you know, let me know too!
<p>
If you want to see how this works, visit
<p>
<a href="http://obelix.pd.astro.it/~news">http://obelix.pd.astro.it/~news</a>
<p>
A quick description of the basic operations needed is given below.
<p>
--------------------------------------------------------------------------
<p>
The following lines briefly describe how to set up the light news server.
<p>
1. Create a new user named `news'
<p>
2. Login as news and create the directories ~/public_html
and ~/public_html/folders (I assume that your http server is configured
so that `http://machine/~user' will point to `public_html' in the user's
$HOME).
<p>
3. Put the wmanager.sh script in the $HOME/bin directory. The script follows
the main body of this message as attachment [1]. The script does work
under bash.
<p>
The relevant variables are grouped at the beginning of the script. These
should be changed according to the machine/user setup
<p>
4. The script uses splitmail.c in order to break the mail file in sub-folders
The binary file should be put in the $HOME/bin dir. See attachment [2].
<p>
5. Finally, add a line in the `news' user crontab, like the following
<p>
00 * * * * /news_bin_dir/wmanager.sh
<p>
where `news_bin_dir' stands for $HOME/bin. In this case the mail will be
checked once every hour.
<p>
<p>
---------------------------------- attachment [1]
<pre>
#!/bin/sh
# wmanager.sh
# Updates the www news page reading the user's mails
# (c) 1997 Ivo Saviane
# requires splitmail (attachment [2])
## --- environment setup
BIN=/home/obelnews/bin # contains all the executables
MDIR=/usr/spool/mail # mail files directory
USR=news # user's login name
MFOLDER=$MDIR/$USR # user's mail file
MYFNAME=`date +%y~%m~%d~%H:%M:%S.fld` # filename for mail storage under www
FLD=folders # final dir root name
PUB=public_html # httpd declared public directory
PUBDIR=$HOME/$PUB/$FLD
MYFOLDER=$PUBDIR/$MYFNAME
INDEX=$HOME/$PUB/index.html
## --- determines the mailfile size
MSIZE=`ls -l $MFOLDER | awk '{print $5}'`
## --- if new mail arrived goes on; otherwise does nothing
if [ $MSIZE != "0" ]; then
## --- writes the header of index.html in the pub dir
echo "&lt;html&gt;&lt;head&gt;&lt;title&gt; News! &lt;/title&gt;&lt;/head&gt;" &gt; $INDEX
echo "&lt;h2&gt; Internal news archive &lt;/h2&gt; &lt;p&gt;&lt;p&gt;" &gt;&gt; $INDEX
echo "Last update: &lt;i&gt;`date`&lt;/i&gt; &lt;hr&gt;" &gt;&gt; $INDEX
## --- breaks the mail file in single folders; splitmail.c must be compiled
$BIN/splitmail $MFOLDER &gt; $MFOLDER
## --- each folder is copied in the folder dir, under the pub dir,
## and given an unique name
for f in $MFOLDER.*; do\
NR=`echo $f | cut -d. -f2`;\
MYFNAME=`date +%y~%m~%d~%H:%M:%S.$NR.fld`;\
MYFOLDER=$PUBDIR/$MYFNAME;\
mv $f $MYFOLDER;\
done
## --- prepares the mailfile for future messages
rm $MFOLDER
touch $MFOLDER
## --- Now creates the body of the www index page, searching the folders
## dir
for f in `ls $PUBDIR/* | grep -v index`; do\
htname=`echo $f | cut -d/ -f5,6`;\
rfname=`echo $f | cut -d/ -f6 | sed 's/.fld//g'`;\
echo \&lt;a href\=\"$htname\"\&gt; $rfname\&lt;\/a\&gt; &gt;&gt; $INDEX;\
echo \&lt;strong\&gt; &gt;&gt; $INDEX;\
grep "Subject:" $f | head -1 &gt;&gt; $INDEX;\
echo \&lt;/strong\&gt; &gt;&gt; $INDEX;\
echo \&lt;br\&gt; &gt;&gt; $INDEX;\
done
echo "&lt;hr&gt;End of archive" &gt;&gt; $INDEX
echo "&lt;/html&gt;" &gt;&gt; $INDEX
fi
</pre>
<P>
---- attachment [2]<br>
<pre>
/******************************************************************************
Reads stdin. Assuming that this has a mailfile format, it breaks the input
in single messages. A filestem must be given as argument, and single
messages will be written as filestem.1 filestem.2 etc.
(c) 1997 I.Saviane
******************************************************************************/
#define NMAX 256
/*****************************************************************************/
#include &lt;stdio.h&gt;
/*****************************************************************************/
/*****************************************************************************/
/************************** MAIN **************************************/
int main(int argc, char *argv[]) {
FILE *fp;
char mline[NMAX], mname[NMAX];
int nmail=0, open;
if(argc &lt; 2) {
fprintf(stderr, "splitmail: no input filestem");
return -1;
}
fp = fopen("/tmp/xx", "w");
while(fgets(mline, NMAX, stdin) != NULL) {
open = IsFrom(mline);
if(open==1) {
fclose(fp);
nmail++;
sprintf(mname, "%s.%d", argv[1], nmail);
fp = fopen(mname, "w");
open = 0;
}
fprintf(fp, "%s", mline);
}
fclose(fp);
system("rm /tmp/xx");
return 1;
}
/*****************************************************************************/
int IsFrom(char *s) {
if(s[0]=='F' && s[1]=='r' && s[2]=='o' && s[3]=='m' && s[4]==' ') {
return 1;
} else {
return 0;
}
}</pre>
<P> <hr> <P>
<!--================================================================-->
<a name="tree"></a>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
Displaying File Tree
</H3>
<P>
Date: Tue, 26 Aug 1997 16:40:43 -0400 (EDT)
<br>
From: Scott K. Ellis <a href="mailto:storm@gate.net">storm@gate.net</a><br>
<p>A nice tool for displaying a graphic tree of files or directories in your
filesystem can be found at your local sunsite mirror under
/pub/Linux/utils/file/tree-1.2.tgz. It is also included as the package
tree included in the Debian distribution.
<P>
<hr> <P>
<!--================================================================-->
<a name="video"></a>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
Making Changing X video modes easier
</H3>
<P>
Date: Thu, 28 Aug 1997 20:29:59 +0100<br>
From: Jo Whitby <a href="mailto:pandore@globalnet.co.uk">pandore@globalnet.co.uk</a><br>
Hi
<P>
In issue 20 of the Linux gazette there was a letter from Greg Roelofs on
changing video modes in X - this was something I had tried and had found
changing colour depths awkward, and didn't know how to start multiple
versions of X.
<P>
I also found the syntax of the commands difficult to remember, so here's
what I did.
<P>
First I created 2 files in /usr/local/bin called x8 and x16 for the
colour depths that I use, and placed the command in them -
<P>
for x8
<pre>
#!/bin/sh
startx -- :$* -bpp 8 &
</pre>
<P>
and for x16
<P>
<pre>
#!/bin/sh
startx -- :$* -bpp 16 &
</pre>
<P>
then I made them executable -
<P>
<pre>
chmod -c 755 /usr/local/bin/x8
chmod -c 755 /usr/local/bin/x16
</pre>
<P>
now I simply issue the command x8 or x16 for the first instance of X and
x8 1 or x16 1 for the next and so on, this I find much easer to
remember:-) An addition I would like to make would be to check which X
servers are running and to increment the numbers automatically, but as I
have only been running Linux for around 6 months my script writing is
extremely limited, I must invest in a book on the subject.
<P>
Linux is a fantastic OS, now I've tried it I could not go back to
Windoze and hate having to turn my Linux box into a wooden doze box just
to run the couple of progs that I can't live without (Quicken 4 and a
lottery checking prog), so if anyone knows of a good alternative to
these please let me know, the sooner doze is gone for good the better -
then Linux can have the other 511Mb of space doze95 is hogging!
<P>
ps. Linux Gazette is just brilliant, I've been reading all the back
issues, nearly caught up now - only been on the net for 3 months. I hope
to be able to contribute something a little more useful to the Gazette
in the future, when my knowledge is a little better:-)
<P>
keep up the good work.
<P> <hr> <P>
<!--================================================================-->
<a name="code"></a>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
Tree Program
</H3>
<P>
Date: Mon, 01 Sep 1997 03:28:57 -0500<br>
From: Ian <a href="mailto:Beth13@mail.utexas.edu">Beth13@mail.utexas.edu</a><br>
<p>
Try this instead of the tree shell-script mentioned earlier:<br>
--------- Cut here --------
<pre>
#include &lt;stdlib.h&gt;
#include &lt;stdio.h&gt;
#include &lt;sys/stat.h&gt;
#include &lt;unistd.h&gt;
#include &lt;sys/types.h&gt;
#include &lt;dirent.h&gt;
// This is cool for ext2.
#define MAXLEN 256
#define maxdepth 4096
struct dnode {
dnode *sister;
char name[MAXLEN];
};
const char *look;
const char *l_ascii="|+`-";
const char l_ibm[5]={179,195,192,196,0};
int total;
char map[maxdepth];
void generate_header(int level) {
int i;
for (i=0;i&lt;level;i++) printf(" %c ",(map[i]?look[0]:32));
printf (" %c%c ",(map[level]?look[1]:look[2]),look[3]);
}
dnode* reverselist(dnode *last) {
dnode *first,*current;
first=NULL;
current=last;
// Put it back in order:
// Pre: last==current, first==NULL, current points to backwards linked
list
while (current != NULL) {
last=current->sister;
current->sister=first;
first=current;
current=last;
}
return first;
}
void buildtree(int level) {
dnode *first,*current,*last;
first=current=last=NULL;
char *cwd;
struct stat st;
if (level>=maxdepth) return;
// This is LINUX SPECIFIC: (ie it may not work on other platforms)
cwd=getcwd(NULL,maxdepth);
if (cwd==NULL) return;
// Get (backwards) Dirlist:
DIR *dir;
dirent *de;
dir=opendir(cwd);
if (dir==NULL) return;
while ((de=readdir(dir))) {
// use de->d_name for the filename
if (lstat(de->d_name,&st) != 0) continue; // ie if not success go on.
if (!S_ISDIR(st.st_mode)) continue; // if not dir go on.
if (!(strcmp(".",de->d_name) && strcmp("..",de->d_name))) continue; //
skip ./
..
current=new dnode;
current->sister=last;
strcpy(current->name,de->d_name);
last=current;
}
closedir(dir);
first=reverselist(last);
// go through each printing names and subtrees
while (first != NULL) {
map[level]=(first->sister != NULL);
generate_header(level);
puts(first->name);
total++;
// consider recursion here....
if (chdir (first->name) == 0) {
buildtree(level+1);
if (chdir (cwd) != 0) return;
}
current=first->sister;
delete first;
first=current;
}
free (cwd);
}
void tree() {
char *cwd;
cwd=getcwd(NULL,maxdepth);
if (cwd==NULL) return;
printf("Tree of %s:\n\n",cwd);
free (cwd);
total=0;
buildtree(0);
printf("\nTotal directories = %d\n",total);
}
void usage() {
printf("usage: tree {-[agiv]} {dirname}\n\n");
printf("Tree version 1.0 - Copyright 1997 by Brooke Kjos
&lt;beth13@mail.utexas.ed
u&gt;\n");
printf("This program is covered by the Gnu General Public License
version 2.0\n
");
printf("or later (copyleft). Distribution and use permitted as long
as\n");
printf("source code accompanies all executables and no additional\n");
printf("restrictions are applied\n");
printf("\n\n Options:\n\t-a use ascii for drawings\n");
printf("\t-[ig] use IBM(tm) graphics characters\n");
printf("\t-v Show version number and exit successfully\n");
};
void main (int argc,char ** argv) {
look=l_ascii;
int i=1;
if (argc>1) {
if (argv[1][0]=='-') {
switch ((argv[1])[1]) {
case 'i':
case 'I':
case 'g':
case 'G':
look = l_ibm;
break;
case 'a':
case 'A':
look = l_ascii;
break;
case 'v':
case 'V':
usage();
exit(0);
default:
printf ("Unknown option: %s\n\n",argv[1]);
usage();
exit(1);
} // switch
i=2;
} // if2
} // if1
if (argc > i) {
char *cwd;
cwd=getcwd(NULL,maxdepth);
if (cwd==NULL) {
printf("Failed to getcwd:\n");
perror("getcwd");
exit(1);
}
for (;i&gt;argc;i++) {
if (chdir(argv[i]) == 0) {
tree();
if (chdir(cwd) != 0) {
printf("Failed to chdir to cwd\n");
exit(1);
}
}
else printf("Failed to chdir to %s\n\n",argv[i]);
} // for
free (cwd);
} else tree();
}</pre><BR>
------- Cut Here --------
<P>Call this tree.cc and run gcc -O2 tree.cc -o /usr/local/bin/tree.
<P> <hr> <P>
<!--================================================================-->
<a name="rcs"></a>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
Managing an Entire Project
</H3>
<P>
Date: Tue, 26 Aug 1997 16:44:06 -0400 (EDT)<br>
From: Scott K. Ellis <a href="mailto:storm@gate.net">storm@gate.net</a><br>
<p>While RCS is useful for managing one or a small set of files, CVS is a
wrapper around RCS that allows you to easily keep track of revisions
across an entire project.
<P> <hr> <P>
<!--================================================================-->
<a name="find"></a>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
Finding what you want with find</H3>
<P>
Date: Tue, 2 Sep 1997 21:53:41 -0500 (CDT)<br>
From: David Nelson <a href="mailto:dnelson@psa.pencom.com">dnelson@psa.pencom.com</a>
<P>
While the <tt>find . -type f -exec grep "string" {} \;</tt> works, it does not
tell you what file it found the string in. Try using <tt>find . -type f
-exec grep "string" /dev/null {} \;</tt> instead.
<p>David /\/elson
<P> <hr> <P>
<!--================================================================-->
<a name="kermit"></a>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
Minicom kermit help</h3><p>
Date: Wed, 10 Sep 1997 12:21:55 -0400 (EDT)<br>
From: "Donald R. Harter Jr." <a href="mailto:ah230@traverse.lib.mi.us">ah230@traverse.lib.mi.us</a><p>
With minicom, ckermit was hanging up the phone line after I exited
it to return to minicom. I was able to determine a quick fix for this.
In file ckutio.c comment out (/* */) line 2119 which has <B>tthang()</B> in it.
<B>tthang</B> hangs up the line. I don't know why ckermit thought that it
should hang up the line.
<p> Donald Harter Jr.
<P> <hr> <P>
<!--================================================================-->
<a name="postscript"></a>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
Postscript printing</h3><p>
Date: Sun, 7 Sep 1997 15:12:17 +0200 (MET DST)<br>
From: Roland Smith <a href="mailto:rsmit06@ibm.net">
mit06@ibm.net</a><br>
<p>
Regarding your question in the Linux Gazette, there is a program that
can interpret postscript for different printers. It's called Ghostscript.
<p>
The smartest thing to do is to encapsulate it in a shell-script and then
call this script from printcap.
<P>
<pre><br>
----- Ghostscript shell script -------<br>
#!/bin/sh
#
# pslj This shell script is called as an input filter for the
# HP LaserJet 5L printer as a PostScript printer
#
# Version: /usr/local/bin/pslj 1.0
#
# Author: R.F. Smith &lt;rsmit06@ibm.net&gt;
# Run GhostScript, which runs quietly at a resolution
# of 600 dpi, outputs for the laserjet 4, in safe mode, without pausing
# at page breaks, writing and reading from standard input/output
/usr/bin/gs -q -r600 -sDEVICE=ljet4 -dSAFER -dNOPAUSE -sOutputFile=- -
------- Ghostscript shell script ------</pre><br>
<p>
You should only have to change the resolution <tt>-r</tt> and device <tt>-sDEVICE</tt>
options to something more suitable to your printer. See <tt>gs -?</tt> for a list
of supported devices. I'd suggest you try the cdeskjet or <tt>djet500c</tt>
devices. Do a <tt>chmod 755 &lt;scriptname&gt;</tt>, and copy it to /usr/local/bin as
root.
<p>
Next you should add a Postscript printer to your /etc/printcap file. Edit
this file as root.
<p>
<pre>
-------- printcap excerpt -----------<br>
ps|HP LaserJet 5L as PostScript:\
:lp=/dev/lp1:\
:sd=/var/spool/lp1:\
:mx#0:\
:if=/usr/local/bin/pslj:sh<br>
-------- printcap excerpt ------------</pre><br>
<p>
This is the definition of a printer called <tt>ps</tt>. It passes everything it
should print through the pslj filter, which converts the postscript to
something my Laserjet 5 can use.
<p>
To print Postscript, use <tt>lpr -Pps filename</tt>.
<p>
change this to reflect your script name.
<p>
Hope this helps!
<p>
Roland
<P> <hr> <P>
<!--================================================================-->
<a name="realaudio"></a>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
Realaudio without X-windows</h3>
Date: Sun, 7 Sep 1997 00:45:58 -0700 (PDT)<br>
From: Toby Reed <a href="mailto:toby@eskimo.com">toby@eskimo.com</a><p>
This is more of a pointer than a tip, but your readers might want to check
out traplayer on sunsite, it lets you play realaudio without starting up
an X server on your screen. Kinda useful if you don't like to use
memory-hog browsers just to listen to realaudio.
<p>
The file is available at sunsite.unc.edu/pub/Linux in the Incoming
directory (until it gets moved), and then who knows where. It's called
traplayer-0.5.tar.gz.
<P> <hr> <P>
<!--================================================================-->
<a name="dynamic"></a>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
Connecting to dynamic IP via ethernet </h3>
Date: Fri, 12 Sep 1997 13:22:06 +0200<br>
From: August Hoerandl <a href="mailto:hoerandl@elina.htlw1.ac.at">hoerandl@elina.htlw1.ac.at</a><p>
in LG 21 Denny wrote:
<p>
"Hello. I want to connect my Linux box to our ethernet ring here at my company.
The
problem is that they(we) use dynamic IP adresses, and I don't know how to get
an
address."
<p>
There is a program called bootpc (a bootp client for linux).
From the LSM entry (maybe there is a newer version now):<p>
<pre>
Title: Linux Bootp Client
Version: V0.50
Entered-date: 1996-Apr-16
Description: This is a boot protocol client used to grab the machines
ip number, set up DNS nameservers and other useful information.
Keywords: bootp bootpc net util
Author: ceh@eng.cam.ac.uk (Charles Hawkins)
Maintained-by: J.S.Peatfield@damtp.cam.ac.uk (Jon Peatfield)
Primary-site: ftp.damtp.cam.ac.uk:/pub/linux/bootpc/bootpc.v050.tgz
Alternate-site:
sunsite.unc.edu:/pub/Linux/system/Network/admin/bootpc.v050.tgz
Platform: You need a BOOTP server too.
Copying-policy: This code is provided as-is, with no warrenty, share and
enjoy.
</pre>
<p>
The package inludes a shell script to set up the ethernet card, send the
bootp request,
receive the answer and set up everything needed.
<p>
I hope this helps
<p>
Gustl
<P> <hr> <P>
<!--================================================================-->
<a name="commandx"></a>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
Running commands from X w/out XTerm</h3>
Date: Fri, 26 Sep 1997 18:28:51 -0600<br>
From: "Kenneth R. Kinder" <a href="mailto:Ken@KenAndTed.com">Ken@KenAndTed.com</a><p>
I often found myself running XTerm just to type a single shell
commmand. After a while, you just wish you could run a single command
without even accessing a menu. To solve this problem, I wrote exec.
As the program name would emply, the exec program mearly prompts (in
X11) for a command, and replaces its own process with the
shell-orriented command you type in. Exec can also browse files, and
insert the path in the text box, incase you need a file in your command
line. Pretty simple huh? Exec (of course!) is GPL, and can be
downloaded at http://www.KenAndTed.com/software/exec/ -- I would
appreciate it if someone would modify my source to do more! =)
<P> <hr> <P>
<!--================================================================-->
<a name="asciiftp"></a>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
Ascii problems with FTP</h3>
Date: Wed, 24 Sep 1997 12:42:05 -0400<br>
From: Carl Hohman <a href="mailto:carl@microserv-canada.com">carl@microserv-canada.com</a><p>
Andrew, I read your letter to the Linux Gazzette in issue 19. I don't
know if you have an answer yet, but here's my 2 bits...
<br>
If I understand correctly, you are using FTP under DOS to obtain Linux
scripts. Now, as you may know, the line terminators in text files are
different between Unix systems and DOS (and Apples, for that matter). I
suspect that what's happening is this: FTP is smart enough to know about
terminator differences between systems involved in an ascii mode
transfer and performs appropriate conversions silently and on the fly.
This give you extra ^M's on each line if you download the file in DOS
and then simply copy it (or use an NFS mount) to see it from Unix. I
suspect that if you use a binary tranfer (FTP> image) the file will
arrive intact for Linux use if it originates on a Unix server.
<p>
Hope this helps.<br>
Carl Hohman
<P> <hr> <P>
<!--================================================================-->
<a name="rhq"></a>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
Red Hat Questions</h3>
Date: Thu, 18 Sep 1997 14:06:08 -0700
<br>
From: James Gilb <a href="mailto:p27451@am371.geg.mot.com">p27451@am371.geg.mot.com</a><p>
Signal 11 crashes are often caused by hardware problems. Check out the
The Sig11 FAQ on: http://www.bitwizard.nl/sig11/
<p>
James Gilb
<P> <hr> <P>
<!--================================================================-->
<center>Published in Linux Gazette Issue 22, October 1997</center>
<P> <hr> <P>
<!--================================================================-->
<A HREF="./index.html"><IMG SRC="../gx/indexnew.gif" ALT="[ TABLE OF
CONTENTS ]"></A> <A HREF="../index.html"><IMG SRC="../gx/homenew.gif"
ALT="[ FRONT PAGE ]"></A> <A HREF="./lg_mail22.html"><IMG SRC="../gx/back2.gif"
ALT=" Back "></A>
<A HREF="./lg_bytes22.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>
<P> <hr> <P>
<h5>This page maintained by the Editor of <I>Linux Gazette</I>,
<A HREF="mailto: gazette@ssc.com">gazette@ssc.com</A><BR>
Copyright &copy; 1997 Specialized Systems Consultants, Inc. </H5>
<P>
<p><hr><p>
<H4>&quot;Linux Gazette...<I>making Linux just a little more fun!</I>&quot;</H4>
<HR>
<center>
<table cellpadding=7><tr><td>
<IMG SRC="../gx/bytes.gif" border=1 ALT="News Bytes">
</td><td>
<H3>Contents:</H3>
<ul>
<li><a HREF="./lg_bytes22.html#general">News in General</a>
<li><a HREF="./lg_bytes22.html#software">Software Announcements</a>
</ul>
</td></tr></table>
</center>
<a name="general"></a>
<p><hr><p>
<!-- =================================================================== -->
<center><H3> News in General </H3></center>
<P> <hr> <P>
<!-- =================================================================== -->
<H3><IMG ALT=" " SRC="../gx/bolt.gif">
BLINUX Documentation and Development Project
</H3>
<P>
<P>
The purpose of The BLINUX Documentation and Development Project is to serve as a catalyst
which will both spur and speed the development of software and documentation which will enable the
blind user to run his or her own Linux workstation.
<p>
Their web site is at: <br>
<a href="http://leb.net/blinux/">http://leb.net/blinux/</A>
<br>
It contains information about documenting Linux for the Blind and Visually
Impaired, the BLINUX FTP Archive, and where to find Linux Software for
the Blind User.
<P> <hr> <P>
<!-- =================================================================== -->
<H3><IMG ALT=" " SRC="../gx/bolt.gif">
Linux "class" via the Internet</h3>
<p>
There is a Linux "class" being offered on the internet! It's a
beginners class that's using Matt Welsh's "Running Linux" as the
textbook. Lessons are posted to the site, with links to Linux related
urls and reading from the text as additional assignments. I just checked
out the first lesson (history of Linux), looks pretty good.
<p>
If anyone's interested (it's free), the url is:
<a href="http://www.vu.org/channel25/today/">http://www.vu.org/channel25/today/</a>
<p>
<P> <hr> <P>
<!-- =================================================================== -->
<H3><IMG ALT=" " SRC="../gx/bolt.gif">
WindowMaker and AfterStep themes</h3>
<p>
Give your X-windows a whole new look with one of the WindowMaker or
AfterStep themes. There are almost 30 different themes for the
WindowMaker and another 30 for AfterStep window manager available at:
<a href="http://x.unicom.net/themes">http://x.unicom.net/themes</a>
<a name="software"></a>
<P> <hr> <P>
<!-- =================================================================== -->
<center><H3> Software Announcements </H3></center>
<P> <hr> <P>
<!-- =================================================================== -->
<H3><IMG ALT=" " SRC="../gx/bolt.gif">
TCD 1.0: New curses-based CD player
</H3>
<P>
<P>
TCD is a new curses based CD player for Linux. Here are some of it's
distinct features:
<P>
* Nice-looking color (if supported) curses interface.
<br>
* Simple, sensible, one-keystroke control.
(No more mapping little icons to your keypad!) :)
<br>* Repeat track, continuous play control.
<br>* Track name database.
<br>* Uses little CPU time while running.
<P>
It should still be at
<br> <a href="ftp://sunsite.unc.edu/pub/Linux/Incoming/tcd-1.0.tar.gz">
ftp://sunsite.unc.edu/pub/Linux/Incoming/tcd-1.0.tar.gz</a>
<P>
But by the time you read this is may have moved to
/pub/Linux/apps/sound/cdrom/curses/
<P> <hr> <P>
<!-- =================================================================== -->
<H3><IMG ALT=" " SRC="../gx/bolt.gif">
urlmon -- The URL Monitor
</H3>
<P>
<P>
urlmon reports changes to web sites
(and ftp sites, too).
<P>
urlmon makes a connection to a web site and records the
last_modified time for that url. Upon subsequent calls, it will
check the url again, this time comparing the information to the
previously recorded times. Since the last_modified data is not
required to be given by HTTP (it's optional) and is
non-existent for ftp, urlmon will then take an MD5 checksum.
<P>
It's real utilitity is evident when running it periodically (from cron,
for example) in batch mode, so as to keep tabs on many different web
pages, reporting on those that have recently changed.
<P>
New with 2.1, it can monitor muliple URLs in parallel. It also has
user settable proxy server ability, and user settable timeout lengths.
A few algorithm improvements have been made.
<P>
It can be found at
<P>
<a href="http://sunsite.unc.edu/pub/Linux/apps/www/mirroring/urlmon-21.tgz">http://sunsite.unc.edu/pub/Linux/apps/www/mirroring/urlmon-21.tgz</a>
<P>
<a href="http://web.syr.edu/~jdimpson/proj/urlmon-21.tgz">http://web.syr.edu/~jdimpson/proj/urlmon-21.tgz</a>
<P>
<a href="ftp://camelot.syr.edu/pub/web/urlmon-21.tgz">
ftp://camelot.syr.edu/pub/web/urlmon-21.tgz</a>
<P>
urlmon requires perl 5, the LWP perl modules, the MD5 module,
all available at any CPAN archive <a href="http://www.perl.com/perl/CPAN/">
http://www.perl.com/perl/CPAN/</a>
<P> <hr> <P>
<!-- =================================================================== -->
<H3><IMG ALT=" " SRC="../gx/bolt.gif">
New Netscape Version for Linux
</H3>
<P>
<P>
Netscape Communicator 4.03 (Standard and Professional editions) is now
available for Linux.
<p>
To download it, go to <a href="http://www.netscape.com">http://www.netscape.com</a>
<P> <hr> <P>
<!--================================================================-->
<H3><IMG ALT=" " SRC="../gx/bolt.gif">
TeamWave Workplace 2.0</h3><p>
TeamWave Workplace is an Internet groupware product that lets you
work together with colleagues in shared Internet rooms using Windows,
Macintosh or Unix platforms.
<p>
TeamWave's rooms are customized with shared tools like whiteboards,
chat, calendars, bulletin boards, documents, brainstorming and voting,
so you can fit the rooms to your team's tasks. Team members can work
together in rooms any-time, whether meeting in real-time or leaving
information for others to pick up or add to later.
<p>
The support for any-time collaboration and easy customization, combined
with its rich cross-platform support and modest infrastructure needs,
make TeamWave Workplace an ideal communication solution for telecommuters,
branch offices, business teams, road warriors -- any teams whose members
sometimes work apart.
<p>
System Requirements: TeamWave Workplace runs on both Windows 95/NT
and Macintosh platforms, as well as SunOS, Solaris, SGI, AIX and
Linux. A network connection (LAN or modem) is also required.
<p>
<p>
Availability and Pricing
<p>
TeamWave Workplace 2.0 is available now. A demonstration version may be
downloaded from TeamWave's web site at
<a href="http://www.teamwave.com/">http://www.teamwave.com/</a>.
A demo
license key, necessary to activate the software, can also be requested
from the web site.
<p>
Regular licenses are US$50 per team member, with quantity discounts
available. Licenses can be purchased via postal mail, fax, email or
secure web server. We are making free licenses available for qualified
educational use. Please see our web site for additional information.
<P> <hr> <P>
<!--================================================================-->
<center>Published in Linux Gazette Issue 22, October 1997</center>
<P> <HR> <P>
<!-- =================================================================== -->
<A HREF="./index.html"><IMG SRC="../gx/indexnew.gif" ALT="[ TABLE OF
CONTENTS ]"></A>
<A HREF="../index.html"><IMG SRC="../gx/homenew.gif" ALT="[ FRONT
PAGE ]"></A>
<A HREF="./lg_tips22.html"><IMG SRC="../gx/back2.gif" ALT=" Back "></A>
<A HREF="./lg_answer22.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>
<P><HR><P>
<h5>This page written and maintained by the Editor of <I>Linux Gazette</I>,
<A HREF="mailto: gazette@ssc.com">gazette@ssc.com</A><BR>
Copyright &copy; 1997 Specialized Systems Consultants, Inc. </H5>
<p><hr><p>
<H4>&quot;Linux Gazette...<I>making Linux just a little more fun!</I>&quot;
</H4>
<P> <hr> <P>
<!-- =============================================================== -->
<center>
<H1><A NAME="answer">
<img src="../gx/ans.gif" alt="" border=0 align=middle>
The Answer Guy
<img src="../gx/ans.gif" alt="" border=0 align=middle>
</A></H1> <BR>
<H4>By James T. Dennis,
<a href="mailto:jimd@starshine.org">jimd@starshine.org</a><BR>
Starshine Technical Services, <A HREF="http://www.starshine.org/">
http://www.starshine.org/</A> </H4>
</center>
<p><hr><p>
<H3>Contents:</H3>
<ul>
<li><a HREF="./lg_answer22.html#fax">Faxing and Dialing-Out on the Same Line</a>
<li><a HREF="./lg_answer22.html#286">Linux and the 286</a>
<li><a HREF="./lg_answer22.html#ext2fs">Accessing ext2fs from Windows 95</a>
<li><a HREF="./lg_answer22.html#chattr">chattr +i</a>
<li><a HREF="./lg_answer22.html#sendmail">Linux sendmail problem</a>
<li><a HREF="./lg_answer22.html#fetch">POP3 vs. /etc/passwd</a>
<li><a HREF="./lg_answer22.html#make">Problem with make</a>
<li><a HREF="./lg_answer22.html#swap">Swap partition and Modems</a>
<li><a HREF="./lg_answer22.html#rhmotif">Redhat 4.2/Motif</a>
<li><a HREF="./lg_answer22.html#email">E-mail adjustment needed</a>
<li><a HREF="./lg_answer22.html#realbios">REALBIOS?</a>
<li><a HREF="./lg_answer22.html#lib">X-Windows Libraries</a>
<li><a HREF="./lg_answer22.html#pc">PC Emulation</a>
<li><a HREF="./lg_answer22.html#vbasic">Visual Basic for Linux</a>
<li><a HREF="./lg_answer22.html#hardware">Linux 4.2 software and Hardware
compatablity problems</a>
<li><a HREF="./lg_answer22.html#mvusr">Moving /usr subdirectory to
another drive..</a>
<li><a HREF="./lg_answer22.html#cppx">C++ Integrated Programming
Enviroment for X...</a>
<li><a HREF="./lg_answer22.html#lynx">LYNX-DEV new to LYNX</a>
</ul>
<p><hr><p>
<!--================================================================-->
<a name="fax"></a>
<h3><img align=bottom alt=" " src="../gx/ques.gif">
Faxing and Dialing Out on the Same Line
</h3>
<P> <B>
From: Carlos Costa Portela
<a href="mailto:c.c.portela@ieee.org">
c.c.portela@ieee.org </a>
</b>
<p>
<b>
Hello, Linux Gazette!
<br>First of all, let me say you that the Gazette is EXCELLENT! Well, you
probably know that, but I must say it!.
I have the next problem:
<br>I am using the fax program efax, by Ed Casas. Really good!. When my
system starts, I put the fax in answer mode:
</B><p><B>
This is the entry in the inittab file:
rf:3:respawn:/bin/sh /usr/bin/fax answer
</B> <P>
<img align=bottom alt=" " src="../gx/ans2.gif">
Another option here would be 'mgetty' -- which provides
dial-in (terminal, PPP, etc) and fax support on the same
line. Allegedly the 'vgetty' extension to 'mgetty' will
even allow limited "voice" support on that same line
(although the only modem that's currently supported seems
to be certain Zyxel models -- none of the other modem
manufacturers seem to be willing to release the API's for
voice support!).
<p>
<b>
<img align=bottom alt=" " src="../gx/ques.gif">
But sometimes a day (once or twice) I need my modem to connect to my ISP
and, at least, read and send my mail!
</b><p> <B>
Then there is an overlapping between one program -or command- and the
other.
</B> <P>
<img align=bottom alt=" " src="../gx/ans2.gif">
This is a very common situation. That's why Unix communications
programs support various sorts of "device locking."
<p>
The only trick is to make sure that all the programs on your
system agree on the name, location, and type of lock files.
<p>
On a Linux box this is reasonably easy -- compile them all
to use the /var/lock/ directory. The lock files will be of
the form: LCK..$device (where $device is the base name of the
modem device -- like 'ttyS0' or 'modem'). That takes care of
the location.
<p>
My advice is to ignore everything you've heard about using
"cuaXX" as the call out device and "ttySxx" as the dial-in device.
I make a symlink from /dev/modem to the appropriate /dev/ttyS*
node and use /dev/modem as the device name for EVERYTHING
(pppd, chat, uucp, C-Kermit, minicom, efax, mgetty/sendfax,
diald, EVERYTHING). Obviously that advice applies to situations
where you only have one or two modems. If you're handling whole
banks of modems (you're an ISP) than your situation is different
(you probably don't allow much dial-out via these lines and would
probably have one or more lines dedicated to fax). However, that
handles the 'name' issue.
<p>
Finally there is the question of lock file "type." There are
three common strategies in Unix for dealing with lock files.
The first a refer to a "touch" -- the mere existence of any
file by the correct name is a flag for all other processes
to leave the device/resource alone. If a process dies and
leaves a stale lock file -- there is not automatic recovery --
an administrator must manually remove the lock file. This
limitation makes this the least useful and least common of the
lockfile types.
<p>
With the other sorts of lock files the controlling process
(the one creating the lock) writes its PID into the file.
Any other process seeing the lock file then parses a 'ps' listing
to determine the status of the process that locked the resource.
If it's dead or non-existent (possibly even if it's a zombie)
then the new process removes the "stale" lock file (usually with
a message to that effect) and creates a new one.
<p>
Here the only question is: what format should the PID be written
in? I prefer "text" (i.e. the PID is a string of ASCII digits
-- like the printf("%d", int) would generate). Some programs
might default to "binary" -- where the PID is written to the
file in the same way that a program stores it in memory.
<p>
The advantage of text format lock files is that you can more
easily write a wrapper script in perl, sh, or whatever -- to
provide lock file support to a program that doesn't use the
same sort of lock files you want. Another advantage is that
the admin of a system can read it -- and use 'ps' or 'top' to
check the state of the locking process manually (useful if
a client program is overly timid about removing the lock
file from a "zombie" for example).
<p>
The only other problem associated with device lock files
involves the permissions of the /var/lock directory. The
simple solution is to make it world writable. However I
consider that to be poor administrative practice --
particularly on a multi-user or server system. You can't
make this directory "sticky" (as you should with your /tmp/)
unless you make all of your modem using programs SUID. If
you did that, no program would be able to remove a lock
file that was created by a different user -- stale or otherwise.
<p>
So, I make this directory group writable by the 'uucp' group
and make all my modem using programs SGID 'uucp'. If you
need finer grain support (for other programs that use the
/var/lock directory) then you'd want to create more
specific directories below /var/lock, and compile all of
your programs to use those. On my main Red Hat (3.03) system
all of the other programs that I've see use directories
below /var/lock/ so only my modem programs really need write
access. Obviously any root owned, or suid root or even suid
'bin' programs can also write to the /var/lock directory --
all we're doing is keeping out the "riff-raff" (like my
personal shell account).
<p>
<b>
<img align=bottom alt=" " src="../gx/ques.gif">
Obviously, this is not a solution:
<br> Turn off the modem, and then turn on.
<br> Kill the efax process.
</b><p> <b>
Because the entry has a "respawn" keyword.
</b><p> <B>
What is the best way to:
<br> - inactivate the fax.
<br> - connect to Internet.
<br> - disconnect.
<br> - activate the fax.
</B> <P>
<img align=bottom alt=" " src="../gx/ans2.gif">
The best way is to avoid the problem. Configure or
compile efax to use a locking mechanism that's compatible
with your dial-out programs (or switch to 'mgetty' or some
other enhanced getty).
<p>
The 'mgetty' home page is at:
<p>
Mgetty+Sendfax Documentation Centre (Gert Doering)
<a href="http://www.leo.org/~doering/mgetty/">
http://www.leo.org/~doering/mgetty/</a>
<p>
... and some related resources are at:
<p>
ISP Resources - mgetty info (AutoPPP)
<a href="http://www.buoy.com/isp/mgetty.html">
http://www.buoy.com/isp/mgetty.html</a>
<p>
Coastal Internet - ISP Info!
<a href="http://www.buoy.com/isp/">
http://www.buoy.com/isp/</a>
<p>
<B>
<img align=bottom alt=" " src="../gx/ques.gif">
Well, one solution is:
<br> go to the /etc/inittab
comment the line
restart the system
Is there a better one?.
</B> <P>
<img align=bottom alt=" " src="../gx/ans2.gif">
If you really had an insurmountable problem of this sort --
a program that just wouldn't co-exist with something that
you're respawning in your inittab (like some weird UPS
power daemon or data aquisition service) -- I'd solve it
using a new runlevel. The line where you're loading your
fax daemon process specifies that it runs in level 3
(the default "multi-user with networking" mode). So you
could just use the 'telinit 4' command to switch to the
(currently undefined or "custom") runlevel. This should
kill the fax process (and any getty's or xdm's that you
have configured for runlevel 3) and start any processes
that you define for runlevel 4.
<p>
Read the man page for inittab(5) (that is "the inittab
page in section section 5 of the man tree") for details.
I've always been mildly surprised that the SysV Init
programmers didn't put in options for a full 9 runlevels
(where 7, 8, and 9 would all be custom). However I've
never seen a need for such elaborate handling -- so they
likely didn't either.
<p>
Hope that clarifies the whole issue of lock files and
resolving access concurrency issues. You can use similar
programming techniques (even in shell scripts) to resolve
similar problems with directory, file, or device locking.
<p>--
Jim
<p><hr><p>
<!--================================================================-->
<a name="286"></a>
<h3><img align=bottom alt="" src="../gx/ques.gif">
Linux and the 286
</h3>
<P>
<b>
From: tbickl@inreach.com
<a href="mailto:tbickl@inreach.com">tbickl@inreach.com</a>
</b><P><B>
Hello,<br>
I am taking a class at community college for introduction to Unix.
I was told I could download Linux, put it on the 286 machine I have,
and that it would function well enough to learn from.
</B> <P>
<img align=bottom alt=" " src="../gx/ans2.gif">
You were told wrong.
<P>
<img align=bottom alt=" " src="../gx/ques.gif">
<B>
Searching thru the downloadables, I have only seen versions that
will run on 386 or above, and I do not have a 386 machine available
to me right now.
</B> <P>
<img align=bottom alt=" " src="../gx/ans2.gif">
Your observations are to be trusted more than the sources
of your rumors.
<P>
<img align=bottom alt=" " src="../gx/ques.gif">
<B>
Do you know if and where I could find a version of Linux that would
suffice?
</B> <P>
<img align=bottom alt=" " src="../gx/ans2.gif">
There is a project to produce an 8086 (and thus 286 compatible)
subset of the Linux kernel (ELK -- embeddable Linux kernel).
However it is probably not far enough along to be of interest
to you. More generally we can say that a kernel is not enough
-- there would be considerable work to porting a large enough
set of tools to the subset architecture.
<p>
Moving back a little bit from Linux specifically we can
recommend a couple of Unix like OS' that did run on the 286.
Of them, only Minix is still widely available. It is not
free (in the sense of GPL or the BSD License) -- but is
included with copies of Andrew Tanenbaum's seminal text book
on _Operating_Systems_Design_and_Implementation_. You'll
want the 2nd Edition.
<p>
The two other implementations of Unix that have run on
286 systems are Xenix (originally a Microsoft product then
handed off to SCO -- Santa Cruz Operations; which I think
Microsoft still owns a good chunk of) and long since
discontinued, and Coherent (by the now defunct Mark Williams
Company).
<p>
Neither of these offered any TCP/IP support. I think the
latest versions of Minix do -- although I don't know how
robust or extensive that support is.
<p>
For the price of the book you could probably find a
386 motherboard and 16Mb of RAM to toss on it. I don't
like to "push" people into hardware upgrades -- but the
change from 286 to 386 is night and day.
<p>
<img align=bottom alt=" " src="../gx/ques.gif">
<B>
Like I said, it only has to function textually (textually?), no graphics
or other fancies are necessary. Just regular Unix-command-line based
stuff.
</B> <P>
<img align=bottom alt=" " src="../gx/ans2.gif">
The tough nut to crack isn't really the GUI -- Geoworks'
Ensemble provided that (also there used to be a Windows for
the 286 and Windows 3.x had a "standard mode" to support the
AT). It isn't the timeslicing/multitasking
(DESQview did that). It isn't providing Unix semantics in
a shell and a set of Unix like tools (there's a whole
directory full of GNUish tools on SimTel and there's the
earlier versions of the MKS toolkit).
<p>
The hard part of running a "real" Unix on a 286 or earlier
processor is the memory protection model. Prior to the
286 there was simply no memory protection mechanism at all.
Any process could read or write to any address (I/O or memory)
and therefore had complete control of the machine. These
architectures are unsuitable for multi-user interactive systems.
Unix is, at its heart, a multi-user system.
<P><B>
<img align=bottom alt=" " src="../gx/ques.gif">
Thank you for any help you can offer . . .
</B> <P>
<img align=bottom alt=" " src="../gx/ans2.gif">
The most bang for your buck is to buy a 386 or better
motherboard. If you are in the SF bay area (Silicon Valley)
I can give you one. This will allow you to run Linux,
OpenBSD (or any of the other FreeBSD derivatives) and will
just make more sense than spending any time or money on the
286.
<p>
If that just doesn't work for you -- get a copy of Tanenbaum's
book (with the included CD). In fact, even if that does work for
you, get a copy of his book. If you read that, you'll probably
more about Unix than your instructors.
<p>--Jim
<p><hr><p>
<!--================================================================-->
<a name="ext2fs"></a>
<h3><img align=bottom alt=" " src="../gx/ques.gif">
Accessing ex2fs from Windows 95
</h3>
<P> <B>
From: <a href="mailto:globus@pathcom.com">globus@pathcom.com</a>
</B><p><B>
Hi:<br>
Just wondering, is there any way (i.e. driver) in existence that would
let me access ext2fs from Win95? I need read and write capabilites.
</B> <P>
<img align=bottom alt=" " src="../gx/ans2.gif">
Try the Linux Software Map (currently courtesy of ExecPC).
I used just the keyword "DOS":
<p>
Have you looked at ext2tool:
<p>
Database: Linux Software Map
<p>
Title: Ext2 tools
<br>Version: 1.1
<br> Entered-date: 09 Jan, 96
<p> Description:
<br> A collection of DOS programs that allow you to
read a Linux ext2 file system from DOS.
<p>
Keywords: DOS, ext2
<br>Author: ct@login.dknet.dk (Claus Tondering)
<br> Maintained-by: ct@login.dknet.dk (Claus Tondering)
<br>Primary-site:
<br> login.dknet.dk pub/ct
<br> 287706 ext2tool_1_1.zip
<br>
<br> Alternate-site:
<br> sunsite.unc.edu pub/Linux/system/Filesystems/ext2
<br> 287706 ext2tool_1_1.zip
<br>
<br> Platforms:
<br> PC with 386 or better
<br>
<br> Copying-policy: GPL
<p>
There is also an installale filesystem for OS/2 -- but
that probably won't help you much.
<p>
-- Jim
<p><hr><p>
<!--================================================================-->
<a name="chattr"></a>
<h3><img align=bottom alt=" " src="../gx/ques.gif">
chattr +i
</h3>
<P> <B>
From: <A HREF="mailto:ckkrish@cyberspace.org">ckkrish@cyberspace.org</A>
</B> <P><B>
Hi Jim,
I was going thru the "Tips" document distributed along with
Slackware 3.2. Thanks for the "chattr +i". I used to take pride
that I knew Unix related stuff reasonably well, until I read
about "attribute" in your snippet. If only I had read it a few
weeks before! I have been running Linux for about 2 years now.
Only recently I went for an upgrade. To Slackware 3.2. While
exploring the set of four CD's that came in the pack, I hit upon
a language called INTERCAL - a sort of crazy stuff, the antethe-
sis of a good programming language. As per the documents that ac-
companied it, INTERCAL was made by pundits for fun. Well, I gave
a "make install" and after that the usuall commands failed! The
makefile had a line to "rm -f" everything from the target "bin"
directory! I really felt a need for a "chattr +i" at that time,
not really aware that it already exists.
Thanks for the tip. It is a lifesaver.
</B> <P>
<img align=bottom alt=" " src="../gx/ans2.gif">
You're welcome. If you're ever administering a BSD machine
(FreeBSD, OpenBSD, NetBSD or the commercial BSDI/OS) you can
use the chflags +syschg command for the same purpose. That
requires the UFS filesystem (while Linux' chattr is exclusively
for ext2 filesystems. If they ever port ext2fs to other
Unix system they'll probably port the lsattr and chattr commands
along with them.
<P>
There's a few other tips you should consider following --
which will also help prevent disasters. First, configure
your /usr/ as a separate filesystem and mount it read-only.
You can always issue a 'mount' command with the 'remount'
option when you really need to write to it (which should be
pretty rarely). As part of that -- make sure to consistently
user /usr/local for all new software that you install. It
should also be a separate filesystem which you usually leave
mounted read-only. Developement should be done in home directories,
additions that are not part of a distribution should be in
/usr/local/ and the / and /usr/ should be almost exclusively
reserved for things that came with the initial installation.
(you may end up and a /opt as well -- though mine is just a
symlink to /usr/local).
<P>
Following these conventions helps when you need to do an
upgrade -- since you can isolate, even unmount, the portions
of your directory tree that the OS upgrade should NOT touch.
<P>
The other suggestion is to avoid doing things as root.
You can set the permission on /usr/local to allow write
access to member of a "staff" or "wheel" or "adm" group
(I like to just create one called staff) -- and add your
user account to that group. You can also use also use
'sudo' and carefully chosen suidperl scripts (which are
also group executable and not accessible to other) to
minimize the time you spend at the root prompt.
<P>
I've read about Intercal before. It's almost as infamous
as TECO (the "tape editing command") which was the language
in which EMACS was originally implemented. EMACS stands for
"editor macros." There is a TECO emulator for GNU emacs now
-- which was obviously done to satisfy some lisp programmer's
sick fascination with recursion.
<P>
Anyway -- glad my tips were helpful.
<P>
-- Jim
<p><hr><p>
<!--================================================================-->
<a name="sendmail"></a>
<h3><img align=bottom alt=" " src="../gx/ques.gif">
Linux sendmail problem
</h3>
<P> <B>
From: Jason Moore <A HREF="mailto:jsmoore@brain.uccs.edu">jsmoore@brain.uccs.edu</A>
</B> <P><B>
I have a problem with my linux setup. I have a Linksys Ether16 Ethernet
Card(NE2000 compat), and It finds the card fine(with the correct irg,
etc..) but when it boots, the machine freezes when it's loading send
mail. currently I'm using Redhat 4.2, Kernal 2.0.30, and I don't know
anything about sendmail.
</B> <P>
<img align=bottom alt=" " src="../gx/ans2.gif">
Sendmail isn't really hanging. It's blocking while waiting for
a DNS query to time out. If you were to leave it alone long enough
it would eventually timeout and your boot process will continue.
<P>
This is because your system can't talk to a name server whereby
your copy of sendmail can look up the names associated with your
network interfaces (using "reverse" DNS resolution). The quick
solution is to remove the symlink from /etc/rc.d/rc3.d/S??sendmail
(which points to /etc/rc.d/init.d/sendmail).
<P>
I like to manage these by creating a "disabled" directory under each
of the /etc/rc.d/ directories -- then I can disable any of the startup
scripts by simply moving their symlinks down one directory. The
advantage of this is that is is self-documenting. Also, if I have to
put an entry back in -- I don't have to wonder what numeric sequence
it used to be in, since this "meta information" is encoded in the
symlink's name (that's what the Sxx and Kyy part of the link names are
doing).
<P>
Another thing you could do is just start sendmail asynchronously.
To do this just find the line in /etc/rc.d/init.d/sendmail that
actually loads /usr/lib/sendmail -- and put an "&" (ampersand) on the
end of the line. If you do that right then sendmail will do it's
waiting (and timing out) in the background -- and the rest of your
startup scripts will continue.
<P>
Obviously this last item is not a solution -- it's just a workaround.
sendmail will still fail to operate properly until it's configured
properly (big surprise, right?).
<P>
I'm not going to write a treatise on sendmail configuration here.
First I don't have enough information about your network connections
and your requirements (it would be a monumental waste of our time
if you're planning on reading your e-mail from a different system,
for instance). Also there are a few HOWTO's and Mini-HOWTO's and a
couple of pretty decent books on the topic. Here's the HOWTO's you
want to peruse:
<P>
<pre>
DNS HOWTO
How to set up DNS.
_Updated 3 June 1997._
<a href="http://sunsite.unc.edu/LDP/HOWTO/DNS-HOWTO.html">http://sunsite.unc.edu/LDP/HOWTO/DNS-HOWTO.html</a>
</pre>
<p>
(Like I said -- the real problem is your DNS).
<p> <pre>
Electronic Mail HOWTO
Information on Linux-based mail servers and clients.
_Updated 29 November 1995. _
<a href="http://sunsite.unc.edu/LDP/HOWTO/Mail-HOWTO.html">http://sunsite.unc.edu/LDP/HOWTO/Mail-HOWTO.html</a>
</pre><p>
(This is a bit of an overview).
<p><pre>
Mail Queue mini-HOWTO
How to queue remote mail and deliver local mail.
_Updated 22 March 1997. _
<a href="http://sunsite.unc.edu/LDP/HOWTO/mini/Mail-Queue">http://sunsite.unc.edu/LDP/HOWTO/mini/Mail-Queue</a>
</pre><p>
(This is more specific -- and might be how
you want to do your mail).
<p><pre>
Offline Mailing mini-HOWTO
How to set up email addresses without a dedicated Internet
connection.
_Updated 10 June 1997. _
<a href="http://sunsite.unc.edu/LDP/HOWTO/mini/Offline-Mailing">http://sunsite.unc.edu/LDP/HOWTO/mini/Offline-Mailing</a>
</pre><p>
(This is another way you might want to do your
mail).
<p><pre>
ISP Hookup HOWTO
Basic introduction to hooking up to an ISP.
_Updated 9 December 1996. _
<a href="http://sunsite.unc.edu/LDP/HOWTO/ISP-Hookup-HOWTO.html">http://sunsite.unc.edu/LDP/HOWTO/ISP-Hookup-HOWTO.html</a>
</pre><p>
(Your e-mail almost certainly has to go through
some sort of ISP to get anywhere beyond your
system. Reading this will determine which of the
mail configuration options are available to you).
<p><pre>
PPP HOWTO
Information on using PPP networking with Linux.
_Updated 31 March 1997. _
<a href="http://sunsite.unc.edu/LDP/HOWTO/PPP-HOWTO.html">http://sunsite.unc.edu/LDP/HOWTO/PPP-HOWTO.html</a>
</pre><p>
(Most people are connecting to their ISP's
via PPP these days. There are other sorts of
connections, like SLIP and various SLIP/PPP
"emulators" (like TIA))
<p><pre>
UUCP HOWTO
Information on UUCP software for Linux.
_Updated 29 November 1995. _
<a href="http://sunsite.unc.edu/LDP/HOWTO/UUCP-HOWTO.html">http://sunsite.unc.edu/LDP/HOWTO/UUCP-HOWTO.html</a>
</pre><p>
(This is another way to get mail and news. It
is much older than PPP and SLIP and doesn't support
protocols like HTTP. UUCP is a protocol that
can work over dial up modem lines, or over TCP/IP
-- including PPP and SLIP. I use UUCP for all my
mail and news -- because it is designed for
intermittent operation and spooling. However it
can be a hassle to find an ISP that's ever heard of
it. Another advantage to a UUCP feed is that you
can control your own e-mail address space -- every
user you create on your box can send and receive
e-mail and read/post news. You don't have to have
to ask your ISP to do anything at their end -- and
they can't charge you based on the number of addresses
at your end)
<pre>
Sendmail+UUCP mini-HOWTO
How to use sendmail and UUCP together.
_Updated 15 March 1997. _
<a href="http://sunsite.unc.edu/LDP/HOWTO/mini/Sendmail+UUCP">http://sunsite.unc.edu/LDP/HOWTO/mini/Sendmail+UUCP</a>
</pre><p>
(In the unlikely event that you decide to go out
and find a UUCP feed (or several -- it can handle
that) this is what you need to configure sendmail
to talk to UUCP. This isn't difficult (once you
have UUCP working) -- and sendmail and UUCP have
been interoperating for over twenty years. It's
just that you have to pay attention to the details).
<p>
Although our whole discussion has been about 'sendmail' --
it's worth noting that there are a couple of alternatives to
it available. The two that are relatively recent and readily
available for Linux are 'smail' and 'qmail.' I'm not going
to go into much detail about them -- but you can find out more
about these at:
<p>
<pre>
smail:
FTP Site:
<a href="ftp://ftp.uu.net/networking/mail/smail">ftp://ftp.uu.net/networking/mail/smail</a>
Newsgroup:
news:comp.mail.smail
qmail:
<a href="http://www.qmail.org">http://www.qmail.org</a>
</pre>
<P>
-- Jim
<HR><P>
<!--================================================================-->
<a name="fetch"></a>
<h3><img align=bottom alt=" " src="../gx/ques.gif">
POP3 vs. /etc/passwd
</h3>
<P> <B>
From: Benjamin Peikes <A HREF="mailto:benp@npsa.com">benp@npsa.com</A>
</B> <P><B>
The problem with that is that now that person has ftp access. Too
many programs rely on /etc/passwd. What I would like is to be able
to set up users on a per service basis.
</B> <P>
<img align=bottom alt=" " src="../gx/ans2.gif">
Yes -- I understood that from the get go.
<P> <B>
<img align=bottom alt=" " src="../gx/ques.gif">
I guess what I'm looking for is a way to manage which users can use
which services. i.e. put this person into a no ftp, no samba, yes
mail group. I guess what I really need is to write some scripts to
manage users/services.
</B> <P>
<img align=bottom alt=" " src="../gx/ans2.gif">
This is precisely the intent of PAM/XSSO. Unfortunately
PAM isn't quite done yet -- it's about 60% there and can
be used for some of what you want now.
<P>
Under PAM you can configure any service to require
membership in a specific group. You can also limit
access to specific users based on the time of day or the
source of the connection -- setup ulimit's and environment
values, and provide/require S/Key (OPIE) one-time passwords
in some cases while allowing plaintext in others.
<P>
Under the hood you can use shadowing, pwdb (indexed/hashed
account/password files) to handle large numbers of accounts
(without introducing linear delays for lookups), MD5 or "big
DES" to allow long passwords (some might write an SHA-1
password hashing module now that MD5 has shown some weakness).
<P>
You could write a custom SQL query client if you wanted to
allow database driven access to a particular service. The
advantage to PAM is that you'd write this once -- and an
admin could use it on any service with no coding required.
<P>
This gives us the flexibility that previously required very
localized sysadmin hacking -- to reinvent the same wheel at
every site and for every service!
<P>
-- Jim
<p><hr><p>
<!--================================================================-->
<a name="make"></a>
<h3><img align=bottom alt=" " src="../gx/ques.gif">
Problem with make</h3>
<b>Date: Thu, 25 Sep 1997 21:17:56 -0700</b><p>
<b>From: Alfredo Todini <a href="mailto:mc0736@mclink.it">mc0736@mclink.it</a><br>
Jim,
</B><p><B>
I have a strange problem with make. I have Red Hat 4.0, and I recently
installed GNU make 3.76.1. The compilation went well, and the program
works, except for the fact that it doesn't accept the "short" version of
the command line options. For example, "make --version" works, "make -v"
doesn't; "make --file" works, "make -f" doesn't. All I get in these
cases is the standard "invalid option" error message. It seems to be a
problem related to my particular Linux distribution: I have also tried
it on a Slackware 3.2 distribution, and it worked well. The old version
of make that I have removed to install the new one worked well.<p>
Could you please help me?
</B><P>
<img align=bottom alt=" " src="../gx/ans2.gif">
This sounds very odd.
What version of GCC did you use?
Did you run the ./configure script under this directory?
For GNU software this behavior should be controlled by the
getopt libraries (defined in your /usr/include/getopt.h)
-- which I think are linked with your normal libc (C libraries).<p>
So, are there differences between the getopt.h files between
these systems? What libc's are these linked against (use the
'ldd' command to see that)? Are there differences between the
Makefiles generated by the ./configure on each of these systems?<p>
If you make the program ('make') on one system, and copy it to
the other system -- do you see the same problem? How about the
converse? What if each is made "statically" (not using shared
libraries)?<p>
Obviously, there are many ways to try to isolate the problem.<p>
I just make a copy of this same version -- grabbed it from
prep.ai.mit.edu, ran ./configure and make -- and tested
it (in part by taking the 'make' I just built and using it
to remake itself). There was no problem.<p>
<p>--Jim
<!--================================================================-->
<a name="swap"></a>
<P> <hr> <P>
<h3><img align="bottom" alt=" " src="../gx/ques.gif">
Swap partition and Modems</h3><p>
<b>Date: Thu, 25 Sep 1997 16:50:19 -0700</b><br>
<b>From: Robert Rambo <a href="mailto:robert.rambo@yale.edu">robert.rambo@yale.edu</a><br>
</b><p><B>
I was wondering if it is possible to resize the swap partition in
Linux. I think mine is too small, I keep getting some virtual memory
problem and a friend of mine suggested changing the swap partition.
</b><p>
<img align=bottom alt=" " src="../gx/ans2.gif">
Resizing is more trouble than its worth. You can add
addition swap partitions or swap files. Must read the
'mkswap' and 'swapon (8)' man pages for details.
<p>--Jim
<!--================================================================-->
<a name="rhmotif"></a>
<P> <hr> <P>
<h3><img align=bottom alt=" " src="../gx/ques.gif">
Redhat 4.2/Motif</h3><p>
<b>Date: Thu, 25 Sep 1997 03:11:51 -0700<br>
From: "Victor J. McCoy" <a href="mailto:vmccoy@kmrmail.kmr.ll.mit.edu">
vmccoy@kmrmail.kmr.ll.mit.edu</a><br>
</B><p><B>
Ok, the details first:<br>
Redhat 4.2 (default installation)<br>
Redhat Motif 2.0.1<br>
Intel p133<br>
64 MB RAM<br>
ATI Graphics Pro Turbo (4MB)<br>
I think that's all the relevant info.<br>
I'm having trouble with pppd and Motif. If I run my connection
script, the Motif stops behaving properly.</B><p><B>
Before pppd...popup menus work fine, click anywhere in client window
and focus shifts.</B><p><B>
After pppd...popups are non-existent, must click on window border to
get focus.
</b><P>
<img align=bottom alt=" " src="../gx/ans2.gif">
Are there *any* other symptoms?<br>
This seems awfully specific -- and the PPP connection seems
awfully peripheral to the windowing system.<p>
What if you initiate the PPP session from another virtual
console -- or prior to loading X? What if you use the
modem for some other form of dial-up activity? (i.e. is it
a particular X client application, is it something to do
with the serial hardware?)<p>
Is this an internal modem? Is it "Plug and Pray?"
What if you try an external modem?<p>
What if you connect another system with PLIP or via
ethernet? <p>
What if you use a different Window manager (other than mwm)?
<p>
I can't offer much of a suggestion. Just try to isolate
it further -- try different screen resolutions, copy your
xinitrc and other conf files off to somewhere else and
strip them down to nothing -- etc.
<p>
You'll definitely want to post in the newsgroups -- where
you might find someone who's actually used Red Hat's Motif.
(I haven't -- I hardly use X -- and fvwm or twm is fine for
the little that I do in it).
<p><img align=bottom alt=" " src="../gx/ques.gif">
<b>
I noticed the behavior quite a while back with previous versions, but
I was unable to duplicate the problem (I connect to work much more
often than I used to so I noticed a pattern).
</b><p><b>
Has this been trouble for anyone else? I emailed redhat, but their
"bugs@" email address states not to expect an answer.
</b><p>
<img align=bottom alt=" " src="../gx/ans2.gif">
I might even get involved in a program to provide
a better support infrastructure for Red Hat.
<p>
Unfortunately that's probably months away -- and this sort
of "no response" situation is likely to be the norm for RH
users for a bit.
<p>--Jim
<!--================================================================-->
<a name="email"></a>
<P> <hr> <P>
<h3><img align=bottom alt=" " src="../gx/ques.gif">E-mail adjustment needed</h3>
<P> <B>Date: Mon, 22 Sep 1997 12:52:50 -0700<BR>From: Terrey Cobb<a href="mailto:tcobb@onr.com">tcobb@onr.com</a></B><p>
<B>Greetings Answer Guy:<br>
I have a problem with e-mail which you may have already deduced from the
"from:" line of this letter. In brief, I am running RedHat 4.0 on a
home computer. I get onto the Internet by means of a local ISP using
a dynamic ppp connection. I send and read my e-mail through EMACS.
Whenever I send mail to anyone, the "from:" line states that I am
"root &lt;sierra.onr.com&gt;." Even though I always use a "reply to" header
giving my actual e-mail address, it would be nice if I could configure
something so that the "from" header would reflect my true identity.
Any help you could give me on this would be greatly appreciated.
</b><p>
<align=bottom alt=" " src="../gx/ans2.gif">
What you want to use is called "masquerading" in the
'sendmail' terminology. This should not be confused with
IP Masquerading (which everyone outside of the Linux
world calls "NAT" -- network address translation).
<P> The other think you'll want to use is to use M-x customize
or M-x edit-options (in emacs) to customize/override the
e-mail address that emacs' mail readers (RMAIL VM mh-e --
whichever) will put in its headers).
<p>--Jim
<!--================================================================-->
<a name="realbios"></a>
<P> <hr> <P>
<H3><img align=bottom alt=" " src="../gx/ques.gif">REALBIOS?</H3>
<P> <B>From: Bill Dawson <a href="mailto:bdawson@abginc.com">bdawson@abginc.com</a><br>
Linux Wizard,<br>
I am a newbie to Linux, and it has been a rocky start. Through a series
of trial and error I discovered I needed to use loadlin to get started.
When I ran loadlin I got this message:
</B><p><B>
"Your current configuration needs interception of "setup.S,"
but the setup-code in your image is *very* old (or wrong)
Please use BIOSINTV/ REALBIOS or try another image file"
</B><p><B>
I looked at the reference on your page to REALBIOS, but it did not tell
me where to find this program. Could you tell me where to get it and how
to use it, please?
</b><p>
<img align=bottom alt=" " src="../gx/ans2.gif">
This happens when you have a memory manager, a disk manager,
or any sort of TSR or device driver that "hooks" into your
BIOS controlled interrupt vectors prior to running LOADLIN.
<p>
Short Answer:<br>
-------------<br>
Look for the loadlin.tar.gz package -- it
should include that. Here's the URL for the
copy of that on sunsite:
<p>
<a href="http://sunsite.unc.edu/pub/Linux/distributions/slackware/slakware/a4/loadlin.tgz">http://sunsite.unc.edu/pub/Linux/distributions/slackware/slakware/a4/loadlin.tgz</a><p>
In this file there should be a copy of a program called
REALBIOS.EXE which you would run as I've described before. It
would create a special "system/hidden" file in the root of
your C:\ drive -- which allows LOADLIN to find all the ROM
handlers for each of your hardware interrupts.
<p>
One way you might avoid the problem is to invoke
LOADLIN from your CONFIG.SYS. You can do that by
invoking LOADLIN.EXE from a SHELL= directive in your
CONFIG.SYS.
<p>
If you're using a version of MS-DOS later than
5.0 you can create a menu of boot options pretty
easily -- see your MS-DOS/Windows '95 manuals for
real details. Heres a trivial example:
<p>
<pre>
rem CONFIG.SYS
menuitem WIN
menuitem LINUX
menudefault LINUX
[WINDOWS]
FILES=64
BUFFERS=32
[LINUX]
rem Load my 2.0.30 Linux kernel
SHELL=C:\LINUX\LOADLIN.EXE C:\LINUX\L2030.K root=/dev/hdc1
</pre>
<p>
A bit of Background:<br>
--------------------<br>
<p>
PC Interrupt's are similar to Unix signals or Macintosh
"traps." They are a table of pointers (in the first 4K
of RAM) to "handlers" (routines that process verious sorts
of events -- like characters coming in from the keyboard,
handshaking signals from modems or printers, or data-ready
events from disk drives). Normally, under MS-DOS, many of
these events are handled by the BIOS. Others are handled
by DOS device drivers. Still others aren't assigned to
hardware events at all. In fact most of the interrupts are
reserved for "service routines" (similar to Unix "system calls").
<p>
Linux doesn't use any of these routines. Your system's BIOS
is a set of machine language routines written for the processor's
"real mode." All x86 processor start in real mode. Every processor
since the 286 has had a "protected" mode -- which is where all of
the cool extended memory addressing and other features are
implemented (actually the 286 only supported 24-bit addressing --
but it's not supported by any modern operating protected mode
OS, the obscure 80186 was never used as the core processor).
<p>
So, your kernel has to shift from "real mode" to "protected mode."
It also has to provide low level device drivers for any device
you want to access -- where it uses I/O port and DMA channels to
talk to the devices. The problem is that something from real
mode must load the Linux kernel.
<p>
LILO and LOADLIN.EXE:
<br>
---------------------
<br><p>
The two common ways to load a Linux kernel into memory
are: LILO and LOADLIN.EXE.
<p>
On any PC hard disk there is a "partition table" which is how
multiple operating systems can share the same disk. This was
necessary because the early design o fthe PC made it very
difficult to swap drives. (Using the sorts of external SCSI
drives that are common on other systems -- and any sort of
OpenBoot or other PROM "monitor/debugger" -- makes it pretty
easy to connect external drives with alternative OS' on them
-- but that would have been far too expensive for the early PC
XT's (the first PC's to offer hard drives).
<p>
Throughout most of the history of the PC architecture the
BIOS for most machines could only see two hard drives -- any
additional hard drives required additional drivers. Furthermore
these two drives had to be on a single controller -- so you
couldn't mix and match (without resorting to software drivers).
<p>
Worse than that -- there were no standard drivers -- each
manufacturer had to write their own -- and none of them
followed an particular conventions.
<p>
None of this matters to us, once we get the Linux kernel
loaded, because Linux will recognize as many drives and
devices as you attach to it (assuming you compile in the
drivers or load their modules).
<p>
However, it does matter *until* we get our kernel loaded.
With LILO this basically requires that we have our kernel
somewhere where the BIOS can reliably find it from real mode.
With LOADLIN we have a bit more flexibility -- since we can
put the kernel anywhere where DOS can find it (after any of
those funky drivers is loaded).
<p>
The partition table is a small block of data at the end of the
master boot record (the MBR). It's about 40 bytes long and
has enough for 4 entries. These are your "primary" partitions.
One of them may be marked "active" that is will be the
partition that is "booted" by default. One of the partitions
may be an "extended" partition -- which is a pointer to another
partition table on the same hard disk. The rest of the MBR
(512 bytes total) which precedes the partition table is a
section of real mode machine code called the 'boot loader'.
<p>
LILO can replace the MBR boot code (or it can be in the
"logical boot record" -- which is like the "superblock" in
Unix terminology -- it can also be placed in the boot sector
of a floppy. If LILO is placed in "logical boot record" of
a Linux partition -- then the DOS (or NT, or OS/2 or whatever)
code must be set to load it (usually by setting that partition
-- with LILO in it -- as the "active" partition).
<p>
With LOADLIN all of this is moot. You just boot DOS (or
Win '95 in "command prompt" mode -- using {F8} during the boot
sequence or whatever) -- or you can use the mult-boot
configuration I described earlier.
<p>
One of the funny things about Linux is how many different ways
you can load it. You can even shove a Linux kernel unto a
floppy (using the dd command) and boot it that way (though you
don't get any chance to pass it any parameters that way -- as
you do with LOADLIN and LILO).
<p>
Last Notes:
<br>
-----------
<br>
<p>
Things are improving in the PC world. We no have some SCSI
and EIDE controllers that can boot off of specially formatted
CD-ROM disks (meaning we can use a full featured system for
our rescue media, rather than and to scrimp and fight to get
what we need onto one or two floppies). Most new systems
come with at least EIDE -- giving us support for four devices
rather than just two. (That's especially important when you
want to share a system with a couple of OS and you want to have
a CD-ROM drive). Any decent system comes with SCSI -- and most
PCI SCSI controllers support 15 devices, rather than the
traditional limit of seven. There are "removable bay" and
drive adapters for IDE and SCSI -- so having an extra "cold
spare" hard drive is pretty simple (and with SCSI we can have
external drives again).
<p>
Conclusion:
<br>
-----------
<br><p>
There are still many cases where we need to use LOADLIN.EXE
rather than LILO. I personally recommend that anyone that has
DOS installed on their system make a LINUX directory somewhere
and toss a copy of LOADLIN.EXE and their favorite kernel(s) in
there. This makes an effective "alternative boot" sequence of
your partition tables
<p>--Jim
<P> <hr> <P>
<!--================================================================-->
<a name="lib"></a>
<h3><img align=bottom alt=" " src="../gx/ques.gif">X-Windows Libraries</h3><p><b>
Date: Sun, 21 Sep 1997 14:06:26 -0700<br>
From: <a href="mailto:PATAP!DPFALTZG@patapsco.com">PATAP!DPFALTZG@patapsco.com</a></B><p><B>
Although I did not get any response from you, I want to follow up with
what I have found in the hopes that it may benefit someone along the
way.
</b><p>
<img align=bottom alt=" " src="../gx/ans2.gif">
Sorry. The volume of my mail and the nature of my
expertise (that is the fact that I don't know much about
X Windows -- meaning I have to research anything
I'm thinking of saying), means that there are sometimes
unfortunate delays in my responses.
<p>
By the beginning of next year I hope to entirely revamp
the way we do "The Answer Guy" (it will hopefully become
"The Answer Gang").
<p><img align=bottom alt=" " src="../gx/ques.gif">
<B>
This is about the problem of the X-Windows System not coming up but
instead gives messages to the effect that it couldn't map the libraries.
</B><p><B>
In the process of our playing around, on occasion it would give a message
about being out of memory. This puzzled us in that it was not consistent
and appeared in a small percentage of the cases. However, on that clue,
I found that the swap entry was missing from '/etc/fstab'. I manually
turned on swapping and now the X-Windows System comes up and runs normally.
</B><p><B>
After adding the entry to '/etc/fstab', the whole system comes up and plays
as it should. All I can say is that somewhere in the process of trying
to get the system back on the air, the entry got removed!
</B><p><B>
Although you were not directly involved in the solution, I'd like to say,
"Thanks for being there!"
</B><p>
<img align=bottom alt=" " src="../gx/ans2.gif">
I'm glad that worked. I'll try remember that next time a similar probl
em comes up.
<p>
To the extent that I have "been there" you're welcome.
As with most of the contributors to Linux I must balance
my participation against my paying work. Naturally my
contributions are far less significant than those of our
illustrious programmers -- bit I hope to help anyway.
<p>--Jim
<P> <hr> <P>
<!--================================================================-->
<a name="pc"></a>
<h3><img align=bottom alt=" " src="../gx/ques.gif">
PC Emulation</h3><p><b>Date: Sat, 20 Sep 1997 13:07:56 -0700
<br>From: SAFA ISAA <a href="mailto:safaisaa@swipnet.se">safaisaa@swipnet.se</a></B><p><B>
Hi Im working in comp. named Fordons Data our databas is a UNIX
RS/6000.and we use aprogram calld Reflection to emulte pc so we can use the
</B>
<p>
<img align=bottom alt=" " src="../gx/ans2.gif">
That would be the WRQ Reflections to emulate a 3270 or 5150/5250
IBM terminal.
<p><b>
<img align=bottom alt=" " src="../gx/ques.gif">
pc=B4s as aterminal.We use ethernet withe TCP/IP protcol=20
for com.betwen RS and PC .In pc we use win95.My q. is can we use
doslinux or minilinux to com. withe rs instade of Reflection ??
</b><p>
<img align=bottom alt=" " src="../gx/ans2.gif">
You could install DOSLinux or MiniLinux and a copy of
tn3270 and it *might* be able to talk to your RS/6000 (AIX)
applications.
<p>
The problem is that the 3270 and 5150 terminals are very
complex -- more of a client/server hardware than a
"terminal/host." Essentially the IBM mainframes and mini's
download whole forms to the "terminal" and the "terminal"
then handles all sorts of the processing on its own.
<p>
tn3270 just implements a bare minimum subset of the 3270
protocols (just the weird EBCDIC character set so far as
I know).
<p>
Frankly I don't know how this relates to your RS/6000 AIX
system. That should be able to accept standard telnet
and terminal connections. The question be becomes: "Can
your database application (frontends) handle this sort of
connection?" Does it provide a curses or tty interface?
<p><b>
<img align=bottom alt=" " src="../gx/ques.gif">
If the answer is YES would U tell me where can I gat and how to test
it..We R the bigest comp. in skandinavin for adm the hole car sys
THX
</B><P>
<img align=bottom alt=" " src="../gx/ans2.gif">
This looks pretty mangled. The answer is "I don't know."
However, Linux has the virtual of being free -- so there's
very low risk in setting up a copy and trying it.
<p>
The more fundamental question is: What are you trying to
accomplish? If you currently use Win '95 and Reflections
why do you want to switch?
<p>
Do you want to save money?
<p>
While Win '95 and Reflections are commercial packages
-- they aren't terribly expensive. Your administrative
and personnel training costs are presumably much higher.
<p>
Is is for administrative flexibility?
<p>
The number one complaint about MS Windows products by
Unix sysadmins (based on my attendance at LISA, USENIX,
and similar events) is that MS products are difficult
to administer -- and largely impossible to administer
remotely or in any automated way.
<p>
Unix admins are spoiled by rlogin, rcp, rdist, and
the fact that almost *anything* under Unix can be
scripted. Most jobs are amenable to shell or perl
scripts run via rlogin or cron -- and some of the
"tough" jobs require expect (or the perl comm.pl)
to "overcome those fits of interactivity."
<p>
Mouse driven interfaces with "floating" windows and
dialog boxes are not "automation friendly" and MS
Windows is particularly unfriendly in this regard.
(MacOS has an Applescript and a popular third-party
utility called QuickKeys (sp) that reduce its deficiencies
in this area).
<p>
So, if you're considering switching from Win '95
to Linux so that you can centrally administer your
client desktops -- it's probably not quite a
compelling reason.
<p>
I could go on and on. The point is that you have to make
a good business case for making this switch. Is there some
Linux application that you intend to deploy? Is this suggested
by your security needs? What are the requirements of you database
applications? Could you migrate those to use "thin clients"
(HTML/CGI forms) through a web (intranet) gateway? Could you
implement the client on Java?
<p>
As for DOSLinux and MiniLinux specifically: Those can be
pretty hard to find. I've sent e-mail to Kent Robotti, the
creator of the DOSLinux distribution, to ask where it's
run off to.
<p>
There are some other small Linux distributions that are
suitable for installation into a DOS directory and able
to be run off of the UMSDOS filesystem mount on '/' (root).
<p>
Mini-Linux is pretty old (1.2.x kernel) and doesn't appear
to be currently maintained.
<p>
I'd look at Sunsite's distibutions directory --
<p>
<a href="http://sunsite.unc.edu/pub/Linux/distributions/">http://sunsite.unc.edu/pub/Linux/distributions/</a>
<p>
Normally there would be a doslinux directory thereunder --
but Kent seems to change things pretty rapidly and it may
be that this as been removed while he's doing another
upgrade or release.
<p>
It may be that you best bet would be the "Monkey" distribution
(there's a directory under the URL above for that). This seems
to be a five diskette base set in a set of split ARJ
(Jung Archive) files. This seems to have been put together
by Milan Kerslager of Czechloslovakia (CZ). There are about
nine add-on "packages" that are ready to roll with it.
<p>
This is pretty recent (last March) package -- and one of the
packages for it is a 2.0.30 kernel from the end of April.
<p>
A copy of ARJ.EXE doesn't seem to be included, so you'd
have to grab that from someplace like:
<p>
Simtel: arj250a.exe -- Robert Jung's Archiver<p>
<a href=" ftp://ftp.cdrom.com/pub/simtelnet/msdos/arcers/arj250a.exe
"> ftp://ftp.cdrom.com/pub/simtelnet/msdos/arcers/arj250a.exe
</a>
<p>
* (for those who don't know Simtel used to be at the
White Sands Missile Range on an old TOPS system. It's
primary mirror used to be at oak.oakland.edu -- and it's
now hosted by Walnut Creek CD-ROM (ftp.cdrom.com). If
you need any sort of DOS shareware or freeware (perhaps
to run under dosemu or Caldera's OpenDOS) this is the
definitive collection. If you need any significant
number of packages (like you need to test/evaluate
a dozen of them to decide which works for you) I'd
suggest springing for the CD. Another invaluable site
for any non-MS DOS users is at http://www.freedos.org --
which in proper free software tradition has links to other
DOS sites like RxDOS. DOS is truly the OS that wouldn't
die -- and the shareware writers have about a decade headstart
on ubiquitous availability over Linux).
<p>--Jim
<p>
<!--================================================================-->
<a name="vbasic"></a>
<P> <hr> <P>
<h3><img align=bottom alt=" " src="../gx/ques.gif">Visual Basic for Linux</h3>
<p>
<b>Date: Thu, 18 Sep 1997 15:34:08 -0700
<br>From: Forzano <a href="mailto:Forzano@ansaldo.it">Forzano@ansaldo.it</a></b><p>
<B>I'm looking for a sw that can translate an application developed in
Visual Basic to Unix. Could you help me?
</b><p>
<img align=bottom alt=" " src="../gx/ans2.gif">
The product you were undoubtedly
thinking ofis VBIX by Halcyon Software (<a href="http://www.vbix.com">http://www.vbix.com</a>).
(408-378-9898).
<p>
I haven't used this product personally (since I have no
interest in Visual BASIC). However they do claim to
support Microsoft Visual BASIC source code and they offer
some other, related products.
<p>
I see a DBIX (which appears to be a database engine with
ODBC -- open database connectivity drivers for Linux/Unix and
MS Windows '95 and NT). Also interesting might be their
"BASIC 4 Java." Here's a blurb from their web pages:
<p>
"<I>Halcyon Software Java Products
</I><p><I>
InstantBasic Script -Written in 100% Pure Java, Halcyon InstantBasic
Script (IBS) is more than just cross-platform BASIC; it is BASIC for
the Internet. Moreover, IBS is available as both a compiler and an
interpreter, thus allowing developers to execute scripts as either
BASIC source code or Java binaries(class file). The engine is
compatible with Microsoft's BASIC
Script Edition and provides complete Java Beans and ActiveX* support.
The engine is easily customizable for quick integration and comes with
its own lightweight Interactive Development Environment (IDE).
</I><p><I>
InstantBasic 4 Java - InstantBasic 4 Java is a 4GL development
environment written 100% in Java that allows programmers to quickly
and easily migrate their existing VB applications to run under any
Java environments using the VB-like IDE.</I>
<p>--Jim
<P> <hr> <P>
<!--================================================================-->
<a name="hardware"></a>
<h3><img align=bottom alt=" " src="../gx/ques.gif">
Linux 4.2 software and Hardware compatablity problems</h3>
Date: Wed, 17 Sep 1997 20:03:54 -0700<br>
From: John Arnold <a href="mailto:jarnold@hal-pc.org">jarnold@hal-pc.org</a><p>
I purchased a new computer system and 4.2 RedHat Linux Power Tools for
my son, Blake, who is a student at Trinity University in San Antonio, TX.
<p>
<B>They were purchased from different vendors.
</B><p>
<P><B>Neither, Blake, his profs,myself or my vendor knew what we were doing. The
result is a big mess. I believe the basic configuration is incorrect.
That notwithstanding, I need to know which parts are not supported by Linux
and recommended replacements. The following is a brief description of the
system:</B>
<p><pre><B>
Supermicro P5MMS motherboard with 430TX chip set. Ultra DMA 33 Mb/s
Transfer and 512K pipe line burst mode cache
AMD K6 MMX Processor @166 MHz, 6th generation performance, Microsoft
certified.
32 MEG SDRAN-10ns-DIMM Memory
Western Digital 4.0 Gig IDE hard drive. Split 50/50 by vendor
TEAC 1.44 floppy disk drive
MATROX MYSTIQUE 4MEG SGRAM PCI Video card
14" NI SVGA Color monitor by MediaTech,
1024X768-28DPI (I beleive it has a Fixed Frequency)
PIONEER 24X CD ROM Drive
Keytronics keyboard
Microsoft PS2 mouse
US Robotics 28.8/33.6 Sportster modem
Sound Blaster AWE 64 sound card with speakers
Windows 95 & Plus, Service release 2
</B></pre>
<P><B>When I have the correct equipment I will find a professional to properly
configurer it.
</B><p>
<B>Thank you for your assistance.
</b><p>
<img align=bottom alt=" " src="../gx/ans2.gif">
All of this equipment is fine. However I have to question your
approach. There are several vendors that can ship you a
fully configured system with Linux and Windows '95 pre-installed
and configured (or just Linux, if you prefer).
<p>
In fact an upcoming issue of the Linux Journal has a hardware
review of just such a system: the VAR Station II by VA Research
(<a href="http://www.varesearch.com">http://www.varesearch.com</a>).
<br> This system is very similar to the
one you described (using the same video card, keyboard, and sound
card and a very similar 24X CDROM). The big difference between
the configuration you list and the one I reviewed is that
the VAR Station came with a 4Gb SCSI hard drive, a Toshiba SCSI
CD-ROM, and a SymBIOS SCSI adapter (in lieu of the IDE equipment
you listed). Also the system I reviewed had a 3Com PCI
ethernet card rather than any sort of modem (I already have
some modem on my LAN). The other thing is that this motherboard
is an Intel and uses a 266 Pentium II.
<p>
For about the same as you have spent on these parts separately
you could probably get a system from VA Research or several
others.
<p>
Here's a short list in no particular order:
<p>
PromoX
(<a href="http://www.promox.com">http://www.promox.com</a>)<p>
Aspen Systems
(<a href="http://www.aspsys.com">http://www.aspsys.com</a>)<p>
Linux Hardware Solutions
(<a href="http://www.linux-hw.com">http://www.linux-hw.com</a>)<p>
SW Technology
(<a href="http://www.swt.com">http://www.swt.com</a>)<p>
Apache Digital
(<a href="http://www.apache.com">http://www.apache.com</a><p>
Telenet Systems Solutions
(<a href="http://www.tesys.com">http://www.tesys.com</a>)<p>
... and that doesn't include the ones that specialize in
Alphas or SPARC based systems.
<p>
So, you have many choices for getting system with Linux
preconfigured.
<p>
Now, if you're stuck with the system you've got, and you
just want it all to work, you could pay a consultant to
install and configure on the existing hardware. At typical
rates of $50 to $150 per hour (mine are usually set at $91/hr)
you'd rapidly spend more on this than on getting system from
any of these vendors (who presumably have most of the
installation and configuraiton process automated).
<p>
I cannot, in good conscience, recommend that you hire me
to configure a system like this. It's just too expensive
that way.
<p>
If you made it clear to your vendor that you intended to
run Linux on the system, and they were unable to adequately
install and configure it -- I personally think you are fully
justified in returning everything and starting over. (If
not then yo are still probably within your rights -- and
you may still want to consider it).
<p>
Another approach you might try is to get just a hard disk
with Linux pre-installed on it. This is the popular LOAD
(Linux on a Disk) product from Cosmos Engineering
(http://www.cosmoseng.com). This isn't quite a neat as
getting the whole box pre-configured -- you still have to
tell it what sort of video, sound, and other cards you want
it to use (and you have to be able to support the extra
drive -- which may be tricky if you have an IDE HD and
an IDE CD-ROM drive already on your IDE controller. Many
new IDE controller have two "channels" (enough to support
four IDE devices) and some don't.
<p>
Another approach is to just let Blake fend for himself.
He can wander around the campus a bit and look for fellow
students who use and understand Linux. Who knows, he may
meet some great people that way -- maybe even get a date
in the process. Linux is very popular at colleges and
universities -- and students are generally pretty enthusiastic
about helping one another use any sort of toys -- computers
especially.
<p>--Jim
<P> <hr> <P>
<!--================================================================-->
<a name="mvusr"></a>
<h3><img align=bottom alt=" " src="../gx/ques.gif">
Moving /usr subdirectory to another drive..
</h3>
Date: Wed, 17 Sep 1997 18:11:32 -0700<br>
From: Ben Bullock <a href="mailto:bullock@toolcity.net">bullock@toolcity.net</a>
<p>
<B>My entire Linux filesystem currently resides on /dev/hda2 and uses up
almost 90% of this partition. Because I am quickly running out of disk
space on my original hard drive, I recently added a second hard drive
and created a Linux partition on it which the system sees as /dev/hdb1.
The /usr subdirectory of my filesystem has swollen to over 300MB, so I
would like to copy all the directories and files under /usr over to
/dev/hdb1 and then edit /etc/fstab so that this partition will then be
mounted on /usr in the filesystem when I boot up.
</B><p><B>
I've given a lot of thought about how to do this, but I am very
concerned about making this change because of the potential problems it
might cause if not done properly. I would, therefore, appreciate your
advice on how to proceed and what steps I should take to safeguard the
integrity of my filesystem. BTW, I have a second, unused partition
(/dev/hdb2) available on the new drive that could be used to store a
"backup copy" of all the directories and files currently under /usr on
/dev/hda2, and I also have an emergency boot/root floppy disk set that
provides basic utilties.
</B><p><B>
Thanks very much for any help you can give me on this. Also, I want you
to know that I enjoy your column in the Linux Gaxette and have found it
to be very helpful.
</B><P>
<img align=bottom alt=" " src="../gx/ans2.gif">
Re: my previous columns and articles.
<p>
You're welcome.
<p>
Re: how to move (migrate) trees full of files:
<p>
I can understand you concerns. Under DOS and Windows
this sort of operation is hairy, tricky, painful, and
often terribly destructive.
<p>
The good news is that Unix is *much* better at this.
<p>
Here's the overview:
<p>
Mount the new filesytem to a temporary location
Use a cpio or tar command to copy everything
* (optionally) Make all these files "immutable"
Boot from an alternate partition or a rescue disk
Rename the source directory
Make a new directory by that name (a mount point)
Mount the new fs on the new mount point
Update your /etc/fstab to make this permanent
* (optionally) Update your tripwire database
Test
Remove the old tree at your leisure.
<p>
That's all there is to it. Now we'll go back over those
steps in greater detail -- with same commands and some
commentary.
<p>
Mount the new filesytem to a temporary location:
<p>
I like to use /mnt/tmp for this. So the command
is:
<p>
<code>
mount /dev/hdb1 /mnt/tmp
</code>
<p>
Use a cpio or tar command to copy everything
<p>
I used to use tar for this -- but I've found that
cpio is better. So here's the tricky command that's
really the core of your question:
<p>
<code>
cd /usr/ && find . -print0 | cpio -p0vumd /mnt/tmp
</code><p>
* note: must do this as root -- to preserve
permissions and ownership!
<p>
I realize this is an ugly looking command. However,
we'll explain it step by step:
<p>
cd /usr/ && -- this cd's to the user directory
and (if that goes O.K.) executes the following.
If you typed /usr/ wrong you won't end up with a
mess.
<p>
find . -print0 -- this provides a list of filenames
as "null terminated strings" -- this will work
*even if some of the files have spaces, newlines, or
other dubious characters in them*. The results
are written into a pipe -- and the program reading
them must be capable of using this list. Luckily the
GNU cpio and xargs command have this feature, as we'll
see.
<p>
| cpio -p0vmd /mnt/tmp -- here's the tricky part.
This is the "passthrough" mode of cpio. cpio normally
copies files "in" or "out" -- but it can do "both"
using the "passthrough" mode. cpio expects a list
of filenames for its standard input (which we are
providing with the 'find' command). It then copies
the corresponding file "in" from the path specified
(as part of the input line) and "out" to the the path
specified as one of cpio's arguments (/mnt/tmp in this
case).
<p>
The rest of the switches on this cpio command are:
0 -- expect the input records (lines) to be null
terminated, v -- be verbose, m -- preserve the
modification time of the files (so your next
incremental backup does think that everything under
/usr/ has suddenly changed), and d -- make leading
directories as needed.
<p>
The last argument to this cpio command is simply
the target directory we supply to the -p switch.
<p>
* (optionally) Make all these files "immutable"
<p>
One obscure feature of Linux' ext2 filesystem that I
like to suggest is the "immutable attribute." This
prevents *any* change to a given file or directory
until the file is made "mutable" again. It goes way
beyond simply removing write permissions via the
standard Unix chmod command.
<p>
To do this use the command:
<p>
<code>
cd /mnt/tmp && chattr -R +i *
</code><p>
... or (to just do the files and not the directories):
<p><code>
find /mnt/tmp -type f -print0 | xargs -0 chattr +i
</code><p>
Ultimately this protects the sysadmin from his or her
own 'rootly' powers. Even 'root' gets an "operation
not permitted" error on any attempt to modify any
feature of an immutable file.
<p>
Under normal circumstances this only marginally improves
the system's security (any attackers who get a 'root'
shell can just 'chattr' the files back to "-i" (mutable),
and then have their way with your files). However,
with the addition of the "sysctl securelevel" features
that are expected in the 2.2 kernel (and may already be
in the current 2.0 and 2.1 kernels) -- this will actually
be a real security feature. (Discussion of "securelevel"
is for a different article).
<p>
The point is that you can save yourself from many
sorts of mistakes by making files immutable. This
is particularly handy when running 'make' as root
-- when you may have missed some problem in the file
that would otherwise wipe out some of your important
files. I suspect it's also handy if you get a bogus
RPM package -- for basically the same reason.
<p>
(Many sysadmin's I've talked to and exchanged mail
and news postings with fervently rail about the
dangers of running make as root or using any sort
of package management system. I understand their
concerns but also recognize that the number of new
inexperienced SA's -- and the sheer amount of work
that many SA's are expected to complete -- practically
require us all to take shortcuts and place some trust
in some of the packages we're installing. So this
"immutable" feature is a reasonable compromise).
<p>
Boot from an alternate partition or a rescue disk
<p>
Now we've done the hard part. All we have to do
now is use the new copy of /usr. The only problem is
that many of the commands we want to use require
access to the shared libraries in /usr/lib. If you
ever accidentally remove or damage /usr/lib/libc.so
you'll have first hand experience with the problem.
<p>
So, we boot from an alternative boot partition or
from a rescue disk, mount our normal root partition
and continue. I'll leave out the details on this --
since the details vary from one distribution and site
to another.
<p>
* Note to distributors and installation script
maintainers: PLEASE INCLUDE AN OPTION TO CREATE
AN ALTERNATIVE BOOT PARTITION IN YOUR PRODUCTS
<p>
Rename the source directory
<p>
Now we've copied the whole /usr/ tree to /mnt/tmp.
We could just modify the /etc/fstab, and reboot the
system. Your rc scripts would blithely mount
the new /dev/hdb1 right over the existing /usr --
in effect "hiding" the old usr files. However this
wouldn't be very useful -- it does free up any disk
space.
<p>
So we issue a command like:
<p>
<pre>
cd $NORMALROOT # (wherever you mounted
# your normal root filesystem)
mv usr usr.old
</pre>
<p>
Make a new directory by that name (a mount point)
<p>
Now we need to make a new /usr directory. We
just issue the "mkdir /usr" command. However --
we're not quite done. We also want to chown and
chmod this new directory to match the old one.
<p>
So we use "ls -ld usr.old" to see the owner,
group, and permissions -- whice are typically
like:
<p>
<pre>
drwxr-xr-x 20 root root 1024 Aug 1 22:10 usr
</pre><p>
... and we use the commands:
<p><pre>
chown root.root usr
chmod 755 usr
</pre><p>
... to finish the new mount point.
<p>
(Personally I like to make /usr/ owned by root.bin
and mode 1775 -- sticky and group writable. However,
I also mount the whole thing read-only so I'm not
sure this is comparable to any of the FSSTND (the
filesystem standard) or the conventions used by any
distribution).
<p>
I get a bit of confused about how the mount command
works -- because it seems that the mount command
actually over-rides the underlying ownership and
permissions of the mount point. However I have seen
problems that only seemed to go away when I make the
underlying mount point match my intended permissions
-- so I do it without understanding it completely.
<p>
Mount the new fs on the new mount point
<p>
I like to do this just to test things.
<p>
Update your /etc/fstab to make this permanent
<p>
Now you can edit your /etc/fstab (which should
actually be under whatever mount point your using
during this "alternative root/rescue" session)
<p>
You'll add a line like:
<p>
<pre>
/dev/sdb1 /usr ext2 defaults,ro 1 2
</pre><p>
... to it.
<p>
(Note, I like to mount /usr/ in "read-only" mode.
this provide one extra layer of protection from
the occasional root 'OOOOPS!' It also helps enforce
my policy that all new packages are installed under
/usr/local, or /usr/local/opt (to which my /opt is
a symlink), or under a home directory (which, on
some of my systems are under /usr/local/home). The
idea of maintaining this policy is that I know
what files and packages are not part of the base
OS).
<p>
* (optionally) Update your tripwire database
<p>
Tripwire is a program that maintains a detailed
database of your files, their permissions, ownership,
dates, sizes, and several different checksums and
hashes. The intent is to detect modifications to the
system -- in particular these would be signs of
corruption, or tampering (security breaches or the
work of a virus or trojan horse).
<p>
I won't go into details here. If you have tripwire
installed, you want to update the database and
store it back on it's read-only media.
<p>
For more info about tripwire see:
<p>
Tripwire (<a href="ftp://coast.cs.purdue.edu/pub/COAST/Tripwire">ftp://coast.cs.purdue.edu/pub/COAST/Tripwire</a>)
<p>
To get it to compile cleanly under Linux look at
the patch I wrote for it:
<p>
Tripwire Patch for Linux (<a href="http://www.starshine.org/linux/tripwire-linux.patch">http://www.starshine.org/linux/tripwire-linux.patch</a>)<p>
(no .html extension on that -- its just a text file).
<p>
(* one of these days I'll get around to writing up a
proper web page for Tripwire and for my patch -- I
submitted it to Gene and Gene and they never integrated
it into their sources).
<p>
Test
<p>
Now you simply reboot under your normal configuration
and test to your hearts content. You haven't removed
the old /usr.old yet -- so you can back out of all
your changes if anything is broken.
<p>
Remove the old tree at your leisure.
<p>
When you're satisfied that everthing was copied
O.K. -- you can simply remove all the old copies
using the command:
<p><code>
rm -fr /usr.old
</code><p>
Now you finally have all that extra disk space back.
<p>
Obviously this process can be done for other parts of your
filesystems as well. Luckily any other filesystem (that
doesn't include the / (root) and /usr/lib/ trees) is less
involved. You shouldn't have to reboot or even switch to
single user mode for any other migrations (though it won't
hurt to do so).
<p>
I like to put /tmp, /var, and /usr/local all on their own
filesystems. On news servers I put /var/spool/news on it's
own. Here's a typical fstab from one of my systems:
<p>
<pre>
# &lt;device&gt; &lt;mountpoint&gt; &lt;filesystemtype&gt; &lt;options&gt; &lt;dump&gt; &lt;fsckorder&gt;
/dev/sdc1 / ext2 defaults 1 1
/dev/sda6 /tmp ext2 defaults 1 2
/dev/sda10 /usr ext2 defaults,ro 1 2
/dev/sda7 /var ext2 defaults 1 3
/dev/sda8 /var/log ext2 defaults 1 3
/dev/sda9 /var/spool ext2 defaults 1 3
/dev/sdb5 /usr/local ext2 defaults 1 3
/proc /proc proc defaults
/dev/sda2 none swap sw
/dev/fd0 /mnt/a umsdos noauto,rw,user 0 0
/dev/fd1 /mnt/b umsdos noauto,rw,user 0 0
/dev/hda1 /mnt/c umsdos defaults 0 0
/dev/scd1 /mnt/cd iso9660 noauto,ro,user,nodev,nosuid 0 0
/dev/scd0 /mnt/cdwr iso9660 noauto,ro,user,nodev,nosuid 0 0
/dev/fd0 /mnt/floppy minix noauto,rw,user,noexec,nodev,nosuid 0 0
/dev/fd0 /mnt/e2floppy ext2 noauto,rw,user,noexec,nodev,nosuid 0 0
/dev/sdd1 /mnt/mo ext2 noauto,rw,user,nodev,nosuid 0 0
/dev/sdd1 /mnt/mo.offline ext2 noauto,rw,user,nodev,nosuid 0 0
/dev/sdd1 /mnt/modos umsdos defaults,noauto 0 0
tau-ceti:/ /mnt/tau-ceti nfs ro
</pre>
<p>
Note all the noauto and user point points. These allow
users to access these removable devices without switching
to 'root.' To protect against potential problems with the
'mount' command (being SUID 'root') I have it configured
with the following ownership and permissions:
<p>
<pre>
-r-sr-x--- 1 root wheel 26116 Jun 3 1996 /bin/mount
</pre><p>
Thus, only members of the "wheel" group are allowed to use
the mount command (and I only put a few people in that). So
I balance the risk of one of the "wheel" members finding and
exploiting a bug in 'mount' vs. the expense having to do all
mount's myself and risk of my typing *bad things* at the
root shell prompt. I could also accomplish the same sorts
of things with 'sudo' (and I use that for many other cases).
<p>
For more info about sudo see:
<p>
Sudo Home Page
(<a href="http://www.courtesan.com/courtesan/products/sudo/">http://www.courtesan.com/courtesan/products/sudo/</a>)<p>
FTP sudo:
(<a href="ftp://ftp.cs.colorado.edu/pub/sysadmin/sudo">ftp://ftp.cs.colorado.edu/pub/sysadmin/sudo</a><p>
I hope that I've done more than answer your question. I hope
I've given you some ideas for how to make your system more
robust and secure -- how to apply some of the principles of
"best practice" to administering your Linux box.
<p>--Jim
<P> <hr> <P>
<!--================================================================-->
<a name="cppx"></a>
<h3><img align=bottom alt=" " src="../gx/ques.gif">
C++ Integrated Programming Enviroment for X...</h3>
Date: Wed, 17 Sep 1997 17:56:30 -0700<br>From: <a href="mailto:trustno1@kansas.net">trustno1@kansas.net</a><p>
<P><B>
Dear Answer Guy,<br>
I am a student in Information Systems at Kansas State University. As a
relatively new user of Liunx, I was wondering if there exists a software
package for X which could be comparable to something like Borland's C++
IDE? I've heard of something called Wipeout, but I'm not running Xview,
is there anything else that I should check out?
</B><P>
<img align=bottom alt=" " src="../gx/ans2.gif">
I've never heard of "Wipeout" -- but it sounds suspicously
like a slurred pronunciation of "wpe" -- which would be
the "Window Programming Environment" by Fred Kruse. This
has a console mode (wpe) and an X mode (xwpe) which are just
links to the same binary.
<p>
I don't know that it requires Xview. Certainly on the rare
occasions when I've run it I didn't have to do anything
special -- just type the appropriate command for the mode
I wanted and it just appears. So, I didn't have to install
any special libraries or run a particular window manager or
anything silly like that.
<p>
t typing 'xwpe &' from any xterm and see if that's
already installed for you. If so you can add it to your
window manager's menu tree, or to whatever sort of desktop
manager or program/applications manager you use (or just
always launch if from an xterm -- which is what I do for
90% of the things I run under X).
<p>--Jim
<P> <hr> <P>
<!--================================================================-->
<a name="lynx"></a>
<h3><img align=bottom alt=" " src="../gx/ques.gif">
LYNX-DEV new to LYNX</h3>
Date: Tue, 16 Sep 1997 22:06:45 -0700
<P><B>
Will I be able to browse the FULL INTERNET using LYNX?
I am using LYNX at my job, and the computer does not have window!
</B><P>
<img align=bottom alt=" " src="../gx/ans2.gif">
The web is not the FULL INTERNET!
<p>
Web browsers (such as Lynx, Mosaic, Netscape and MSIE) only
access the web, ftp, and gopher. These are only a few of
the services and protocols supported by the Internet.
<p>
There is no such thing as "browsing" the "full Internet."
Indeed, the phrase "full Internet" is meaningless.
<p>
As to your implicit question:
<p>
Will you be able to browse all public web sites
using Lynx?
<p>
... the answer is no.
<p>
Lynx is a browser that complies with as much of the HTTP and
HTML specifications (the protocols and data representation
(file formats) used by the "web") as possible -- within the
constraints of it various platforms (text only -- no "inline"
graphics, no sound, no support for "Java" or "JavaScript"
(which aren't part of these specifications anyway).
<p>
Therein lies the rub. The client (Lynx) is able -- but many
of the servers aren't willing. (In this case, by "servers"
I'm referring to the people and the sites -- not the software).
<p>
Basically there are some sites that are "unfriendly." They
make gratuitous use of tables, imagemaps, frames, Java applets,
embedded JavaScript, cookies, ActiveX, active server pages (ASP)
and ISAPI, and other extensions. They hope to win in some
"one-up-manship" contest of "coolness."
<p>
Most of these extensions were introduced or promoted by one or
another company (mostly Microsoft or Netscape) in their efforts
to "capture" the "mindshare" -- which they hope will lead to
increased *market*-share for their browsers and "web developement
tools" (at the expense of standards, interoperability, and -- most
especially -- their competitors).
<p>
The "web development tools" are the most insidious power piece
in this little chess game. These tools (mostly Microsoft's
"FrontPage") seem to include these non-standard extensions
wherever possible -- with no warning, commentary, and mostly
with no option to avoid them. Anyone who wants to produce "clean,"
friendly, standards conformant code is basically reduced to
using a bare text editor -- and knowing the syntax inside and out.
<p>
In some particularly notorious cases there are "active" or
"dynamic content" sites that will slam the door shut on your
browser just based on a prejudice about it's name. By default
your browser identifies itself to the server when fetching pages.
Some sites are "just too cool" to have any textual content -- and
shove a message down your throat:
<p>
<I>"Go get a 'real' browser, punk!"</I>
<p>
... (the sheer effrontery of telling your "customers" what
sort of vehicle to drive around on the "stupor hypeway" --
it simply boggles the mind and gasts the flabber!).
<p>
I've even encountered a couple of cases where some "dynamic
sites" would shove hundreds of kilobytes of "search engine spam"
to my copy of Lynx. This was a crude effort to seed the
databases maintained by Yahoo!, InfoSeek, HotBot, and others with
excessively favorable content rating (based on the notion that
most of these sites used "bots" (web robots, or "spiders") that
identify themselves as "Lynx" (to avoid using the extra bandwidth
on graphics that they couldn't use).
<p>
There are also an increasing number of sites that require
SSL even for their non-secure information. SSL is a set of
encryption protocols which are primarily used to provide for
server-authenticated (or mutually authenticated) and "secure"
(encrypted) access to web forms (mostly for order Pizzas
without shouting your credit card number to every router in
fifty states and a few countries).
<p>
So, there are a number of places on the "full Internet" that
you can't adequately or comfortably browse with Lynx.
<p>
The good news is that Lynx does support features to address
most of these problems. You can get an SSL proxy (which you'd
run on the same machine as you run Lynx), the current versions
of Lynx will list all the "frames" (which are a Netscape
extension for displaying multiple separate HTML files concurrently),
and can fetch some sorts of "map" files (the text files which
describe the "hot" (clickable) regions of an IMAGEMAP -- which
is a picture with "clickable" point therein) -- so you can browse
them. Lynx can offer to accept cookies *(see note: cookies) for a
given session -- and, eventually, may offer options to save them.
<p>
The bad news, again from the site maintainers and devlopers, is
that they often don't provide meaningful names for their frames,
or within their image map files. These are intended to be
"seen" by a site's users -- and often aren't "seen" by the site's
developers (remember the "integrated web developer software we
mentioned earlier?).
<p>
The final bit of good news is this:
<p>
<I>"Most sites that are particularly "Lynx-unfriendly"
have not real content. When I succumb to curiosity
and view them in a GUI browser -- they are all flash
and no substance."</I>
<p>
When we say "hypertext" they seem to hear "hype OR text"
<p>
So, Lynx acts as a bit of a twit filter. Visit a site first
with a text browser (Lynx or emacs' W3 mode) and you'll know
immediately whether their webmasters are hard of hearing or
whether they "get it."
<p>
<I> "* Cookies are another Netscape extension
which are intended to allow web site
developers a crude and unreliable way to
"maintain state" (distinguish between
users who might be at the same site --
like all of the AOL, CompuServe, and
Netcom users going through their
respective gateways). Marketing people
drool over statistics based on "cookies"
which can purport to tell how many *new*
and *returning* users there are to a
site, *who* read *which* documents other
nonsense. However, for those statistics
to be even close enough for a marketeer,
the use of them must be almost universal
(so we stop non-cookies browsers at the
front home page) and we have to rely on
them being so obscure in the browser
software that no one tampers with them
(they essentially must be "sneaky")."</I>
<p>
PS: I've copied this to my editor at the Linux Gazette -- since
I think it's a article for them to consider. Maybe they'll reprint
it in "Websmith" (a feature of the Linux Journal, which is published
by SSC, the maintainers for the Linux Gazette webazine). Interested
parties can view all of the back issues of LG the URL in my sig.
- -- a site that is emminently "Lynx Friendly"
<p>--
Jim
<P> <hr> <P>
<!--================================================================-->
<center><H5>Copyright &copy; 1997, James T. Dennis <BR>
Published in Issue 22 of the Linux Gazette October 1997</H5></center>
<P> <hr> <P>
<!--================================================================-->
<A HREF="./index.html"><IMG SRC="../gx/indexnew.gif" ALT="[ TABLE OF
CONTENTS ]"></A> <A HREF="../index.html"><IMG SRC="../gx/homenew.gif"
ALT="[ FRONT PAGE ]"></A>
<A HREF="lg_bytes22.html"><IMG SRC="../gx/back2.gif" ALT=" Back "></A>
<A HREF="./gm.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>
<p><hr><p>
<H4>
&quot;Linux Gazette...<I>making Linux just a little more fun!</I>&quot;
</H4>
<P> <HR> <P>
<!--===================================================================-->
&nbsp;<!-- =============================================================
This Page Designed by Michael J. Hammel.
Permission to use all graphics and other content for private,
non-commerical use is granted provided you give me (or the
original authors/artists) credit for the work.
CD-ROM distributors and commercial ventures interested in
providing the Graphics Muse for a fee must contact me,
Michael J. Hammel (mjhammel@csn.net), for permission.
============================================================= !-->&nbsp;<!-- The Button box as a client side imagemap --><MAP NAME="nav-main"><AREA SHAPE="rect" HREF="#mews" coords="20,18 185,40"><AREA SHAPE="rect" HREF="#webwonderings" coords="10,60 185,83"><AREA SHAPE="rect" HREF="#musings" coords="90,102 185,130"><AREA SHAPE="rect" HREF="#resources" coords="70,152 185,180"></MAP>
<TABLE BORDER=0 COLS=2 WIDTH="100%" >
<TR>
<TD><IMG SRC="../gx/hammel/gm3.gif" ALT="Welcome to the Graphics Muse" NOSAVE HEIGHT=216 WIDTH=441 ALIGN=LEFT></TD>
<TD VALIGN=BOTTOM>
<CENTER><FONT SIZE=-1>Set your browser as wide as you'd like now.&nbsp;
I've fixed the Muse to expand to fill the aviailable space!</FONT></CENTER>
<CENTER><FONT SIZE=-2>&copy; 1997 by <A HREF="mailto:mjhammel@csn.net">mjh</A>&nbsp;</FONT></CENTER>
</TD>
</TR>
</TABLE>
&nbsp;
<HR WIDTH="100%">
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=10 COLS=2 WIDTH="100%" NOSAVE >
<TR NOSAVE>
<TD WIDTH="10%" NOSAVE><IMG SRC="../gx/hammel/muse-image-map.gif" ALT="Button Bar" USEMAP="#nav-main" HEIGHT=200 WIDTH=185 ALIGN=LEFT></TD>
<TD VALIGN=TOP WIDTH="70%" NOSAVE><B><FONT SIZE=+1>muse:</FONT></B>&nbsp;
<OL>
<LI>
<I>v;</I> to become absorbed in thought&nbsp;</LI>
<LI>
<I>n;</I> [ fr. Any of the nine sister goddesses of learning and the arts
in Greek Mythology ]: a source of inspiration&nbsp;</LI>
</OL>
&nbsp;<IMG SRC="../gx/hammel/w.gif" ALT="W" HEIGHT=28 WIDTH=36 ALIGN=BOTTOM>elcome
to the Graphics Muse! Why a "muse"? Well, except for the sisters aspect,
the above definitions are pretty much the way I'd describe my own interest
in computer graphics: it keeps me deep in thought and it is a daily source
of inspiration.&nbsp;
<CENTER><FONT SIZE=-1>[<A HREF="#mews">Graphics Mews</A>] [<A HREF="#webwonderings">WebWonderings</A>][<A HREF="#musings">Musings</A>]
[<A HREF="#resources">Resources</A>]</FONT></CENTER>
</TD>
</TR>
</TABLE>
&nbsp;
<BR><IMG SRC="../gx/hammel/t.gif" ALT="T" HEIGHT=28 WIDTH=26 ALIGN=LEFT>his column
is dedicated to the use, creation, distribution, and discussion of computer
graphics tools for Linux systems.
<BR>&nbsp;
<BR>As expected, two months of material piled up while I was out wondering
the far reaches of the US in August.&nbsp; My travels took me to California
for SIGGRAPH, Washington DC for vacation (honest), Huntsville Alabama for
work (they kind that pays the rent) and just last week I was in Dallas
for a wedding.&nbsp; All that plane travel gave me lots of time to ponder
just where the Muse has come in the past year and where it should go from
here.&nbsp; Mixed with a good dose of reality from SIGGRAPH, I came up
with the topics for this month.<IMG SRC="./gx/hammel/gradients-film.jpg" HSPACE=10 VSPACE=10 HEIGHT=286 WIDTH=298 ALIGN=RIGHT>
<P>First, there are two new sections: <B><FONT COLOR="#006600">Reader Mail
</FONT></B>and <B><FONT COLOR="#006600">Web Wonderings</FONT></B>. Reader
Mail is an extension of Did You Know and Q and A.&nbsp; I'm getting much
more mail now than I&nbsp;did when I first started this column and many
of the questions are worthy of passing back to the rest of my readers.&nbsp;
I've also gotten many suggestions for topics.&nbsp; I&nbsp;wish I had time
to cover them all.
<P>Web Wonderings is new but may be temporary.&nbsp; I&nbsp;know that many
people are reading my column as part of learning how to do Web page graphics.&nbsp;
Its hard to deny how important the Web has become or how much more important
it will become in the future.&nbsp; I&nbsp;started reading a bit more on
JavaScript to see if the language is sufficient to support a dynamically
changing version of my Linux Graphics mini-Howto.&nbsp; Well, it is.&nbsp;
I'll be working (slowly, no doubt) on converting the LGH to a JavaScript
based set of pages.&nbsp; My hope is to make it easier to search for tools
of certain types.&nbsp; I&nbsp;can do this with JavaScript, although the
database will be psuedo static as an JavaScript array.&nbsp; But it should
work and requires no access to a Web server.
<P>Readers with Netscape 3.x or later browsers should notice a lot more
color in this column.&nbsp; The Netscape 4.x Page Composer makes it pretty
easy to add color to text and tables so I make greater use of color now.&nbsp;
Hopefully it will add more than it distracts.&nbsp; We'll see. I&nbsp;may
do a review of Netscape 4.x here or maybe for Linux Journal soon.&nbsp;
There are some vast improvements to this release of Netscape, although
the new reader (known as Collabra Discussions) is not one of them.
<BR>&nbsp;
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; In this months column I'll be covering
...
<UL>
<LI>
Browser detection using JavaScript</LI>
<LI>
SIGGRAPH&nbsp;97 - what I saw, what I&nbsp;learned</LI>
<LI>
Designing Multimedia applications for Linux</LI>
</UL>
Oh yeah, one other thing:&nbsp; Yes, I know I spelled "Gandhi" wrong in
the logo used in the September 1997 Linux Gazette.&nbsp; I goofed.&nbsp;
I was more worried about getting the quote correct and didn't pay attention
to spelling.&nbsp; Well, I fixed it and sent a new version to our new editor,
Viki.&nbsp; My apologies to anyone who might have been offended by the
misspelling.&nbsp; Note:&nbsp; the logo has been updated at the SSC site.
<P><A NAME="mews"></A>
<BR>&nbsp;
<TABLE BORDER=0 COLS=1 WIDTH="100%" >
<TR>
<TD><IMG SRC="../gx/hammel/mews.gif" ALT="Graphics Mews" HEIGHT=53 WIDTH=242 ALIGN=LEFT></TD>
</TR>
</TABLE>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Disclaimer: Before I get too far into this
I should note that any of the news items I post in this section are just
that - news. Either I happened to run across them via some mailing list
I was on, via some Usenet newsgroup, or via email from someone. I'm not
necessarily endorsing these products (some of which may be commercial),
I'm just letting you know I'd heard about them in the past month.
<BR>&nbsp;
<TABLE BORDER=0 COLS=3 WIDTH="100%" NOSAVE >
<TR>
<TD COLSPAN="3" WIDTH="100%" BGCOLOR="#000000"><IMG SRC="../gx/hammel/cleardot.gif" ALT="indent" HSPACE=30 VSPACE=2 HEIGHT=1 WIDTH=1 ALIGN=LEFT></TD>
<TD></TD>
</TR>
<TR NOSAVE>
<TD WIDTH="50%">
<H3>
VRML 98</H3>
The third annual technical symposium focusing upon the research, technology
and applications of VRML, the Vritual Reality Modeling Language will be
held Feb 16-19, 1998 in Monterey, California.&nbsp; VRML 98 is sponsored
by ACM SIGGRAPH and ACM SIGCOMM in cooperation with the VRML Consortium.
Deadlines for submission are as follows:&nbsp;
<CENTER><TABLE BORDER COLS=2 WIDTH="60%" NOSAVE >
<TR BGCOLOR="#33CCFF" NOSAVE>
<TD NOSAVE>Papers</TD>
<TD>Mon. 22 Sep</TD>
</TR>
<TR BGCOLOR="#FFCC00" NOSAVE>
<TD NOSAVE>Panels</TD>
<TD VALIGN=CENTER ROWSPAN="3" NOSAVE>Fri. 3 Oct</TD>
</TR>
<TR NOSAVE>
<TD BGCOLOR="#FFCC00" NOSAVE>Workshops</TD>
</TR>
<TR NOSAVE>
<TD BGCOLOR="#FFCC00" NOSAVE>Courses</TD>
</TR>
<TR BGCOLOR="#33CC00" NOSAVE>
<TD NOSAVE>Video</TD>
<TD>Mon. 2 Feb</TD>
</TR>
</TABLE></CENTER>
Contact Information:&nbsp;
<BR>&nbsp;
<TABLE BORDER COLS=2 WIDTH="80%" NOSAVE >
<TR NOSAVE>
<TD NOSAVE>VRML 98 Main Web Site</TD>
<TD><A HREF="http://ece.uwaterloo.ca/vrml98">http://ece.uwaterloo.ca/vrml98</A></TD>
</TR>
<TR>
<TD>Courses</TD>
<TD><A HREF="mailto:vrml98-courses@ece.uwaterloo.ca">vrml98-courses@ ece.uwaterloo.ca</A></TD>
</TR>
<TR>
<TD>Workshops</TD>
<TD><A HREF="mailto:vrml98-workshops@ece.uwaterloo.ca">vrml98-workshops@
ece.uwaterloo.ca</A></TD>
</TR>
<TR>
<TD>Panels</TD>
<TD><A HREF="mailto:vrml98-panels@ece.uwaterloo.ca">vrml98-panels@ ece.uwaterloo.ca</A></TD>
</TR>
<TR>
<TD>Papers</TD>
<TD><A HREF="mailto:vrml98-papers@ece.uwaterloo.ca">vrml98-papers@ ece.uwaterloo.ca</A></TD>
</TR>
<TR>
<TD>Video Submissions</TD>
<TD><A HREF="mailto:vrml98-video@ece.uwaterloo.ca">vrml98-video@ ece.uwaterloo.ca</A></TD>
</TR>
<TR>
<TD>Demo Night</TD>
<TD><A HREF="mailto:vrml98-demos@ece.uwaterloo.ca">vrml98-demos@ ece.uwaterloo.ca</A></TD>
</TR>
</TABLE>
&nbsp;</TD>
<TD ROWSPAN="3" WIDTH="2" BGCOLOR="#000000"><IMG SRC="../gx/hammel/cleardot.gif" ALT="indent" HSPACE=1 HEIGHT=1 WIDTH=1></TD>
<TD VALIGN=TOP WIDTH="49%" NOSAVE>
<TABLE BORDER=0 COLS=1 WIDTH="100%" NOSAVE >
<TR>
<TD>
<H3>
Iv2Rib</H3>
Cow House Productions is please to present the first release of <B><I><FONT COLOR="#CC6600">Iv2Rib</FONT></I></B>,
an Inventor 2.0 (VRML 1.0) to Renderman / BMRT converter. Source (C++)
and an Irix 5.3 binary are available at:&nbsp;
<P><A HREF="http://www.cowhouse.com/Home/Converters/converters.html">http://www.cowhouse.com/
Home/Converters/converters.html</A>&nbsp;
<P>Additionally, new updates (V0.12, 30-Jul-97) of both <B><I><FONT COLOR="#CC6600">Iv2Ray
</FONT></I></B>(the Inventor to Rayshade converter) and <B><I><FONT COLOR="#CC6600">Iv2POV
</FONT></I></B>(the inventor to POVRAY converter) are also available on
the same page, as both source (C++) and binaries for Irix 5.3</TD>
</TR>
<TR NOSAVE>
<TD BGCOLOR="#000000" NOSAVE><IMG SRC="../gx/hammel/cleardot.gif" HEIGHT=3 WIDTH=1></TD>
</TR>
<TR NOSAVE>
<TD NOSAVE>Crack released the Abuse source code to the public domain recently.
Abuse was a shareware and retail game released for DOS, MacOS, Linux, Irix,
and AIX platforms.&nbsp;
<P>The source is available at&nbsp;
<P>&nbsp; <A HREF="http://games.3dreview.com/abuse/files/abuse_pd.tgz">http://games.3dreview.com/abuse/files/abuse_pd.tgz</A>&nbsp;
<BR>&nbsp; and&nbsp;
<BR>&nbsp; <A HREF="http://games.3dreview.com/abuse/files/abuse_pd.zip">http://games.3dreview.com/abuse/files/abuse_pd.zip</A>&nbsp;
<P>If you don't know the 1st thing about Abuse,&nbsp;
<P>&nbsp; <A HREF="http://crack.com/games/abuse">http://crack.com/games/abuse</A>&nbsp;
<BR>&nbsp; and&nbsp;
<BR>&nbsp; <A HREF="http://games.3dreview.com/abuse">http://games.3dreview.com/abuse</A>&nbsp;
<P>Lastly, if you want to discuss the source (this is a just-in-case thing-it
may very well not get used), we put a small newsgroup up at <A HREF="news://addicted.to.crack.com/crack.technical">news://addicted.to.crack.com/crack.technical.
</A>That is also where we'll prolly host a newsgroup about Golgotha DLL's,
mods, editting, movies and stuff like that later on.&nbsp;
<BR>Dave Taylor</TD>
</TR>
</TABLE>
&nbsp;
<BR>&nbsp;</TD>
</TR>
<TR>
<TD BGCOLOR="#000000"><IMG SRC="../gx/hammel/cleardot.gif" HSPACE=1 HEIGHT=1 WIDTH=1></TD>
<TD BGCOLOR="#000000"><IMG SRC="../gx/hammel/cleardot.gif" HSPACE=1 HEIGHT=1 WIDTH=1></TD>
</TR>
<TR NOSAVE>
<TD>
<H3>
Version 0.2.0 of DeltaCine</H3>
<B><I><FONT COLOR="#CC6600">DeltaCine </FONT></I></B>is a software implemented
MPEG (ISO/IEC 11172-1 and 11172-2) decompressor and renderer for GNU/Linux
and X-Windows. It is available from <A HREF="ftp://thumper.moretechnology.com/pub/deltacine">ftp://thumper.moretechnology.com/pub/deltacine</A>.&nbsp;
<P>This project aims to provide portable C++ source code that implements
the system and video layers of the MPEG standard.&nbsp; This first release
will interpret MPEG 1 streams, either 11172-1 or raw 11172-2, and render
them to an X-Windows display.&nbsp; The project emphasizes correctness
and source code readability, so the performance suffers. It cannot maintain
synchronized playback on a 166MHz Pentium.&nbsp;
<P>Still, the source code contains many comments about the quality of the
implementation and the problems encountered when interpreting the standard.&nbsp;
All of the executing code was written from scratch, though there is an
IDCT (Inverse Discrete Cosine Transform) implementation adapted from Tom
Lane's IJG project that was used during development.&nbsp;
<P>This is an ALPHA release which means that the software comes with no
warranties, expressed or implied.&nbsp; It is being released under the
GNU Public License for the edification of the GNU/Linux user community.&nbsp;
<P>Limitations:&nbsp;
<UL>
<LI>
Requires ix86</LI>
<LI>
No playback synchronization.&nbsp; Movies play as fast as the decoder can
render the frames.</LI>
<LI>
Requires X-Windows server in 16bpp mode.</LI>
</UL>
Features:&nbsp;
<UL>
<LI>
Full decode of Part 1 (System) and Part 2 (Video) specification for ISO/IEC
11172.&nbsp; Full implementation except for synchronization.</LI>
<LI>
Reference quality output as compared to the Stanford implementation.</LI>
<LI>
User-mode multi-threading implemented as part of the decoder.</LI>
</UL>
</TD>
<TD VALIGN=TOP NOSAVE>
<TABLE BORDER=0 COLS=1 WIDTH="100%" NOSAVE >
<TR NOSAVE>
<TD NOSAVE>
<H3>
RenderMan Module v0.01 for PERL 5</H3>
This module acts as a Perl5 interface to the Blue Moon Rendering Tools
(BMRT) RenderMan-compliant client library, written by Larry Gritz:&nbsp;
<BR><A HREF="http://www.seas.gwu.edu/student/gritz/bmrt.html">http://www.seas.gwu.edu/student/gritz/bmrt.html</A>&nbsp;
<P>REQUIREMENTS&nbsp;
<BR>This module requires Perl 5, a C compiler, and BMRT.&nbsp;
<P>EXAMPLES&nbsp;
<BR>Some extra code has been added to the examples directory that should
enable you to convert LightWave objects to RIB or to a Perl script using
the RenderMan binding.&nbsp; More useful examples will be provided in future
releases.&nbsp;
<P>Updates will hopefully be uploaded to PAUSE once I am authorized to
upload there, and will be posted to my personal home page at:&nbsp;
<BR><A HREF="http://www.gmlewis.com/">http://www.gmlewis.com/</A>&nbsp;
<P>AUTHOR&nbsp;
<BR>Glenn M. Lewis | <A HREF="mailto:glenn@gmlewis.com">glenn@gmlewis.com</A>&nbsp;
<BR>&nbsp;</TD>
</TR>
<TR NOSAVE>
<TD HEIGHT="1" BGCOLOR="#000000" NOSAVE><IMG SRC="../gx/hammel/cleardot.gif" HEIGHT=3 WIDTH=1></TD>
</TR>
<TR>
<TD>Sven Neumann released two more GIMP scripts for the megaperls script
collection. You can find them as usual at:&nbsp;
<BR><A HREF="http://www-public.rz.uni-duesseldorf.de/ ~neumanns/gimp/megaperls">http://www-public.rz.uni-duesseldorf.de/
~neumanns/gimp/megaperls</A>&nbsp;
<P>You'll need to patch the waves-plug-in if you want to use the waves-anim
script. The patch was posted a while ago on the list but hasn't made its
way into any semi-official release yet. It is also available from the web-site
mentioned above.&nbsp;
<P>Ed. Note:&nbsp; Please note that the current release of the GIMP is
a developers only release and not a public release.&nbsp; If you plan on
using it you should be very familiar with software development and C.&nbsp;
A public release is expected sometime before the end of the year.&nbsp;
<P>Sven Neumann&nbsp;
<BR>&lt;<A HREF="mailto:neumanns@uni-duesseldorf.de">neumanns@uni-duesseldorf.de</A>></TD>
</TR>
</TABLE>
&nbsp;</TD>
</TR>
<TR>
<TD COLSPAN="3" WIDTH="100%" BGCOLOR="#000000"><IMG SRC="../gx/hammel/cleardot.gif" HSPACE=1 HEIGHT=1 WIDTH=1></TD>
</TR>
</TABLE>
<H3>
t1lib-0.3-beta</H3>
<B><I><FONT COLOR="#CC6600">t1lib </FONT></I></B>is a library for generating
character- and string-glyphs from Adobe Type 1 fonts under UNIX. t1lib
uses most of the code of the X11 rasterizer donated by IBM to the X11-project.
But some disadvantages of the rasterizer being included in X11 have been
eliminated. Here are the main features:
<UL>
<LI>
t1lib is completely independent of X11 (although the program provided for
testing the library needs X11)</LI>
<LI>
fonts are made known to library by means of a font database file at runtime</LI>
<LI>
searchpaths for all types of input files are configured by means of a configuration
file at runtime</LI>
<LI>
characters are rastered as they are needed</LI>
<LI>
characters and complete strings may be rastered by a simple function call</LI>
<LI>
when rastering strings, pairwise kerning information from .afm-files may
optionally be taken into account</LI>
<LI>
an interface to ligature-information of afm-files is provided</LI>
<LI>
rotation is supported at arbitrary angles</LI>
<LI>
there's full support for extending and slanting fonts</LI>
<LI>
new encoding vectors may be loaded at runtime and fonts may be reencoded
using these encoding vectors</LI>
<LI>
antialiasing is implemented using three gray-levels between black and white</LI>
<LI>
a logfile may be used for logging runtime error-, warning- and other messages</LI>
<LI>
an interactive test program called "xglyph" is included in the distribution.
This program allows to test all of the features of the library. It requires
X11.</LI>
</UL>
For X11-users a special set of functions exists which:
<UL>
<LI>
draw directly into X11 drawbles</LI>
<LI>
respect fore- and background color of the graphics context</LI>
<LI>
provide opaque and transparent drawing mode</LI>
<LI>
provide automatic colored antialiasing</LI>
</UL>
Author:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Rainer Menzner (<A HREF="mailto:rmz@neuroinformatik.ruhr-uni-bochum.de">rmz@neuroinformatik.ruhr-uni-bochum.de</A>)
<P>You can get t1lib by anonymous ftp at:
<BR><A HREF="ftp://ftp.neuroinformatik.ruhr-uni-bocum.de/pub/software/t1lib/t1lib-0.3-beta.tar.gz">ftp://ftp.neuroinformatik.ruhr-uni-bocum.de/pub/software/t1lib/t1lib-0.3-beta.tar.gz</A>
<P>An overview on t1lib including some screenshots of xglyph can be found
at:
<BR><A HREF="http://www.neuroinformatik.ruhr-uni-bochum.de/ini/PEOPLE/rmz/t1lib.html">http://www.neuroinformatik.ruhr-uni-bochum.de/ini/PEOPLE/rmz/t1lib.html</A>
<BR>&nbsp;
<TABLE BORDER=0 COLS=1 WIDTH="100%" BGCOLOR="#000000" NOSAVE >
<TR>
<TD><IMG SRC="../gx/hammel/cleardot.gif" HEIGHT=3 WIDTH=1></TD>
</TR>
</TABLE>
<H3>
&nbsp;GTK Needs A Logo!</H3>
<B><I><FONT COLOR="#CC6600">GTK</FONT></I></B>, the GIMP Toolkit (I think,
at least thats what it used to stand for) is looking a for a logo. Something
that defines the essence of GTK, something that captures its soul and personality.
A frozen image of everything that GTK stands for. Or maybe just something
cool.
<P>The Prize
<P>The prize for submitting the winning logo is a very cool yourname@gimp.org
email alias. Thats right, if you win, you can be the envy of your friends
with your sparkling @gimp.org email alias.
<P>See <A HREF="http://www.gimp.org/contest.html">http://www.gimp.org/contest.html
</A>for more details.
<BR>&nbsp;
<TABLE BORDER=0 COLS=1 WIDTH="100%" HEIGHT="1" BGCOLOR="#000000" NOSAVE >
<TR NOSAVE>
<TD NOSAVE><IMG SRC="../gx/hammel/cleardot.gif" HEIGHT=3 WIDTH=1></TD>
</TR>
</TABLE>
&nbsp;
<TABLE BORDER=0 CELLSPACING=0 WIDTH="100%" NOSAVE >
<TR NOSAVE>
<TD NOSAVE>
<H3>
Announcing MpegTV SDK 1.0 for Unix</H3>
<B><I><FONT COLOR="#CC6600">MpegTV SDK 1.0</FONT></I></B> is the first
toolkit that allows any X-windows application to support MPEG video without
having to include the complex code necessary to decode and play MPEG streams.&nbsp;
<P>MpegTV SDK 1.0 is currently available for:&nbsp;
<UL>
<LI>
Solaris 2.5 SPARC</LI>
<LI>
Solaris 2.5 x86</LI>
<LI>
IRIX 6.2</LI>
<LI>
Linux x86</LI>
<LI>
BSD/OS 3.0</LI>
</UL>
MpegTV also announces more good news: <B><I><FONT COLOR="#CC6600">MpegTV
Player 1.0</FONT></I></B> for Unix is now free for non-commercial use!&nbsp;
<BR>For more information on MpegTV products and to download MpegTV software,
please visit the MpegTV website:&nbsp;
<BR><A HREF="http://www.mpegtv.com">http://www.mpegtv.com</A>&nbsp;
<P>Regards,&nbsp;
<BR>Tristan Savatier - President, MpegTV LLC&nbsp;</TD>
<TD WIDTH="1" BGCOLOR="#000000" NOSAVE><IMG SRC="../gx/hammel/cleardot.gif" HEIGHT=1 WIDTH=3></TD>
<TD NOSAVE>
<H3>
</H3>
<TABLE BORDER=0 CELLPADDING=5 COLS=1 WIDTH="100%" NOSAVE >
<TR NOSAVE>
<TD NOSAVE>
<H3>
Announcing MpegTV Plug-in 1.0 for Unix</H3>
<B><I><FONT COLOR="#CC6600">MpegTV Plug-in 1.0 </FONT></I></B>is a streaming-capable
Netscape Plug-in that allows you to play MPEG movie embedded inside HTML
documents.&nbsp;
<P>Unlike other similar Netscape Plug-ins (e.g. the Movieplayer Plug-in
on SGI), MpegTV Plug-in is capable of streaming from the network, i.e.
you can play a remote MPEG stream immediately, without having to wait for
the MPEG file to be downloaded on your hard disk.&nbsp;
<P>MpegTV Plug-in 1.0 is currently available for:&nbsp;
<UL>
<LI>
Solaris 2.5 SPARC</LI>
<LI>
IRIX 6.2</LI>
<LI>
Linux x86</LI>
<LI>
Solaris 2.5 x86 (coming soon)</LI>
<LI>
BSD/OS 3.0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (coming soon)</LI>
</UL>
Get it now at <A HREF="http://www.mpegtv.com/plugin.html">http://www.mpegtv.com/plugin.html
</A>!&nbsp;
<BR>Regards, -- Tristan Savatier (President, MpegTV LLC)&nbsp;
<P>MpegTV:&nbsp;&nbsp; <A HREF="http://www.mpegtv.com">http://www.mpegtv.com</A>&nbsp;
<BR>MPEG.ORG: <A HREF="http://www.mpeg.org">http://www.mpeg.org</A>&nbsp;</TD>
</TR>
</TABLE>
&nbsp;</TD>
</TR>
</TABLE>
&nbsp;
<TABLE BORDER=0 COLS=1 WIDTH="100%" HEIGHT="1" BGCOLOR="#000000" NOSAVE >
<TR>
<TD><IMG SRC="../gx/hammel/cleardot.gif" HEIGHT=3 WIDTH=1></TD>
</TR>
</TABLE>
&nbsp;
<TABLE BORDER=0 COLS=3 WIDTH="100%" NOSAVE >
<TR NOSAVE>
<TD WIDTH="50%" NOSAVE>
<H3>
USENIX 1998 Annual Technical Conference</H3>
The 1998 USENIX Technical Conference Program Committee seeks original and
innovative papers about the applications, architecture, implementation,
and performance of modern computing systems. Papers that analyze problem
areas and draw important conclusions from practical experience are especially
welcome. Some particularly interesting application topics are:&nbsp;
<P>&nbsp;ActiveX, Inferno, Java, and other embeddable environments&nbsp;
<BR>&nbsp;Distributed caching and replication&nbsp;
<BR>&nbsp;Extensible operating systems&nbsp;
<BR>&nbsp;Freely distributable software&nbsp;
<BR>&nbsp;Internet telephony&nbsp;
<BR>&nbsp;Interoperability of heterogeneous systems&nbsp;
<BR>&nbsp;Nomadic and wireless computing&nbsp;
<BR>&nbsp;Privacy and security&nbsp;
<BR>&nbsp;Quality of service&nbsp;
<BR>&nbsp;Ubiquitous computing and messaging&nbsp;
<P>A major focus of this conference is the challenge of technology: What
is the effect of commodity hardware on how we build new systems and applications?
What is the effect of next-generation hardware? We seek original work describing
the effect of hardware technology on software. Examples of relevant hardware
include but are not limited to:&nbsp;
<P>&nbsp;Cheap, fast personal computers&nbsp;
<BR>&nbsp;Cheap, large DRAM and disks&nbsp;
<BR>&nbsp;Flash memory&nbsp;
<BR>&nbsp;Gigabit networks&nbsp;
<BR>&nbsp;Wireless networks&nbsp;
<BR>&nbsp;Cable modems&nbsp;
<BR>&nbsp;WebTV&nbsp;
<BR>&nbsp;Personal digital assistants&nbsp;
<BR>&nbsp;Network computers&nbsp;
<P>The conference will also feature tutorials, invited talks, BOFs,&nbsp;
<BR>and Vendor Exhibits.&nbsp;
<P>For more information about this event:&nbsp;
<P>* Visit the USENIX Web site:&nbsp;
<BR>&nbsp; http://www.usenix.org/events/no98/index.html&nbsp;
<P>* Send email to the USENIX mailserver at info@usenix.org.&nbsp; Your
message should contain the line:&nbsp; "send usenix98 conferences".&nbsp;
<P>* Or watch comp.org.usenix for full postings&nbsp;
<P>The USENIX Association brings together the community of engineers, system
administrators, scientists, and technicians working on the cutting edge
of computing. Its technical conferences are the essential meeting grounds
for the presentation and discussion of the most advanced information on
new developments in all aspects of advanced computing systems.&nbsp;</TD>
<TD WIDTH="3" BGCOLOR="#000000" NOSAVE><IMG SRC="../gx/hammel/cleardot.gif" HEIGHT=1 WIDTH=3></TD>
<TD VALIGN=TOP WIDTH="50%" NOSAVE>
<TABLE BORDER=0 COLS=1 WIDTH="100%" NOSAVE >
<TR>
<TD>
<H3>
Ra-vec version 2.1b - convert plan drawings to 3D vector format</H3>
<B><I><FONT COLOR="#CC6600">Ra-vec </FONT></I></B>is a program which can
convert plan drawings of buildings into a vector format suitable for the
creation of 3D models using the popular modelling package AC3D. It is freely
avalible for linux from&nbsp;
<BR><A HREF="http://www.comp.lancs.ac.uk/computing/users/aspinr/ra-vec.html">http://www.comp.lancs.ac.uk/
computing/users/aspinr/ra-vec.html</A>&nbsp;
<BR>&nbsp;</TD>
</TR>
<TR NOSAVE>
<TD HEIGHT="1" BGCOLOR="#000000" NOSAVE><IMG SRC="../gx/hammel/cleardot.gif" HEIGHT=3 WIDTH=1></TD>
</TR>
<TR NOSAVE>
<TD NOSAVE>
<H3>
xfpovray 1.2.4</H3>
A new release of the graphical interface to the cool ray-tracer POV-Ray
called <B><I><FONT COLOR="#CC6600">xfpovray </FONT></I></B>is now available.&nbsp;
It requires the most recent (test) version of the XForms library (0.87),
and supports most of the numerous options of POV-Ray.&nbsp; Hopefully 0.87
will migrate from test release to public release soon.&nbsp;
<P>This version of xfpovray adds a couple nice features, such as POV-Ray
templates to aid in writing scene files. Binary and source RPMs are also
available.&nbsp; Since xforms does not come in rpm, you may get a failed
dependency error.&nbsp; If you get this, just use the --nodeps option.&nbsp;
<P>You can view an image of the interface and get the RPMs and source code
from&nbsp;
<CENTER><A HREF="http://cspar.uah.edu/~mallozzir/">http://cspar.uah.edu/~mallozzir/</A></CENTER>
<P>There is a link there to the XForms home page if you don't yet have
this library installed.&nbsp;
<P>Bob Mallozzi &lt;<A HREF="mailto:mallozzir@cspar.uah.edu">mallozzir@cspar.uah.edu</A>>&nbsp;
<BR>&nbsp;</TD>
</TR>
<TR NOSAVE>
<TD HEIGHT="1%" BGCOLOR="#000000" NOSAVE><IMG SRC="../gx/hammel/cleardot.gif" HEIGHT=3 WIDTH=1></TD>
</TR>
<TR NOSAVE>
<TD NOSAVE>
<H3>
WSCG'98 - Call for Papers and Participation</H3>
Just a reminder:&nbsp;
<P>The Sixth International Conference in Central Europe on Computer Graphics
and Visualization 98, in cooperation with EUROGRAPHICS and IFIP working
group 5.10 on Computer Graphics and Virtual Worlds, will be held in February
9 - 13, 1998 in Plzen at the University of West Bohemia close to PRAGUE,
the capital of Czech Republic&nbsp;
<P>Information for authors: <A HREF="http://wscg.zcu.cz">http://wscg.zcu.cz</A>
select WSCG'98&nbsp;
<BR>Contribution deadline:&nbsp; September 30, 1997</TD>
</TR>
</TABLE>
&nbsp;</TD>
</TR>
</TABLE>
&nbsp;
<TABLE BORDER=0 COLS=1 WIDTH="100%" BGCOLOR="#000000" NOSAVE >
<TR>
<TD><IMG SRC="../gx/hammel/cleardot.gif" HEIGHT=3 WIDTH=1></TD>
</TR>
</TABLE>
<H3>
ivtools 0.5.7</H3>
<B><I><FONT COLOR="#CC6600">ivtools </FONT></I></B>contains, among other
things, a set of drawing editors written in C++ for Unix/X11.&nbsp; They
extend idraw with networked export/import, multi-frame flipbook editing,
and node/graph topology editing.&nbsp; A new release, 0.5.7, is now available.
<P>Source code at:
<BR><A HREF="http://www.vectaport.com/pub/src/ivtools-0.5.7.tar.gz">http://www.vectaport.com/pub/src/ivtools-0.5.7.tar.gz</A>
<BR><A HREF="ftp://sunsite.unc.edu/pub/Linux/apps/graphics/draw/ivtools-0.5.7.tar.gz">ftp://sunsite.unc.edu/pub/Linux/apps/graphics/draw/ivtools-0.5.7.tar.gz</A>
<P>Linux elf binaries at:
<BR><A HREF="http://www.vectaport.com/pub/src/ivtools-0.5.7-LINUXx.tar.gz">http://www.vectaport.com/pub/src/ivtools-0.5.7-LINUXx.tar.gz</A>
<BR><A HREF="ftp://sunsite.unc.edu/pub/Linux/apps/graphics/draw/ivtools-0.5.7-LINUX.tar.gz">ftp://sunsite.unc.edu/pub/Linux/apps/graphics/draw/ivtools-0.5.7-LINUX.tar.gz</A>
<P>Web page at:
<BR><A HREF="http://www.vectaport.com/ivtools/">http://www.vectaport.com/ivtools/</A>
<P>Vectaport Inc.
<BR><A HREF="http://www.vectaport.com">http://www.vectaport.com</A>
<BR><A HREF="mailto:info@vectaport.com">info@vectaport.com</A>
<BR>&nbsp;
<TABLE BORDER=0 COLS=1 WIDTH="100%" BGCOLOR="#000000" NOSAVE >
<TR>
<TD><IMG SRC="../gx/hammel/cleardot.gif" HEIGHT=3 WIDTH=1></TD>
</TR>
</TABLE>
<H3>
Pixcon &amp; Anitroll 1.04</H3>
New features since version 1.04:
<UL>
<LI>
added DOS binaries to the distribution</LI>
<LI>
3DSMAX import/export plugin for Pixcon data files</LI>
<LI>
25% increase in rendering speed</LI>
</UL>
<B><I><FONT COLOR="#CC6600">Pixcon </FONT></I></B>3D rendering package
that creates high quality images by using a combination of 11 rendering
primitives.&nbsp; <B><I><FONT COLOR="#CC6600">Anitroll </FONT></I></B>is
a forward kinematic hierarchical based animation system that has some support
for some non-kinematic based animation (such as flock of birds, and autonomous
cameras).&nbsp; These tools are based upon the Graph library which is full
of those neat rendering and animation algorithms that those 3D faqs keep
mentioning.
<P>Why Pixcon &amp; Anitroll?&nbsp; Well, systems like Alias, Renderman,
3DS/3DSMAX, Softimage, Lightwave, etc are too expensive for average users
(anywhere from $1000 - $5000 US)&nbsp; and require expensive hardware to
get images in a reasonable amount of time.&nbsp; Conventional freeware
systems, such as BMRT, Rayshade, and POV are too slow (they're raytracers...).
Pixcon &amp; Anitroll is FREE, and doesn't take a long time to render a
frame (true, its not real time... but I'm working on it). It also implements
some rendering techniques that were presented at Siggraph 96 by Ken Musgrave
and was used to generate an animation for Siggraph '95.
<P>The Pixcon &amp; Anitroll Home page is at: <A HREF="http://www.radix.net/~dunbar/index.html">http://www.radix.net/~dunbar/index.html</A>
<P>Comments to <A HREF="mailto:dunbar@saltmine.radix.net">dunbar@saltmine.radix.net</A>
<BR>Availabe from:&nbsp; <A HREF="ftp://sunsite.unc.edu/incoming/Linux/pixcon-105.tgz">ftp://sunsite.unc.edu/incoming/Linux/pixcon-105.tgz</A>
<BR>and will be moved to:
<BR><A HREF="ftp://sunsite.unc.edu/pub/Linux/apps/graphics/rays/pixcon-105.tgz">ftp://sunsite.unc.edu/pub/Linux/apps/graphics/rays/pixcon-105.tgz</A>
<BR>&nbsp;
<TABLE BORDER=0 COLS=1 WIDTH="100%" BGCOLOR="#000000" NOSAVE >
<TR>
<TD><IMG SRC="../gx/hammel/cleardot.gif" HEIGHT=3 WIDTH=1></TD>
</TR>
</TABLE>
<H3>
Glide 2.4 ported to Linux</H3>
Glide version 2.4 has now been ported to Linux and is available free of
charge. This library enables Linux users with 3Dfx Voodoo Graphics based
cards such as the Orchid Righteous 3D, Diamond Monster 3D, Canopus Pure
3D, Realvision Flash 3D, and Quantum Obsidian to write 3D applications
for the cards. The Voodoo Rush is not yet supported. The library is available
only in binary form.
<P>To quote 3Dfx's web page:
<BLOCKQUOTE>Glide is an optimized rasterization library that serves as
a software 'micro-layer' to the 3Dfx Voodoo accelerators. With Glide, developers
can harness the power of the Voodoo to provide perspective correct, filtered,
and MIP mapped textures at real-time frame rates - without having to work
directly with hardware registers and memory, enabling faster product development
and cleaner code.</BLOCKQUOTE>
As a separate effort, a module for Mesa is also under development to provide
an OpenGL like interface for the Voodoo Graphics cards.
<P>For more information on Glide please see:
<BR><A HREF="http://www.3dfx.com/download/sdk/index.html">http://www.3dfx.com/download/sdk/index.html</A>
<BR>For more download informtion for Glide see:
<BR><A HREF="http://www.3dfx.com/download/sdk/index.html">http://www.3dfx.com/download/sdk/index.html</A>
<BR>For more information on Mesa see:
<BR><A HREF="http://www.ssec.wisc.edu/~brianp/Mesa.html">http://www.ssec.wisc.edu/~brianp/Mesa.html</A>
<BR>For an FAQ on 3Dfx on Linux see:
<BR><A HREF="http://www.gamers.org/~bk/xf3D/">http://www.gamers.org/~bk/xf3D/</A>
<BR>Finally, if you need to discuss all this, try the 3Dfx newsgroup:
<BR><A HREF="news://news.3dfx.com/3dfx.glide.linux">news://news.3dfx.com/3dfx.glide.linux</A>
<BR>&nbsp;
<TABLE BORDER=0 COLS=1 WIDTH="100%" BGCOLOR="#000000" NOSAVE >
<TR>
<TD><IMG SRC="../gx/hammel/cleardot.gif" HEIGHT=3 WIDTH=1></TD>
</TR>
</TABLE>
<P><!--
-- Did You Know Section
-->
<H4>
Did You Know?</H4>
<!--
-- Q and A Section
-->
<H4>
<B><FONT SIZE=+0>Q and A</FONT></B></H4>
<I>Q:</I> Let me ask a graphic related question: is there a software which
converts GIF/JPEG file to transparent GIF/JPEG file?&nbsp; Raju Bathija
&lt;<A HREF="mailto:bathija@sindhu.theory.tifr.res.in">bathija@sindhu.theory.tifr.res.in</A>>
<P><I>A</I>: JPEG, to my knowledge, doesn't support transparency.&nbsp;
You have to use GIF (or PNG).&nbsp; GIF files can have a transparency added
by picking the color you want to be transparent.&nbsp; One of the colors,
and only one, can be specified as transparent.&nbsp; You can use xv to
pick the color.&nbsp; Then you can use the NetPBM tools to convert the
image to a transparent GIF.&nbsp; You would do something like
<CENTER><B><FONT SIZE=-1>giftopnm file.gif | ppmtogif -transparent rgb:ff/ff/ff
> newfile.gif</FONT></B></CENTER>
<P>Check the man page for ppmtogif for how to specify the color to use.
<BR>&nbsp;
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 COLS=1 WIDTH="100%" BGCOLOR="#000000" NOSAVE >
<TR NOSAVE>
<TD HEIGHT="1" NOSAVE><IMG SRC="../gx/hammel/cleardot.gif" HEIGHT=3 WIDTH=1></TD>
</TR>
</TABLE>
<H3>
Reader Mail</H3>
Chris Bentzel &lt;<A HREF="mailto:cbentzel@rhythm.com">cbentzel@rhythm.com</A>>
wrote:
<BLOCKQUOTE>At the end of your gamma correction discussion of graphics
muse issue 17, you mention that you were unable to find contact info for
Greg Ward. He is at <A HREF="mailto:gregl@sgi.com">gregl@sgi.com</A> (he
is now Greg Ward Larson-> believes in reciprocating on the maiden-married
name thing).However, a better link is to the radiance page: a high-end,
physically correct ray-tracing/radiosity renderer used mostly for architectural
design (and runs on Linux! Free source!)&nbsp; <A HREF="http://radsite.lbl.gov/radiance/HOME.html">http://radsite.lbl.gov/radiance/HOME.html</A></BLOCKQUOTE>
Jean Francois Martinez &lt;<A HREF="mailto:jfm2@club-internet.fr">jfm2@club-internet.fr</A>>
wrote:
<BLOCKQUOTE>I had just finished reading your article in LJ about Megahedron
and I was reading some of the examples and playing with them.&nbsp; I looked
in mhd/system/smpl_prims and found the following:
<CENTER><B><FONT SIZE=-1>coord_system=right_handed;</FONT></B></CENTER>
so you can do this
<CENTER><B><FONT SIZE=-1>picture smokey_train_pic with</FONT></B></CENTER>
<CENTER><B><FONT SIZE=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; coord_system=left_handed;</FONT></B></CENTER>
Notice than I put it just under the declaration of the top level object
(the one called by do). Of course if you use this for the examples provided
you will notice that now the camera is not focusing on the subject.</BLOCKQUOTE>
John P. Pomeroy &lt;<A HREF="mailto:pomerojp@ttc2.lu.farmingdale.edu">pomerojp@ttc2.lu.farmingdale.edu</A>>
wrote:
<BLOCKQUOTE>Usually I skip over the Graphics Muse, (I'm a bit head, not
a graphic artist) but something drew me in this time.&nbsp; Perhaps it's
because I'm investigating the development of a Linux based Distance Learning
platform for for use in my networking classes.Anyway, one of the&nbsp;
least expensive resources I've found over time has been the <B>Winnov Videum-AV</B>.&nbsp;
An outstanding card but near as I can tell, there are no Linux drivers
.&nbsp; I contacted Winnov a while back and they're not interested in Linux
at all, but after reading about the efforts of the QuickCam folks I was
wondering if you could just mention that the Videum card exists, perhaps
simply asking if anyone is working on a driver?&nbsp; (And, no, I don't
own stock in Winnov nor know anyone that does.)Perhaps some of the programmers
out there are working on something, or maybe Winnov will take the hint.&nbsp;
I'm certain that a Videum card on Linux would outperform the same card
under NT.&nbsp; Imagine a streaming video service (Either Java based or
using the just released 60 stream Real Video Linux server) with a live
feed under Linux. Sure wish the folks at Winnov could!Anyway, thanks. The
'Muse has a good balance of technical material and artistic issues.&nbsp;
I'll be reading the 'Muse a lot more often, but first...... the back issues!</BLOCKQUOTE>
<I><FONT COLOR="#990000">'<B>Muse</B></FONT>:&nbsp; Well?&nbsp; Anyone
working on a driver for this?</I>
<P>Jim Tom Polk&nbsp; &lt;<A HREF="mailto:jtpolk@camalott.com">jtpolk@camalott.com</A>>&nbsp;
<A HREF="http://camalott.com/~jtpolk/">http://camalott.com/~jtpolk/ </A>wrote:
<BLOCKQUOTE>Reading your column I noticed that you state that you don't
know of any animated GIF viewers for Linux. I use xanim.&nbsp; I usually
use gifmerge to create the image, and then load up the image and step through
it with xanim.&nbsp; I also find it useful to see just how some animations
are composed / created.&nbsp; The version I have installed is: <B><FONT COLOR="#CC6600">XAnim
</FONT></B>Rev 2.70.6.4 by Mark Podlipec (c) 1991-1997 I only found it
out by accident when I loaded an animated GIF by accident (I was clicking
on an mpeg file and missed it). You can start/stop/pause.&nbsp; Go forward
and backwards one frame at a time, and speed up or slow down the entire
sequence.&nbsp; You still have to use another utility to create the GIF,
but I use it all the time.Really enjoy your column.</BLOCKQUOTE>
<B><I><FONT COLOR="#990000">'Muse</FONT></I></B>: I got a number of replies
like this.&nbsp; I never tried xanim for animated GIFs.&nbsp; Sure enough,
it works.&nbsp; It just goes to show how much this wonderful tool can do.
<P>Alf Stockton &lt;<A HREF="mailto:stockton@acenet.co.za">stockton@acenet.co.za</A>>
wrote:
<BLOCKQUOTE>I have a number of JPEGs that I want to add external text to.
ie Comments on photographs I have taken with my QV-10 digital camera. Now
I don't want the text to appear on the picture. It must appear either next
to or below same. So in other words I want to create a large JPEG consisting
of some text and my picture. Of course it does not necessarily have to
be a JPEG but it must be something that a web browser can display as I
intend uploading same to my ISP.The thought was that I would create a HTML
document for each image and this would work but now I have a large number
of images &amp; I don't want to create an equal amount of HTMLs.</BLOCKQUOTE>
<B><I><FONT COLOR="#990000">'Muse</FONT></I></B>: I'm a little confused
here.&nbsp; Do you want the text visible at all?&nbsp; Or just include
the text as unprintable info (like in the header of the image)? If you
want the text in the header I'm not sure how to do this.&nbsp; I'm pretty
sure it can be done, but I've never messed with it.
<P>If you want the text visible but not overlapping the original image
there are lots of ways to get it done.&nbsp; I highly recommend the GIMP,
even though you feel its overkill - once you've learned to use it you'll
find it makes life much easier.&nbsp; However, if you just want a shell
script to do it you can try some of the NetPBM tools.&nbsp; NetPBM is a
whole slew of simple command line programs that do image conversion and
manipulations.&nbsp; One of the tools is pnmcat.&nbsp; To use this you'd
take two images and convert them to pnm files.&nbsp; For GIFs that would
be like
<CENTER><B><TT><FONT SIZE=-1>giftoppm file1.gif > file1.pnm</FONT></TT></B></CENTER>
<P>Then you use pnmcat like this:
<CENTER><B><TT><FONT SIZE=-1>pnmcat -leftright file1.pnm file2.pnm > final-image.pnm</FONT></TT></B></CENTER>
<P>This would place the two images side by side.&nbsp; You could then convet
this back to a GIF file for placing on the Web page.&nbsp; pnmcat has other
options allowing you to stack the images (-topbottom) and specify the way
to justify the smaller image if the images are not the same width/height.
There is a man page for pnmcat that comes with NetPBM.
<P>Note that the NetPBM tools do not have tools for dealing with JPEG images.
However, there are some tools called jpegtoppm and ppmtojpeg available
from the JPEG web site (I think).&nbsp; I'm not positive abou that.&nbsp;
I don't use these specific tools for dealing with JPEGs.
<P>If you want, you can always read in the JPEG with xv first and save
it as a PPM/PNM (these two formats are essentially the same) file first,
then use the NetPBM tools.
<P>Jeff Taylor &lt;<A HREF="mailto:jeff@adeno.wistar.upenn.edu">jeff@adeno.wistar.upenn.edu</A>>
wrote:
<BLOCKQUOTE>1)&nbsp; You mentioned [in your review of Megahedron in the
September issue of Linux Journal]some difficulty in writing the model information
to a file for rendering with an alternative renderer.&nbsp; This is important
to me as I would like to use PVMPOV for the final rendering.&nbsp; It wasn't
clear from what you wrote, is it difficult to do or impossible?</BLOCKQUOTE>
<B><I><FONT COLOR="#990000">'Muse</FONT></I></B>: Difficult, but not impossible.&nbsp;
I think you can get model information via polygon data (vectors), but you'll
have to do the work of getting that out to the file format of interest.
I'm no expert, however.&nbsp; I used it only for a little while, to get
modestly familiar with it.&nbsp; The best thing to do is write to them
and ask the same question.&nbsp; It will get a better answer (one would
hope, anyway) and also show that the Linux community is interested in supporting
commercial products.
<BLOCKQUOTE>2)&nbsp; Does the modeller allow 2D images to be printed?&nbsp;
I'm thinking of CAD type 3-angle-view drawings.&nbsp; I'd like to use it
for CAD applications where a model is created and scale drawing can be
printed.</BLOCKQUOTE>
<B><I><FONT COLOR="#990000">'Muse</FONT></I></B>: There isn't a print function
for the 2D images, but you can save the images to a file and then print
them using some other tool, like xv or the GIMP. The manual has a section
on how to save the images.&nbsp; BTW, I'm assuming you mean the images
that have been rendered.&nbsp; These images can be saved in RAW&nbsp; or
TGA format using functions provided in the SMPL language.
<P>Daniel Weeks &lt;<A HREF="mailto:danimal@blueskystudios.com">danimal@blueskystudios.com</A>>
wrote:
<BLOCKQUOTE>I just want to start of by telling you that you are doing a
great job with the Graphic Muse and on the current article in the Linux
Jornal on Megahedron.&nbsp; This is where my questions come from.</BLOCKQUOTE>
<B><I><FONT COLOR="#990000">'Muse</FONT></I></B>: Thanks for the compliments!
<BLOCKQUOTE>First, with Megahedron I noticed that it is a progamatic/procedural
language for modeling (interestingly enough the language itself is not
that dissimilar to our cgiStudio language in structure and function {except
for that wierd commenting style}, in fact I already have a perl script
that translates most of SPML to cgiStudio :).&nbsp; The question here is
does Megahedron have any sort of interface over the demo mode, I guess
I mean something like (but it doesn't have to be as fully functional or
bloated as) SoftImage or Alias|Wavefront.&nbsp; Second can Megahedron support
NURBS patches and deforming geometry.</BLOCKQUOTE>
<B><I><FONT COLOR="#990000">'Muse</FONT></I></B>: Megahedron is a programming
API - actually a scripting API.&nbsp; The CD I got (which is the $99 version
they sell from their web pages) wasn't a demo, although it had lots of
demos on it.&nbsp; There is no X interface to the language (ie no graphical
front end/modeler).&nbsp; I suppose if there was enough interest they'd
look into it.&nbsp; Best thing to do is check their web page and get an
email address to ask for it.&nbsp; There might be a non-Unix graphical
front end, but I didn't check on that. As for Nurbs, there wasn't any mention
of support for it on the disk I got. In fact, I don't think I've come across
<I><B>any</B> </I>modellers (or modelling languages) aside from BMRT that
has support for NURBS on Linux.&nbsp; But Linux is just beginning to move
into this arena anyway, so its just a matter of time.
<BR>BTW:&nbsp; for those that don't know it, Blue Sky Studios is the special
effects house that is doing, among other things, the special effects for
the upcoming <B><U>Alien Resurrection</U></B> movie.&nbsp; Yes, it appears
Ripley may live forever.
<P>Hap Nesbitt &lt;<A HREF="mailto:hap@handmadesw.com">hap@handmadesw.com</A>>,
of Handmade Software wrote in reply to my review of <B><FONT COLOR="#CC6600">Image
Alchemy</FONT></B>:
<BLOCKQUOTE>A very nice review thanks.&nbsp; BTW we do 81 formats now.&nbsp;
The new formats are documented in addendum.pdf. The Mews seems quite ambitious.&nbsp;
Is this all your work or do you get some help?</BLOCKQUOTE>
<B><I><FONT COLOR="#990000">'Muse</FONT></I></B>: Its all mine, although
I've had a couple of people write articles on two separate occassions.&nbsp;
And Larry Gritz offered lots of help when I did the BMRT write ups.&nbsp;
I still owe the readers an advanced version of that series.
<BLOCKQUOTE>We've found a tool for porting Mac libraries to X. Our Mac
interface is beautiful and we should get it ported sometime in the next
6 months or so.&nbsp; I'll keep you posted. BTW people don't really buy
much Image Alchemy, they buy Image Alchemy PS to RIP PostScript files out
to large format inkjet plotters in HP-RTL format. If you give me your mailing
address I'll send you a poster done this way. I think you might enjoy it.</BLOCKQUOTE>
<B><I><FONT COLOR="#990000">'Muse</FONT></I></B>: Sounds great.&nbsp; Thanks
for the info Hap!
<P>G. Lee Lewis &lt;<A HREF="mailto:GLLewis@ecc.com">GLLewis@ecc.com</A>>
wrote:
<BLOCKQUOTE>Your web pages look really nice.</BLOCKQUOTE>
<B><I><FONT COLOR="#990000">'Muse</FONT></I></B>: Thanks.
<BLOCKQUOTE>Did you use Linux software to create your web pages?</BLOCKQUOTE>
<B><I><FONT COLOR="#990000">'Muse</FONT></I></B>: Yes.&nbsp; In fact, thats
all I use - Linux.&nbsp; I don't use MS for anything anymore.&nbsp; All
the software used to create the graphic images on my pages runs on Linux.
<BLOCKQUOTE>Can you say what you used?.</BLOCKQUOTE>
<B><I><FONT COLOR="#990000">'Muse</FONT></I></B>: Mostly the GIMP, a Photoshop
clone for Unices.&nbsp; "GIMP" stand for GNU Image Manipulation Program,
but the acronym kinda stinks (IMHO, of course).&nbsp; Its quite a powerful
program though. I also use xv quite a bit, along with tools like the NetPBM
toolkit (a bunch of little command line programs for doing various image
processing tasks), MultiGIF (for creating GIF animations) and Netscape's
4.x Page Composer for creating HTML.&nbsp; I just started using the latter
and not all my pages were created with it, but eventually I'll probably
switch from doing the HTML by hand (through vi) to only using the Page
Composer. For 3D images I use POV-Ray and BMRT.&nbsp; These require a bit
more understanding of the technology than a tool like the GIMP, but then
3D is at a different state of development than 2D tools like the GIMP.
<BLOCKQUOTE>What flavor of Linux do you like, redhat, debian, etc..??</BLOCKQUOTE>
<B><I><FONT COLOR="#990000">'Muse</FONT></I></B>: Right now two of my 3
boxes at home are WGS Linux Pro's (which is really a Red Hat 3.x distribution)
and one is a Slackware (on my laptop).&nbsp; I like the Red Hat 4.2 distribution,
but it lacks support for network installs using the PCMCIA ethernet card
I have for my laptop.&nbsp; I plan on upgrading all my systems to the RH4.2
release by the end of the year.
<P>I've not seen the Debian distribution yet.&nbsp; Slackware is also quite
good. I liked their "setup" tool for creating packages for distribution
because it used a simple tar/gzip/shell script combination that was easy
to use and easy to diagnose.&nbsp; However, its not a real package management
system like RPM.&nbsp; "Consumers" (not hackers) will probably appreciate
RPM more than "setup".
<P>I also use commercial software for Linux when possible.&nbsp; I run
Applixware, which I like very much, and Xi Graphics AcceleratedX server
instead of the XFree86 servers.&nbsp; The Xi server is much easier to install
and supports quite a few more video adapters.&nbsp; However, it doesn't
yet support the X Input Extension unfortunately.&nbsp; The latest XFree86
servers do, and thats going to become important over the next year with
respect to doing graphics.
<BLOCKQUOTE>What do you think of Caldera OpenLinux?</BLOCKQUOTE>
<B><I><FONT COLOR="#990000">'Muse</FONT></I></B>:&nbsp;I haven't had a
chance to look it over.&nbsp; However, I fully support the commercial distributions.&nbsp;
I'm an avid supporter of getting Linux-based software onto the shelves
of software reseller stores like CompUSA or Egghead Software.&nbsp; Caldera
seems the most likely candidate to be able to get that done the quickest.&nbsp;
After that, we'll start to see commercial applications on the shelves too.&nbsp;
And thats something I'd love to see happen.&nbsp; I did buy the Caldera
Network Desktop last year but due to some hardware limitations decided
to go back to the Slackware distributions I had then.
<P>Of all the distributions Caldera probably has a better understanding
of what it takes to make a "product" out of Linux - something beyond just
packing the binaries and sticking them on a CD.&nbsp; A successful product
will require 3rd party products (ones with full end-user quality, printed
documentation and professional support organizations) and strategic alliances
to help prevent fragmentation.&nbsp; Fragmentation is part of what hurt
the early PC Unix vendors (like Dell and Everex) and what has plagued Unix
workstation vendors for years.
<P>So, in summary, I strongly support the efforts of Caldera, as well as
Red Hat, Xi Graphics, and all vendors who strive to productize Linux.
<P>&lt;<A HREF="mailto:veliath@jasmine.hclt.com">veliath@jasmine.hclt.com</A>>&nbsp;wrote:
<BLOCKQUOTE>Is there some documentation available on GIMP - please, please
say there is and point me towards it.</BLOCKQUOTE>
<B><I><FONT COLOR="#990000">'Muse</FONT></I></B>: No, not yet.&nbsp; A
couple of books are planned, but nothing has been started officially.&nbsp;
No online documentation exists yet.&nbsp; Its a major flaw in free software
in general which annoys me to no end, but even in commercial organizations
the documentation is usually the last thing to get done.
<P>There will be a 4 part series on the GIMP in the Linux Journal starting
with the November issue.&nbsp; I wrote this series.&nbsp; It is very introductory
but should help a little. I also did the cover art for that issue.&nbsp;
Let me know what you think!
<P>You can also grab any Photoshop 3 or Photoshop 4 book that covers the
basics for that program.&nbsp; The Toolbox (the main window with all the
little icons in it) is nearly exactly the same in both programs (GIMP and
Photoshop).&nbsp; Layers work the same (with some minor differences in
the way the dialog windows look).&nbsp; I taught myself most of what I
know based on "The Photoshop 3 Wow! Book" and a couple of others.
<P>
<HR WIDTH="100%">
<BR><A NAME="webwonderings"></A>
<BR><IMG SRC="../gx/hammel/webwonderings.jpg" HEIGHT=57 WIDTH=246>
<BR>&nbsp;
<H3>
Browser Detection with JavaScript</H3>
I recently started reading up on the latest features that will be supported
in the upcoming releases of the Netscape and MSIE Web browsers through
both the C|Net web site known as <A HREF="http://www.builder.com">Builder.com
</A>and another site known as <A HREF="http://www.developer.com">Developer.com</A>.&nbsp;
A couple of the more interesting features are <I><FONT COLOR="#006600">Cascading
Style Sheets</FONT></I>, which you'll often see referred to as <I><FONT COLOR="#006600">CSS</FONT></I>,
and layers.&nbsp; CSS will allow HTML authors to define more definitive
characteristics to their pages.&nbsp; Items such as the font family(Ariel,
Helvetica, and so forth), style (normal, italic, oblique), size, and weight
can be specified for any text on the page.&nbsp; Browsers will attempt
to honor these specifications and if they can't do so they will select
appropriate defaults.&nbsp; CSS handles most of the obvious characteristics
of text on a page plus adds the ability to position text in absolute or
relative terms.&nbsp; You can also clip, overflow, and provide a z-index
to the position of the text.&nbsp; The z-index positioning is useful because
it provides a means of accesing text and graphics in layers.&nbsp; By specifying
increasing values of z to a position setting you can effectively layer
items on a page. Builder.com and Developer.com both have examples of these
extensions to HTML that are fairly impressive.&nbsp; There is a table of
the new CSS features available at <A HREF="http://www.cnet.com/Content/Builder/Authoring/CSS/table.html">http://www.cnet.com/Content/Builder/Authoring/CSS/table.html.</A>&nbsp;&nbsp;
You will need Netscape 4.x to view these pages.
<P>CSS is about to make web pages a whole lot more interesting.
<P>The down side to CSS is that its new.&nbsp; Any new technology has a
latency period that must pass before the technology is sufficiently distributed
to be useful to the general populace.&nbsp; In other words, the browsers
aren't ready yet, or will just be released at the time this goes to print,
so adding CSS elements to your pages will pretty much go unnoticed for
some time.&nbsp; I would, however, recommend becoming familiar with them
if you plan on doing any serious Web page design in the future.&nbsp; In
the meantime we still have our JavaScript 1.1 and good ol' HTML 3.0.
<P>Ok, enough philosophizing, down to some nitty gritty.
<P>I just updated <A HREF="http://www.csn.net/~mjhammel/gimp/gimp.html">my
GIMP pages </A>to reflect the fact that the 0.54 version is pretty much
dead and the 0.99 version is perpetually "about to become 1.0".&nbsp; What
that means is I've dropped most of my info and simply put up a little gallery
with some of the images I've created with the GIMP.&nbsp; Along with the
images, including a background image that was created using nothing more
than a set of gradients created or modified with the gradient editor in
the GIMP, I've added some Javascript code to spice up my navigation menus
and a couple of simple animated GIFs.&nbsp; It was probably more fun to
do than it is impressive.&nbsp; If you check out these pages you'll find
its a little more attractive with Netscape 4.x since I'm using a feature
for tables that allows me to specify background images for tables, rows
and even individual cells.&nbsp; Netscape 3.x users can still see most
of the effects, but a few are lost.
<P>I had added some JavaScript code to the <A HREF="http://www.csn.net/~mjhammel/nav-top.html">main
navigation page of my whole site </A>some time back.&nbsp; I sent email
to my brother, who does NT work at Compaq, and a Mac-using friend asking
them to take a look at it and see what they thought.&nbsp; It turned out
MSIE really disliked that code and the Netscape browser on the Mac didn't
handle the image rollers correctly (image rollovers cause one image to
be replaced by another due to some user initiated action - we'll talk about
those in a future Web Wonderings).&nbsp; Shocking - JavaScript wasn't really
cross platform as was first reported.&nbsp; Well, its a new technology
too.&nbsp; The solution is to add code to determine if the rest of the
code should really execute or not.&nbsp; I needed to add some browser detection
code.
<P>That was .... a year ago?&nbsp; I&nbsp;can't remember, its been so long
now.&nbsp; Well, while scanning the CSS and other info recently I ran across
a few JavaScript examples that explained exactly how to do this.&nbsp;
I now take this moment to share it with my readers.&nbsp; Its pretty basic,
so I'll show it first, then explain it.&nbsp;&nbsp; Note:&nbsp; the following
columns might be a little hard to read in windows less than about 660 pixels
wide.&nbsp; Sorry 'bout that.
<BR>&nbsp;
<TABLE BORDER=0 CELLPADDING=0 COLS=2 WIDTH="100%" NOSAVE >
<TR NOSAVE>
<TD ALIGN=LEFT WIDTH="60%" NOSAVE>
<BLOCKQUOTE><TT><FONT SIZE=-1>&lt;SCRIPT LANGUAGE="JavaScript1.1"></FONT></TT><BR><TT><FONT SIZE=-1>&lt;!--
<FONT COLOR="#993399">// Activate Cloaking Device</FONT>&nbsp;</FONT></TT><BR><TT><FONT SIZE=-1><FONT COLOR="#993399">//***************************************</FONT>&nbsp;</FONT></TT><BR><TT><FONT SIZE=-1><FONT COLOR="#993399">//
Browser Detection - check which browse</FONT>&nbsp;</FONT></TT><BR><TT><FONT SIZE=-1><FONT COLOR="#993399">//
we're working with.</FONT>&nbsp;</FONT></TT><BR><TT><FONT SIZE=-1><FONT COLOR="#993399">//
Based loosely on code from both Tim&nbsp;</FONT>&nbsp;</FONT></TT><BR><TT><FONT COLOR="#993399"><FONT SIZE=-1>//
Wallace and the Javascript section of</FONT></FONT></TT><BR><TT><FONT SIZE=-1><FONT COLOR="#993399">//
www.developer.com.</FONT>&nbsp;</FONT></TT><BR><TT><FONT SIZE=-1><FONT COLOR="#993399">//***************************************</FONT>&nbsp;</FONT></TT><BR><TT><FONT SIZE=-1></FONT></TT><TT><FONT SIZE=-1>browserName
= navigator.appName;&nbsp;</FONT></TT><BR><TT><FONT SIZE=-1>browserVersion
= parseInt(navigator.appVersion);&nbsp;</FONT></TT><BR><TT><FONT SIZE=-1>browserCodeName
= navigator.appCodeName;&nbsp;</FONT></TT><BR><TT><FONT SIZE=-1>browserUserAgent
= navigator.appUserAgent;&nbsp;</FONT></TT><BR><TT><FONT SIZE=-1>browserPlatform
= navigator.platform;</FONT></TT><BR><TT><FONT SIZE=-1></FONT></TT><BR><TT><FONT SIZE=-1><FONT COLOR="#993399">//
Test for Netscape browsers</FONT>&nbsp;</FONT></TT><BR><TT><FONT SIZE=-1>if
( browserName == "Netscape" &amp;&amp;&nbsp;<BR>&nbsp;&nbsp; browserVersion
>= 4 )&nbsp;&nbsp;</FONT></TT><BR><TT><FONT SIZE=-1>&nbsp;&nbsp; bVer =
"n4";&nbsp;</FONT></TT><BR><TT><FONT SIZE=-1>if ( browserName == "Netscape"
&amp;&amp;&nbsp;<BR>&nbsp;&nbsp; browserVersion == 3 )&nbsp;&nbsp;</FONT></TT><BR><TT><FONT SIZE=-1>&nbsp;&nbsp;
bVer = "n3";&nbsp;</FONT></TT><BR><TT><FONT SIZE=-1>if ( browserName ==
"Netscape" &amp;&amp;&nbsp;<BR>&nbsp;&nbsp; browserVersion == 2 )&nbsp;&nbsp;</FONT></TT><BR><TT><FONT SIZE=-1>&nbsp;&nbsp;
bVer = "n1";&nbsp;</FONT></TT><BR><BR><TT><FONT SIZE=-1><FONT COLOR="#993399">//
Test for Internet Explorer browsers</FONT>&nbsp;</FONT></TT><BR><TT><FONT SIZE=-1>if
( browserName == "Microsoft Internet Explorer" &amp;&amp;&nbsp;</FONT></TT><BR><TT><FONT SIZE=-1>&nbsp;&nbsp;&nbsp;&nbsp;
browserVersion == 2 ) bVer = "e2";&nbsp;</FONT></TT><BR><TT><FONT SIZE=-1>if
( browserName == "Microsoft Internet Explorer" &amp;&amp;&nbsp;</FONT></TT><BR><TT><FONT SIZE=-1>&nbsp;&nbsp;&nbsp;&nbsp;
browserVersion == 3 ) bVer = "e3";&nbsp;</FONT></TT><BR><TT><FONT SIZE=-1>if
( browserName == "Microsoft Internet Explorer" &amp;&amp;&nbsp;</FONT></TT><BR><TT><FONT SIZE=-1>&nbsp;&nbsp;&nbsp;&nbsp;
browserVersion >= 4 ) bVer = "e4";&nbsp;</FONT></TT><BR><BR><TT><FONT SIZE=-1><FONT COLOR="#993399">//
Deactivate Cloaking</FONT>&nbsp; -->&nbsp;</FONT></TT><BR><TT><FONT SIZE=-1>&lt;/SCRIPT></FONT></TT></BLOCKQUOTE>
</TD>
<TD VALIGN=TOP NOSAVE>The first line tells browsers that a script is about
to follow.&nbsp; The LANGUAGE construct is supposed to signify the scripting
language, but is not required. If the LANGUAGE tag is left off browsers
are supposed to assume the scripting language to be JAVASCRIPT.&nbsp; The
only other language available that I'm aware of currently is VBSCRIPT for
MSIE&nbsp;&nbsp; Browsers that do not understand this HTML element simply
ignore it.&nbsp; The next line starts the script.&nbsp; All scripts are
enclosed in HTML comment structures.&nbsp; By doing this the script can
be hidden from browsers that don't understand them (thus the comment on
"cloaking").&nbsp; Note that scripts can start and stop anywhere in your
HTML document.&nbsp; Most are placed in the &lt;HEAD> block at the top
of the page to make debugging a little easier, but thats not required.&nbsp;
<P>Comments in scripts use the C++ style comment characters, either single
lines prefixed with // or multiple lines that start with /* and end with
*/.&nbsp; I placed the comments in the example in a purple color for those
with browsers that support colored text, just to make them stand out from
the real code a little.&nbsp;
<P>The next five lines grab identification strings from the browser by
accessing the <B>navigator </B>object.&nbsp; The first two, which set the
browserName and browserVersion variables,&nbsp; are obvious and what you
will use most often to identify browsers in your scripts.&nbsp; The <B>appCodeName
</B>is "Mozilla"&nbsp;for Netscape and may not be set for MSIE.&nbsp; The
<B>appUserAgent </B>is generally a combination of the appCodeName and the
appVersion, although it doesn't have to be.&nbsp; Often you can use grab
this string and parse out the information you are really looking for.&nbsp;
The last item, the <B>platform </B>property for the navigator object, was
added in Javascript 1.2.&nbsp; Be careful - this code tries to access a
property that not all browsers can handle!&nbsp; You may want to embed
the browserPlatform assignment inside one of the IF statements below it
to be safe.
<P>Now we do some simple tests for the browsers our scripts can support.
Note that the tests are fairly simply - we just test the string values
that we grabbed for our browserName and browserVersion variables.&nbsp;
In the first set of tests we check for Netscape browsers.&nbsp; The second
set of tests test for MSIE browsers.&nbsp; We could add code inside these
tests to do platform specific things (like special welcome messages for
Linux users!) but in practice you'll probably want this particular script
to only set a global flag that can be tested later, in other scripts where
the real work will be done.&nbsp; Remember - you can have more than one
script in a single HTML&nbsp;page and each script has access to variables
set in other scripts.
<BR>&nbsp;</TD>
</TR>
</TABLE>
Why is it important to test for browers versions?&nbsp; Simple - JavaScript
is a new technology, introduced in Netscape's 2.0 release of their Navigator
browser.&nbsp; Microsoft, despite whining that JavaScript isn't worth supporting,
added support for the language in their 3.0 browser.&nbsp; The problem
is that each version, for either browser, supports the language to different
extents.&nbsp; For example, one popular use of the language is "image rollovers".&nbsp;
These allow images to change in the display based when the mouse is placed
over the image.&nbsp; Various versions of Netscape from 2.0 handled this
just fine.&nbsp; The Mac version had a bug in 3.0 that would not clear
the original image before updating with the new image.&nbsp; MSIE 2.0 and
3.0 didn't like this bit of JavaScript at all, popping up error windows
in protest.&nbsp; Knowing the browser and platform information can help
you design your JavaScript to work reasonably well on any platform.&nbsp;
<P>
<HR WIDTH="100%">
<P><A NAME="musings"></A>
<BR>&nbsp;
<TABLE BORDER=0 COLS=1 WIDTH="100%" >
<TR>
<TD><IMG SRC="../gx/hammel/musings.gif" ALT="Musings" HEIGHT=52 WIDTH=247 ALIGN=LEFT></TD>
</TR>
</TABLE>
&nbsp;
<H2>
SIGGRAPH 97</H2>
Unfortunately I'm not able to bring you my experiences at SIGGRAPH&nbsp;this
month.&nbsp; On my trip I&nbsp;took notes in my NEC Versa notebook (running
Linux, of course).&nbsp; Unfortunately I left the power supply and power
cable in my motel room and by the time I&nbsp;realized it after I returned
the motel could not find it.&nbsp; Its probably on some used computer resellers
shelves now.&nbsp; Anyway, I&nbsp;just ordered a replacement.&nbsp; I'll
have my SIGGRAPH&nbsp;report for you next month.&nbsp; Sorry about that.&nbsp;
I&nbsp;am, of course, taking donations to cover the cost of replacement.&nbsp;
&lt;grin>
<BR>&nbsp;
<TABLE BORDER=0 COLS=1 WIDTH="100%" BGCOLOR="#000000" NOSAVE >
<TR NOSAVE>
<TD NOSAVE><IMG SRC="../gx/hammel/cleardot.gif" HEIGHT=3 WIDTH=1></TD>
</TR>
</TABLE>
&nbsp;
<TABLE BORDER=0 COLS=3 WIDTH="100%" NOSAVE >
<TR NOSAVE>
<TD WIDTH="50%" NOSAVE>
<H2>
Designing Multimedia Applications</H2>
I&nbsp;recently picked up a copy of <B>Design Graphics</B> from my local
computer bookstore.&nbsp; This is a monthly magazine with a very high quality
layout that covers many areas of computer graphics in great detail.&nbsp;
The magazine is rather pricey, about $9US, but so far has proven to be
worth the price.&nbsp; If you are into Graphic Design and/or User Interface
Design it might be worth your time and money to check out this magazine.
<P>The July issue focused on <B>MetaCreations</B>, the company that was
created from the merger of <B>MetaTools </B>and <B>Fractal Design</B>.&nbsp;
MetaTools founders include<B><I><FONT COLOR="#993300">Kai Krause</FONT></I></B>,
a unique designer and software architect, the man responsible for the bold
interfaces found in MetaTools products like <B><I><FONT COLOR="#CC6600">Soap
</FONT></I></B>and <B><I><FONT COLOR="#CC6600">GOO</FONT></I></B>.&nbsp;
This issue also included very detailed shots of the interface for Soap.&nbsp;
It was while reading this issue and studying the interface for Soap that
I realized something basic:&nbsp; Multimedia applications can look like
anything you want.&nbsp; You just have to understand a little about how
Graphical Interfaces work and a lot about creating graphical images.
<P>Graphical Interfaces are simply programs which provide easily recognizable
displays that permit users to interact with the program.&nbsp; These interfaces
are event driven, meaning they sit in a loop waiting for an event such
as a mouse click or movement and then perform some processing based on
that event.&nbsp; There are two common ways to create programs like this.&nbsp;
You can use a application programming interface, often referred to as an
API, like Motif or OpenGL.&nbsp; Or you can use a scripting interface like
HTML&nbsp;with Java/JavaScript or VRML.&nbsp; Which method you choose depends
on the applications purpose and target audience.
<P>So, who is the target audience?&nbsp; My target audience for this column
is the multitudes of Linux users who want to do something besides run Web
servers.&nbsp; Your target audience will either be Linux/Unix users or
anyone with access to a computer no matter what platform they use.&nbsp;
In the first case you have a choice:&nbsp; you can use either the API's
or you can make use of HTML/VRML&nbsp;and browser technology.&nbsp; If
you are looking for cross-platform support you will probably go with browser
technology.&nbsp; Note that a third alternative exists - native Java which
runs without the help of a browser - but that this is even newer than browser
technology.&nbsp; You'll have about a year to wait till Java can be used
easily across platforms.&nbsp; Browser technology, although a little shakey
in some ways, is already here.
<BR><P>In order to use an API&nbsp;for your multimedia application you
need to choose a widget set.&nbsp; A&nbsp;widget set is the part of the
API that handles windowing aspects for you.&nbsp; Motif has a widget set
that provides 3D buttons, scrollbars, and menus.&nbsp; Mutlimedia applications
have higher demands than this, however. The stock Motif API cannot handle
MPEG&nbsp;movies, sound, or even colored bitmaps.&nbsp; It must be used
in conjunction with OpenGL, <A HREF="http://www.mpegtv.com">MpegTV</A>'s
library, the <A HREF="http://www.4front-tech.com">OSS </A>sound interface
and the XPM&nbsp;library to provide a full multimedia development environment.&nbsp;
The advantage to the API&nbsp;method is control - the tools allow the developer
the ability to create applications that are much more sophisticated and
visually appealing than with browser based solutions.&nbsp; An API solution,
for example, can run in full screen mode without a window manager frame,
thus creating the illusion that it is the only application running on the
X server.&nbsp; In order to get the effects you see in MetaTool's Soap
you will need to create 2D and 3D&nbsp;pixmaps to be used in Motif label
and button widgets.&nbsp; If you do this you should turn off the border
areas which are used to create Motif's 3D button effects. You will also
need to write special <I>callbacks </I>(routines called based on an event
which you specify) to swap the pixmaps quickly in order to give the feeling
of motion or animation.
<P>Even with the use of 3D&nbsp;pixmaps in Motif you still won't have the
interactivity you desire in your multimedia application.&nbsp; To add rotating
boxes and other 3D effects with which the user can interact you will need
to embed the OpenGL&nbsp;widget, available from the <A HREF="http://www.ssec.wisc.edu/~brianp/Mesa.html">MesaGL&nbsp;</A>package,
into your Motif program.&nbsp; By creating a number of OpenGL&nbsp;capable
windows you can provide greater 3D&nbsp;interactivity than you can by simply
swapping pixmaps in Motif labels and buttons.&nbsp; The drawback here is
that you will be required to write the code which registers events within
given areas of the OpenGL&nbsp;widget.&nbsp; This is not a simple task,
but it is not impossible.&nbsp; Using OpenGL&nbsp;with Motif is a very
powerful solution for multimedia applications, but it is not for the faint
of heart developer.
<P>Using browser technology to create a multimedia application is a little
different.&nbsp; First, the browser will take care of the event catching
for you.&nbsp; You simply need to tell it what part of a page accepts events,
which events it should watch for and what to do when that event happens.&nbsp;
This is, conceptually, just like using the API&nbsp;method.&nbsp; In reality,
using a browser this way is much simpler because the browser provides a
layer of abstraction to simplify the whole process.&nbsp; You identify
what parts of the page accept input via HTML&nbsp;markup using links, anchors,
and forms and then use JavaScript's <I>onEvent </I>style handlers, such
as onClick or onMouseOver, to call an event handler.&nbsp; Formatting your
application is easier using the HTML&nbsp;markup language than trying to
design the interface using the API.&nbsp; You can have non-rectangular
regions in imagemaps, for example, that accept user input.&nbsp; API's
can also have non-rectangular regions, but HTML&nbsp;only requires a single
line of code to specify the region.&nbsp; An API&nbsp;can use hundreds
of lines of code.
<CENTER><A HREF="#next-column">-Top of next column-</A></CENTER>
</TD>
<TD WIDTH="3" BGCOLOR="#000000" NOSAVE><IMG SRC="../gx/hammel/cleardot.gif" HEIGHT=3 WIDTH=1></TD>
<TD VALIGN=TOP WIDTH="50%" NOSAVE>
<TABLE BORDER=0 COLS=1 WIDTH="100%" NOSAVE >
<TR>
<TD><LH><A NAME="next-column"></A><B>More Musings...</B>&nbsp;</LH>&nbsp;
<BR>No other musings - what?&nbsp; This wasn't enough for you?&nbsp; &lt;grin>
<BR>&nbsp;</TD>
</TR>
<TR NOSAVE>
<TD BGCOLOR="#000000" NOSAVE><IMG SRC="../gx/hammel/cleardot.gif" HEIGHT=3 WIDTH=1></TD>
</TR>
<TR NOSAVE>
<TD NOSAVE><P>
<BR>Ok, since we know using API's can be complex, and because I'm going
to run out of room long before I can cover how to use an API&nbsp;to do
a multimedia application, lets look at creating an application using browser
technology.
<P>Creating web pages is pretty easy.&nbsp; If you haven't had a chance
yet, take a look at <B>Netscape 4.0</B>.&nbsp; It includes a tool called
the <B>Page Composer</B> which allows for WYSIWYG creations of web pages.&nbsp;
This column was created using Page Composer.&nbsp; Web pages are not enough,
of course.&nbsp; We need graphics, animations and sound.&nbsp; Not to mention
interaction with files on disk.
<P>Graphics, animations and sound can easily be embedded in a web page
with links.&nbsp; Your application will probably need to provide players
for any animations or sounds you provide unless you feel really confident
users will already have players.&nbsp;&nbsp; For animations on Linux systems,
other than animated GIFs which are supported natively in most browsers
these days, you can try <B><I><FONT COLOR="#CC6600">xanim</FONT></I></B>.&nbsp;
Your installation process will have to explain how to install the players.&nbsp;
JavaScript does permit you to query what players and plug-ins are available
but doesn't appear to give you the ability to automatically launch them
without having first registered them with the browser.
<P>Sound can be added just like the graphics and animations.&nbsp; You
simply have links to the sound files.&nbsp; Not all Linux systems will
have sound available.&nbsp; You might want to consider writing a plug-in
which checks for the sound devices before trying to play sounds and having
this plug-in installed for your sound files.&nbsp; Security issues may
prevent a plug-in from opening a device file.&nbsp; You should check the
Netscape plug-in API&nbsp;to find out what files you can and cannot open.
<P>You might be wondering how you can use a browser for a multimedia application
on a CD.&nbsp; Don't forget - both MSIE&nbsp;and Netscape allow you to
view HTML documents on the native system.&nbsp; On Netscape you can just
use something like <B><FONT SIZE=-1>file:/cdrom/start.html</FONT></B> to
open up the main page of the application.&nbsp; Any links - sound, graphics,
or animations - can be displayed or played when the page is first loaded
using JavaScript's <I>onLoad </I>event handler.&nbsp; Graphics, animations,
sound and Java applets do not have to be served via a Web server to be
viewed or run by the browser.&nbsp; And JavaScript is embedded in the HTML&nbsp;page
so it doesn't require a Web server either.&nbsp; As long as you use relative
links (relative to the directory where your applications start page is
located) your users won't need access to a Web server to use your HTML-based
multimedia application.
<P>Well, we've covered just about all the things you'll want to do in your
program except how to access files.&nbsp; Security in browsers and with
Java has traditionally been rather zealous - the systems were secure by
denying all access to your hard drives.&nbsp; Thats still the case even
with JavaScript 1.2.&nbsp; There are no real file I/O&nbsp;commands in
the JavaScript language.&nbsp; In order to place data in your application
you will need to place it all in static arrays embedded in JavaScript code
in a page.&nbsp; Fortunately you can place this data in separate files
and link to them when the page is loaded.&nbsp; To do this you would use
the <B>SRC=</B> attribute of the <B>SCRIPT&nbsp;</B>tag.&nbsp; Netscape
3.0 or later browsers will read this and load the script file as if it
were embedded at the SCRIPT&nbsp;tag of the original page.&nbsp; This will
not work for pre-3.0 browsers, some of the beta 4.0 browsers or (apparently)&nbsp;any
of the MSIE browsers.
<P>The SCR attribute&nbsp; provides some level of control for maintaining
your data files, but it also means your data is in user readable files
on the CD. If you use Java applets instead you have the ability to compile
this data into an object file but you still don't have access to your file
system.&nbsp; It may be possible to read data from files using plug-ins
in order to perform some interactive operations but I'm not familiar with
the Netscape or MSIE&nbsp;plug-in API's and suspect they also have some
measure of security that may prevent this.&nbsp; Reading files seems harmless
enough, but there are reasons to disallow this practice. There is a way
to get read/write access to the users filesystem from a JavaScript or Java
application - <I>certificates</I>.&nbsp; This is a new technology and I'm
not that familiar with its use yet.&nbsp; <B><U>The Official Netscape JavaScript
1.2 Book </U></B>describes certificates and how to obtain and create them.&nbsp;
I&nbsp;suggest taking a look at this book (at the end of chapter 14) if
you are interested in this.
<P>As I reread this article I&nbsp;realize what is so crystal clear in
my mind now is probably still a muddy swamp to my readers.&nbsp; Don't
fret.&nbsp; I&nbsp;covered a lot of material in a rather short space.&nbsp;
What you should do is first pick a method - API&nbsp;or browsers.&nbsp;
Then pick one part of that method and start reading all you can about it.&nbsp;
Personally, I&nbsp;understand the API&nbsp;methods better since I'm a programmer
by trade.&nbsp; The browser technology is interesting in that it provides
the User Interface (UI) that is filled in by the developer with images
and sound.&nbsp; Abstrasting the UI&nbsp;in this manner is the future of
applications but its still in its early days of development.&nbsp; In either
case you still need an understanding of what each piece of the puzzle does
for you. The API&nbsp;method will give you more control and access to databases
without the need for servers (you can embed the database code in the application).&nbsp;
The browser method is easier to prototype and develop but has limited access
to the system for security reasons. Either method can produce stunning
effects, if you understand how all the pieces fit together.&nbsp; And when
you look at MetaCreations products, like Soap and GOO, you can see the
kinds of effects that are possible.</TD>
</TR>
</TABLE>
&nbsp;</TD>
</TR>
</TABLE>
&nbsp;
<TABLE BORDER=0 COLS=1 WIDTH="100%" BGCOLOR="#000000" NOSAVE >
<TR>
<TD><IMG SRC="../gx/hammel/cleardot.gif" HEIGHT=3 WIDTH=1></TD>
</TR>
</TABLE>
&nbsp;
<BR>&nbsp;<A NAME="resources"></A>
<TABLE BORDER=0 COLS=1 WIDTH="100%" >
<TR>
<TD><IMG SRC="../gx/hammel/resources.gif" ALT="Resources" HEIGHT=57 WIDTH=246 ALIGN=LEFT></TD>
</TR>
</TABLE>
The following links are just starting points for finding more information
about computer graphics and multimedia in general for Linux systems. If
you have some application specific information for me, I'll add them to
my other pages or you can contact the maintainer of some other web site.
I'll consider adding other general references here, but application or
site specific information needs to go into one of the following general
references and not listed here.
<BR>&nbsp;
<TABLE BORDER=0 COLS=2 WIDTH="100%" NOSAVE >
<TR NOSAVE>
<TD NOSAVE><A HREF="http://www.csn.net/~mjhammel/linux/lgh.html">Linux
Graphics mini-Howto</A>&nbsp;
<BR><A HREF="http://www.csn.net/~mjhammel/ugu/ugu.html">Unix Graphics Utilities</A>&nbsp;
<BR><A HREF="http://www.digiserve.com/ar/linux-snd/">Linux Multimedia Page</A>&nbsp;
<P>Some of the Mailing Lists and Newsgroups I keep an eye on and where
I get alot of the information in this column:&nbsp;
<P><A HREF="http://www.XCF.Berkeley.EDU/~gimp/">The Gimp User and Gimp
Developer Mailing Lists</A>.&nbsp;
<BR><A HREF="http://www.irtc.org">The IRTC-L discussion list</A>&nbsp;
<BR><A HREF="news:comp.graphics.rendering.raytracing">comp.graphics.rendering.raytracing</A>&nbsp;
<BR><A HREF="news:comp.graphics.rendering.renderman">comp.graphics.rendering.renderman</A>&nbsp;
<BR><A HREF="news:comp.graphics.api.opengl">comp.graphics.api.opengl</A>&nbsp;
<BR><A HREF="news:comp.os.linux.announce">comp.os.linux.announce</A>&nbsp;</TD>
<TD><IMG SRC="../gx/hammel/gmuse.jpg" HSPACE=10 HEIGHT=270 WIDTH=190></TD>
</TR>
</TABLE>
<P><A NAME="future"></A>
<H2>
Future Directions</H2>
Next month:
<UL>
<LI>
Web Wonderings - Adding JavaScript Rollovers to simulate dynamic images</LI>
<LI>
My SIGGRAPH&nbsp;notes, if I can get my notebook running again.</LI>
<LI>
Maybe a look at libgr, if I&nbsp;have time.</LI>
</UL>
<A HREF="mailto:mjhammel@csn.net">Let me know what you'd like to hear about!</A>
<!--===================================================================-->
<P> <hr> <P>
<center><H5>Copyright &copy; 1997, Michael J. Hammel<BR>
Published in Issue 22 of the Linux Gazette, August 1997</H5></center>
<!--===================================================================-->
<P> <hr> <P>
<A HREF="./index.html"><IMG ALIGN=BOTTOM SRC="../gx/indexnew.gif"
ALT="[ TABLE OF CONTENTS ]"></A>
<A HREF="../index.html"><IMG ALIGN=BOTTOM SRC="../gx/homenew.gif"
ALT="[ FRONT PAGE ]"></A>
<A HREF="./lg_answer22.html"><IMG SRC="../gx/back2.gif"
ALT=" Back "></A>
<A HREF="./bench.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>
<P> <hr> <P>
<p><hr><p>
<H4>
&quot;Linux Gazette...<I>making Linux just a little more fun!</I>&quot;
</H4>
<P> <HR> <P>
<!--===================================================================-->
<h1 align="center">Linux Benchmarking - Concepts</H1>
<H4 align="center">by Andr&eacute; D. Balsa <A
HREF="mailto:andrewbalsa@usa.net">andrewbalsa@usa.net</A></h4>
<h4 align="center">
With corrections and contributions by Uwe F. Mayer
<A HREF="mailto:mayer@math.vanderbilt.edu">mayer@math.vanderbilt.edu</A>
and David C. Niemi <A HREF="mailto:bench@wauug.erols.com">bench@wauug.erols.com</A>
</h4>
<P>
<HR><I>This is the first article in a series of 4 articles on Linux Benchmarking,
to be published by the Linux Gazette. This article deals with the fundamental
concepts in computer benchmarking, as they apply to the Linux OS. An example
of a classic benchmark, &quot;Whetstone&quot;, is analyzed in more detail.</I>
<HR>
<H2><A NAME="toc1"></A>1. <A HREF="bench.html#ss1">Basic concepts and
definitions</A></H2>
<UL>
<LI><A HREF="bench.html#ss1.1">1.1 Benchmark</A> </LI>
<LI><A HREF="bench.html#ss1.2">1.2 Benchmark results</A> </LI>
<LI><A HREF="bench.html#ss1.3">1.3 Index figures</A> </LI>
<LI><A HREF="bench.html#ss1.4">1.4 Performance metrics</A> </LI>
<LI><A HREF="bench.html#ss1.5">1.5 Elapsed wall-clock time vs. CPU
time</A> </LI>
<LI><A HREF="bench.html#ss1.6">1.6 Resolution and precision</A> </LI>
<LI><A HREF="bench.html#ss1.7">1.7 Synthetic benchmark</A> </LI>
<LI><A HREF="bench.html#ss1.8">1.8 Application benchmark</A> </LI>
<LI><A HREF="bench.html#ss1.9">1.9 Relevance</A> </LI>
</UL>
<H2><A NAME="toc2"></A>2. <A HREF="bench.html">A variety of benchmarks</A></H2>
<H2><A NAME="toc3"></A>3. <A HREF="bench.html">FPU tests: Whetstone
and Sons, Ltd.</A></H2>
<UL>
<LI><A HREF="bench.html#ss3.1">3.1 Whetstone history and general
features</A> </LI>
<LI><A HREF="bench.html#ss3.2">3.2 Getting the source and compiling
it</A> </LI>
<LI><A HREF="bench.html#ss3.3">3.3 Running Whetstone and gathering
results</A> </LI>
<LI><A HREF="bench.html#ss3.4">3.4 Examining the source code, the
object code and interpreting the results</A> </LI>
</UL>
<H2><A NAME="toc4"></A>4. <A HREF="bench.html">References</A></H2>
<P><hr><p>
<H2><A NAME="s1">1. Basic concepts and definitions</A></H2>
<H2><A NAME="ss1.1">1.1 Benchmark</A></H2>
<P>A benchmark is a documented procedure that will <B>measure</B> the <B>time</B> needed by a computer system to execute a well-defined computing task. It is assumed that this time is related to the <B>performance</B> of the computer system and that someh
ow the same procedure can be applied to other systems, so that <B>comparisons</B> can be made between different hardware/software configurations.</P>
<H2><A NAME="ss1.2">1.2 Benchmark results</A></H2>
<P>From the definition of a benchmark, one can easily deduce that there are two basic procedures for benchmarking:
<OL>
<LI>Measuring the time it takes for the system being examined to loop through a <B>fixed number of iterations</B> of a specific piece of code.</LI>
<LI>Measuring the number of iterations of a specific piece of code executed by the system under examination in a <B>fixed amount of time</B>.</LI>
</OL>
<P>If a single iteration of our test code takes a long time to execute, procedure 1 will be preferred. On the other hand, if the system being tested is able to execute thousands of iterations of our test code per second, procedure 2 should be chosen.</P>
<P>Both procedures 1 and 2 will yield final results in the form "seconds/iteration" or "iterations/second" (these two forms are interchangeable). One could imagine other algorithms, e.g. self-modifying code or measuring the time needed to reach a steady s
tate of some sort, but this would increase the complexity of the code and produce results that would probably be next to impossible to analyze and compare.</P>
<H2><A NAME="ss1.3">1.3 Index figures</A></H2>
<P>Sometimes, figures obtained from standard benchmarks on a system being tested are compared with the results obtained on a <B>reference</B> machine. The reference machine's results are called the <B>baseline</B> results. If we divide the results of the
system under examination by the baseline results, we obtain a performance <B>index</B>. Obviously, the performance index for the reference machine is 1.0. An index has no units, it is just a relative measurement.</P>
<H2><A NAME="ss1.4">1.4 Performance metrics</A></H2>
<P>The final result of any benchmarking procedure is always a set of numerical results which we can call <B>speed</B> or <B>performance</B> (for that particular aspect of our system effectively tested by the piece of code).</P>
<P>Under certain conditions we can combine results from similar tests or various indices into a single figure, and the term <B>metric</B> will be used to describe the "units" of performance for this benchmarking mix.</P>
<H2><A NAME="ss1.5">1.5 Elapsed wall-clock time vs. CPU time</A></H2>
<P>Time measurements for benchmarking purposes are usually taken by defining a starting time and an ending time, the difference between the two being the elapsed wall-clock time. <B>Wall-clock</B> means we are not considering just CPU time, but the "real"
time usually provided by an internal asynchronous real-time clock source in the computer or an external clock source (your wrist-watch for example). Some tests, however, make use of CPU time: the time effectively spent by the CPU of the system being test
ed in running the specific benchmark, and not other OS routines.</P>
<H2><A NAME="ss1.6">1.6 Resolution and precision</A></H2>
<P>Resolution and precision both measure the information provided by a data point, but should not be confused.</P>
<P>Resolution is the minimum time interval that can be (easily) measured on a given system. In Linux running on i386 architectures I believe this is 1/100 of a second, provided by the GNU C system library function <CODE>times</CODE> (see /usr/include/time
.h - not very clear, BTW). Another term used with the same meaning is "granularity". David C. Niemi has developed an interesting technique to lower granularity to very low (sub-millisecond) levels on Linux systems, I hope he will contribute an explanation
of his algorithm in the next article.</P>
<P>Precision is a measure of the total variability in the results for any given benchmark. Computers are deterministic systems and should always provide the same, identical benchmark results if running under identical conditions. However, since Linux is a
multi-tasking, multi-user system, some tasks will be running in the background and will eventually influence the benchmark results. </P>
<P>This "random" error can be expressed as a time measurement (e.g. 20 seconds + or - 0.2 s) or as a percentage of the figure obtained by the benchmark considered (e.g. 20 seconds + or - 1%). Other terms sometimes used to describe variations in results ar
e "variance", "noise", or "jitter".</P>
<P>Note that whereas resolution is system dependent, precision is a characteristic of each benchmark. Ideally, a well-designed benchmark will have a precision smaller than or equal to the resolution of the system being tested. It is very important to iden
tify the sources of noise for any particular benchmark, since this provides an indication of possibly erroneous results.</P>
<H2><A NAME="ss1.7">1.7 Synthetic benchmark</A></H2>
<P>A program or program suite specifically designed to measure the performance of a subsystem (hardware, software, or a combination of both). Whetstone is an example of a synthetic benchmark.</P>
<H2><A NAME="ss1.8">1.8 Application benchmark</A></H2>
<P>A commonly executed application is chosen and the time to execute a given task with this application is used as a benchmark. Application benchmarks try to measure the performance of computer systems for some category of real-world computing task. Measu
ring the time your Linux box takes to compile the kernel can be considered as a sort of application benchmark.</P>
<H2><A NAME="ss1.9">1.9 Relevance</A></H2>
<P>A benchmark or its results are said to be irrelevant when they fail to effectively measure the performance characteristic the benchmark was designed for. Conversely, benchmark results are said to be relevant when they allow an accurate prediction of re
al-life performance or meaningful comparisons between different systems.</P>
<HR>
<HR>
<H2><A NAME="s2">2. A variety of benchmarks</A></H2>
<P>The performance of a Linux system may be measured by all sorts of different benchmarks:
<OL>
<LI>Kernel compilation performance.</LI>
<LI>FPU performance.</LI>
<LI>Integer math performance.</LI>
<LI>Memory access performance.</LI>
<LI>Disk I/O performance.</LI>
<LI>Ethernet I/O performance.</LI>
<LI>File I/O performance.</LI>
<LI>Web server performance.</LI>
<LI>Doom performance.</LI>
<LI>Quake performance.</LI>
<LI>X graphics performance.</LI>
<LI>3D rendering performance.</LI>
<LI>SQL server performance.</LI>
<LI>Real-time performance.</LI>
<LI>Matrix performance.</LI>
<LI>Vector performance.</LI>
<LI>File server (NFS) performance.</LI>
</OL>
<P>Etc...
<UL>
<LI>Conclusion I: it's obvious that no single benchmark can provide results for all the above items.</LI>
<LI>Conclusion II: you must first decide what you are trying to measure, then choose an appropriate benchmark (or write your own). </LI>
<LI>Conclusion III: it's impossible to come up with a single figure (called Single Figure of Merit in benchmarking terminology) that will summarize the performance of a Linux system. Hence, no "Lhinuxstone" metric exists.</LI>
<LI>Conclusion IV: benchmarking always takes more time than you thought it would.</LI>
</UL>
<HR>
<H2><A NAME="s3"></A>3. FPU tests: Whetstone and Sons, Ltd.</H2>
<P>Floating-point (FP) instructions are among the least used while running
Linux. They probably represent &lt; 0.001% of the instructions executed
on an average Linux box, unless one deals with scientific computations.
Besides, if you really want to know how well designed the FPU in your processor
is, it's easier to have a look at its data sheet and check how many clock
cycles it takes to execute a given FPU instruction. But there are more
benchmarks that measure FPU performance than anything else. Why ? </P>
<OL>
<LI>RISC, pipelining, simultaneous issuing of instructions, speculative
execution and various other CPU design tricks make the CPU performance,
specially FPU performance, difficult to measure directly and simply. The
execution time of an FPU instruction varies depending on the data, and
a continuous stream of FPU instructions will execute under special circumstances
that make direct predictions of performance impossible in most cases. Simulations
(synthetic benchmarks) are needed.</LI>
<LI>FPU tests are easier to write than other benchmarks. Just put a bunch
of FP instructions together and make a loop: voil&agrave; !</LI>
<LI>The Whetstone benchmark is widely (and freely) available in Basic,
C and Fortran versions, in case you don't want to write your own FPU test.</LI>
<LI>FPU figures look good for marketing purposes. Here is what Dave Sill,
the author of the comp.benchmarks FAQ, has to say about MFLOPS: &quot;<I>Millions
of Floating Point Operations Per Second. Supposedly the rate at which the
system can execute floating point instructions. Varies widely between different
benchmarks and different configurations of the same benchmarks. Popular
with marketing types because it's sounds like a &quot;hard&quot; value
like miles per hour, and represents a simple concept.</I>&quot;</LI>
<LI>If you are going to buy a Cray, you'd better have an excuse for it.</LI>
<LI>You can't get a data sheet for the Cray (or don't believe the numbers),
but still want to know its FP performance.</LI>
<LI>You want to keep your CPU busy doing all sorts of useless FP calculations,
and want to check that the chip gets very hot.</LI>
<LI>You want to discover the next big bug in the FPU of your processor,
and get rich speculating with the manufacturer's shares.</LI>
</OL>
<P>Etc...</P>
<H2><A NAME="ss3.1"></A>3.1 Whetstone history and general features</H2>
<P>The original Whetstone benchmark was designed in the 60's by Brian Wichmann
at the National Physical Laboratory, in England, as a test for an ALGOL
60 compiler for a hypothetical machine. The compilation system was named
after the small town of Whetstone, where it was designed, and the name
seems to have stuck to the benchmark itself.</P>
<P>The first practical implementation of the Whetstone benchmark was written
by Harold Curnow in FORTRAN in 1972 (Curnow and Wichmann together published
a paper on the Whetstone benchmark in 1976 for <I>The Computer Journal</I>).
Historically it is the first major synthetic benchmark. It is designed
to measure the execution speed of a variety of FP instructions (+, *, sin,
cos, atan, sqrt, log, exp) on scalar and vector data, but also contains
some integer code. Results are provided in MWIPS (Millions of Whetstone
Instructions Per Second). The meaning of the expression &quot;Whetstone
Instructions&quot; is not clear, though, at least after close examination
of the C source code.</P>
<P>During the late 80's and early 90's it was recognized that Whetstone
would not adequately measure the FP performance of parallel multiprocessor
supercomputers (e.g. Cray and other mainframes dedicated to scientific
computations). This spawned the development of various modern benchmarks,
many of them with names like Fhoostone, as a humorous reference to Whetstone.
Whetstone however is still widely used, because it provides a very reasonable
metric as a measure of uniprocessor FP performance.</P>
<P>Whetstone has other interesting qualities for Linux users: </P>
<UL>
<LI>Its source code is short and relatively easy to understand, with a
clean, self-explanatory structure.</LI>
<LI>The C version compiles cleanly on Linux boxes with gcc.</LI>
<LI>Execution time is short: 100 seconds (by design).</LI>
<LI>It is very precise (small variations in the results).</LI>
<LI>CPU architecture digression: for the Whetstone benchmark, the object
code that gets looped through is very small, fitting entirely in the L1
cache of most modern processors, hence keeping the FPU pipeline filled
and the FPU permanently busy. This is desirable because Whetstone is doing
exactly what we want it to do: measuring FPU performance, not CPU/L2 cache/main
memory coupling, integer performance or any other feature of the system
under test. Note however that <A HREF="mailto:bench@wauug.erols.com">David
C. Niemi</A> has provided some conclusive evidence that at least some interaction
with the L2 cache or main memory is taking place on Pentium (R) systems
(Pentium CPUs have a sophisticated FPU instruction pipeline and can dispatch
two FPU instructions on a single clock cycle. One pipe can execute all
integer and FP instructions, while the other pipe can execute simple integer
instructions and the FXCH FP instructions. This is quoted from Intel's
datasheet on the Pentium processor, available at <A HREF="http://developer.intel.com/design/pentium/datashts/241997.htm">Intel's
developers site</A>). I wish somebody with a Pentium ICE equipment could
investigate this a little further...</LI>
</UL>
<H2><A NAME="ss3.2"></A>3.2 Getting the source and compiling it</H2>
<H3>Getting the standard C version by Roy Longbottom.</H3>
<P>The version of the Whetstone benchmark that we are going to use for
this example was slightly modified by Al Aburto and can be downloaded from
his excellent <A HREF="ftp://ftp.nosc.mil/pub/aburto">FTP site dedicated
to benchmarks</A>. After downloading the file whets.c, you will have to
edit slightly the source: a) Uncomment the &quot;<TT>#define POSIX1</TT>&quot;
directive (this enables the Linux compatible timer routine). b) Uncomment
the &quot;<TT>#define </TT>DP&quot; directive (since we are only interested
in the Double Precision results).</P>
<H3>Compiling</H3>
<P>This benchmark is extremely sensitive to compiler optimization options.
Here is the line I used to compile it: <TT>cc whets.c -o whets -O2 -fomit-frame-pointer
-ffast-math -fforce-addr -fforce-mem -m486 -lm</TT>.</P>
<P>Note that some compiler options of some versions of gcc are buggy, most
notably one of -O, -O2, -O3, ... together with -funroll-loops can cause
gcc to emit incorrect code on a Linux box. You can test your gcc with a
short test program available at <A HREF="http://www.math.vanderbilt.edu/~mayer/linux/gcc.html">Uwe
Mayer's site</A>. Of course, if your compiler is buggy, then any test results
are not written in stone, to say the least (pun intended). In short, don't
use -funroll-loops to compile this benchmark, and try to stick to the optimization
options listed above.</P>
<H2><A NAME="ss3.3"></A>3.3 Running Whetstone and gathering results</H2>
<H3>First runs</H3>
<P>Just execute whets. Whetstone will display its results on standard output
and also write a whets.res file if you give it the information it requests.
Run it a few times to confirm that variations in the results are very small.</P>
<H3>With L1, L2 or both L1 and L2 caches disabled</H3>
<P>Some motherboards allow you to disable the L1 (internal) or L2 (external)
caches through the BIOS configuration menus (take a look at the motherboard's
manual; the ASUS P55T2P4 motherboard, for example, allows disabling both
caches separately or together). You may want to experiment with these settings
and/or main memory (DRAM) timing settings.</P>
<H3>Without optimization</H3>
<P>You can try to compile whets.c without any special optimization options,
just to verify that compiler quality and compiler optimization options
do influence benchmark results.</P>
<H2><A NAME="ss3.4"></A>3.4 Examining the source code, the object code
and interpreting the results</H2>
<H3>General program structure</H3>
<P>The Whetstone benchmark main loop executes in a few milliseconds on
an average modern machine, so its designers decided to provide a calibration
procedure that will first execute 1 pass, then 5, then 25 passes, etc...
until the calibration takes more than 2 seconds, and then guess a number
of passes <TT>xtra</TT> that will result in an approximate running time
of 100 seconds. It will then execute <TT>xtra</TT> passes of each one of
the 8 sections of the main loop, measure the running time for each (for
a total running time very near to 100 seconds) and calculate a rating in
MWIPS, the Whetstone metric. This is an interesting variation in the two
basic procedures described in Section 1.</P>
<H3>Main loop</H3>
<P>The main loop consists of 8 sections each containing a mix of various
instructions representative of some type of computational task. Each section
is itself a very short, very small loop, and has its own timing calculation.
The code that gets looped through for section 8 for example is a single
line of C code:</P>
<P><TT>x = sqrt(exp(log(x)/t1);</TT> where x = 0.75 and t1=0.50000025,
both defined as doubles.</P>
<H3>Executable code size, library calls</H3>
<P>Compiling as specified above with gcc 2.7.2.1, the resulting ELF executable
<TT>whets</TT> is 13 096 bytes long on my system. It calls libc and of
course libm for the trigonometric and transcendental math functions, but
these should get compiled to very short executable code sequences since
all modern CPUs have FPUs with these functions wired-in.</P>
<H3>General comments</H3>
<P>Now that we have an FPU performance figure for our machine, the next
step is comparing it to other CPUs. Have you noticed all the data that
whets.c asked you after you had run it for the first time? Well, Al Aburto
has collected Whetstone results for your convenience at his site, you may
want to download the <A HREF="ftp://ftp.nosc.mil/pub/aburto">data file</A>
and have a look at it. This kind of benchmarking data repository is very
important, because it allows comparisons between various different machines.
More on this topic in one of my next articles.</P>
<P>Whetstone is not a Linux specific test, it's not even an OS specific
test, but it certainly is a good test for the FPU in your Linux box, and
also gives an indication of compiler efficiency for specific kinds of applications
that involve FP calculations.</P>
<P>I hope this gave you a taste of what benchmarking is all about.</P>
<P>
<HR>
<H2><A NAME="s4"></A>4. References</H2>
<P>Other references for benchmarking terminology: </P>
<UL>
<LI>The <A HREF="http://sacam.oren.ortn.edu/~dave/benchmark-faq.html">comp.benchmarks
FAQ</A> by Dave Sill.</LI>
<LI>The <A HREF="http://wombat.doc.ic.ac.uk/foldoc/index.html">On-Line
Computing Dictionary</A>.</LI>
<LI>The <A HREF="http://sunsite.unc.edu/LDP/HOWTO/Benchmarking-HOWTO.html">Linux
Benchmarking HOWTO</A> available from the LDP site and mirrors.</LI>
</UL>
<P>
<HR>
<H5 align="center">Copyright &copy; 1997, Andr&eacute; D. Balsa<BR>
Published in Issue 22 of the Linux Gazette, October 1997</H5>
<!--===================================================================-->
<P> <hr> <P>
<A HREF="./index.html"><IMG ALIGN=BOTTOM SRC="../gx/indexnew.gif"
ALT="[ TABLE OF CONTENTS ]"></A>
<A HREF="../index.html"><IMG ALIGN=BOTTOM SRC="../gx/homenew.gif"
ALT="[ FRONT PAGE ]"></A>
<A HREF="./gm.html"><IMG SRC="../gx/back2.gif"
ALT=" Back "></A>
<A HREF="./words.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>
<P> <hr> <P>
<p><hr><p>
<H4>
&quot;Linux Gazette...<I>making Linux just a little more fun!</I>&quot;
</H4>
<P> <HR> <P>
<!--===================================================================-->
<center><h1>Word Processing and Text Processing</h1></center>
<center>
<h4><a href="mailto: layers@marktwain.net">by Larry Ayers</a></h4>
</center>
<P><HR><P>
One of the most common questions posted in the various Linux newsgroups is
"Where can I find a good word-processor for Linux?". This question has several
interesting ramifications:<br>
<ul>
<li>There is an unspoken assumption that a word processor is a vital
application for an operating system.
<li>The query implies that the questioner has investigated the text
processing capabilities readily available for Linux and has either
found them too daunting to learn and/or not suited to the tasks at
hand, or...
<li>The questioner is a recent migrant from one of the commercial OS's and
is accustomed to a standard word processor.
</ul>
<hr>
<center><h3> Vital For Some...</h3></center>
<p>A notion has become prevalent in the minds of many computer users these
days: the idea that a complex word processor is the only tool suitable for
creating text on a computer. I've talked with several people who think of an
editor as a primitive relic of the bad old DOS days, a type of software which
has been superseded by the modern word-processor. There is an element of
truth to this, especially in a business environment in which even the simplest
memos are distributed in one of several proprietary word-processor formats.
But when it is unnecessary to use one of these formats, a good text editor has
more power to manipulate text and is faster and more responsive.
<p>The ASCII format, intended to be a universal means of representing
and transferring text, does have several limitations. The fonts used are
determined by the terminal type and capability rather than by the application,
normally a fixed, monospace font. These limitations in one sense are virtues,
though, as this least-common-denominator approach to representing text assures
readability by everyone on all platforms. This is why ASCII is still the core
format of e-mail and usenet messages, though there is a tendency in the large
software firms to promote HTML as a replacement. Unfortunately, HTML can now
be written so that it is essentially unreadable by anything other than a
modern graphical browser. Of course, HTML is ASCII-based as well, but is
meant to be interpreted or parsed rather than read directly.
<p>Working with ASCII text directly has many advantages. The output is
compact and easily stored, and separating the final formatting from actual
writing allows the writer to focus on content rather than appearance. An
ASCII document is not dependent on one application; the simplest of editors or
even <b>cat</b> can access its content. There is an interesting parallel,
perhaps coincidental, between the Unix use of ASCII and other OS's use of
binary formats. All configuration files in a Linux or any Unix system are
generally in plain ASCII format: compact,editable, and easily backed-up or
transferred. Many programmers use Linux; source code is written in ASCII
format, so perhaps using the format for other forms of text is a natural
progression. The main configuration files for Win95, NT and OS/2 are in
binary format, easily corruptible and not easily edited. Perhaps this is one
reason users of these systems tend towards proprietary word-processing formats
which, while not necessarily in binary format, aren't readable by ASCII-based
editors or even other word-processors. But I digress...
<p>There are several methods of producing professional-looking printable
documents from ASCII input, the most popular being LaTeX, Lout, and Groff.
<hr>
<center><h3>Text Formatting with Mark-Up Languages</h3></center>
<center><h4>LaTeX</h4></center>
<p>LaTeX, Leslie Lamport's macro package for the TeX low-level formatting
system, is widely used in the academic world. It has become a standard, and
has been refined to the point that bugs are rare. Its ability to represent
mathematical equations is unparalleled, but this very fact has deterred some
potential users. Mentioning LaTeX to people will often elicit a response such
as: "Isn't that mainly used by scientists and mathematicians? I have no need
to include equations in my writing, so why should I use it?" A full-featured
word-processor (such as WordPerfect) also includes an equation editor, but (as
with LaTeX) just because a feature exists doesn't mean you have to use it.
LaTeX is well-suited to creating a wide variety of documents, from a simple
business letter to articles, reports or full-length books. A wealth of
documentation is available, including documents bundled with the distribution
as well as those available on the internet. A good source is this
<a href="ftp://ftp.cdrom.com/.1/tex/ctan/info">ftp site</a>, which is a mirror
of CTAN, the largest on-line repository of TeX and LaTeX material.
<p>LaTeX is easily installed from any Linux distribution, and in my experience
works well "out of the box". Hardened LaTeX users type the formatting tagging
directly, but there are several alternative approaches which can expedite the
process, especially for novices. There <em>is</em> quite a learning curve
involved in learning LaTeX from scratch, but using an intermediary interface
will allow the immediate creation of usable documents by a beginner.
<p>AucTeX is a package for either GNU Emacs or XEmacs which has a multitude of
useful features helpful in writing LaTeX documents. Not only does the package
provide hot-keys and menu-items for tags and environments, but it also allows
easy movement through the document. You can run LaTeX or TeX interactively
from Emacs, and even view the resulting output DVI file with xdvi. Emacs
provides excellent syntax highlighting for LaTeX files, which greatly improves
their readability. In effect AucTeX turns Emacs into a "front-end" for LaTeX.
If you don't like the overhead incurred when running Emacs or especially
XEmacs, John Davis' Jed and Xjed editors have a very functional LaTeX/TeX mode
which is patterned after AucTeX. The console-mode Jed editor does
syntax-highlighting of TeX files well without extensive fiddling with config
files, which is rare in a console editor.
<p>If you don't use Emacs or its variants there is a Tcl/Tk based front-end
for LaTeX available called <b>xtem</b>. It can be set up to use any editor;
the September 1996 issue of <b>Linux Journal</b> has a good introductory
article on the package. <b>Xtem</b> has one feature which is useful for LaTeX
beginners: on-line syntax help-files for the various LaTeX commands.
The
<a href="http://pax.st.usm.edu/~kolibal/tex_html/xtem_html/xtem_texmenu.html">
homepage</a> for the package can be visited if you're interested.
<p>It is fairly easy to produce documents if the default formats included with
a TeX installation are used; more knowledge is needed to produce customized
formats. Luckily TeX has a large base of users, many of whom have contributed
a variety of style-formatting packages, some of which are included in the
distribution, while others are freely available from TeX archive sites
such as CTAN.
<p>At a further remove from raw LaTeX is the LyX document processor. This
program (still under development, but very usable) at first seems to be a
WYSIWYG interface for LaTeX, but this isn't quite true. The text you type
doesn't have visible LaTeX tagging, but it is formatted to fit the window on
your screen which doesn't necessarily reflect the document's appearance
when printed or viewed with GV or Ghostscript. In other words, the appearance
of the text you type is just a user convenience. There are several things
which can be done with a document typed in LyX. You can let LyX handle the
entire LaTeX conversion process with a DVI or Postscript file as a result,
which is similar to using a word-processor. I don't like to do it this way;
one of the reasons I use Linux is because I'm interested in the underlying
processes and how they work, and Linux is transparent. If I'm curious as to
how something is happening in a Linux session I can satisfy that curiosity to
whatever depth I like. Another option LyX offers is more to my taste: LyX can
convert the document's format from the LaTeX-derived internal format to
standard LaTeX, which is readable and can be loaded into an editor.
<p>Load a LyX-created LaTeX file into an Emacs/Auctex session (if you have
AucTeX set up right it will be called whenever a file with the <i>.tex</i>
suffix is loaded), and your document will be displayed with new LaTeX tags
interspersed throughout the text. The syntax-highlighting can make the text
easier to read if you have font-locking set up to give a subdued color to the
tagging (backslashes (\) and $ signs). This is an effective way to learn
something about how LaTeX documents are written. Changes can be made from
within the editor and you can let AucTeX call the LaTeX program to format the
document, or you can continue with LyX. In effect this is using LyX as a
preprocessor for AucTeX. This expands the user's options; if you are having
trouble convincing LyX to do what you want, perhaps AucTeX can do it more
easily.
<p>Like many Linux software projects LyX is still in a state of flux. The
release of beta version 0.12 is imminent; after that release the developers
are planning to switch to another GUI toolkit (the current versions use the
XForms toolkit). The 0.11.38 version I've been using has been working
dependably for me (hint: if it won't compile, give the configure script the
switch <kbd>--disable-nls</kbd>. This disables the internationalization
support).
<hr>
<center><h4>YODL</h4></center>
<p>YODL (Yet One-Other Document Language) is another way of interacting with
LaTeX. This system has a simplified tagging format which isn't hard to
learn. The advantage of YODL is that from one set of marked-up source
documents, output can be generated in LaTeX, HTML, and Groff man and ms
formats. The package is well-documented. I wrote a short introduction to
YODL in issue #9 of the Gazette. The current source for the package is this
<a href="ftp://ftp.icce.rug.nl/pub/unix/">ftp site</a>.
<hr>
<center><h3>Lout</h3></center>
<p>About thirteen years ago Jeffrey Kingston (of the University of Sydney,
Australia) began to develop a document formatting system which became known as
Lout. This system bears quite a bit of resemblance to LaTeX: it uses
formatting tags (using the @ symbol rather than \) and its output is
Postscript. Mr. Kingston calls Lout a high-level language with some
similarities to Algol, and claims that user extensions and modifications are
much easier to implement than in LaTeX. The package comes with hundreds of
pages of Postscript documentation along with the Lout source files which were
used to generate those book-length documents.
<p>The Lout system is still maintained and developed, and in my trials seemed
to work well, but there are some drawbacks. I'm sure Lout has nowhere near as
many users as LaTeX. LaTeX is installed on enough machines that if you should
want to e-mail a TeX file to someone (especially someone in academia) chances
are that that person will have access to a machine with Tex installed and will
be able to format and print or view it. LaTeX's large user-base also has
resulted in a multitude of contributed formatting packages.
<p>Another drawback (for me, at least) is the lack of available front-ends or
editor-macro packages for Lout. I don't mind using markup languages if I can
use, say, an Emacs mode with key-bindings and highlighting set up for the
language. There may be such packages out there for Lout, but I haven't run
across them.
<p>Lout does have the advantage of being much more compact than a typical Tex
installation. If you have little use for some of the more esoteric aspects
of LaTeX, Lout might be just the thing. It can include tables, various types
of lists, graphics, foot- and marginal notes, and equations in a document, and
the Postscript output is the equal of what LaTeX generates.
<p>Both RedHat and Debian have Lout packages available, and the
source/documentation package is available from the Lout
<a href="ftp://ftp.cs.su.oz.au/jeff/lout/">home FTP site</a>.
<hr>
<center><h4>Groff</h4></center>
<p>Groff is an older system than TeX/LaTeX, dating back to the early days of
unix. Often a first-time Linux user will neglect to install the Groff
package, only to find that the <i>man</i> command won't work and that the
man-pages are therefore inaccessible. As well as in day-to-day invocation
by the <i>man</i> command, Groff is used in the publishing industry to
produce books, though other formatting systems such as SGML are more common.
<p>Groff is the epitome of the non-user-friendly and cryptic unix command-line
tool. There are several man-pages covering various of Groff's components, but
they seem to assume a level of prior knowledge without any hint as to where
that knowledge might be acquired. I found them to be nearly incomprehensible.
A search on the internet didn't turn up any introductory documents or
tutorials, though there may be some out there. I suspect more complete
documentation might be supplied with some of the commercial unix
implementations; the original and now-proprietary version is called troff, and
a later version is nroff; Groff is short for GNU roff.
<p>Groff can generate Postscript, DVI, HP LaserJet4, and ASCII text formats.
<p>Learning to use Groff on a Linux system might be an uphill battle, though
Linux software developers must have learned enough of it at one time or other,
as most programs come with Groff-tagged man-page files. Groff's apparent
opacity and difficulty make LaTeX look easy in contrast!
<hr>
<center><h3>A Change in Mind-Set</h3></center>
<p>Processing text with a mark-up language requires a different mode of
thought concerning documents. On the one hand, writing blocks of ASCII is
convenient and no thought needs to be given to the marking-up process until the
end. A good editor provides so many features to deal with text that using any
word-processor afterwards can feel constrictive. Many users, though, are
attracted by the integration of functions in a word processor, using one
application to produce a document without intermediary steps.
<p>Though there <em>are</em> projects underway (such as <b>Wurd</b>)
which may eventually result in a native Linux word-processor, there may be a
reason why this type of application is still rare in the Linux world.
Adapting oneself to Linux, or any unix-variant, is an adaptation to what has
been called "the Unix philosophy", the practice of using several
highly-refined and specific tools to accomplish a task, rather than one tool
which tries to do it all. I get the impression that programmers attracted to
free software projects prefer working on smaller specialized programs. As an
example look at the plethora of mail- and news-readers available compared to
the dearth of all-in-one internet applications. Linux itself is really just
the kernel, which has attracted to itself all of the GNU and other software
commonly distributed with it in the form of a distribution.
<p>Christopher B. Browne has written an essay titled <b>An Opinionated Rant
About Word-Processors</b> which deals with some of the issues discussed in
this article; it's available at <a href="http://www.hex.net/~cbbrowne/wp.html">
this site</a>.
<p>The StarOffice suite is an interesting case, one of the few instances of a
large software firm (StarDivision) releasing a Linux version of an office
productivity suite. The package has been available for some time now, first
in several time-limited beta versions and now in a freely available release.
It's a large download but it's also available on CDROM from
<a href="http://www.caldera.com">Caldera</a>.
You would think that users would be flocking to it if the demand is really that
high for such an application suite for Linux. Judging by the relatively
sparse usenet postings I've seen, StarOffice hasn't exactly swept the Linux
world by storm. I can think of a few possible reasons:
<ul>
<li>Many hard-core Linux users aren't working in a corporate office setting
in which such a product would be valuable; they are scientists,
engineers or academics who are perfectly happy with LaTeX, Lout, Groff,
et al.
<li>Then there are the users who have dual or multiple-boot set-ups; if they
need to use MS Word they just boot from their Win95 or NT partitions.
<li>Another group of users run Linux at home and whatever OS their job
requires at work.
<li>StarOffice is written with a cross-platform development tool-kit; this
may be responsible for its bulk and lack of speed.
</ul>
<hr>
<p>I remember the first time I started up the StarOffice word-processor. It
was slow to load on a Pentium 120 with 32 mb. of RAM (and I thought XEmacs was
slow!), and once the main window appeared it occurred to me that it just
didn't look "at home" on a Linux desktop. All those icons and button-bars!
It seemed to work well, but with the lack of English documentation (and not
being able to convince it to print anything!) I eventually lost interest in
using it. I realized that I prefer my familiar editors, and learning a little
LaTeX seemed to be easier than trying to puzzle out the workings of an
undocumented suite of programs. This may sound pretty negative, and I don't
wish to denigrate the efforts of the StarDivision team responsible for the
Linux porting project. If you're a StarOffice user happy with the suite
(especially if you speak German and therefore can read the docs) and
would like to present a dissenting view, write a piece on it for the Gazette!
<p>Two other commercial word-processors for Linux are Applix and WordPerfect.
Applix, available from <a href="http://www.redhat.com">RedHat</a>,
has received favorable reviews from many Linux users.
<p>A company called SDCorp in Utah has ported Corel's WordPerfect 7 to
Linux, and a (huge!) demo is available now from both the SDCorp
<a href="ftp://ftp.sdcorp.com/pub/demos/linux/">ftp</a> site and
<a href="ftp://ftp.corel.com/pub/WordPerfect/wpunix/demos/linux/">Corel's</a>.
Unfortunately both FTP servers are unable to resume interrupted
downloads (usually indicating an NT server) so the CDROM version, available
from the SDCorp <a href="http://www.sdcorp.com/wplinux">website</a>,
is probably the way to go, if you'd like to try it out. The demo can be
transformed into a registered program by paying for it, in which case a key is
e-mailed to you which registers the program, but only for the machine it is
installed on.
<p>Addendum: I recently had an exchange of e-mail with Brad Caldwell, product
manager for the SDCorp WordPerfect port. I complained about the difficulty of
downloading the 36 mb. demo, and a couple of days later I was informed that
the file has been split into nine parts, and that they were investigating the
possibility of changing to an FTP server which supports interrupted
downloads. The smaller files are available from
<a href="http://www.sdcorp.com/demos/smallftp.htm">this web page</a>.
<hr>
<p>There exists a curious dichotomous attitude these days in the Linux
community. I assume most people involved with Linux would like the operating
system to gain more users and perhaps move a little closer to the mainstream.
Linux advocates bemoan the relative lack of "productivity apps" for Linux,
which would make the OS more acceptable in corporate or business
environments. But how many of these advocates would use the applications if
they were more common? Often the change of mindset discussed above mitigates
against acceptance of Windows-like programs, with no source code available and
limited access to the developers. Linux has strong roots in the GNU and free
software movements (not always synonymous) and this background might be a
barrier towards development of a thriving commercial software market.
<!--===================================================================-->
<P> <hr> <P>
<center>
<h5>Copyright &copy; 1997, Larry Ayers <br>
Published in Issue 22 of the Linux Gazette, October 1997</h5>
</center>
<!--===================================================================-->
<P> <hr> <P>
<A HREF="./index.html"><IMG ALIGN=BOTTOM SRC="../gx/indexnew.gif"
ALT="[ TABLE OF CONTENTS ]"></A>
<A HREF="../index.html"><IMG ALIGN=BOTTOM SRC="../gx/homenew.gif"
ALT="[ FRONT PAGE ]"></A>
<A HREF="./bench.html"><IMG SRC="../gx/back2.gif"
ALT=" Back "></A>
<A HREF="./new_emacs.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>
<P> <hr> <P>
<H4>
&quot;Linux Gazette...<I>making Linux just a little more fun!</I>&quot;
</H4>
<P> <HR> <P>
<!--===================================================================-->
<center><h1>GNU Emacs 20.1</h1></center>
<center>
<h4><a href="mailto: layers@marktwain.net">by Larry Ayers</a></h4>
</center>
<P><HR><P>
<center><h3>Introduction</h3></center>
<p>Richard Stallman and the other members of the GNU Emacs development team
are a rather reticent group of programmers. Unlike many other development
projects in the free-software world, the Emacs beta program is restricted to a
closed group of testers, and news of what progress is being made is scanty.
In the past couple of months hints found in various usenet postings seemed
to intimate that a new release of GNU Emacs was imminent, so every now and
then I began to check the GNU main
<a href="ftp://prep.ai.mit.edu/pub/gnu">FTP</a> site on the off-chance that a
release had been made.
<p>Early on the morning of September 17 I made a quick check before beginning
my day's work, and there it was, a new Emacs 20.1 source archive. As with all
Emacs source packages, it was large (over 13 megabytes) so I began the download
with NcFtp and left it running.
<center><h3>Building It</h3></center>
<p>There is always a delay between the release of a new version of a software
package and the release of a Linux distribution's version, such as a Debian or
RedHat binary package. Even if you usually use RPMs or <i>*.deb</i> releases
(in many cases it's preferable) a source release of a major team-developed
piece of software such as GNU Emacs will usually build easily on a reasonably
up-to-date Linux machine. The included installation instructions are clear:
just run the configure script, giving your machine-type and preferred
installation directory as switches. In my case, this command did the trick:
<br>
<p><kbd>./configure i586-Debian-linux-gnu --prefix=/mt</kbd><br>
<p>The script will generate a Makefile tailored to your machine;
<kbd>make</kbd>, followed by <kbd>make install</kbd> and you're up and
running.
<hr>
<center><h3>So What's New?</h3></center>
<p>It's been about a year since the last public GNU Emacs release, so there
have been quite a few changes. One of the largest is the incorporation of the
MULE (<b>M</b><b>U</b>lti<b>L</b>ingual <b>E</b>macs) extensions, which give
Emacs the capability of displaying extended character sets necessary for
languages such as Chinese and Japanese. This won't be of interest to most
English-speaking users, but if you're interested the necessary files are in a
separate archive at the GNU site.
<p>Here's a partial list of changes and updated packages:
<ul>
<li>For some reason, the scroll-bar is now on the left, but it can be
changed back to its old position on the right with the new Customize
facility. Some day it would be nice if someone implemented a real
scrollbar for GNU Emacs, with the usual buttons or arrows at top and
bottom which allow smooth scrolling rather than paging, but it seems
this is a low priority for the developers.
<li>Per Abrahamsen's <b>Customize</b> package is now thoroughly integrated
with the majority of the included LISP packages, allowing easy
customization of all sorts of options, with the results appended to your
<i>~.emacs</i> file. This so much easier than hacking on the
<i>.emacs</i> file; I don't know how many times I've had a misplaced or
unbalanced parentheses, causing Emacs to quit loading the file and
giving me the dread message: <b>Error in init file</b>.
<li><b>Viper</b>, <b>CC-Mode</b>, the <b>GNUS</b> newsreader, and many other
extension packages have been updated.
<li>The default values for many configuration parameters have been changed
to values more likely to be acceptable to most users, the sort of thing
which would be entered in an <i>~/.emacs</i> file.
<li>The syntax-highlighting color default values are now sensitive to
whether you have a dark or light screen background; for the most part
the dark-background default colors are readable, with enough contrast.
<li>The text-filling commands now handle indented and bulleted paragraphs
more effectively.
<li>The word <b>Emacs</b> no longer is shown in the mode-line, allowing more
room for line and column numbers, mode specifications, time of day,
etc.
<li>For programmers, there are new commands for looking up symbols or files
in the Info documentation files. As an example, in C mode the GNU libc
Info files would be searched for a reference to the symbol or file at
the cursor position in the current buffer.
<li>Another programmer's feature: <b>Alt-tab</b> (with a numeric argument)
will now perform completion on a symbol name in the current buffer,
using Info files as above.
<li>The main /lisp directory has been subdivided into several
sub-directories, which makes individual files much easier to find.
</ul>
<p>Have you ever been puzzled or annoyed by the peculiar way the Emacs screen
scrolls when using the up- or down- arrow keys? It's a jerky scroll,
difficult for the eye to follow, which could only be partially alleviated by
setting scroll-step to a small value. In 20.1 this has been changed, so that
if you set scroll-step to 2 <kbd>(setq scroll-step 2)</kbd> the screen
actually scrolls up and down smoothly, without the disorienting jerks. This
feature alone makes the upgrade worthwhile!
<p>Another Emacs quirk has been addressed with a new variable,
<kbd>scroll-preserve-screen-position</kbd>. This variable, if set to <b>t</b>
(which means "yes"), will allow the user to page-up and page-down and then
returns the cursor to its original position when the starting page is shown
again. I really like this. With the default behavior you have to find the
cursor on the screen and manually move it back to where it was. This variable
can be enabled with the line<br>
<p><code>(setq scroll-preserve-screen-position t)</code>
<p>entered into your <i>~.emacs</i> init file.
<hr>
<center><h3>The Customization Utility</h3></center>
<p>What a labor-saver! Rather than searching for the documentation which
deals with altering one of Emacs' default settings, the user is presented with
a mouse-enabled screen from which changes can be made, either for the current
session or permanently, in which case the changes are recorded in the user's
<i>~.emacs</i> file. It appears that a tremendous amount of work went into
including the customization framework in the LISP files for Emacs' countless
modes and add-on packages. A Customize screen can be summoned from the
<b>Help</b> menu; the entries are in a cascading hierarchy, allowing an easy
choice of the precise category a user might want to tweak. Here's a
screenshot of a typical Customization screen:<br>
<p>
<img alt="Customizing screen" src="./gx/ayers/custom.gif">
<hr>
<p>Per Abrahamsen is to be congratulated for writing this useful utility, and
for making it effective both for XEmacs and GNU Emacs users.
<hr>
<center><h3>Musings</h3></center>
<p>Emacs used to be thought of as a hefty, memory-intensive editor which
tended to strain a computer's resources. Remember the old mock-acronym,
<b>E</b>ight <b>M</b>egabytes <b>A</b>nd <b>C</b>onstantly <b>S</b>wapping?
These days it seems that the hardware has caught up with Emacs;
today a mid-range machine can run Emacs easily, even with other applications
running concurrently. Memory and hard-disk storage have become less expensive
which makes Emacs usable for more people.
<p>Some people are put off by the multiple keystrokes for even the most common
commands. It's easy to rebind the keys, though. The function keys are handy,
as they aren't in use by other Emacs commands. As examples, I have
<b>F1</b> bound to Kill-Buffer, <b>F2</b> bound to Ispell-Word (which checks
the spelling of the word under the cursor), <b>F3</b> and <b>F4</b> put the
cursor at the beginning or end of the current file, and <b>F7</b> is bound to
Save-Buffer. Of course, these operations are on the menu-bar, but using the
keyboard is quicker. If you are accustomed to a Vi-style editor, the
<b>Viper</b> package allows toggling between the familiar Vi commands (which
are extraordinarily quick, as most are a single keystroke) and the Emacs
command set. This emulation mode has been extensively improved lately, and is
well worth using.
<p>Even with the exhaustively detailed Info files, the tutorial, etc. I would
hesitate to recommend Emacs for a novice Linux user. There is enough to learn
just becoming familiar with basic Linux commands without having to learn Emacs
as well. I think Nedit would be a more appropriate choice for a new user
familiar with Windows, OS/2, or the Macintosh, since its mouse-based operation
and menu structure are reminiscent of editors from these operating systems.
<p>Emacs has a way of growing on you; as your knowledge of its traits and
capabilities increases the editor gradually is molded to your preferences and
work habits. It <em>is</em> possible to use the editor at a basic level,
(using just the essential commands), but it's a waste to run a large editor
like Emacs without using at least some of its manifold capabilities.
<!--===================================================================-->
<P> <hr> <P>
<center>
<h5>Copyright &copy; 1997, Larry Ayers <br>
Published in Issue 22 of the Linux Gazette, October 1997</h5>
</center>
<!--===================================================================-->
<P> <hr> <P>
<A HREF="./index.html"><IMG ALIGN=BOTTOM SRC="../gx/indexnew.gif"
ALT="[ TABLE OF CONTENTS ]"></A>
<A HREF="../index.html"><IMG ALIGN=BOTTOM SRC="../gx/homenew.gif"
ALT="[ FRONT PAGE ]"></A>
<A HREF="./words.html"><IMG SRC="../gx/back2.gif"
ALT=" Back "></A>
<A HREF="./notes-mode.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>
<P> <hr> <P>
<H4>
&quot;Linux Gazette...<I>making Linux just a little more fun!</I>&quot;
</H4>
<P> <HR> <P>
<!--===================================================================-->
<center><h1>A True "Notebook" Computer?</h1></center>
<center>
<h4><a href="mailto: layers@marktwain.net">by Larry Ayers</a></h4>
</center>
<P><HR><P>
<center><h3>Introduction</h3></center>
<p>Recently I happened across an ingeniously designed add-on LISP package for
the GNU Emacs editor. It's called Notes-Mode, and it helps organize and
cross-reference notes by subject and date. It was written by <a href="mailto:
johnh@isi.edu">John Heidemann</a>.
Here's his account of how he happened to write the
package:
<blockquote>
Briefly, I started keeping notes on-line shortly after I got a
portable computer in January, 1994. After a month-and-a-half of
notes, I realized that one does not live by grep alone, so I started
adding indexing facilities.
In June of 1995 some other Ficus-project members started keeping
and indexing on-line notes using other home-grown systems. After some
discussion, we generalized my notes-mode work and they started using
it.
Over the next 18 months notes-mode grew. Finally, in April, 1996 I
wrote documentation, guaranteeing that innovation on notes-mode will
now cease or the documentation will become out of date.</blockquote>
<br>
<hr>
<center><h3>Using Notes-Mode</h3></center>
<p>Here's what one of my smaller notes files looks like:<br>
<hr>
<pre>
25-Jul-97 Friday
----------------
* Today
-------
prev: &lt;file:///~/notes/199707/970724#* Today&gt;
next: &lt;file:///~/notes/199707/970728#* Today&gt;
* Prairie Plants
----------------
prev: &lt;file:///~/notes/199707/970724#* Prairie Plants&gt;
next: &lt;none&gt;
</pre>
So far the only results I've seen in response to the various
desultory efforts I've made to direct-seed prairie plants in
the west prairie:
1: Several rattlesnake-master plants in a spot
where we burned a brush-pile. Two are blooming
this summer.
2: One new-england aster near the above.
There are probably others which are small and haven't flowered
yet.
* Linux Notes
-------------
prev: &lt;file:///~/notes/199707/970724#* Linux Notes&gt;
next: &lt;file:///~/notes/199708/970804#* Linux Notes&gt;
I noticed today that a new version of e2compress was available,
and I've patched the 2.0.30 kernel source but haven't compiled it
yet.
I've been experimenting with the color-syntax-highlighting version of nedit
4.03 lately; it has a nifty dialog-box interface for creating and modifying
modes. Easier than LISP! <hr>
<p>The first entry,<i>Today</i>, contains nothing; it just serves as a link to
move from the current notes file to either the previous day's file or the next
day's. Any other word preceded by an asterisk and a space will serve as a
hyper-link to previous or next entries with the same subject. Type in a new
(or previously-used) subject with the asterisk and space, press enter, and the
dashed line and space will automatically be entered into the file; this format
is what the Perl indexing script uses to identify discrete entries.
<p>While in Emacs with a notes-mode file loaded, several keyboard commands
allow you to navigate between successive entries, either by day or by subject,
depending on where the cursor is when the keystroke is executed. A handy
key-binding for notes-mode is <code>Control-c n</code>, which will initialize a
new notes file for the day if the following LISP code is entered into your
<kbd>~.emacs</kbd> file:<br>
<code>(define-key global-map "^Cn" 'notes-index-todays-link)</code>.
The "<kbd>^C</kbd>" part is entered into the file by entering <kbd>Control-q
Control-c</kbd>.
<p>When Notes-Mode is installed a subdirectory is created in your home
directory called Notes. As you use the mode a subdirectory for each month is
created as well as a subdirectory under each month's directory for each week
in the month. The individual note files, one for each day the mode is used,
are given numerical names; the format of the path and filename can be seen in
the above example.
<p>The ability to navigate among your notes is enabled by means of a Perl
script called <b>mkall</b>, which is intended to be run daily by <b>cron</b>.
<b>Mkall</b> in turn calls other Perl scripts which update the index file with
entries for any new notes you may have made. This system works well, making
good use of Linux's automation facilities. Once you have it set up you never
have to think about it again.
<p>While this mode is designed for an academic environment in which voluminous
notes are taken on a variety of subjects, it can also be useful for anyone who
wants to keep track of on-line notes. It could even be used as a means of
organizing diary or journal entries. The only disadvantage I've seen is that,
though the notes-files are ASCII text readable by any editor, the navigation
and hyper-linking features are only available from within Emacs. This is fine
if you use Emacs as your main editor but makes the package not too useful for
anyone else. XEmacs users are out of luck as well, as the package doesn't
work "out-of-the-box" with XEmacs. I imagine a skilled LISP hacker could
modify Notes-Mode for XEmacs; I've made some tentative attempts but without
success.
<center><h3>Availability</h3></center>
<p>The only source I've seen for this package is from the author's web page,
at this URL:<br>
<a href="http://gost.isi.edu/~johnh/SOFTWARE/NOTES_MODE/index.html">
http://gost.isi.edu/~johnh/SOFTWARE/NOTES_MODE/index.html</a>
<p>The documentation for Notes-Mode can be browsed on-line at this site if
you'd like to read more before trying it out.
<!--===================================================================-->
<P> <hr> <P>
<center>
<h5>Copyright &copy; 1997, Larry Ayers <br>
Published in Issue 22 of the Linux Gazette, October 1997</h5>
</center>
<!--===================================================================-->
<P> <hr> <P>
<A HREF="./index.html"><IMG ALIGN=BOTTOM SRC="../gx/indexnew.gif"
ALT="[ TABLE OF CONTENTS ]"></A>
<A HREF="../index.html"><IMG ALIGN=BOTTOM SRC="../gx/homenew.gif"
ALT="[ FRONT PAGE ]"></A>
<A HREF="./new_emacs.html"><IMG SRC="../gx/back2.gif"
ALT=" Back "></A>
<A HREF="./using_m4.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>
<P> <hr> <P>
<H4>
&quot;Linux Gazette...<I>making Linux just a little more fun!</I>&quot;
</H4>
<P> <HR> <P>
<!--===================================================================-->
<!-- Copyright (C) 1997 Bob Hepple
This is an example of the use of m4 to pre-process HTML
code. Using the FSF version of m4, you generate HTML from
this file with:
m4 -P using_m4.m4 >using_m4.html
Please don't be put off by the use of nested quotation marks
in the code examples. This sample is rather an extreme
stress-test of the idea. Normal usage is much simpler.
This program is free software; you can redistribute it
and/or modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later
version.
This program is distributed in the hope that it will be
useful, but WITHOUT ANY WARRANTY; without even the implied
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the GNU General Public License for more
details.
You should have received a copy of the GNU General Public
License along with this program; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA
02139, USA. -->
<A NAME="Contents"><H2 align="center">Using <EM>m4</EM> to write
HTML.</H2></A>
<h4 align="center">By Bob Hepple
<a href="mailto:bhepple@pacific.net.sg">bhepple@pacific.net.sg</a>
</h4>
<P><HR>
<P>
<H4>Contents:</H4>
<UL><P><LI><A HREF="#1. Some limitations of HTML">1. Some limitations of HTML</A>
<LI><A HREF="#2. Using <EM>m4</EM>">2. Using <EM>m4</EM></A>
<LI><A HREF="#3. Examples of <EM>m4</EM> macros">3. Examples of <EM>m4</EM> macros</A>
<LI><A HREF="#3.1 Sharing HTML elements across several page">3.1 Sharing HTML elements across several page</A>
<LI><A HREF="#3.2 Managing HTML elements that often change">3.2 Managing HTML elements that often change</A>
<LI><A HREF="#3.3 Creating new text styles">3.3 Creating new text styles</A>
<LI><A HREF="#3.4 Typing and mnemonic aids">3.4 Typing and mnemonic aids</A>
<LI><A HREF="#3.5 Automatic numbering">3.5 Automatic numbering</A>
<LI><A HREF="#3.6 Automatic date stamping">3.6 Automatic date stamping</A>
<LI><A HREF="#3.7 Generating Tables of Contents">3.7 Generating Tables of Contents</A>
<LI><A HREF="#3.7.1 Simple to understand TOC">3.7.1 Simple to understand TOC</A>
<LI><A HREF="#3.7.2 Simple to use TOC">3.7.2 Simple to use TOC</A>
<LI><A HREF="#3.8 Simple tables">3.8 Simple tables</A>
<LI><A HREF="#4. <EM>m4</EM> gotchas">4. <EM>m4</EM> gotchas</A>
<LI><A HREF="#4.1 Gotcha 1 - quotes">4.1 Gotcha 1 - quotes</A>
<LI><A HREF="#4.2 Gotcha 2 - Word swallowing">4.2 Gotcha 2 - Word swallowing</A>
<LI><A HREF="#4.3 Gotcha 3 - Comments">4.3 Gotcha 3 - Comments</A>
<LI><A HREF="#4.4 Gotcha 4 - Debugging">4.4 Gotcha 4 - Debugging</A>
<LI><A HREF="#5. Conclusion">5. Conclusion</A>
<LI><A HREF="#6. Files to download">6. Files to download</A>
</UL><P>
<P><HR><SMALL><CENTER>This page last updated on Thu Sep 18 22:46:54 HKT 1997
<BR>
$Revision: 1.2 $</CENTER></SMALL><HR><P>
<A NAME="1. Some limitations of HTML"><H2>1. Some limitations of HTML</H2></A>
It's amazing how easy it is to write simple HTML pages - and
the availability of <EM>WYSIWYG</EM> HTML editors like
<EM>NETSCAPE GOLD</EM> lulls one into a mood of <EM>"don't
worry, be happy"</EM>. However, managing multiple,
interrelated pages of HTML rapidly gets very, very
difficult. I recently had a slightly complex set of pages
to put together and it started me thinking - <EM>"there has
to be an easier way"</EM>.
<P>
I immediately turned to the WWW and looked up all sorts of
tools - but quite honestly I was rather disappointed. Mostly,
they were what I would call <EM>Typing Aids</EM> - instead of
having to remember arcane incantations like <CODE>&lt;a
href="link"&gt;text&lt;/a&gt;</CODE>, you are given a button or a
magic keychord like ALT-CTRL-j which remembers the syntax and
does all that nasty typing for you.
<P>
<EM>Linux</EM> to the rescue! HTML is built as ordinary text
files and therefore the normal <EM>Linux</EM> text management
tools can be used. This includes the revision control tools
such as <EM>RCS</EM> and the text manipulation tools like
<EM>awk, perl, etc.</EM> These offer significant help in
version control and managing development by multiple users
as well as in automating the process of extracting from a
database and displaying the results (the classic <CODE>"grep
|sort |awk"</CODE> pipeline).
<P>
The use of these tools with HTML is documented elsewhere,
e.g. see Jim Weinrich's article in <EM>Linux Journal</EM> Issue
36, April 1997, "Using Perl to Check Web Links" which I'd
highly recommend as yet another way to really flex those
<EM>Linux</EM> muscles when writing HTML.
<P>
What I will cover here is a little work I've done recently
with using <EM>m4</EM> in maintaining HTML. The ideas can
probably be extended to the more general SGML case very
easily.
<P>
<A HREF="#Contents">Contents</A>
<P>
<A NAME="2. Using <EM>m4</EM>"><H2>2. Using <EM>m4</EM></H2></A>
I decided to use <EM>m4</EM> after looking at various other
pre-processors including <EM>cpp</EM>, the <EM>C</EM>
front-end. While <EM>cpp</EM> is perhaps a little too
<EM>C</EM>-specific to be very useful with HTML, <EM>m4</EM> is a
very generic and clean macro expansion program - and it's
available under most Unices including <EM>Linux</EM>.
<P>
Instead of editing <EM>*.html</EM> files, I create
<EM>*.m4</EM> files with my favourite text editor.
These look something like this:
<P>
<BLOCKQUOTE><PRE><CODE>m4_include(stdlib.m4)
_HEADER(`This is my header')
&lt;P>This is some plain text&lt;P>
_HEAD1(`This is a main heading')
&lt;P>This is some more plain text&lt;P>
_TRAILER</CODE></PRE></BLOCKQUOTE>
<P>
The format is simple - just HTML code but you can now
include files and add macros rather like in <EM>C</EM>. I use
a convention that my new macros are in capitals and start
with "_" to make them stand out from HTML language and to
avoid name-space collisions.
<P>
The <EM>m4</EM> file is then processed as follows to create an
<EM>.html</EM> file e.g.
<P>
<BLOCKQUOTE><PRE><CODE>m4 -P &lt;file.m4 &gt;file.html</CODE></PRE></BLOCKQUOTE>
<P>
This is especially easy if you create a "makefile" to
automate this in the usual way. Something like:
<P>
<BLOCKQUOTE><PRE><CODE>.SUFFIXES: .m4 .html
.m4.html:
m4 -P $*.m4 >$*.html
default: index.html
*.html: stdlib.m4
all: default PROJECT1 PROJECT2
PROJECT1:
(cd project2; make all)
PROJECT2:
(cd project2; make all)</CODE></PRE></BLOCKQUOTE>
<P>
The most useful commands in <EM>m4</EM> include the following
which are very similar to the <EM>cpp</EM> equivalents (shown in
brackets):
<DL>
<DT><CODE>m4_include</CODE>:
<DD>includes a common file into your HTML (<CODE>#include</CODE>)
<DT><CODE>m4_define</CODE>:
<DD>defines an <EM>m4</EM> variable (<CODE>#define</CODE>)
<DT><CODE>m4_ifdef</CODE>:
<DD>a conditional (<CODE>#ifdef</CODE>)
</DL>
<P>
Some other commands which are useful are:
<DL>
<DT><CODE>m4_changecom</CODE>:
<DD>change the <EM>m4</EM> comment character (normally #)
<DT><CODE>m4_debugmode</CODE>:
<DD>control error disgnostics
<DT><CODE>m4_traceon/off</CODE>:
<DD>turn tracing on and off
<DT><CODE>m4_dnl</CODE>:
<DD>comment
<DT><CODE>m4_incr, m4_decr</CODE>:
<DD>simple arithmetic
<DT><CODE>m4_eval</CODE>:
<DD>more general arithmetic
<DT><CODE>m4_esyscmd</CODE>:
<DD>execute a <EM>Linux</EM> command and use the output
<DT><CODE>m4_divert(i)</CODE>:
<DD>This is a little complicated, so skip on first reading. It is a
way of storing text for output at the end of normal processing - it
will come in useful later, when we get to automatic numbering of
headings. It sends output from <EM>m4</EM> to a temporary file number
<EM>i</EM>. At the end of processing, any text which was diverted is then
output, in the order of the file number <EM>i</EM>. File number -1 is the
bit bucket and can be used to comment out chunks of comments. File
number 0 is the normal output stream. Thus, for example, you can
`m4_divert' text to file 1 and it will only be output at the end.
</DL>
<P>
<A HREF="#Contents">Contents</A>
<P>
<A NAME="3. Examples of <EM>m4</EM> macros"><H2>3. Examples of <EM>m4</EM> macros</H2></A>
<A NAME="3.1 Sharing HTML elements across several page"><H2>3.1 Sharing HTML elements across several page</H2></A>
<P>
In many "nests" of HTML pages, each page shares elements
such as a button bar like this:
<P>
<A name="nil"></A>
<BLOCKQUOTE><a href="#nil">[Home]</a> <a href="#nil">[Next]</a> <a
href="#nil">[Prev]</a> <a href="#nil">[Index]</a></BLOCKQUOTE>
<P>
This is fairly easy to create in each page - the trouble is
that if you make a change in the "standard" button-bar then
you then have the tedious job of finding each occurance of
it in every file and then manually make the changes.
<P>
With <EM>m4</EM> we can more easily do this by putting the
shared elements into an <CODE>m4_include</CODE> statement, just like
<EM>C</EM>.
<P>
While I'm at it, I might as well also automate the naming of
pages, perhaps by putting the following into an include
file, say <CODE>"button_bar.m4"</CODE>:
<P>
<BLOCKQUOTE><PRE><CODE>m4_define(`_BUTTON_BAR',
&lt;a href="homepage.html">[Home]&lt;/a>
&lt;a href="$1">[Next]&lt;/a>
&lt;a href="$2">[Prev]&lt;/a>
&lt;a href="indexpage.html">[Index]&lt;/a>)</CODE></PRE></BLOCKQUOTE>
<P>
and then in the document itself:
<P>
<BLOCKQUOTE><PRE><CODE>m4_include button_bar.m4
_BUTTON_BAR(`page_after_this.html',
`page_before_this.html')</CODE></PRE></BLOCKQUOTE>
<P>
The $1 and $2 parameters in the macro definition are
replaced by the strings in the macro call.
<P>
<A HREF="#Contents">Contents</A>
<P>
<A NAME="3.2 Managing HTML elements that often change"><H2>3.2 Managing HTML elements that often change</H2></A>
<P>
It is very troublesome to have items change in multiple HTML
pages. For example, if your email address changes then you
will need to change all references to the new
address. Instead, with <EM>m4</EM> you can do something like
this in your <CODE>stdlib.m4</CODE> file:
<P>
<BLOCKQUOTE><PRE><CODE>m4_define(`_EMAIL_ADDRESS', `MyName@foo.bar.com')</CODE></PRE></BLOCKQUOTE>
<P>
and then just put <CODE>_EMAIL_ADDRESS</CODE> in your
<EM>m4</EM> files.
<P>
A more substantial example comes from building strings up
with multiple components, any of which may change as the
page is developed. If, like me, you develop on one machine,
test out the page and then upload to another machine with a
totally different address then you could use the
<CODE>m4_ifdef</CODE> command in your <CODE>stdlib.m4</CODE> file (just
like the <CODE>#ifdef</CODE> command in <EM>cpp</EM>):
<P>
<BLOCKQUOTE><PRE><CODE>m4_define(`_LOCAL')
.
.
m4_define(`_HOMEPAGE',
m4_ifdef(`_LOCAL', `//127.0.0.1/~YourAccount',
`http://ISP.com/~YourAccount'))
m4_define(`_PLUG', `&lt;A REF="http://www.ssc.com/linux/">
&lt;IMG SRC="_HOMEPAGE/gif/powered.gif"
ALT="[Linux Information]"> &lt;/A>')</CODE></PRE></BLOCKQUOTE>
<P>
Note the careful use of quotes to prevent the variable
<CODE>_LOCAL</CODE> from being expanded. <CODE>_HOMEPAGE</CODE>
takes on different values according to whether the variable
<CODE>_LOCAL</CODE> is defined or not. This can then ripple
through the entire project as you <EM>make</EM> the pages.
<P>
In this example, <CODE>_PLUG</CODE> is a macro to advertise
<EM>Linux</EM>. When you are testing your pages, you use the
local version of <CODE>_HOMEPAGE</CODE>. When you are ready to
upload, you can remove or comment out the <CODE>_LOCAL</CODE>
definition like this:
<P>
<BLOCKQUOTE><PRE><CODE>m4_dnl m4_define(`_LOCAL')</CODE></PRE></BLOCKQUOTE>
<P>
... and then <EM>re-make</EM>.
<P>
<A HREF="#Contents">Contents</A>
<P>
<A NAME="3.3 Creating new text styles"><H2>3.3 Creating new text styles</H2></A>
Styles built into HTML include things like <CODE>&lt;EM></CODE> for emphasis and <CODE>&lt;CITE></CODE> for citations. With <EM>m4</EM> you can define your own, new styles like this:
<P>
<BLOCKQUOTE><PRE><CODE>m4_define(`_MYQUOTE',
&lt;BLOCKQUOTE>&lt;EM>$1&lt;/EM>&lt;/BLOCKQUOTE>)</CODE></PRE></BLOCKQUOTE>
<P>
If, later, you decide you prefer <CODE>&lt;STRONG></CODE> instead
of <CODE>&lt;EM></CODE> it is a simple matter to change the
definition and then every <CODE>_MYQUOTE</CODE> paragraph falls
into line with a quick <CODE>make</CODE>.
<P>
The classic guides to good HTML writing say things like "It
is strongly recommended that you employ the logical styles
such as <CODE>&lt;EM>...&lt;/EM></CODE> rather than the physical
styles such as <CODE>&lt;I>...&lt;/I></CODE> in your documents."
Curiously, the <EM>WYSIWYG</EM> editors for HTML generate purely
physical styles. Using these <EM>m4</EM> styles may be a good
way to keep on using logical styles.
<P>
<A HREF="#Contents">Contents</A>
<P>
<A NAME="3.4 Typing and mnemonic aids"><H2>3.4 Typing and mnemonic aids</H2></A>
<P>
I don't depend on <EM>WYSIWYG</EM> editing (having been brought
up on <EM>troff</EM>) but all the same I'm not averse to using
help where it's available. There is a choice (and maybe it's
a fine line) to be made between:
<P>
<BLOCKQUOTE><PRE><CODE>&lt;BLOCKQUOTE>&lt;PRE>&lt;CODE>Some code you want to display.
&lt;/CODE>&lt;/PRE>&lt;/BLOCKQUOTE></CODE></PRE></BLOCKQUOTE>
<P>
and:
<P>
<BLOCKQUOTE><PRE><CODE>_CODE(Some code you want to display.)</CODE></PRE></BLOCKQUOTE>
<P>
In this case, you would define <CODE>_CODE</CODE> like this:
<P>
<BLOCKQUOTE><PRE><CODE>m4_define(`_CODE',
&lt;BLOCKQUOTE>&lt;PRE>&lt;CODE>$1&lt;/CODE>&lt;/PRE>&lt;/BLOCKQUOTE>)</CODE></PRE></BLOCKQUOTE><P>
Which version you prefer is a matter of taste and convenience
although the <EM>m4</EM> macro certainly saves some typing and
ensures that HTML codes are not interleaved. Another example
I like to use (I can never remember the syntax for links) is:
<P>
<BLOCKQUOTE><PRE><CODE>m4_define(`_LINK', &lt;a href="$1">$2&lt;/a>)</CODE></PRE></BLOCKQUOTE>
<P>
Then, <P>
<CODE>&lt;a href="URL_TO_SOMEWHERE">Click here to get to SOMEWHERE &lt;/a></CODE> <P>
becomes: <P>
<CODE>_LINK(`URL_TO_SOMEWHERE', `Click here to get to SOMEWHERE')</CODE>
<P>
<A HREF="#Contents">Contents</A>
<P>
<A NAME="3.5 Automatic numbering"><H2>3.5 Automatic numbering</H2></A>
<P>
<EM>m4</EM> has a simple arithmetic facility with two operators
<CODE>m4_incr</CODE> and <CODE>m4_decr</CODE> which act as you might
expect - this can be used to create automatic numbering,
perhaps for headings, e.g.:
<BLOCKQUOTE><PRE><CODE>m4_define(_CARDINAL,0)
m4_define(_H, `m4_define(`_CARDINAL',
m4_incr(_CARDINAL))&lt;H2>_CARDINAL.0 $1&lt;/H2>')
_H(First Heading)
_H(Second Heading)</CODE></PRE></BLOCKQUOTE>
<P>
This produces:
<BLOCKQUOTE><PRE><CODE>&lt;H2>1.0 First Heading&lt;/H2>
&lt;H2>2.0 Second Heading&lt;/H2></CODE></PRE></BLOCKQUOTE>
<P>
<A HREF="#Contents">Contents</A>
<P>
<A NAME="3.6 Automatic date stamping"><H2>3.6 Automatic date stamping</H2></A>
For simple, datestamping of HTML pages I use the
<CODE>m4_esyscmd</CODE> command to maintain an automatic
timestamp on every page:
<P>
<BLOCKQUOTE><PRE><CODE>This page was updated on m4_esyscmd(date)</CODE></PRE></BLOCKQUOTE>
<P>
which produces:
<P>
This page was last updated on Fri May 9 10:35:03 HKT 1997
<P>
Of course, you could also use the date, revision and other
facilities of revision control systems like <EM>RCS</EM> or
<EM>SCCS</EM>, e.g. <CODE>$Date: 2002/10/09 22:24:22 $</CODE>.
<P>
<A HREF="#Contents">Contents</A>
<P>
<A NAME="3.7 Generating Tables of Contents"><H2>3.7 Generating Tables of Contents</H2></A>
<P>
Using <EM>m4</EM> allows you to define commonly repeated
phrases and use them consistently - I hate repeating myself
because I am lazy and because I make mistakes, so I find
this feature absolutely key.
<P>
A good example of the power of <EM>m4</EM> is in building a
table of contents in a big page (like this one). This
involves repeating the heading title in the table of
contents and then in the text itself. This is tedious and
error-prone especially when you change the titles. There are
specialised tools for generating tables of contents from
HTML pages but the simple facility provided by <EM>m4</EM> is
irresistable to me.
<P>
<A NAME="3.7.1 Simple to understand TOC"><H2>3.7.1 Simple to understand TOC</H2></A>
<P>
The following example is a fairly simple-minded Table of
Contents generator. First, create some useful macros in
<CODE>stdlib.m4</CODE>:
<P>
<BLOCKQUOTE><PRE><CODE>m4_define(`_LINK_TO_LABEL', &lt;A HREF="#$1">$1&lt;/A>)
m4_define(`_SECTION_HEADER', &lt;A NAME="$1">&lt;H2>$1&lt;/H2>&lt;/A>)</CODE></PRE></BLOCKQUOTE>
<P>
Then define all the section headings in a table at the
start of the page body:
<P>
<BLOCKQUOTE><PRE><CODE>m4_define(`_DIFFICULTIES', `The difficulties of HTML')
m4_define(`_USING_M4', `Using &lt;EM>m4&lt;/EM>')
m4_define(`_SHARING', `Sharing HTML Elements Across Several Pages')</CODE></PRE></BLOCKQUOTE>
<P>
Then build the table:
<P>
<BLOCKQUOTE><PRE><CODE>&lt;UL>&lt;P>
&lt;LI> _LINK_TO_LABEL(_DIFFICULTIES)
&lt;LI> _LINK_TO_LABEL(_USING_M4)
&lt;LI> _LINK_TO_LABEL(_SHARING)
&lt;UL></CODE></PRE></BLOCKQUOTE>
<P>
Finally, write the text:
<P>
<BLOCKQUOTE><PRE><CODE>.
.
_SECTION_HEADER(_DIFFICULTIES)
.
.</CODE></PRE></BLOCKQUOTE>
<P>
The advantages of this approach are that if you change
your headings you only need to change them in one place
and the table of contents is automatically regenerated;
also the links are guaranteed to work.
<P>
Hopefully, that simple version was fairly easy to understand.
<P>
<A HREF="#Contents">Contents</A>
<P>
<A NAME="3.7.2 Simple to use TOC"><H2>3.7.2 Simple to use TOC</H2></A>
<P>
The Table of Contents generator that I normally use is a bit
more complex and will require a little more study, but is
much easier to use. It not only builds the Table, but it
also automatically numbers the headings on the fly - up to 4
levels of numbering (e.g. section 3.2.1.3 - although this
can be easily extended). It is very simple to use as
follows:
<P>
<OL>
<LI>Where you want the table to appear, call <CODE>Start_TOC</CODE>
<LI>at every heading use <CODE>_H1(`Heading for level 1')</CODE> or <CODE>_H2(`Heading for level 2')</CODE> as appropriate.
<LI>After the very last HTML code (probably after &lt;/HTML>), call <CODE>End_TOC</CODE>
<LI> and that's all!
</OL>
<P>
The code for these macros is a little complex, so hold your breath:
<BLOCKQUOTE><PRE><CODE>m4_define(_Start_TOC,`&lt;UL>&lt;P>m4_divert(-1)
m4_define(`_H1_num',0)
m4_define(`_H2_num',0)
m4_define(`_H3_num',0)
m4_define(`_H4_num',0)
m4_divert(1)')
m4_define(_H1, `m4_divert(-1)
m4_define(`_H1_num',m4_incr(_H1_num))
m4_define(`_H2_num',0)
m4_define(`_H3_num',0)
m4_define(`_H4_num',0)
m4_define(`_TOC_label',`_H1_num. $1')
m4_divert(0)&lt;LI>&lt;A HREF="#_TOC_label">_TOC_label&lt;/A>
m4_divert(1)&lt;A NAME="_TOC_label">
&lt;H2>_TOC_label&lt;/H2>&lt;/A>')
.
.
[definitions for _H2, _H3 and _H4 are similar and are
in the downloadable version of stdlib.m4]
.
.
m4_define(_End_TOC,`m4_divert(0)&lt;/UL>&lt;P>')</CODE></PRE></BLOCKQUOTE>
<P>
One restriction is that you should not use diversions within
your text, unless you preserve the diversion to file 1 used
by this TOC generator.
<P>
<A HREF="#Contents">Contents</A>
<P>
<A NAME="3.8 Simple tables"><H2>3.8 Simple tables</H2></A>
<P>
Other than Tables of Contents, many browsers support tabular
information. Here are some funky macros as a short cut to
producing these tables. First, an example of their use:
<P>
<BLOCKQUOTE><PRE><CODE>&lt;CENTER>
_Start_Table(BORDER=5)
_Table_Hdr(,Apples, Oranges, Lemons)
_Table_Row(England,100,250,300)
_Table_Row(France,200,500,100)
_Table_Row(Germany,500,50,90)
_Table_Row(Spain,,23,2444)
_Table_Row(Denmark,,,20)
_End_Table
&lt;/CENTER></CODE></PRE></BLOCKQUOTE>
<P>
<CENTER>
<TABLE BORDER=5>
<tr><th></th><th>Apples</th><th>Oranges</th><th>Lemons</th></tr>
<tr><td>England</td><td>100</td><td>250</td><td>300</td></tr>
<tr><td>France</td><td>200</td><td>500</td><td>100</td></tr>
<tr><td>Germany</td><td>500</td><td>50</td><td>90</td></tr>
<tr><td>Spain</td><td></td><td>23</td><td>2444</td></tr>
<tr><td>Denmark</td><td></td><td></td><td>20</td></tr>
</TABLE>
</CENTER><P>
...and now the code. Note that this example utilises <EM>m4's</EM>
ability to recurse:
<BLOCKQUOTE><PRE><CODE>m4_dnl _Start_Table(Columns,TABLE parameters)
m4_dnl defaults are BORDER=1 CELLPADDING="1" CELLSPACING="1"
m4_dnl WIDTH="n" pixels or "n%" of screen width
m4_define(_Start_Table,`&lt;TABLE $1>')
m4_define(`_Table_Hdr_Item', `&lt;th>$1&lt;/th>
m4_ifelse($#,1,,`_Table_Hdr_Item(m4_shift($@))')')
m4_define(`_Table_Row_Item', `&lt;td>$1&lt;/td>
m4_ifelse($#,1,,`_Table_Row_Item(m4_shift($@))')')
m4_define(`_Table_Hdr',`&lt;tr>_Table_Hdr_Item($@)&lt;/tr>')
m4_define(`_Table_Row',`&lt;tr>_Table_Row_Item($@)&lt;/tr>')
m4_define(`_End_Table',&lt;/TABLE>)</CODE></PRE></BLOCKQUOTE>
<P>
<A HREF="#Contents">Contents</A>
<P>
<A NAME="4. <EM>m4</EM> gotchas"><H2>4. <EM>m4</EM> gotchas</H2></A>
<P>
Unfortunately, <EM>m4</EM> is not unremitting sweetness and
light - it needs some taming and a little time spent on
familiarisation will pay dividends. Definitive documentation
is available (for example in <EM>emacs' info</EM> documentation
system) but, without being a complete tutorial, here are a
few tips based on my fiddling about with the thing.
<P>
<A NAME="4.1 Gotcha 1 - quotes"><H2>4.1 Gotcha 1 - quotes</H2></A>
<P>
<EM>m4's</EM> quotation characters are the
<EM>grave</EM> accent ` which starts the quote, and the
<EM>acute</EM> accent ' which ends it. It may
help to put all arguments to macros in quotes, e.g.
<P>
<BLOCKQUOTE><PRE><CODE>_HEAD1(`This is a heading')</CODE></PRE></BLOCKQUOTE>
<P>
The main reason for this is in case there are commas in an
argument to a macro - <EM>m4</EM> uses commas to separate macro
parameters, e.g. <CODE>_CODE(foo, bar)</CODE> would print the
<CODE>foo</CODE> but not the <CODE>bar</CODE>. <CODE>_CODE(`foo,
bar')</CODE> works properly.
<P>
This becomes a little complicated when you nest macro
calls as in the <EM>m4</EM> source code for the examples in this
paper - but that is rather an extreme case and normally you
would not have to stoop to that level.
<P>
<A HREF="#Contents">Contents</A>
<P>
<A NAME="4.2 Gotcha 2 - Word swallowing"><H2>4.2 Gotcha 2 - Word swallowing</H2></A>
<P>
The worst problem with <EM>m4</EM> is that some versions of
it "swallow" key words that it recognises, such as
"include", "format", "divert", "file", "gnu", "line",
"regexp", "shift", "unix", "builtin" and "define". You
can protect these words by putting them in <EM>m4</EM> quotes,
for example:
<P>
<BLOCKQUOTE><PRE><CODE>Smart people `include' Linux in their list
of computer essentials.</CODE></PRE></BLOCKQUOTE>
<P>
The trouble is, this is a royal pain to do - and you're
likely to forget which words need protecting.
<P>
Another, safer way to protect keywords (my preference) is to
invoke <EM>m4</EM> with the <CODE>-P</CODE> or
<CODE>--prefix-builtins</CODE> option. Then, all builtin macro
names are modified so they all start with the prefix
<CODE>m4_</CODE> and ordinary words are left alone. For example,
using this option, one should write <CODE>m4_define</CODE> instead
of <CODE>define</CODE> (as shown in the examples in this
article).
<P>
The only trouble is that not all versions of
<EM>m4</EM> support this option - notably some PC versions under
M$-DOS. Maybe that's just another reason to steer clear of
hack code on M$-DOS and stay with <EM>Linux!</EM>
<P>
<A HREF="#Contents">Contents</A>
<P>
<A NAME="4.3 Gotcha 3 - Comments"><H2>4.3 Gotcha 3 - Comments</H2></A>
<P>
Comments in <EM>m4</EM> are introduced with the # character -
everything from the # to the end of the line is ignored by
<EM>m4</EM> and simply passed unchanged to the output. If you
want to use # in the HTML page then you would need to quote it
like this - `#'. Another option (my preference) is to
change the <EM>m4</EM> comment character to something exotic
like this: <CODE>m4_changecom(`[[[[')</CODE> and not have to
worry about `#' symbols in your text.
<P>
If you want to use comments in the <EM>m4</EM> file which do not
appear in the final HTML file, then the macro
<CODE>m4_dnl</CODE> (dnl = <STRONG>D</STRONG>elete to <STRONG>N</STRONG>ew <STRONG>L</STRONG>ine) is for you. This suppresses everything
until the next newline.
<P>
<BLOCKQUOTE><PRE><CODE>m4_define(_NEWMACRO, `foo bar') m4_dnl This is a comment</CODE></PRE></BLOCKQUOTE>
<P>
Yet another way to have source code ignored is the
<CODE>m4_divert</CODE> command. The main purpose of
<CODE>m4_divert</CODE> is to save text in a temporary buffer for
inclusion in the file later on - for example, in building a
table of contents or index. However, if you divert to "-1"
it just goes to limbo-land. This is useful for getting rid
of the whitespace generated by the <CODE>m4_define</CODE>
command, e.g.:
<P>
<BLOCKQUOTE><PRE><CODE>m4_divert(-1) diversion on
m4_define(this ...)
m4_define(that ...)
m4_divert diversion turned off</CODE></PRE></BLOCKQUOTE>
<P>
<A HREF="#Contents">Contents</A>
<P>
<A NAME="4.4 Gotcha 4 - Debugging"><H2>4.4 Gotcha 4 - Debugging</H2></A>
<P>
Another tip for when things go wrong is to increase the
amount of error diagnostics that <EM>m4</EM> emits. The
easiest way to do this is to add the following to your
<EM>m4</EM> file as debugging commands:
<P>
<BLOCKQUOTE><PRE><CODE>m4_debugmode(e)
m4_traceon
.
.
buggy lines
.
.
m4_traceoff</CODE></PRE></BLOCKQUOTE>
<P>
<P>
<A HREF="#Contents">Contents</A>
<P>
<A NAME="5. Conclusion"><H2>5. Conclusion</H2></A>
"ah ha!", I hear you say. "HTML 3.0 already has an include
statement". Yes it has, and it looks like this:
<P>
<BLOCKQUOTE><PRE><CODE>&lt;!--#include file="junk.html" --></CODE></PRE></BLOCKQUOTE>
<P>
The problem is that:
<UL>
<LI> The work of including and interpreting the
include is done on the server-side before downloading and
adds a big overhead as the server has to scan files for
`include' statements.
<LI> Consequently most servers (especially public ISP's) deactivate this feature.
<LI> `include' is all you get - no macro
substitution, no parameters to macros, no ifdef, etc, etc.
</UL>
<P>
There are several other features of <EM>m4</EM> that I have not
yet exploited in my HTML ramblings so far, such as regular
expressions and doubtless many others. It might be
interesting to create a "standard" <CODE>stdlib.m4</CODE> for
general use with nice macros for general text processing and
HTML functions. By all means download my version of
<CODE>stdlib.m4</CODE> as a base for your own hacking. I would be
interested in hearing of useful macros and if there is
enough interest, maybe a Mini-HOWTO could evolve from this
paper.
<P>
There are many additional advantages in using <EM>Linux</EM> to
develop HTML pages, far beyond the simple assistance given
by the typical <EM>Typing Aids</EM> and <EM>WYSIWYG</EM> tools.
<P>
Certainly, this little hacker will go on using <EM>m4</EM> until
HTML catches up - I will then do my last <EM>make</EM> and drop
back to using pure HTML.
<P>
I hope you enjoy these little tricks and encourage you to
contribute your own. Happy hacking!
<P>
<A NAME="6. Files to download"><H2>6. Files to download</H2></A>
You can get the HTML and the <EM>m4</EM> source code for this
article here (for the sake of completeness, they're
copylefted under GPL 2):
<P>
<BLOCKQUOTE><PRE><A HREF="http://home1.pacific.net.sg/~bhepple/using_m4/using_m4.html">using_m4.html</A> :this file
<A HREF="http://home1.pacific.net.sg/~bhepple/using_m4/using_m4.m4">using_m4.m4</A> :<EM>m4</EM> source
<A HREF="http://home1.pacific.net.sg/~bhepple/using_m4/stdlib.m4">stdlib.m4</A> :Include file
<A HREF="http://home1.pacific.net.sg/~bhepple/using_m4/makefile">makefile</A></PRE></BLOCKQUOTE>
<P>
<A HREF="#Contents">Contents</A>
<P>
<!--===================================================================-->
<P> <hr> <P>
<center><H5>Copyright &copy; 1997, Bob Hepple <BR>
Published in Issue 22 of the Linux Gazette, October 1997</H5></center>
<!--===================================================================-->
<P> <hr> <P>
<A HREF="./index.html"><IMG ALIGN=BOTTOM SRC="../gx/indexnew.gif"
ALT="[ TABLE OF CONTENTS ]"></A>
<A HREF="../index.html"><IMG ALIGN=BOTTOM SRC="../gx/homenew.gif"
ALT="[ FRONT PAGE ]"></A>
<A HREF="./notes-mode.html"><IMG SRC="../gx/back2.gif"
ALT=" Back "></A>
<A HREF="./conn.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>
<P> <hr> <P>
</BODY>
</HTML>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>Introduction to The Connecticut Free Unix Group</title>
</head>
<BODY BGCOLOR="#EEE1CC" TEXT="#000000" LINK="#0000FF" VLINK="#0020F0"
ALINK="#FF0000">
<H4>
&quot;Linux Gazette...<I>making Linux just a little more fun!</I>&quot;
</H4>
<P> <HR> <P>
<!--===================================================================-->
<h2 align="center">
An introduction to The Connecticut Free Unix Group
</h2>
<h4 align="center">by Lou Rinaldi
<a href="mailto:lou@cfug.org">lou@cfug.org</a>, CFUG Co-Founder
</h4><p><hr><p>
October of 1996 was when Nate Smith and I first began discussing the creation
of a local-area unix users' group here in Connecticut, something we felt the area
was desperately in need of. We bantered around some initial ideas; some great,
some not so great. Finally we decided on creating a group whose focus was on
the "free unix" community. CFUG, The Connecticut Free Unix Group, was born
in November of 1996. Both of us had very busy schedules, so all of the time we
were going to invest in this project came directly from our ever-decreasing
periods of leisure activity. We agreed upon three major goals for CFUG: The
first was the wide distribution and implementation of free, unix-like operating
systems and software. The second was educating the public about important
developments in the evolution of free operating systems. Finally, we strove to
provide an open, public forum for debate and discussion about issues related to
these topics. After writing to several major vendors and asking for donations of
their surplus stock and/or older software releases, the packages began rolling in.
(After all, we wanted to create some sort of incentive for people to come to the
first meeting)! We then got started doing some heavy advertising on the
newsgroups, in local computer stores and also on local college campuses.
Finally, after securing an honored guest speaker for our first meeting, (Lar
Kaufman, co-author of the seminal reference book "Running Linux"), we were
ready to set a date. December 9th, 1996 marked the first official CFUG
gathering, which took place at a local public library. We've held meetings on
the second Monday of each month ever since, and are now widely recognized as
Connecticut's only organization dedicated to the entire free unix community.
We've since lost Nate Smith to the lucrative wiles of Silicon Valley, but we
continue to carry on with our original goals. We have close relations with
companies such as Caldera Inc., InfoMagic Inc., and Red Hat Software, as well
as such non-commercial entities as The FreeBSD Project, Software In The
Public Interest (producers of Debian GNU/Linux), The OpenBSD Project and
The Free Software Foundation. We were also featured on the front page of
the Meriden Record-Journal, a major local newspaper, on May 26th of this
year. Our future plans include more guest speakers, as well as trips to
events of pertinence throughout New England.
<p>
For more information, please check our website -
<a href="http://www.cfug.org">http://www.cfug.org</a>
<p>
There is a one-way mailing list for announcements concerning CFUG.
You can sign up by emailing
<a href="mailto:cfug-announce-request@cfug.org">
cfug-announce-request@cfug.org</a> with
"subscribe" as the first line of the message body (without the quotes).
<!--===================================================================-->
<P> <hr> <P>
<center><H5>Copyright &copy; 1997, Lou Rinaldi<BR>
Published in Issue 22 of the Linux Gazette, October 1997</H5></center>
<!--===================================================================-->
<P> <hr> <P>
<A HREF="./index.html"><IMG ALIGN=BOTTOM SRC="../gx/indexnew.gif"
ALT="[ TABLE OF CONTENTS ]"></A>
<A HREF="../index.html"><IMG ALIGN=BOTTOM SRC="../gx/homenew.gif"
ALT="[ FRONT PAGE ]"></A>
<A HREF="./using_m4.html"><IMG SRC="../gx/back2.gif"
ALT=" Back "></A>
<A HREF="./haters.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>
<P> <hr> <P>
<H4>
&quot;Linux Gazette...<I>making Linux just a little more fun!</I>&quot;
</H4>
<P> <HR> <P>
<!--===================================================================-->
<h2 align="center">Review: The Unix-Hater's Handbook</h2><p>
<h4 align="center">by Andrew Kuchling
<a href="mailto:amk@magnet.com">amk@magnet.com</a></h4>
<P> <HR> <P>
I've written a review of an old (1994-vintage) book that may be of
interest to Linuxers. While even just its title will annoy people,
there actually is material of interest in the book to Linux developers
and proponents.
<p>
Andrew Kuchling<br>
amk@magnet.com<br>
<a href="http://starship.skyport.net/crew/amk/">
http://starship.skyport.net/crew/amk/</a><p>
<hr>
The UNIX-HATERS Handbook (1994)<br>
by Simson Garfinkel, Daniel Weise, and Steven Strassman.<br>
Foreword by Donald Norman<br>
Anti-Forward by Dennis Ritchie.<p>
Summary: A sometimes enraging book for a Linux fan, but there are
valuable insights lurking here.
<p>
In his Anti-Forward to this book, Dennis Ritchie writes "You claim to
seek progress, but you succeed mainly in whining." That's a pretty
accurate assessment of this book; it's one long complaint about work
lost due to crashes, time wasted finding workarounds for bugs, unclear
documentation, and obscure command-line arguments. Similar books
could be written about any operating system. Obviously, I don't
really agree with this book; I wouldn't be using Linux if I did.
However, there is informative material here for people interested in
Linux development, so it's worth some attention.
<p>
The book describes problems and annoyances with Unix; since it
was inspired by a famous mailing list called UNIX-HATERS, there are
lots of real-life horror stores, some hilarious and some wrenching.
The shortcomings described here obviously exist, but in quite a few
cases the problem has been fixed, or rendered irrelevant, by further
development. Two examples:
<p>
* On the Unix file system: "...since most disk drives can
transfer up to 64K bytes in a single burst, advanced file systems
store files in contiguous blocks so they can be read and written in a
single operation ... All of these features have been built and fielded
in commercially offered operating systems. Unix offers none of them."
But the ext2 file system, used on most Linux systems, does do this;
there's nothing preventing the implementation of better filesystems.
<p>
* "Unix offers no built-in system for automatically encrypting
files stored on the hard disk." (Do you know of any operating system
that has such capability out of the box? Can you imagine the
complaints from users who forget their passwords?) Anyway, software
has been written to do this, either as an encrypting NFS server (CFS)
or as a kernel module (the loopback device).
<p>
There are some conclusions that I draw from reading this book:
<p>
First, when the book was written in 1994, the free Unixes
weren't very well known, so the systems described are mostly
commercial ones. Proponents of free software should notice how many
of the problems stem from the proprietary nature of most Unix variants
at the time of writing. The authors point out various bugs and
missing features in shells and utilities, flaws which could be *fixed*
if the source code was available.
<p>
Better solutions sometimes didn't become popular, because they
were owned by companies with no interest in sharing the code. For
example, the book praises journalled file systems such as
the Veritas file system, because they provide faster operation, and are less likely to
lose data when the computer crashes. The authors write, "Will journaling
become prevalent in the Unix world at large? Probably not. After
all, it's nonstandard." More importantly, I think, the file system
was proprietary software, and companies tend to either keep the code
secret (to preserve their competitive advantage), or charge large fees
to license the code (to improve their balance sheets).
<p>
The chapter on the X Window System is devastating and
accurate; X really is an overcomplicated system, and its division
between client and server isn't always optimal. An interesting
solution is suggested; let programs extend the graphics server by
sending it code. This approach was used by Sun's NeWS system, which
used PostScript as the language. Unfortunately NeWS is now quite dead; it was a
proprietary system, after all, and was killed off by X, which was freely available from
MIT. (Trivia: NeWS was designed by James Gosling, who is now
well-known for designing Java. Sun seems determined not to make the
same mistake with Java... we hope.)
<p>
Second, many of the problems can be fixed by integrating
better tools into the system. The Unix 'find' command has various
problems which are described in chapter 8 of the book, and are pretty accurate,
though they seem to have been fixed in GNU find. Someone has also
written GNU locate, an easier way to find files. It runs a script
nightly to build a database of filenames, and the 'locate' command
searches through that database for matching files. You could make
this database more than just a list of filenames; add the file's size
and creation time, and you can do searches on those fields. One could
envision a daemon which kept the database instantly up to date with
kernel assistance. The source is available, so the idea only needs an
author to implement it...
<p>
Chapter 8 also points out that shell programming is complex
and limited; shell scripts depend on subprograms like 'ls' which
differ from system to system, making portability a problem, and the
quoting rules are elaborate and difficult to apply recursively. This
is true, and is probably why few really sizable shell scripts are
written today; instead, people use scripting language like Perl or
Python, which are more powerful and easier to use.
<p>
Most important for Linux partisans, though, it's very
important to note that not all of the flaws described have been fixed
in Linux yet! For example, most Linux distributions don't really
allow you to undelete files, though the Midnight Commander program
apparently supports undeletes. As the authors say, 'sendmail' really
is very buggy, and Unix's security model isn't very powerful. But
people are working on new programs that do sendmail's job, and they're
coding security features like the immutable attributes, and debating
new security schemes.
<p>
For this reason, the book is very valuable as a pointer to
things which still need fixing. I'd encourage Linux developers, or
people looking for a Linux project, to read this book. Your blood
pressure might soar as you read it, but look carefully at each
complaint and ask "Is this complaint really a problem? If yes, how
could it be fixed, and the system improved? Could I implement that
improvement?"
<!--===================================================================-->
<P> <hr> <P>
<center><H5>Copyright &copy; 1997, Andrew Kuchling <BR>
Published in Issue 22 of the Linux Gazette, October 1997</H5></center>
<!--===================================================================-->
<P> <hr> <P>
<A HREF="./index.html"><IMG ALIGN=BOTTOM SRC="../gx/indexnew.gif"
ALT="[ TABLE OF CONTENTS ]"></A>
<A HREF="../index.html"><IMG ALIGN=BOTTOM SRC="../gx/homenew.gif"
ALT="[ FRONT PAGE ]"></A>
<A HREF="./conn.html"><IMG SRC="../gx/back2.gif"
ALT=" Back "></A>
<A HREF="./lg_backpage22.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>
<P> <hr> <P>
<center>
<H1><IMG SRC="../gx/backpage.gif" alt="Linux Gazette Back Page"></H1>
<H5>Copyright &copy; 1997 Specialized Systems Consultants, Inc.<br>
For information regarding copying and distribution of this material see the
<A HREF="../copying.html">Copying License</A>.</H5>
</center>
<P> <hr> <P>
<H3>Contents:</H3>
<ul>
<li><a HREF="./lg_backpage22.html#authors">About This Month's Authors</a>
<li><a HREF="./lg_backpage22.html#notlinux">Not Linux</a>
</ul>
<a name="authors"></a>
<P> <HR> <P>
<!--======================================================================-->
<center><H3> About This Month's Authors </H3></center>
<P> <HR> <P>
<!--======================================================================-->
<P>
<H4><IMG ALIGN=BOTTOM ALT="" SRC="../gx/note.gif">Larry Ayers</H4>
Larry Ayers lives on a small farm
in northern Missouri, where he is currently engaged in building a
timber-frame house for his family. He operates a portable band-saw mill,
does general woodworking, plays the fiddle and searches for rare
prairie plants, as well as growing shiitake mushrooms. He is also
struggling with configuring a Usenet news server for his local ISP.
<P>
<H4><IMG ALIGN=BOTTOM ALT="" SRC="../gx/note.gif">Jim Dennis</H4>
Jim Dennis
is the proprietor of <A href="http://www.starshine.org">
Starshine Technical Services</A>.
His professional experience includes work in the technical
support, quality assurance, and information services (MIS)
departments of software companies like
<A href="http://www.quarterdeck.com"> Quarterdeck</A>,
<A href="http://www.symantec.com"> Symantec/
Peter Norton Group</A>, and
<A href="http://www.mcafee.com"> McAfee Associates</A> -- as well as
positions (field service rep) with smaller VAR's.
He's been using Linux since version 0.99p10 and is an active
participant on an ever-changing list of mailing lists and
newsgroups. He's just started collaborating on the 2nd Edition
for a book on Unix systems administration.
Jim is an avid science fiction fan -- and was
married at the World Science Fiction Convention in Anaheim.
<P>
<H4><IMG ALIGN=BOTTOM ALT="" SRC="../gx/note.gif">John M. Fisk</H4>
John Fisk is most noteworthy as the former editor of the <I>Linux Gazette</I>.
After three years as a General Surgery resident and
Research Fellow at the Vanderbilt University Medical Center,
John decided to &quot:hang up the stethoscope&quot:, and pursue a
career in Medical Information Management. He's currently a full
time student at the Middle Tennessee State University and hopes
to complete a graduate degree in Computer Science before
entering a Medical Informatics Fellowship. In his dwindling
free time he and his wife Faith enjoy hiking and camping in
Tennessee's beautiful Great Smoky Mountains. He has been an avid Linux fan,
since his first Slackware 2.0.0 installation a year and a half
ago.
<P>
<H4><IMG ALIGN=BOTTOM ALT="" SRC="../gx/note.gif">Michael J. Hammel</H4>
Michael J. Hammel,
is a transient software engineer with a background in
everything from data communications to GUI development to Interactive Cable
systems--all based in Unix. His interests outside of computers
include 5K/10K races, skiing, Thai food and gardening. He suggests if you
have any serious interest in finding out more about him, you visit his home
pages at http://www.csn.net/~mjhammel. You'll find out more
there than you really wanted to know.
<P>
<H4><IMG ALIGN=BOTTOM ALT="" SRC="../gx/note.gif"> Bob Hepple </H4>
<A HREF="mailto:bhepple@pacific.net.sg">Bob Hepple</A> has been hacking at Unix
since 1981
under a variety of excuses and has somehow been paid for it
at least some of the time. It's allowed him to pursue
another interest - living in warm, exotic countries
including Hong Kong, Australia, Qatar, Saudi Arabia, Lesotho
and (presently) Singapore. His initial aversion to the cold
was learned in the UK. Ambition - to stop working for the
credit card company and taxman and to get a real job - doing
this, of course!
<P>
<a name="notlinux"></a>
<P> <hr> <P>
<!--====================================================================-->
<center><H3> Not Linux </H3></center>
<P> <HR> <P>
<!--======================================================================-->
<P>
Thanks to everyone who contributed to this month's issue!
<p>
I'm very excited to edit the Linux Gazette for October.
<br>
At my last job, where I fixed computers for a big
company, I was talking with a woman about life in general
while fixing her computer, and suddenly she blurted:
"Oh my God! You're really a computer geek!"
She immediately apologized and explained that she didn't
mean any offense, even though I had a huge smile on my face
and was trying to explain that I appreciated the compliment.
<p>
After many experiences like that, working with
SSC has been a welcome change. And since Linux Gazette is one of
the places where geeks come home to roost, I'm happy to be a part of it.
<p>
I just came back from the <a href="http://www.systers.org/hopper">
Grace Hopper Celebration for Women in Computing</a>,
which was held in San Jose, California this year. To quote Bill and Ted,
it was totally awesome! I got to meet the illustrious Anita Borg, the
amazing Ruzena Bajcny, and the inspiring Fran Allen from IBM, as well
as many many many others who came from all over the country, and from dozens
of countries from around the world. It was the most incredible even that I have
ever attended, and I encourage everyone to go to the next one which
will be in the year 2000.
<p>
Margie Richardson will return next month as Editor-In-Chief, and I'll be helping out on the sidelines. I'm really glad that I got the chance to be the Big Cheese for a month. :) <br>
Keep sending those articles to <a href="mailto:gazette@ssc.com">gazette@ssc.com</a>!
<p>
Until next month, keep reading and keep hacking!
<P> <hr> <P>
Viktorie Navratilova<br>
Editor, <i>Linux Gazette</i> <A HREF="mailto:gazette@ssc.com">gazette@ssc.com</a>
<P> <HR> <P>
<!--====================================================================-->
<A HREF="./index.html"><IMG SRC="../gx/indexnew.gif" ALT="[ TABLE OF
CONTENTS ]"></A>
<A HREF="../index.html"><IMG SRC="../gx/homenew.gif" ALT="[ FRONT
PAGE ]"></A>
<A HREF="./haters.html"><IMG SRC="../gx/back2.gif" ALT=" Back "></A>
<p><hr><p>
<I>Linux Gazette</I> Issue 22, October 1997, http://www.ssc.com/lg/<BR>
This page written and maintained by the Editor of <I>Linux Gazette</I>,
<A HREF="mailto: gazette@ssc.com"> gazette@ssc.com</A>
<P>
</BODY>
</HTML>