Linux Gazette... making Linux just a little more fun!

Copyright © 1996-98 Specialized Systems Consultants, Inc.


Welcome to Linux Gazette!(tm)


Published by:

Linux Journal


Sponsored by:

InfoMagic

S.u.S.E.

Red Hat

LinuxMall

Linux Resources

Mozilla

Our sponsors make financial contributions toward the costs of publishing Linux Gazette. If you would like to become a sponsor of LG, e-mail us at sponsor@ssc.com.

Linux Gazette is a non-commercial, freely available publication and will remain that way. Show your support by using the products of our sponsors and publisher.



Table of Contents
June 1998 Issue #29


The Answer Guy

The Graphics Muse Will Return


TWDT 1 (text)
TWDT 2 (HTML)
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.


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


This page written and maintained by the Editor of Linux Gazette, gazette@ssc.com

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


 The Mailbag!

Write the Gazette at gazette@ssc.com

Contents:


Help Wanted -- Article Ideas


 Date: Wed, 13 May 1998 13:39:17 -0700
From: Michael Vanecek, webmaster@mjv.com
Subject: Blender

I'd be tickled pink if one of your writers/Linux gurus would take a peek at the new 3D development package called Blender and write about it. Info can be found at:

http://www.neogeo.nl/blender.html

It's still in beta, but appears to be a sharp product and will appeal to us graphic artists looking for new tools for Linux.

Thanks, Mike


 Date: Sun, 24 May 1998 16:35:41 -0600
From: Phil Reardon, pcr@pcrt.com
Subject: Article Ideas

I think a lot of people would be interested in an article on Linux related posters, which would have good eye appeal and provide a resource to the community for ordering these collectibles. Someone would have to locate all of them first, however.


 Date: Sat, 02 May 1998 15:48:04 -0700
From: "Joseph Mugerwa", joe.jtm@mailcity.com
Subject: Sound card with radio on it

I am intending to install Red Hat 5.0 to my 486: PC and my question is that I have a ISA sound card (SF16-FMI) with radio on it, it's 100% SB compatible,and has a IDE connection on it and it's not PnP will it be able to work and in particular the radio please help I enjoy listening to radio

Joseph


 Date: Mon, 04 May 1998 21:08:35 -0700
From: slappy, slappy@pcisys.ne
Subject: Best Linux Motherboard

Hi. I recently bought a Tyan Turbo AT S1571 motherboard to run my Red Hat Linux www server on. The keyboard freaks out when I attempt to install Linux. No BIOS update is available. Do you have any suggestions as to what motherboard/chip set combinations work well with Linux? I have searched and found only generic information, I'm looking for something a bit more specific. Intel, ABit, Asus, DFI, SuperMicro??? I'm planning on using a 233MHz MMX Pentium.

Slappy (slappy@pcisys.net)


 Date: Wed, 06 May 1998 12:49:23 +0800
From: Guan Yang, guan@wk.dk
Subject: Permissions problem

After I have tried the 'su' command, all permissions for user accounts seem to be gone (Slackware 3.4). When it try to login with a normal user account, if says that I don't have permission to execute /bin/bash. I have checked, and bash is world readable and world executable.


 Date: Wed, 13 May 1998 12:46:47 +0200 (MEST)
From: Thomas Hotz, bombur@uni-koblenz.de
Subject: Help wanted! - PS/2-Intellimouse

I have just bought a Microsoft Intellimouse, because I thought it was a good choice if you must use Windows and can use Linux. The Mouse is connected to the PS/2-Mouseport. Here is my problem: I want to use the wheel-button as the middle button in X, but in xf86config I only have the choice between IntelliMouse or PS/2Mouse, there is no combination of both. PS/2Mouse will enable the mouse, but the wheelbutton is not recognized, the other way the movements of the mouse are not correctly recognized, e.g. I cant move the pointer through the middle of the screen. Anybody got a solution for this?

Thomas Hotz


 Date: Mon, 11 May 1998 18:32:20 +0000 (UTC)
From: Christopher Butler, chrisb@sandy.force9.co.uk
Subject: Printer

I have here an Epson Stylus COLOR 400 printer, and I was wondering if I can get one of these beasts to print graphics in Linux (it only does text atm).

I've got Aladdin Ghostscript 3.33 (4/10/1995) currently installed, but setting that up was a mystery to me.

Pointers to HOWTOs would also be welcomed :-)

Chris Butler


 Date: Mon, 18 May 1998 12:12:16 -0400 (EDT) From: Randy Shaver, randy@gconn.net
Subject: BJ-200e

I am having a very difficult time setting up my Cannon BJ-200e, has anyone been able to configure Linux correctly to print from this?

Randy Shaver


 Date: Fri, 15 May 1998 17:42:00 +0000
From: Patrick Leung, wt.leung@student.unsw.edu.au
Subject: Compilation Error with Red Hat 5.0 on Cyrix CPU

I'm using a Cyrix 6x86 P150+ Machine with 80MB RAM. Everything when I compile stuff with the gcc compiler (2.7.2.3) that come with RH5.0, I get the error message like "cc1 internal error,signal 11". I know this is a bug with Cyrix CPU but does anyone know how to fix it? Please tell me.


 Date: Thu, 21 May 1998 19:06:55 +0100
From: Andrew Crook, Andrew@andycrook.demon.co.uk
Subject: X and list probs

I have noticed a real problem with X eg that the fonts listing in Netscape and MANY APPS the list goes off the screen and many can not be seen how can i stop this problem?


 Date: Wed, 27 May 1998 11:20:26 +0800
From: "Felix", felix@omen.com.au
Subject: definitions

Let me introduce myself, I am Felix. I am _totally_ new to not just Linux but computers in general. I have had a computer for the last ....two years, and in all that time was restricted to the limitations Windows puts on me. This is because , like many users, I started with the program that came with my setup. Windows is _great_ for someone who knows _nothing_ of computers. It is all point and click accessible. But like anyone who uses a computer for a while, I have come to realize that Windows is not the be all and end all of my possibilities. Now I want more. Since I got on the Net, I have realized this and found Linux. I am in the process of browsing Linux for a grounding in the unfamiliar world of Linux. It is ................most enlightening.

One 'problem' I have encountered is strong, complete definitions of terms. If I post a list of terms I have heard in the new groups and ask for explanations, I get many replies { the Linux community is amazingly tolerant of newbies, and help most unselfishly!} but the common thread running through them is that each explanation is slightly different to the next. While I realize that some of the answers I get are subject specific, some definitions seem to vary from application to application, even from distribution to distribution. Again, I realize that each distribution may focus on different capabilities of applications.

What I want to know is this: Is there a book, magazine, net site or whatever that lists in dictionary form properties and definitions of Linux?

Thank you, Felix

(Good books include Linux in a Nutshell from O'Reilly and Linux for Dummies Quick Reference from IDG. While it is not specifically for Linux, I find UNIX: The Open System's Dictionary from Resolution Business press quite useful. --Editor)


 Date: Wed, 27 May 1998 01:42:02 +0900
From: Maximo Ramos, ramos@nuri.net
Subject: Deception about Linux

I wonder why I find so often in many home pages about Linux that it will run fine in a 386 with 8 MB RAM, JA! Keep in mind that novice end users (like me) who are trying to escape from Windows 95 by trying something else, confuse Linux with the X Window System. Did you try to run Linux and XFree86 in such a machine? Tell people the truth! Is anyone using X Windows in a 14 inch monitor? It's ugly! Today I paid the bill to buy a 17 inch monitor, ouch!!!! Again, tell people the truth when you talk about hardware requirements to run Linux and X.

Of course, in some home pages they say that if you want to run the X Window System you need a "little bit" more hardware, but what is exactly "a little bit"? Come on!

Why am I writing this? Because I own a 486DX2 with 32MB of RAM, and I said myself : Hey, if Linux runs fine in a 386 with 8 MB of RAM, running Linux in my computer will feel like having a Pentium! But that is not the true. X works good but more slowly than Windows 95, even the Internet is slower, incredible!

So, I request one thing, tell the people (end users) on which hardware Linux will run fast (with X Windows included); in my case, I have to buy a new computer, at least a Pentium II 233 MHz. I thought MS Windows was the only OS hungry resource.

Well, one more thing, any tips to improve the speed of my Internet Connection?

What is the difference between having the PPP support as a module or included in the kernel? Which is more recommendable?

Anyone has successful installed ICQ for JAVA? When I download some libraries, which one should I choose? static or dynamic? How do I know what is the correspondent to my system? By the way, It is Red Hat Linux 5.0. My video card is Cirrus Logic clgd5426 with 1 MB.

Talking about e-mails, I heard about sendmail and so on, but I use Netscape for Linux to send and receive e-mails, Which one is better? Is sendmail only for servers?

Please, do I have to buy a new computer anyway?

cheers, Desperado


 Date: Thu, 14 May 1998 04:04:14 -0400 (EDT)
From: arunk@m-net.arbornet.org
Subject: Serial line overrun

When I'm downloading on one virtual console and doing something else on another (especially accessing the hard disk) I get the message 'cua1 1 input overrub(s). Why does this happen? What should I do to stop this? Please help me. Thanks.


 Date: Sun, 31 May 1998 21:28:53 +0100
From: Martin Cannell martin@cannell.prestel.co.uk
Subject: Linux

Hi, a great magazine.

A bit advanced for me though. Do you know where to get an idea about how to install Linux?

(Try the Linux Installation HOWTO by Eric Raymond: http://www.ssc.com/linux/LDP/HOWTO/Installation-HOWTO.html. In fact you might want to search around the LDP (Linux Documentation Project) for other things of interest to newbies. You might also want to check out some of the earlier issues of Linux Gazette and our semi-regular column "Clueless at the Prompt" by Mike List. --Editor)


General Mail


 Date: Thu, 30 Apr 1998 08:03:52 +0000
From: Chris Fischer, protek@brigadoon.com
Subject: BusLogic Support for Linux

This is just a little FYI for anyone interested in the web page for Linux BusLogic support.

http://www.dandelion.com/Linux/BusLogic.html

Chris


 Date: Fri, 01 May 1998 09:14:06 +0000
From: Lars Hamren, hamren@sdu.se
Subject: Web Speed

Your home page just took me 45 seconds to load, mainly due to the nice but far too large gifs. I think that the following holds:

Lars


 Date: Sun, 3 May 1998 12:02:54 -0400
From: "Tim Gray", timgray@lambdanet.com
Subject: Article on home networking.

There is one part of the home networking article I strongly disagree with.

"The software and hardware for networking can be expensive."

10baseT network cards sell for about $14.00USD that work well with Linux.. even less if you want the holy grail of a card with actual jumpers on it! A hub - 8 port will cost you a whole $60.00USD Buy the cheapest you can get your hands on... this will be plenty for a home network.

Now the software...... it comes with your Linux distribution, and win95 has it built in.... So my network at home...

4 PC's Win95, 2 servers, 1 router, Full-time Internet connection...... Less than $300.00 total to network it, including a 1000' spool of category 5 cable and a huge bag of connectors. and the wall plates were 1.95 each (Cat 3 I don't need 100baseT capability) Oh yes, one expensive part.. the connector crimper.... it cost 29.95USD one weekend of running wire and a week of fighting with windows and VOILA! home network!

Yes you can get more expensive stuff..... You can spend thousands on a hub.. or even more on a switch (A glorified hub) especially if you want that gleaming white box that says Cisco networking on it... but it wont work any better than the 60 dollar blue thing that has Chinese writing on it, not in a home environment. No networking your house is not expensive, it's dirt cheap!

BTW, my servers and router are all Linux machines that were built from "junk" computers that were given to me or found in a corporate garbage dumpster!


 Date: Wed, 13 May 1998 17:43:04 +0200 (CEST)
From: Rob van der Putten, rob@sput.sput.dsl.nl
Subject: Modeline for TV

Though I have been using Linux for since 1.2.8, I still discover something new every week or so. Yesterday I discovered the online version of the Linux Gazette and was pleasantly surprised to read the following:

I have shamelessly stolen this from USENET, because I feel this excellent information should appear within the Linux Gazette. I hope the original author don't mind. :-) From: Rob van der Putten
I don't mind at all. I just wanted to say that I wrote a html page about it: http://www.sput.dsl.nl/~rob/tv-x.html

Regards, Rob


 Date: Wed, 13 May 1998 02:05:22 +0800
From: "Kevin Ng", kng@HK.Super.NET
Subject: Swap problem solved! Thanks...

Dear Linux fans,
I'd like to say thanks to all who have responded and offered help to the swap problem. A number of you reminded me that I had to do a mkswap before I can enable the swap space with swapon.And now my system is running smoothly, with occasional swap. Once again thanks to you all. Linux peer support is excellent.

Kevin


 Date: Tue, 12 May 1998 00:37:34 -0500
From: Todd Myers, tmyers@autobahn.mb.ca
Subject: good article

I just read the article "Marketing Linux" by Jim Schweizer and agree with his points on this subject. Being involved with microcomputers for the last 12-14 years I've noticed that each successful platform has at least one 'killer app' that launched it onto people's desktops...VisiCalc -> AppleII, DTP -> Mac, Office Suites -> Windows.

It appears that Linux has ,at present, 2 killer apps to use for it's launch point...Apache and Samba. Since Linux is, at present, better poised in a server role, these 2 apps are beginning to gain Linux it's recognition. The only thing that will keep Linux off the desktop is the lack of a standard GUI. Though this will change as this is dissected and dealt with with the amazing collaboration efforts that I have witnessed with other Linux-related issues in the past 12 months.

Later, Todd


 Date: Thu, 28 May 1998 18:40:48 +0100 (WET DST)
From: 40334022 Dani Pardo Portas, dp4022@speedy.udg.es
Subject: Proprietary formats

I just can't stop being fascinated with Issue 18, The Answer Guy where the editor talks about proprietary formats. Even now, I often think about the issue of word processors and proprietary formats (BTW, I've started learning lout :).

And now that there is so much interesting talk about philosophy of computers and programming, I'd just like to point everyone interested to LG-issue 18:

http://www.linuxgazette.com/issue18/lg_answer18.html (users and mounted disks)


 Date: Mon, 04 May 1998 14:44:50 -0500
From: Clive Bittlestone, clyvb@asic.sc.ti.com
Subject: Linux in EDA - hot news topic

Just in case you had not already heard, Linux vs NT is a hot item in my area of the CAE/CAD industry. Integrated System Design magazine had a strawman poll last month, and based on the overwhelming response,is organizing a public forum during DAC-week [a big industry conference].

http://www.isdmag.com/linuxvsnt.html

From what I can tell, NT is being touted as the next OS on PC's [vs solaris/Ultrix/hp-os etc] Some engineers don't like that and there is some form of pushback.

There is quite a buzz amongst the Linux users I work with. We hope this will encourage CAD-Vendors to support Linux !!

These are my own opinions, and not those of Texas Instruments.

Regards, Clive Bittlestone


 Date: Sat, 09 May 1998 03:38:17 -0700
From: Jim Dennis, jimd@starshine.org
Subject: Open Letter Re: Linux on Dell Hardware

To: Mr. Michael Dell, CEO, Dell Computers cc: T.R. Reid Re: Linux on Dell Hardware

Dear Mr. Dell,

Please forward this to members of your marketing staff.

It is with great disappointment that I read comments by one of your representatives, a Mr. T. R. Reid to the effect that "none of Dell's customers" use Linux (*).

This is patently untrue. I have personally administered a number of Linux servers that were running on Dell Dimension desktops. I have also often recommended them to my clients, despite the fact that your company offers no option to unbundle software from the system (software which is utterly useless for my applications).

Obviously my advice was misguided. I clearly have failed in my duty, as a consumer, to provide you with proper feedback --- and this as resulted in a gross display of ignorance regarding the needs and preferences of your customers (at least the ones I represent).

Forthwith I'm retracting all recommendation of your products from all Starshine's customers where the intent is to use the system under Linux. I maintain a list of smaller hardware companies which do provide Linux, FreeBSD, and other alternatives to meet the needs of their customers.

I'll be recommending VAResearch, PromoX, Telenet, SWT, Apache Systems, Microway, and many others until you offer your customers a choice in the software that's bundled with your systems. I personally consider it a pity since your hardware has never required any special tweaks or considerations to run with any distribution of Linux or FreeBSD that I've ever installed on it.

This will be posted to a few Linux and FreeBSD venues as an open letter so that you can be provided with *honest* feedback from real customers. Hopefully with the co-operation from other interested parties we can overcome this regrettable failure in communication. You're comments have underscored the need for consumers every where to make their requirements and preferences known --- and we must no longer simply accept the "extra" and unwanted components that our vendors foist on us.

It is time to just say "No!" to software that we'll simply be replacing.

Thank you for your attention to this matter. My apologies for not providing this feedback sooner.

(*) The precise quote was:

"I haven't been able to find any examples of customers requesting Linux"

... and it can be read at:

http://www.zdnet.com/zdnn/content/inwo/0427/310649.html

--
Jim Dennis, consulting@starshine.org
Proprietor, Starshine Technical Services: http://www.starshine.org/


Published in Linux Gazette Issue 29, June 1998


[ TABLE OF 
CONTENTS ] [ FRONT 
PAGE ]  Next

This page written and maintained by the Editor of Linux Gazette, gazette@ssc.com
Copyright © 1998 Specialized Systems Consultants, Inc.


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


More 2¢ Tips!


Send Linux Tips and Tricks to gazette@ssc.com


Contents:


Linux kernel 2.1.102(3) error - patch!

Date: Sat, 23 May 1998 16:20:07 +0000
From: Yaroslav Rosomakho, alons55@dialup.ptt.ru

Hello. I have found that make menuconfig and lowlevel sound drivers won't work in 2.1.102 & 2.1.103 (latest kernels). I have written a patch:
http://yaroslav.hypermart.net/linux

tell people about it!

Yaroslav Rosomakho.


Tip for using Windows 95 buttons in X

Date: Wed, 29 Apr 1998 20:18:00 +0200 (MET DST)
From: Andreas Ehliar, tamyrlin@futurniture.se

I am sure that I am not the only one using a keyboard with Windows 95 buttons. Most people I know tend to ignore them, since they are not very useful in Windows 95, and even less so in Linux. But they are supported in the Linux kernel. That is, they do generate key codes which applications could use, if they only know what to look for.

So, how do I get X to use the offending buttons? In the following example, I will show how I configured X and fvwm2 to allow me to move a window by pressing the left Windows 95 button, and the left mouse button anywhere in the window. I can also resize the window by pressing the left Windows 95 button and the right mousebutton anywhere in the window. This greatly simplifies things for me, since I don't have to locate the titlebar, or a border of the window to move it. So, how did I accomplish this? First, I created a file named .Xmodmap in my home directory with the following two lines:

keycode 115 = Hyper_L
add mod4 = Hyper_L
This will map the left Windows 95 button to Hyper_L, and map Hyper_L to mod4.

I added the following line to .xsession to actually load the modified keymap:

 
xmodmap $HOME/.Xmodmap
Note that .xsession is usually executed if you use xdm to log on. If this is not the case, you need to find the relevant file on your computer system. Some likely candidates are .xinitrc, or .Xclients, however, YMMV.

To actually use mod4 I modified my .fvwm2rc by adding the following lines:

 
# I have bound my left win95 button to mod4, and by holding down it
# I can move and resize my window without bothering to find a border or
# titlebar
Mouse 1 W       4       Move
Mouse 3 W       4       Resize
What these lines does is to specify that if you press the left mouse button (1) in a window (W) while pressing mod4 (4) you will move the window. (Move) If you want to know more about these lines, you should study the fvwm2 man page.

So, read in your .Xmodmap, restart fvwm2, and enjoy the added functionality. Now all that is left is to replace that Windows logo with a penguin :)

Final notes:

* This is only an example, you will probably need to modify some paths to suit your system.

* It is also possible that you already have a button bound to mod4. In that case, you should probably think twice before binding another button to it.

* If you don't use fvwm2 as your window manager,you should read the documentation that comes with your window manager to figure out how to do the above mentioned configuration.

* If you want to bind the other two window 95 buttons, the scan codes for them are 116 respectively 117. This sort of information is by the way available using the xev program.

Andreas Ehliar


Re: Help Wanted (usershell on console without logging in)

Date: Thu, 30 Apr 1998 09:38:03 -0700
From: Rick Bronson, rick@efn.org

I've read, with interest, the good ideas people have submitted about setting up Linux to be more stand alone. I've worked on this issue on and off for some time now and would like to share my ideas.

I've often thought that there needs to be a Linux distribution that has an automatic startup as the default. One of the reasons that MSDOS (as bad as it was) was popular was because it wasn't burdened with "security" items like logging in. Most of us that use Linux at home don't need to waist time logging in every day. If we had a distribution of Linux that booted up into X we would have a lot more users.

My goals are as follows (all done automatically from power up):

1. From power up, automatically login.

2. Bring up X Windows.

3. If I haven't been connected to my ISP (via PPP) in the last 4 hours then connect.

3.1 Start up Netscape, get mail from my ISP (via cron), and check it every minute.

3.2 If I haven't read USENET news today then fire up newsreader and automatically to thru and apply kill files to all articles and leave newsreader just showing what's left.

3.3 (I admit, this one is weird) Telnet into my local library and check to see if I have overdue books.

For the purposes of this 2 cent tip, I'm going to cover #1 & #2. (NOTE: replace every occurrence of "username" with your real login name).

1. Add this to the bottom of your /etc/inittab (for Debian), unless you have an rc.local file

 
rc:12345:wait:/etc/init.d/rc.local
1a (if you don't have an rc.local file) Make an /etc/init.d/rc.local file with this in it:
 
#!/bin/bash
echo "Auto login of user username"
cd /home/username
su - username
Set permissions of rc.local to:
 
  -rwxr-xr-x   1 root     root           96 Jun 29  1997 rc.local
By doing:
 
chmod 755 rc.local
1b (if you have an rc.local file) Add this to the bottom of your rc.local
 
echo "Auto login of user username"
cd /home/username
su - username
2. Add the following to the bottom of your ~/.bash_profile:
 
if [ "`tty`" = "/dev/console"  -o "`tty`" = "/dev/tty0" ]
then
  startx
fi
That's it! This has been tested under Slackware (a long time ago) and under Debian, recently. Please give me any feedback.

Thanks, Rick Bronson


IBM Lan Adapter for Ethernet

Date: Fri, 01 May 1998 00:23:21 +0000
From: Brian Hall, brihall@pcisys.net

I believe this is the same card I have. I have two on my home LAN, one in my Linux box and the other in a Win95 box. In Linux, use the ne2000 compatible network driver, found under "Other ISA" network cards in the kernel configuration. To configure the card itself, you will need to run a DOS program. The setup program is contained in an archive called "ETILAN.EXE".


Easy Access to Removable Media

Date: Fri, 1 May 1998 10:30:52 +0100 (BST)
From: Karsten Ballueder, karsten@phy.hw.ac.uk

Here's a little tip that makes life much easier. I always found it annoying to manually mount and unmount floppies, CD-ROMs or my ZIP drive, so eventually I decided to use the amd automounter for that.

The configuration is somehow tricky, but once it's set up, it works like a charm.

For amd to work, you need to create a mountmap /etc/amd.direct= . Mine looks like this:

 
zip type:=3Dprogram;fs:=3D"/.amd/myhost/zip";mount:=3D"/bin/mount mount=
-tvfat -o user,rw,conv=3Dbinary,nosuid,uid=3D502,gid=3D100,umask=3D0000=
,quiet
/dev/sda4 ${fs} ";unmount:=3D"/bin/umount umount ${fs}"

cdrom type:=3Dprogram;fs:=3D"/.amd/myhost/cdrom";mount:=3D"/bin/mount m= ount -tiso9660 -o user,ro,conv=3Dbinary,nosuid,uid=3D502,gid=3D100,umask=3D0= 000 /dev/cdrom ${fs} ";unmount:=3D"/bin/umount umount ${fs}"
A type:=3Dprogram;fs:=3D"/.amd/myhost/A";mount:=3D"/bin/mount mount -tv= fat -o user,rw,conv=3Dbinary,nosuid,uid=3D502,gid=3D100,umask=3D0000,qu= iet /dev/fd0 ${fs} ";unmount:=3D"/bin/umount umount ${fs}"
Where you will need to replace "myhost" with your machine's hostname. Like this it will automount the ZIPdrive, a CD-ROM and the first floppy in a set of directories created under /.amd .

To start amd, you will usually use something like a script /sbin/init.d/amd, which should contain a line like:
/usr/sbin/amd -l syslog -c 30 -w 30 -x all -a /.amd -- /tmpmnt /etc/amd= .direct &=20

This will start amd and give it a 30 second timeout for unmounting directories. You also need to create a directory called /tmpmnt where you can access the devices. For easy access, I have create symbolic links /zip, /A and /cdrom pointing to /tmpmnt/zip, /tmpmnt/A and /tmpmnt/cdrom.

Now, when you try to access any of these directories, amd will automatically mount the device with the options specified in /etc/amd.direct. Once you no longer access it, it will get unmounted after 30 seconds.

Oh, if it doesn't unmount your device, you can use thefuser /dir command to check which of your processes uses it.

Karsten Ballueder


Re: bpp 16 Question

Date: Sun, 3 May 1998 14:07:55 +0200 (MET DST)
From: Roland Smith, rsmit06@ibm.net

To: Denny@ele.kth.se
You asked in the Linux Gazette #28:

Hi, I'm tired of starting my X-session with 'startx -- -bpp 16' to get 16 biplanes instead of the default 8. How do I get xdm to run with 16 bpp? If I use it now, it starts X with 8bpp on my Red Hat 5 installation.
Assuming you're using the XFree86 server:

Edit your XF86Config file.

Hope this helps.

Roland


Re: finite elements programs for Linux

Date: Sun, 3 May 1998 14:07:55 +0200 (MET DST)
From: Roland Smith, rsmit06@ibm.net

To: berntsen@bkm.dtu.dk
In response to your query in the Linux Gazette #28:

I started talking to the ones buying it and my arguments stopped, when they said that one reason for using NT was that they should be running finite elements programs on them and that the frontier for those programs was now on the Windows platform. I don't know anything about that, so I am looking for info; should I accept their arguments or is it that he just does not know what can be gotten for Linux? Commercial Finite Element Method (FEM) programs are also in the searchlight!
FEM has traditionally a UNIX domain. Most FE programs run on commercial unices. I only know of one free program for Linux: felt. You can find it at http://www-cse.ucsd.edu/users/atkinson/FElt/felt.html

Hope this helps.

Roland


Re: How to enable swapping

Date: Sun, 3 May 1998 13:51:21 +0200 (MET DST)
From: Roland Smith, rsmit06@ibm.net

To: kng@HK.Super.NET
In the Linux Gazette you wrote:

My machine, which is a Pentium Pro with 64MB memory, reports no swap space being used. In procinfo, it always report 0K swap space. I did a fdisk on /dev/hda and verified that a 64MB partition of type Linux swap (83) is actually there. So why is the swap never being used ?
Swapping needs to be started. This can be done with the `swapon' command.

Normally there should be something like `/sbin/swapon -a' in the system initialization scripts. On my Slackware system it is in /etc/rc.d/rc.S.

For this to work, you need to define the swap partition in /etc/fstab. Something like (on my box):

 
/dev/hda7    swap         swap    defaults   1   2
Hope this helps.

Regards, Roland Re: cd rom


Re: Slackware

Date: Sun, 3 May 1998 14:30:59 +0200 (MET DST)
From: Roland Smith, rsmit06@ibm.net
To: letromb@tin.it

In the Linux Gazette #28 you asked:

Hello.I have the Linux Slackware 2.0.30 Walnut Creek.I installed it on a Pentium 200 MMX with a 24x CD-ROM. During the installation I had to write "ramdisk hdd=cdrom" for reading the CD-ROM, but after the installation Linux doesn't see the CD-ROM. I have an atapi CD-ROM, and when I tried to compile my kernel another time, I saw that atapi is the default !!! So I don't understand where is the problem . What can I do ?
To use your CD-ROM, you must "mount" it, i.e. add it to your file-system.

You will have to make sure that the iso9660 filesystem is supported in the kernel.

Mounting is most conveniently done by first adding an entry into your /etc/fstab file like this:

 
/dev/hdb     /mnt/cdrom   iso9660 ro,user,noauto,unhide 1 2
(Assuming your CD-ROM player is /dev/hdb) Create the directory /mnt/cdrom before mounting the CD! Put a CD-ROM in the drive and issue the command `mount /mnt/cdrom' to mount the CD.

You will have to unmount the CD (`umount /mnt/cdrom') before you can open the drive!

Hope this helps.

Roland


May 2Cent Tips--about:mozilla

Date: Wed, 6 May 1998 10:28:44 -0700 (PDT)
From: David Mc Anulty, davemc@connectnet.com

The tip of going to about:mozilla is incorrect. You do not have to click on Netscape's logo to get the new animation. The act of visiting about:mozilla does this.

It lasts until Netscape is restarted. So if you like him, set about:mozilla as your home page.

Dave


Re: Rebooting without logging in as root, 2c tips

Date: Wed, 06 May 1998 09:25:13 +0200
From: Hartmut Niemann, niemann@cip.e-technik.uni-erlangen.de

An alternative I used once on a system that did *not* have enabled was to provide a special login that *just* did a shutdown. There is such a line in my /etc/passwd now that I didn't put there, so I guess it's from Red Hat two years ago.
I had this shutdown login too. Normally it needs rood rights, i.e. UID 0. But then I found out that su shutdown does not execute the login shell, i.e. the shutdown script. So everybody can become 'shutdown', which is basically 'root' with a different startup shell. Bad if this 'shell' doesn't get executed ...

For some time I have had 'shutdown' just SUID root, and now I'm back to Ctrl-Alt-Del performing a shutdown -h. (And then press Ctrl-Alt-Del again for a reboot.)

Hartmut.


Re: Running an ATAPI ZIP drive

Date: 05 May 1998 20:26:26 -0500
From: Omegaman, omegam@cmq.com

Steve Beach gives some interesting remarks and good advice for setting up an ATAPI ZIP drive. In it he says: First, the kernel:

Do _not_ use the "IDE FLOPPY" option (officially the name is CONFIG_BLK_DEV_IDEFLOPPY ). This will work perfectly for reading and writing, but it will not work for ejecting.
I recently bought a system with one of these units PRE-installed. I purchased a copy of Debian 1.3.1 on CD and was surprised to find "IDE Floppy" support compiled into the stock kernel. So, like Steve, I added necessary entries to my /etc/fstab to mount my ZIPs and away I went.

However, I do not have the problem he's had with ejecting my ZIP disks. On the front of my drive is a status light that also functions as the eject button. It works fine. I surmise that Steve's problem is that he has no such button and requires a software-only eject method.

One note of warning: I once ejected a standard floppy by pressing the drive's eject button when it was mounted causing a system panic and forced reboot. I don't know if the eject button on the ZIP is disabled in the same way as the eject button on a CDROM when it is mounted. I have no intention of finding out.

Omegaman


Re: enabling swap space

Date: Tue, 05 May 1998 04:44:22 -0300
From: Diego Rodrigo, d.rodrigo@iname.com

On issue # 28, Kevin Ng wrote :

My machine, which is a Pentium Pro with 64MB memory, reports no swap space being used. n procinfo, it always report 0K swap space. I did a fdisk on /dev/hda and verified that a 64MB partition of type Linux swap (83) is actually there. So why is the swap never being used ?
Tagging a partition with type 83 (Linux swap) is not enough. You kave to prepare it for swap with mkswap (see manual page) . Type:
 
        mkswap /dev/hdxx
where hdxx is your swap partition. After that, you have to append a line in /etc/fstab saying this:
 
        /dev/hdxx       none            swap
where /dev/hdxx is your swap partition, none is the mount point, and swap is the type of file system.

With these changes, the next time you reboot, your swap space will be added to your system. The command that actually adds your swap space to the system is swapon (see man page, section 8), which is called from an init script at boot time. OK, I agree, Linux shouldn't be rebooted, (only when recompiling the kernel), so you can just type:

 
        swapon -a
and you'll have your swap space.

Diego Rodrigo - ARGENTINA


Re: problems using menus in X

Date: Thu, 7 May 1998 11:45:01 -0500 (CDT) From: Michael Hammel, mjhammel@graphics-muse.org

To: eijck@iri.tudelft.nl

I'm having a problem with my menus in X. I can access all menus (by mouse), but the items of those menus which are WITHIN a "X-box" are not selectable, somehow. The menus I'm talking about are menus like the 'vt fonts', 'main options' and 'vt options' in the Xterm. Or the 'file' and 'page' menu of Ghostscript. If anyone has a suggestion on why I can select the menu but not menu item, please send me a mail. I'm using Debian 1.3.
Check your NumLock key. It should probably be turned off for applications written in strict Xlib or Athena widgets, which appears to be the case with the applications you mention. Its not a strict rule, but many people had problems with my XPostitPlus program, caused by the use of the number keypad with applications like XCalc.

Michael J. Hammel, The Graphics Muse


Music Typesetters

Date: Tue, 12 May 1998 12:13:50 -0400 (EDT)
From: Robert Tennent, rdt@qucis.queensu.ca

Although I appreciated Bob van der Poel's review of MUP in LG28, there are some good free music notation systems that weren't even mentioned. First, a very good site to check out is the Lilypond home page at

http://www.cs.ruu.nl/people/hanwen/lilypond/out-www/index.html

This describes Lilypond (which is still under development) but also has links to many other music packages.

One of these, musixtex, is IMHO the best free system available. It certainly isn't beta, but it is being extended and improved constantly. The input language is plain TeX, but there are some good pre-processors available (PMX, MPP, M-Tx, SceX, ABC2MTeX). The output quality is professional. Several arrangements I've set using musixtex have been published directly from my postscript files. Check out

http://www.gmd.de/Misc/Music

for links, downloads, documentation, examples, etc.

Bob Tennent


BASH hostname completion: comment on tip in May '98 issue

Date: Tue, 12 May 1998 08:58:18 -0500
From: Justin Dossey, dossey@ou.edu

The script John Taylor sent had a nice idea to it, but I must admit I didn't read it; Bash completes host names by a builtin function.

Just as you would use to complete a filename, you can use ESC, @ to complete a hostname (if it is in /etc/hosts) and CTRL-X, @ to list all possible hostname completions based on /etc/hosts.


Re: xdm and depth

Date: Tue, 12 May 1998 11:32:26 +0100 (IST)
From: Caolan McNamara, Caolan.McNamara@ul.ie

From: Denny Åberg, Denny@ele.kth.se
Hi, I'm tired of starting my X-session with 'startx -- -bpp 16' to get 16 biplanes instead of the default 8. How do I get xdm to run with 16 bpp? If I use it now, it starts X with 8bpp on my Red Hat 5 installation.
under redhat in the file /etc/X11/xdm/Xservers

there's a line

 
:0 local /usr/X11R6/bin/X
change this to
 
:0 local /usr/X11R6/bin/X -bpp 16D
and ta-da, thats it.

Caolan McNamara


Re: Shutdown and Root

Date: Mon, 11 May 1998 13:42:44 +0200
From: Aaron Digulla, digulla@wi-pc44.fh-konstanz.de

Another note to the 2cents Tip "Re: Shutdown and Root":

I have a shutdown user, too, and this is what he looks like:

In /etc/passwd:

 
    shutdown:x:6:0:shutdown:/home/shutdown:/bin/sh
You'll probably have to adjust the user-id (here: 6).

Then you create a home-dir which just contains this script as .profile:

 
------------------------ .profile ---------------------------------------
#!/bin/sh
trap "" SIGKILL SIGINT SIGQUIT

PATH=/bin

# List all users which are still logged on
/usr/bin/finger

echo
echo "Really shut down (y/N) ?"

read answer

# Every answer except "y" is no
if [ "x$answer" != xy ]; then
	answer=n
fi

if [ $answer = y ]; then
	echo 'The system will now shut down. You can turn the power'
	echo 'off when the message "System halted" appears'
	/bin/sleep 5
	./halt
else
	echo 'Abgebrochen...'
	/bin/sleep 1
fi
------------------------ .profile ---------------------------------------
Now just copy /sbin/halt to /home/shutdown/ and make it executable for this user (chown shutdown halt and chmod 700 halt).

Aaron "Optimizer" Digulla


Printing with Linux

Date: Sat, 09 May 1998 18:50:06 +1000
From: Mitch Davis, mjd@alphalink.com.au To: AFAIZ@cstp.umkc.edu

I've just bought a HP DeskJet 722C printer, but I couldn't get it to work. I asked around and everyone has answered that Linux does not support it - is it a Windows-only printer? If so, is it possible to write a driver for it? or does anyone know of where I can get my hands on the driver (if it's already been written, of course).
In an effort to reduce the production cost of their low-end printers, HP has removed as much of the electronics from the printer as possible, and put the burden of turning commands into dots on the printer driver in the computer. Somewhat euphuistically, this is called the Printing Performance Architecture, a kind of less-is-more concept which I'm sure is big in the HP marketing Dept.

All is not lost however. There's a guy who reverse-engineered the protocol, and has written a driver. You can find his page here:

http://www.rpi.edu/~normat/technical/ppa/

(I have not tried it, nor have I corresponded with him).

I hope this helps you.

Mitch.
(I don't work for HP. Well Ok, I do, but further away from the bit that makes printers than you'd ever believe. I speak as an outsider)


RE: finite elements programs for Linux

Date: Fri, 22 May 1998 09:39:29 -0700
From: "James Gilb (p27451)", p27451@email.sps.mot.com
To: berntsen@bkm.dtu.dk

At the department where I am sitting they are planning to buy a PC-bar, and they intend to put NT on the machines. I would benefit from them putting Linux on them, since I could then use them for simulations overnight. ... I don't know anything about that, so I am looking for info; should I accept their arguments or is it that he just does not know what can be gotten for Linux? Commercial Finite Element Method (FEM) programs are also in the searchlight!
There a some really neat FEM codes out there that are free or semi-free. Check out the Scientific Applications for Linux (SAL) page, sponsored by Kachina Tech at http:// SAL.KachinaTech.COM/

Next, go to the INTERNET FINITE ELEMENT RESOURCES page at:

http://www.engr.usask.ca/~macphed/finite/fe_resources/

and check out the section on Public Domain FE Programs (I think FElt is way cool). Also, there may be some commercial vendors that support Linux as well, you should probably ask your vendors. I found Northwest Numerics and Modeling on the above page which sells a product called Zebulon on Linux. Also, some related software is also available on Linux, e.g. PV-WAVE (graphics), MATLAB, Mathematica, Maple.

Finally, do a search of Linux and FEM software on your favorite search engine. (linux + FEM + software gave me 1085 hits on www.hotbot.com).

As a postscript, the future of FEM doesn't depend on the OS it is used on. The real work is done in numerical code that never touches the OS, indeed an OS call in the middle of the deepest loops would cause a severe slowdown of the program. Some of the interfaces that you use for input, pre-processing and post-processing may be moving to NT, but there are still substantial packages available on the big iron. In any event, the current IA32 line from Intel is not a leader in double-precision floating point work, the current crop of workstations will blow it away in most floating point benchmarks. This is improving with the emphasis on multi-media, but the new chips will be very expensive within the near term (USD $2000-$4000 until at least 2000).

If you have any more questions, please email me.

James Gilb, p27451@email.mot.com


RE: How to enable swapping

Date: Thu, 21 May 1998 15:49:17 -0700
From: "James Gilb (p27451)", p27451@email.sps.mot.com
To: kng@HK.Super.NET, gazette@ssc.com

My machine, which is a Pentium Pro with 64MB memory, reports no swap space being used. In procinfo, it always report 0K swap space. I did a fdisk on /dev/hda and verified that a 64MB partition of type Linux swap (83) is actually there. So why is the swap never being used ?
First, make sure the partition has been turned into a swap partition by doing an mkswap on it. Then just do swapon /dev/hda? where ? is the partition number of the swap partition. Now, if you put an entry for the swap partition in /etc/fstab and run swapon -a in your boot scripts (pretty early on), then swap will be automagically enabled whenever you boot.

James Gilb


Cuckoo Clock

Date: Sun, 24 May 1998 23:48:02 +0200
From: Jjacobsen, jacobsen@biosys.net

My wife's grandpa has a pretty switzer-cuckoo-clock (kuckucksuhr..). Well, I love to hear the little bird singing every hour. That's why I wrote this little script...

 
#!/bin/sh
#cockoo.sh
time=`date +%I`
count=0
until [ "$count" -eq "$time" ]
  do
   play /usr/share/sounds/au/cuckoo.au
   count=$[$count+1]
  done
Then, I edited the crontab file using crontab -e:
 
00 * * * * /bin/cuckoo.sh
and well, it's really funny... Using my script and cron, your Linux box will become a great switzer-kuckucks-uhr ;)

Joerg Jacobsen, Schweinfurt, Germany


Published in Linux Gazette Issue 29, June 1998


[ TABLE OF 
CONTENTS ] [ FRONT PAGE ]  Back  Next


This page maintained by the Editor of Linux Gazette, gazette@ssc.com
Copyright © 1998 Specialized Systems Consultants, Inc.

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


News Bytes

Contents:


News in General


 June Linux Journal

The July issue of Linux Journal will be hitting the newsstands June 5. The focus of this issue is Science and Engineering with articles on using Linux at CERN, the NIST Neutron Lab and the British Antarctic Society. Also, an introduction to Samba and a look at two programming languages: Yorick and ICON. Check out the Table of Contents. To subscribe to Linux Journal, click here.


 Corel & Open Source

Corel and Corel Computer Corporation have announced their official position on Linux and Open Source Software. At the Ottawa Carleton Linux Users Group meeting, Corel announced that they will port all of their commercial applications to Linux, including a $99 version of Corel Word Perfect Suite 8. Corel Computer will open the source code for the development of their NetWinder NC.

For more information:
http://www.corelcomputer.com/
http://www.corel.com/


 Linus Torvalds & Richard Stallman at the USENIX Conference, June 1998

Date: Thu, 7 May 1998 10:53:17 -0700 (PDT)
Linus Torvalds, developer of Linux, and Richard Stallman, founder of the GNU project, will participate in the USENIX Annual Technical Conference, June 15-19, 1998, at the Marriott Hotel in New Orleans.

This year the conference includes a special track showcasing the latest developments and interesting applications in FreeBSD, GNU, Linux, NetBSD, OpenBSD, Samba, and more. FREENIX offers 28 talks, plus evening BoF sessions. Share ideas and actual code with developers and avid users of freely redistributable software.

Full program and on-line registration:
http://www.usenix.org/events/no98/

For more information: Jackson Dodd, jackson@usenix.ORG
USENIX, the Advanced Computing Systems Association


 O'Reilly's Perl Conference 2.0

Date: Fri, 22 May 1998 09:47:48 -0700 (PDT)
O'Reilly & Associates is presenting the Perl Conference 2.0 from August 17-20, 1998 at The Fairmont Hotel in San Jose, California. Perl Conference 2.0 features two days of intensive tutorial sessions followed by a two-day conference led by key Perl developers. Full program and registration information is at:

http://conference.perl.com

For more information:
Ellen Elias, elias@ora.com
O'Reilly & Associates


 Linux Penguins Stickers

Date: Sat, 23 May 1998 01:06:25 +0300 (EEST)
Linux Penguin Sticker Movement announces printed Linux Penguin Stickers

In cooperation with the Linux Penguin Sticker movement http://www.jyu.fi/~juhtolv/linux-sticker/ Linux Mall has agreed to make available professionally designed and printed Penguin Stickers for all who do not wish to print their own.

For more information:
http://www.LinuxMall.com/PP.html


 Announcement and Call for Papers, 7th International Python Conference

Date: Thu, 28 May 1998 18:29:07 -0400 (EDT)

7th International Python Conference
South Shore Harbour Resort
Houston, Texas
November 10-13, 1998

For more information, visit the conference Web page at:

http://www.foretec.com/python/workshops/1998-11/

 
IMPORTANT DATES:
June 29: email intent to submit paper 
July 27: deadline for papers and tutorials 
Aug. 31: notification of acceptance for papers 
Sep. 28: deadline for final versions of full papers 

For more information about submitting a tutorial: http://www.foretec.com/python/workshops/1998-11/cft.html

Jeremy Hylton, CNRI, jeremy@cnri.reston.va.us
Program Chair, 7th International Python Conference


 Linux Links

Project MUSCLE: http://www.linuxnet.com/smartcard/index.html

"Introduction to Linux" class: http://www.learningtree.com/us/courses/330.htm#top

Linux Applications: http://www.linuxapps.com/

Linux Advocacy: http://www.netnomics.com/linux/

New Linux Help Page: http://www.admin.burned.org/

Linux Links: http://www.linuxlinks.com/

The Linux PenguinPlay Project: http://sunsite.auc.dk/penguinplay/

ECLiPt Project: http://eclipt.uni-klu.ac.at/

Linux Discussion Board: http://paradigm.uor.edu/linux/wishlist/bulletinboard.html

Free Linux Support: http://support.marko.net/

Current ports of Linux OS: http://www.ctv.es/USERS/xose/linux/linux_ports.html

Linux Books: http://www.technologybooks.com/linux.htm

Linux on-line bookstore: http://www.dragonfire.net/~garym/linux.html


 Project Independence: Linux for the Masses

Date: Tue, 12 May 1998 08:16:43 GMT

A system accessible only to a minority will remain a minority OS. Project Independence believes that this is not an acceptable fate for Linux. Project Independence aims to make Linux accessible to people with little computing experience.

A Call For Action:

 
*	If you want to make Linux usable 
*	If you favour a pragmatic approach 
*	If you believe in the bazaar model 
*	If you are unhappy when you are unable to recommend Linux to
	friends and relatives, 
*	If you want to act upon it
Go straight to: http://independence.dunadan.com/

For more information:
Jean Francois Martinez, jfm2@club-internet.fr Linux Application Development Book Date: Tue, 12 May 1998 08:27:42 GMT

New book available from Linux Central: Linux Application Development By Michael K. Johnson and Erik W. Troan from Addison Wesley Publishing.

Linux Application Development helps C programmers write applications that run on Linux.

For more information:
sales@linuxcentral.com


Software Announcements


 Stalker Software Announces CommuniGate Pro Server 2.0 Beta

Date: May 15th, 1998
CommuniGate Pro 2.0 beta is the platform-independent Internet messaging server. The new generation of the CommuniGate integrated messaging system unifies the performance of multi-threaded operating systems, the standards-compliance of the Internet applications, and flexibility of the modular CommuniGate System, initially designed for MacOS.

The new version of the CommuniGate Pro is based on the Stalker Foundation framework and can run under all major operating systems. The first released versions can run on the Linux operating system among others.

The CommuniGate Pro server can be configured, controlled, and monitored from any computer connected to the Internet using any Web browser application. The administrators can monitor the Server status, create, update and modify user accounts, delete and redirect messages in the queues, update the communication modules settings, and configure the full-featured CommuniGate Router.

SMTP component of the CommuniGate Pro server incorporates all the anti- spamming features implemented in the other Stalker mail servers, including centralized DNS-based blacklisting (RBL).

The CommuniGate Pro server is scheduled for the commercial release in July'98. The beta versions of the CommuniGate Pro Server are available now, free of charge. They can be downloaded either from the Stalker sites:

http://www.stalker.com/CommuniGatePro/
ftp://www.stalker.com//pub/CommuniGatePro/

For more information:
Ali Liptrot, ali@stalker.com, http://www.stalker.com/


 LPEvol, A Java Application

Date: Wed, 20 May 1998 14:25:25 +0200 This is a first (beta) release of LPEvol, a Java application which allows you to interactiveley breed LSystems objects and view the results graphically. LSystems are (recursive) mathematical models that can be used to describe growth patters modelling the shapes we see around us every day, like trees, flowers and many others. LPEvol is an application which uses LParser and PovRay to generate and draw these LSystems. You as the user then have the choice to select the LSystems you like and then breed them (doing a crossover, using theGenetic Algortihm) to produce a next generation (the children ) which will have been derived from the formulas ( genes ) describing the parents.

LPEvol requires:

 
- JDK 1.1.x
- lparser (default works; a modified lparser.c is shipped with LPEvol)
- PovRay 3
- cjpeg
- see the README file for other (hardware/memory) requirements.
LPEvol 0.50 is available from:
ftp://sunsite.unc.edu/pub/Linux/science/biology/ http://www.peoplesoft.com/peoplepages/g/robert_gasch/src/src.htm For more information:
Robert Gasch, Robert_Gasch@peoplesoft.com


 RED HAT LINUX 5.1

Date: May 26, 1998
Red Hat Software, Inc. announced the June 1 release of Red Hat Linux 5.1, a powerful update that includes enhanced installation features, as well as system configuring, web caching, window management features and an added value CD of applications for Linux.

For more information:
http://www.redhat.com/


 Webmin version 0.51 - WWW-based configuration software

Date: Mon, 4 May 1998 07:50:19 GMT
Webmin version 0.51 is now available for download from

http://www.webmin.com/webmin/

This version allows the simple, browser-based configuration of Unix services such as

 
 - Apache (version 1.1, 1.2 and 1.3)
 - Samba
 - Crontab
 - NFS exports
 - BIND
 - Inetd
 - SYSV init scripts
 - Local/remote mounts and /etc/fstab
 - Users and groups
 - Disk partitions
 - Running processes
 - Disk quotas
 - Software packages
 - PPP accounts
Webmin runs on Solaris 2.5 & 2.6, Redhat Linux 4 & 5, Slackware Linux 3, Debian 1.3 and SUSE 5.1.

For more information:
Jamie Cameron, jcameron@webmin.com


 banal 0.05 (bookkeeping software) released

Date: Thu, 7 May 1998 12:50:51 GMT
TITLE INFORMATION: BANAL 0.05 - or BANAL's Absolutely Not A Ledger AUTHOR INFORMATION: Matthew Rice - Matthew.Rice@ftlsol.com AFFILIATION INFORMATION: FTL Solutions Inc. DATE INFORMATION: May 1998

BANAL is a bookkeeping system that allows you to track invoices, clients, projects, TODOs, bank accounts and expenses. BANAL is a client/server application so you can keep one set of books one your system while allowing everyone access.

If you want to obtain BANAL and try it out, ftp to: ftp://sunsite.unc.edu/pub/Linux/apps/financial/accounting.

and look for a file banal-X.YY.tar.gz, with X.YY being a version number (0.00 is of course the first). Unpack it in a "sources" directory and start reading the document in the "doc" subdirectory.

FTL Solutions Inc. holds the copyright (I am doing it under their time), however, it is very unrestricted (read: do what you want but don't think of suing them). There is a more detailed COPYRIGHT file included with the distribution.

For more information:
Matthew Rice Matthew.Rice@ftlsol.com


 satlas-0.95 (solar atlas) released

Date: Mon, 4 May 1998 07:17:18 GMT
I am announcing a first public release of satlas!

Satlas is an electronic atlas of the solar sprectrum and targeted primaraly for astronomers who do a lot of spectral analysis work. It is based on Gtk+ and MySQL. MySQL is used to store, manage and provide a quick access to the data, while Gtk+ is provides GUI.

http://www.physics.unc.edu/~serge/satlas/

Satlas is distributed under GNU Public License.

For more information:
Sergei Naumov, serge@astro.unc.edu


 ECLiPt Mirror 2.0b1 (former SimpleMirror)

Date: Mon, 4 May 1998 07:34:37 GMT
I've just released a new version of ECLiPt-Mirror (it's original name has been SimpleMirror). The new release includes

- - HTML-Logs, including the possibilty to directly download from this 
  page
- - automatic creating of index-files as an overview over all mirrors
- - download just the most recent version of some files (e.g. the linux
  kernel)
- - bug fixes :-)
- - new bugs :-(
Have a look at http://eclipt.uni-klu.ac.at (and then the mirror section) for a example usage. You can download it from the same page (under the projects section).

For more information:
Martin Preishuber, Martin.Preishuber@stuco.uni-klu.ac.at


 Whisper 0.1 - Internet Telephone Application

Date: Thu, 7 May 1998 12:32:21 GMT

I announce the availability of Whisper -- Internet Phone. You can use it to talk to other people on the Internet. It uses gsm compression and should be suitable for low speed networks (19.200 bps and up)

I uploaded the sources to /incoming/Linux on sunsite. Hopefully they will appear in /pub/Linux/apps/sound/talk. Sources (and a binary version) are also available at:

http://www.itp.uni-hannover.de/~roeden/whisper.html

Copying-policy: GPL

For more information:
Claus Roedenbeck, roeden@itp.uni-hannover.de


 JCam 0.3 - Java-based software for Digital Cameras

Date: Tue, 12 May 1998 08:05:54 GMT
JCam - a single software program for (almost) all OSes and (almost) all Digital Still Cameras ...

Release 0.3 of JCam, available from http://www.jcam.com introduces support for cameras from Fuji and Olympus ... this adds to existing support for cameras from Epsom, Casio, Kodak ... and a neater user interface with "LEDs" ... ;-)

For more details about supported cameras, etc, please E-Mail to info@jcam.com or visit the Web Page at "www.jcam.com" ... For more information:
info@jcam.com, http://www.jcam.com/


 gax 1.0 - galaxy DB utility for astronomy

Date: Tue, 12 May 1998 08:14:06 GMT
Announcing the first release of Gax, a program for amateur astronomy.

Gax can create searchable databases of galaxy information that can then be searched based on user selectable ranges for fields in the database.

The information contained in or derived from the database includes:

 
	RA
	Declination
	Major/Minor Diameter
	Position Angle
	Magnitude
	Surface Brightness
	Constellation
	Uranometria 2000 Map number
	Local Transit Time
Report formatting is also under complete user control providing the ability to tailor the report output to your specific needs.

Temporarily at: http://sunsite.unc.edu/pub/Linux/Incoming/

Permanite site: http://sunsite.unc.edu/pub/Linux/science/astronomy/

Files: 1664Kb gax-1.0.tar.gz, 1Kb gax.lsm

Copying-policy: GPL

For more information:
Mark Anderson, manders1@csc.com


 SampLin, new scientific data acquisition software

Date: Tue, 12 May 1998 08:15:10 GMT
Few days ago I released first public version of scientific data acquisition software 'SampLin' which can be found at http://www.troja.mff.cuni.cz/~kvasnica/samplin.html.

Currently is implemented support for serial, gpib devices and arbitrary labcards with drivers, basic-like script language and simple plot widget. Software supports data acquisition over TCP/IP network via RPC protocol from remote servers. Requirements: X11R6, Qt, KDE libs, GPIB lib

*** I'M LOOKING FOR NEW PROGRAMMERS TO CONTINUE THIS PROJECT ***

For more information:
Samuel Kvasnica, kvasnica@iaee.tuwien.ac.at


 SCNN3.3 cellular neural network simulator

Date: Tue, 12 May 1998 08:33:00 GMT
The new version of our simulation system for cellular neural networks (CNN) is now available from our home page
http://apx00.physik.uni-frankfurt.de/e_ag_rt/cnn/SCNN/

It is a zero price product, available for Intel x86 (Linux), IBM RS 6000 (AIX4), SGI Indigo (Irix 6.2), HP (HP Unix) and DEC Alpha (Ultrix). It is planned to add versions for other Unix operating systems on request. For more information take a look at our homepage.

For more information:
SCNN Team, Roland Kunz, kunz@apx12.physik.uni-frankfurt.de


 Sox 12.14 - Universal Sound Processing Tool

Date: Fri, 15 May 1998 07:40:31 GMT
The latest patchlevel of Sox is now available. Sox is intended to be the Swiss Army knife of sound processing tools. Its allows a user to convert sounds files between any supported format including CD Audio, .au, .voc, .wav and several others. Latest versions also include support for playing the sound file to either Linux's /dev/dsp or a Sun /dev/audio.

It can be downloaded from the following sites:

http://home.sprynet.com/sprynet/cbagwell/projects.html
http://sunsite.unc.edu/pub/Linux/apps/sound/convert/sox-12.14.tar.gz

For more information:
Chris Bagwell, cbagwell@fujitsu-fnc.com


 Linux Point Of Sale

Date: Mon, 18 May 1998 11:16:14 GMT
LinuxPOS Version 1.0 Released for Beta Testing

Linux Canada Inc. wishes to announce that the beta version of LinuxPOS 1.0 is now available for evaluation. LinuxPOS is an exciting new point of sale application written in Tcl/Tk. If you require the power,stability and connectivity of Linux, the graphical user interface inherent in Tck/Tk, a dynamite point of sale application and full source code for peace of mind and/or personal customizations --- then LinuxPOS is for you.

For more information:
Philip Tonellier, phil@linuxcanada.com, http://www.linuxcanada.com/


 SHAREWARE: QuoteGrabber-1.0 Real-time stock quotes.

Date: Tue, 26 May 1998 12:47:06 GMT
The QuoteGrabber, 1.0.0 is a universal stock market client.

A stock market tracker and portfolio manager written in Java and developed under Linux, the QuoteGrabber provides real-time and delayed quotes, news and charts. Fully customizable, it is a versatile tool:

- - trading: real-time quotes for www.datek.com clients and registered
  users;
- - charting: intra-day, 3 month, 1 year, 2 years, 5 years;
- - news: breaking company news as they arrive;
- - portfolio management: enter all transactions, track portfolio
  performance;
- - alerts: based on a combination of four criteria;
- - international stocks: US, Canada, France, UK, Germany, Italy (delayed
  15-20 minutes);
The QuoteGrabber is distributed as 30-day trial shareware with a personal license price of $25.

For more information:
Louis-David Mitterrand, mito@aparima.com, http://www.aparima.com/quote/


 Fortify now on Linux_glibc2: 128-bit Netscape crypto

Date: Tue, 26 May 1998 13:01:39 GMT
Sydney, Australia. (23 May, 1998). By popular demand, Fortify for Netscape has now been extended to support the Linux_glibc2 editions of the Netscape web browsers (Communicator and Navigator v4.05).

This functionality is available immediately, as part of the Fortify-1.2.3-unix distribution. You can download this from the Fortify web site, at http://www.fortify.net/

In a second addition to the Fortify service, the Fortify-announce mailing list is now on-line, and open to anyone who wishes to receive news and announcements via e-mail regarding the Fortify project. You can subscribe to the mailing list here: http://www.fortify.net/feedback.html

Farrell McKay, fbm@jolt.mpx.com.au


 Organic molecule drawing program

Date: Tue, 26 May 1998 13:30:46 GMT
I have written a program to draw organic molecules easily under X. You can store the picture as bitmapfile. It is compiled with the Athena Widget Set and is also compartible to UNIX.

You can download the sourcecode at:

http://www.uni-ulm.de/~s_tvolk/chemtool.html

copyright is GPL

For more information:
Thomas Volk, thomas.volk@student.uni-ulm.de, http://www.uni-ulm.de/~s_tvolk/


 Toshiba Linux Utilities

Date: Tue, 26 May 1998 13:43:46 GMT
The Toshiba Linux Utilities are a series of three programs that I have written to replace Toshiba supplied MS-DOS or Microsoft Windows programs for controlling Toshiba laptops, with Linux versions. Full details and source code can be found at

http://www2.prestel.co.uk/hex/toshiba.html

FAN: A update to my fan program that uses a completely new version of turning the fan on/off. If you have tried a 1.x version of the program and it did not work on your laptop try this version. This version is known to work on the new Satellite Pro models (440x, 460x, 480x), and may work on others that the previous version did not. I am particularly keen to hear from owners of Tecra's.

SVPW: A direct replacement for the svpw.exe program found on the Companion diskette, for the setting/removal of supervisor passwords, and changing whether setup can be run in user mode. Known to work on a Satellite Pro 400x, 430x, and 440x. I am keen to know if it works on other models.

To anyone reading this, svpw does not, and cannot be made to remove passwords unless you already know the password. This is not a limitation impossed by me. I don't know how to *crack* the passwords on Toshiba laptops and have no interest in doing so. I will not answer any emails relating to this.

HOTKEY: This is not exactly a replacement for a Toshiba program, but provides the same functionality as MaxTime(tm) does under Microsoft Windows, under X11 when the power-up or battery save mode is changed with the Fn+F2, Fn+F3 key combinations. Namely a small window pops up in the centre of the screen with some icons to let you know what you are doing. It is know to work on a Satellite Pro 400x, 430x, Portage 610x, and Tecra 740x

For more information:
Jonathan A. Buzzard, jab@hex.prestel.co.uk


 GNU Midnight Commander 4.1.35 file manager

Date: Tue, 26 May 1998 14:11:12 GMT
The Midnight Commander team has just released version 4.1.35 of the GNU Midnight Commander. For more information on the Midnight Commander, please consult
http://www.gnome.org/mc

This program is available now in:

ftp://ftp.nuclecu.unam.mx/linux/local/mc-4.1.35.tar.gz

For more information:
Miguel de Icaza, miguel@nuclecu.unam.mx


Published in Linux Gazette Issue 29, June 1998


[ TABLE OF 
CONTENTS ] [ FRONT 
PAGE ]  Back  Next


This page written and maintained by the Editor of Linux Gazette, gazette@ssc.com
Copyright © 1998 Specialized Systems Consultants, Inc.

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


(?) The Answer Guy (!)


By James T. Dennis, answerguy@ssc.com
Starshine Technical Services, http://www.starshine.org/


Contents:

(!)Greetings from Jim Dennis

(?)Version-a-go-go and the Tragedy of being "Left Behind"
(?)Removing Lilo from a multi-boot machine
(?)Question on sendmail... --or--
'sendmail' FEATURE creatures for virtual domain and generic re-write tables
(?)Kernel crashes
(?)Winmodems --or--
More on 'WinModems': How to "lose" Gracefully - Just say No!
(?)Mail on a LAN Linux to NT --or--
Basic e-mail Setup for Linux?
(?)Remote Tape Backups
(?)adduser
(?)Letter to Dell - Linux on Dell Hardware
(?)Hello --or--
Connecting a Dumb Terminal to your Linux System
(?)Why Linux?
(?)Redhat telnet
(?)Network Cards
(?)A little note about "good times" or emailed viruses --or--
"Good Times" are Spread to the "Great Unwashed"
(?)The Answer Guy --or--
Regarding the Column's New Look
(?)TACACS+ client for Linux --or--
TACACS and RADIUS Authentication Models for Linux and/or PAM
(?)Sendmail jam --or--
'sendmail' Log Jams and Capacity Problems: running extra 'sendmail -q' processes
(?)PPP connection and diald --or--
Co-ordinating diald and Manual PPP
(?)getting ppp-2.3.3 to work
(?)Mail access --or--
Getting at MS-Mail from within Linux: The Myriad Ways to Co-exist with MS Windows
(?)Program for Mailer Daemons --or--
Automated Handling for MAILER-DAEMON Messages: Read The Sources, Luke.


Linux Gazette: The Answer Guy for June, 1998

The theme for this month seems to be "vendor support for Linux." From the responses to my open letter to Dell, through the common problems with "winmodems" and "winprinters" and even to the impossible dream of running MS Windows applications and accessing Microsoft proprietary formats from native Linux applications --- we continue to fight uphill battles with so many vendors.

This isn't new in the broader Unix world. Readers of A Quarter Century of Unix by Peter H. Salus should recognize this as a as an attitude that has dominated hardware vendors for almost thirty years. They've been prdicting the "death" of Unix (and the "death of the Internet) almost since from the beginning.

There is some hope on the horizon. As some of you may have heard or read Corel Computer (the hardware division of the famous software company) is basing it's NC (network computer) on a Strong-ARM version of Linux. Within a week or two after that Corel Software announced their intention of porting the rest of the applications suite to Linux (their WordPerfect 7 and 8 have been available in Linux versions for some time).

A little further afield it appears that Apple Inc is starthing to make some sense with their future OS strategy --- by "thinking different", or "outside of the box" in a manner of speaking. Specifically they've apparently decided to skip the planned version of Rhapsody with its "blue" and "yellow" boxes that separated the MacOS and the Mach/NeXTStep (Unix) personalities. Apparently buried in their announcement for MacOS X ("ten") is the i rumor that your "NeXT" (Rhapsody) native applications will co-exist on the same desktop with yor MacOS programs --- and that the MacOS API's will be seamlessly supported with all the multi-threaded support that the Mach microkernel can provide. Of course you have to hear that as rumors, or read between the lines with a considerable background in the Macintosh architecture since it is not apparent from their own press releases, or from the San Jose Mercury News articles on the subject. The San Francisco Examiner sings a similarly hollow tune. However, I'm not alone in my opinion as we see in David K. Every's article.

I suspect he knows way more than I do on the subject.

Oddly the MacOS Rumors web site seems to have no mention MacOS X on their site.

What does this have to do with Linux? Well, I can only continue to speculate that mkLinux binaries will eventually run under MacOS X (Rhapsody). I can also still hope that, with the progress in the G3's, and the plans for the G4 generations of the PowerPC platform, and hopefully the continued availability development of the DEC (Compaq) Alpha processor, we'll see some real choices and competition in the market place. Linux is the one OS that crosses all of these (and Sun SPARC's and SGI MIPS and others). Some form of Unix is available on just about every platform, whether or not it supports Linux.

As we look beyond the world of PC clones we see that there is some vendor support. There is some hope that Microsoft's legacy will be the separation of hardware vendors from their "control" hegemony. Before Microsoft it was the norm for computer manufacturers to almost completely control the availability of software for their platforms --- Unix has undermined that control for over two decades. The popular backlash from Microsoft's own unique form of control --- over the collective Wintel platform --- may finally completely sever the puppet's strings. The trickles of vendor support that you're seeing now is largely a survival strategy. So not only will these vendors give up the efforts to control their customer's range of software choices, they'll be glad they did it, considering the alternative.


Jim Dennis


Copyright © 1998, James T. Dennis
Published in Linux Gazette Issue 29 June 1998


[ Table Of Contents ] [ Front Page ] [ Back ] [ Next ]

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


GUI building using the Java 1.1 AWT

Java Linux Audio CD Player--Part 2

By Michael Hamilton


Contents:


In my previous article I described a simple CD player that can be extended to create a GUI player such as Jcd, a freeware player I've made available on the Web, see http://www.actrix.gen.nz/users/michael/giveaways.html

In this article I will describe how to extend the Drive object so that it can carry out programmed play (play a list of tracks) and shuffle play (play every track once in a random order). The structure of the new player is described by the class diagram in the following figure. Rather than starting with the low level components, I thought it would be more interesting to start with a description of the GUI interface. For the moment just assume that there is a new SmartDrive version of Drive that includes all the old functionality, plus monitoring of the Drive state and the ability to accept and modify a list of tracks to be played. I'll introduce the use of the new functionality as we proceed.

In my previous article I described a Java class, called ``Drive'', that provides the following CD player functionality:

Drive Object:
	Informational methods: 
		currentTrack, currentIndex, numberOfTracks,
		currentAddress,
		cdEndAddress, trackAddress, trackLength

Control methods:
	play, stop, pause, resume, eject, setVolume
In this article I will describe how to extend the Drive object so that it can carry out programmed play (play a list of tracks) and shuffle play (play every track once in a random order). But rather than start with the low level components, I thought it would be more interesting to start with a description of the GUI interface. For the moment just assume that there is a new SmartDrive version of Drive that includes all the old functionality, plus monitoring of the Drive state and the ability to accept and modify a list of tracks to be played. I'll introduce the use of the new functionality as we proceed.

Since writing my previous article, the Java Development Kit 1.1 has been ported to Linux. This code in this article will use features of the AWT from JDK 1.1. The article was originally written using the JDK 1.0.1, and the original JDK 1.0.1 code is included in the tar available at SSC's Linux Journal ftp site.


The Player Class


The new CD player I'm going to describe is called Player and is run from the command line by entering:

setenv SBPCD 1 # if you have an old SoundBlaster connected drive
java Jcd.Player
Running the application creates the GUI interface in Figure 1 and Figure 2.

The source code for the Player class is presented in Listing 1. The Player class has a static main() method on line 30, which is where program execution will begin. On line 32 the main() method creates an instance of the player class:

Player player = new Player(); 
On lines 38 to 43, the Player's class constructor sets up the SmartDrive object that communicates with the CD player. The name of the device to open (/dev/cdrom) and the location of the native module (Jcd_Drive.so) is hard coded into the Player's constructor. The native module implements the kernel interface to the CDROM drive. In a real production version of the system, these parameters would be read from a configuration file or deduced by interrogating the operating environment.

As previously stated SmartDrive is an extended version of the hardware interface class described in my first article--it has been enhanced to support programmed play, and to provide notification events concerning the CD players status. On line 56, the Player's constructor starts the SmartDrive's monitor. The monitor will begin delivering CD player events to any object that has registered for them.

Figure 1. GUI Components

I'll now go back over Player and look at some of the code involved in the GUI. On lines 45 to 54 of Listing 1. the Player's constructor creates the GUI components seen in Figure 1: a menu-bar; a display area for track info; and a control area of push-button CD player controls.


The Form Panel


The AWT GUI toolkit provides components such as text-labels, text-entry fields, menus, and buttons. Components are placed into containers to build windows and pabels. The AWT's top level component container is the Frame class. A Frame constructs a separate free-standing window. Like other GUI toolkits, the AWT provides the programmer with sub-container classes that can be used to control component placement by subdividing a window into smaller areas. The AWT's major sub-container is the Panel class. The AWT provides further control over placement by allowing the programmer to configure a Frame or Panel's layout policy. For example, the standard AWT FlowLayout just places components left to right, top to bottom. A Frame or Panel's layout can be assigned from the layouts provided by the AWT or you can write your own.

On line 10 of Listing 1, the Player class is declared to extend the Form class. The source code for Form is presented in Listing 2. Form is a class I've created that extends the normal top level AWT Frame class. Player is a Form, a Form is a Frame, a Frame creates a free-standing window, so Player creates a free-standing window. The Form class uses the AWT GridBagLayout manager. The GridBagLayout manager is the AWT's most flexible layout manager. It has a wide variety of options for the spacing, and placement of objects with a Frame or Panel. GridBagLayout's flexibility makes it complex to deal with. Form simplifies dealing with the GridBagLayout by providing an addCenter() method. On lines 23 to 32 of Listing 2, the addCenter() method controls placement by placing the object at the next available row and making it consume the entire row:

c.gridx = 0;
...
c.gridwidth = GridBagConstraints.REMAINDER;
It sets fill to NONE. It sets the inset space around the component to 1. The end effect is that the Form sub-class will place objects top to button, one object per row, each consuming the space it needs plus a little surrounding space.


The Menu Bar


Returning to the Player class. On lines 46 and 47 of Listing 1, the Player's constructor sets up the windows menu bar:

setMenuBar(new MenuBar());
getMenuBar().add(createFileMenu()); 
The actual drop-down menu is created by the createFileMenu() method on Lines 70 to 78 of Listing 1. It creates the player's file-menu, and adds individual menu items to it. Lines 76 and 77 of createFileMenu() setup the event handling for the menu:
fileProgramItem.addActionListener(this);
fileExitItem.addActionListener(this); 
These two lines set up the Player object (this) to handle the ActionEvents from the file-menu's fileProgramItem and fileExitItem. These events are generated when the user selects a menu item. In order to be able to handle these events the Player class must implement the ActionListener interface--it is declared as such on Listing 1 line 10:
public class Player extends Form implements ActionListener
What's going on here? Player inherits from--``extends''--Form, but what does ``implements ActionLister'' mean? Player can only inherit data and method definitions from a single parent--Java doesn't support multiple inheritance--an object can only ``extend'' one parent class. However, to provide some of the functionality of multiple inheritance, Java provides the ``implements/interface'' mechanism. In other languages multiple inheritance has to deal with the issue of what to do when a class inherits two more implementations of the same data-structure or method from two different parents. For example, say both parents have an add() method, which one should be used in the sub-class? Java's limited multiple inheritance mechanism, the ``interface'', doesn't support the inheritance of implementation. Except for class-wide constants, interface definitions must be completely abstract. An interface definition, such as ActionListener, cannot provide an implementation of any of the methods it declares. Any class wishing to ``implement'' an interface must provide its own code to implement all the methods in the interface. A class can implement any number of interfaces--a class could implement both ActionListener and MouseListener and handle both kinds of events. By not providing an implementation, interfaces leave conflict resolution in the hands of the programmer designing the implementation.

Listener interfaces such as ActionListener, MouseListener, and others, were newly introduced in JDK 1.1. The new JDK 1.1 AWT Event model uses the Java interface mechanism to provide a more flexible event handling mechanism that the earlier version of the JDK. There are separate interfaces for different kinds of events such as the mouse or the keyboard. Multiple objects can register for the same events and they will all receive them.

In order to implement the ActionListener interface, the Player class has to have an actionPerformed() method--the method is defined on on Lines 59 to 68. The Player will be passed menu events via a call to the actionPerformed() method. The actionPerformed() method checks which component was the source of the event and invokes an appropriate code fragment: at lines 62 to 65, the Player's actionPerformed method checks if the source of the event was the fileProgramItem--if it was, and there isn't an existing program showing, a new one is created. At line 66, if the source of the event was fileExitItem the program is terminated.


AWT Adapters


In some cases the interface necessary to handle an AWT event is quite complex. To save the programmer the work of having to completely define all of an AWT event interface, the AWT includes pre-written Adapter classes that provide default implementations for the more complex event interfaces. For example the MouseListener interface has a corresponding MouseAdapter class that provides a default implementation. These pre-canned AWT Adapter classes can be sub-classed to selectively override any of their methods.

The Player class makes use of an Adapter class to handle close requests from the window manager. Close requests are usually the result of the user double clicking the close button on window's title bar. On line 52 of Listing 1, the Player registers a WindowListener:

addWindowListener(new DoClose());
The WindowListener interface has several methods and I only want to override one of them--the windowClosing() method. Unfortunately the Player class can't inherit from the default WindowAdaptor class because the Player class already inherits from the Form class. The solution I've applied in this case is to use another new feature of the JDK 1.1. JDK 1.1 adds Inner Classes to the Java language--this means I can declare a class within a class:
public class Player extends Form implements ActionListener {
...
addWindowListener(new DoClose());
...
private class DoClose extends WindowAdapter {
public void windowClosing(WindowEvent e) {
System.exit(0);
}
}
...
}
The Player uses addWindowListener() to register a new instance of its own inner DoClose class. Because DoClose is an Inner Class of Player it has access to Player's data and methods and can therefore be more closely integrated into Player than a separately declared class. In other languages it's quite common to solve situations such as this by passing pointers to methods, functions, or code-fragments--but in Java only objects can be passed, so Inner Classes were provided as one solution.


The Main Button Controls


Turning now to the remainder of the Player GUI interface: the Controls and Display classes. I'll describe the Controls class first because it's the simplest. Controls is a panel of buttons which you can see on the bottom of Figure 1. Listing 3 shows the source code for the Controls class. Since it is intended to be a sub-panel of Player it inherits from Panel:

class Controls extends Panel implements ActionListener
The Controls class also needs to take action when the buttons are pressed, so it also implements the ActionLister interface.

Lines 17 to 22 of Listing 3 declares the set of buttons. The button declarations also specify how to initialize the buttons when a Controls object is created. On lines 26 to 32, the Controls constructor adds each of the buttons to the Panel. The simple GridLayout manager, not to be confused with the more complex GridBagLayout manager, is used to control component placement within the Panel. GridLayout places components left to right, top to bottom, in equal sized cells in the grid specified:

setLayout(new GridLayout(1, 6, 2, 2)); 
In this case the grid is 1 row by 6 columns--a column for each button. The last two arguments specify a horizontal and vertical gap between grid cells of 2.

The Controls add() method, on lines 31 to 34, overrides the add() method inherited from the Panel super-class. Add() behavour has been modified to set the Controls object as the ActionListener for each button:

private void add(Button b) {
b.addActionListener(this); 
super.add(b); // Now call super class add() method.
}
The Controls actionPerformed() method, lines 36 to 49, reponds to button press events by invoking corresponding CdPlayer methods.


The CD Player Status Display


The final part of the interface shown in Figure 1 is the Display panel, the source code for which can be seen in Listing 4. The Display panel consists of three text fields to display the CD track, the CD index, and the CD track time remaining--trackField, indexField, and timeField. They're declared on lines 13 to 15 of Listing 4 and will be initialized as new TextFields a Display object is created (which only ever happens once in this application).

The Display() constructor method is on line 20 of Listing 4. Lines 22 to 29 setup the basic components involved in the display. The Panel is assigned the FlowLayout manager which means that calls to the add() method will place the three text fields in a left to right layout butted up to each other with a small amount of separation top and bottom. And on Lines 23 and 24 I've made the indexField and timeField read-only so the user can't alter their values:

 indexField.setEditable(false);
 timeField.setEditable(false); 
The trackField is left editable so that the user can enter the number of a track to start playing from. In order to handle the trackField's mouse focus events and keyboard events, we have to register a couple of event Listeners:
trackField.addFocusListener(new TrackFocusLost());
trackField.addKeyListener(new TrackKeyPress()); 
Both of the Listeners are quite complex, so rather that write our own complete implementations, two default Adapter classes are sub-classed to handle the task on lines 53 to 74--more about them later.

On line 34 we register Display() as an Observer of the cdPlayer:

cdPlayer.monitor.addObserver(this); 
The status of the CD player is actually kept track of by a Monitor object--the cdPlayer.monitor object. The monitor runs in its own thread (a thread can be thought of as a light weight sub-process that has shared access to the data of the main task). The need to monitor events and notify other objects is a common programming problem. Java provides the Observable Class, and its companion Observer Interface, as a standard basis for addressing this kind of problem. The monitor object is a sub-class of a Observable class. The Observable class provides the code necessary to manage the Observer/Observable relationship. The monitor class will be described in more detail later. Display is declared to implement Observer, which means it must define an update() method. The update() method will be called when an Observable event takes place. Display's update() method is defined on lines 37 to 51, it is passed the Observable object that caused the event and an extra argument (which isn't used in this application).

Normally the trackField is updated once a second when the monitor broadcasts a status update to its Observers. The user can also alter the value of the trackField by entering a new track which will force the player to skip to it immediately. To prevent the one second update from clobbering the users input, the update() method is careful not to update the trackField text unless the track really has changed:

if (prevText.compareTo(newTrackText) != 0) {
trackField.setText(newTrackText);
prevText = newTrackText;
}
Lines 53 to 75 of Listing 4 define two inner classes to handle user input into the trackField. TrackFocusLost restores the correct track number when ever the user changes focus out of the trackField. The inner class TrackKeyPress checks every key pressed in the trackField for the enter key. If enter is pressed, an attempt is made to parse the text entered into an integer value, if this succeeds the cdPlayer is instructed to immediately start playing at this track.


The SmartDrive and the Monitor Thread


Before we go on to describe how to write a GUI for programmed track play and shuffle play, we really have to understand more of the new SmartDrive class that extends the Drive class from my first article. SmartDrive.java can be seen in Listing 5. SmartDrive is a sub-class of the original Drive class. SmartDrive mainly adds new methods to provide for playing a list of tracks.

In order to store the playlist of tracks, a new class called TrackList is defined at lines 175 to 243. TrackList is a sub-class of the JDK Vector class. A Vector is is a JDK implementation of a list-like structure. A Vector can only store java Objects. I would like to store int-type track numbers, but the int-type isn't a Java Object, it's a primitive data-type and primitive data types aren't first-class objects. To get around this problem the JDK provides a class wrapper for each kind of primitive data type. In this case I have to use the Integer wrapper class to contain each track number. When ever a track is added to a TrackList, the code actually stores a corresponding Integer object:

addTrack(int t) { addElement(new Integer(t)); }
TrackList provides methods to test the state of the list, to advance along the list, and to reset the list. Because Vectors store generic Objects, TrackList also has to do a fair bit of casting. For example, elementAt() returns an Object that has to be cast to an Integer before I can use it:
Integer elem = (Integer) (elementAt(position)); // Cast Object to Integer
The methods within TrackList have been declared as synchronized. This prevents multiple threads from simultaneously trying to access the same TrackList object. For example, we don't want the GUI to attempt to clear the track list at the same time as the cdPlayer attempts to advance to the next track in the track list. By declaring the methods as synchronized we ensures that requests are handled one at a time--waiting calls will block until the object is available.

In order to implement programmed play, the SmartDrive class includes an instance of TrackList, called tracksToPlay. SmartDrive methods such as next() and prev(), on lines 53 to 83, either just play tracks in the normal numerical sequence, or in the order returned by the tracksToPlay nextTrack(), prevTrack() methods.

Anytime the player gets to the end of track SmartDrive has to refer to tracksToPlay and issue a new play() call to play the next track in the program. In order to do this it sets up an instanse of the Monitor object mentioned earlier.

2b:The code for the Monitor class is in Listing 6. As described earlier the monitor object is a sub-class of a Observable class, a JDK class that provides much of the code necessary to manage Observer/Observable relationship. The Monitor class runs in a separate thread that interrogates the hardware player and passes on its status every second.

The monitor is started by calling the monitor's start() method--in this case the call to start() is made in the main() method in Listing 1. The Monitor's start() method, lines 57 to 65 of Listing 6, creates a new thread and starts it running:

if (updateThread == null) {
System.out.println("Starting thread");
updateThread = new Thread(this); 
updateThread.start();
}
The Thread constructor expects to be passed an object that implements the Runnable interface, in this case the Monitor is its own Runnable, so it passes itself (``this''). To implement the Runnable interface, Monitor has to define a run() method. The run() method provides the code that will be executed in a new thread. When the updateThread.start() method is called the new execution thread will be created. The new thread will then call the the monitor's, run() method. The run() method loops forever collecting status from the cdPlayer, passing it on, and then sleeping one second. The update is carried out in a synchronized statement:
synchronized (cdPlayer) {
updateCdInfo(); 
setChanged();  // Force notifyObservers() to do its thing.
notifyObservers(); 
}    
The synchronized statement will obtain a lock on the cdPlayer before it updates its info and notifies each observer. This ensures that all Observers get the same consistent picture. The monitor uses the setChanged() method, inherited from Observable, to indicate that the Observers need to be informed. It then calls the notifyObservers() method, also inherited from Observers, which passes the update event on to all Observers who have previous registered with the monitor.

The bulk of the Monitor class on lines 72 to 127 implements the updateCDInfo() method that collects info from the Drive/SmartDrive object. It caches the CD info to save having to bother the Linux kernel with repeated requests for constant information such as the length of the tracks on the current CD. The Drive interface was extensively covered in my first article, so won't go into the the details of the calls to the cdPlayer again here.

Although the monitor provides the main means for conveying status information, the SmartDrives's update() method, lines 118 to 148 of Listing 5, has to switch into more precise mode to handle the transition from one track to the next. The normal one second update from the monitor is insufficient to control precise switching between tracks so the update() method does it's own frequent polling when ever the end of track is near:

if (monitor.currentAddress >= tend - 210) { // Near end of
track?
// Poll frequently so we don't miss the event.
while (currentAddress() 
&& monitor.status == Drive.STATUS_PLAY
&& currentAddress() != 0) {
try { Thread.sleep(100); } // Sleep 100 msec's.
catch (InterruptedException e) { }
}
This ensures that the listener doesn't hear small sound bites of the next track.


The Program Window


Figure 2. Program Window

Now we can address the final GUI component--the Program class that creates the Program window. The Program window can be seen in Figure 2. The source code for the program class can be seen in Listing 7. The Program class lays out its sub-panels by using the same Form object described earlier. The Program constructor, lines 40 to 87, assembles three sub-panels:

+ programListing - a text field;
+ trackPanel - a grid of track buttons;
+ and buttonPanel - a row of control buttons.
The program class isn't really any more complex than the rest of the GUI except that it features quite extensive use of Inner Classes and Anonymous Classes newly introduced in Java 1.1. Most of the following description will concentrate on these two new language features.

Lines 53 to 70 setup the buttonPanel and the actions to take when each control button is pressed. The Program() constructor uses the Program's own addButton() method to add the control buttons to the buttonPanel. AddButton() expects to passed the panel; the button; and an object to handle the associated button press action:

void addButton(Panel panel, Button button, DoAction action)
{
panel.add(button);
button.addActionListener(action);
}
The action parameter, is declared to be from the DoAction class. DoAction is declared at the top of the Program class as an Inner class--a class contained within the Program class:
class Program extends Form implements Observer {
private abstract class DoAction implements ActionListener {
public void actionPerformed(ActionEvent event) {
this.invoke();
}
abstract void invoke();
}
The DoAction class is abstract because it has no implementation for the invoke() method. The implementation of invoke() is provided individually for each button by new sub-classes of DoAction. These new sub-classes are created inside the Program() constructor on lines 54 to 78--each addButton() call creates a new DoAction sub-class:
addButton(buttonPanel,
 editButton,
 new DoAction() { void invoke() { setEditMode(); } });
In each of these calls to addButton, the last paramter is an Anonymous sub-class of DoAction. Like Inner Classes, Anonymous Classes were added to Java to give programmers the means for implementing objects like ActionListeners without the programmer having to creating zillions of free standing mini classes. The new verb, normally used to create a new object, is used here to create a new class:
new DoAction() { void invoke() { setEditMode(); } }
This code creates a new anonymous, i.e., unnamed, sub-class of DoAction. The body of the class, in the curly-braces, provides an implementation of the invoke() method specific to the editButton. In the same manner 6 other anonymous classes are created to handle each control button.

Another anonymous class is used to handle the close-request for the Program window on lines 71 to 79. Rather than fully declare a single class to handle the request, I've used an anonymous sub-class of the AWT WindowAdapter class:

new WindowAdapter() {
public void windowClosing(WindowEvent e) {
dismiss(); // call dismiss(0) for the outer class.
}
}
Again ``new'' is creating a new class. In this case a sub-class of WindoAdapter is created with an override for the windowClosing() method.

Because these anonymous classes are inner classes of Program, they have access to its data and methods. For example, windowClosing() in the previous example calls dismiss()--dismiss() is a method of the Program class.

The suggested use for Anonymous classes is for small fragments of code only. Larger code fragments are more tidily expressed as named inner classes.

The updateTrackPanel() method, on lines 171 to 194, contains a tricky use of inner classes. Here inner classes are used to carry extra information around. When the Program window is created the updateTrackPanel() method is called to set up the track-number buttons. The method is also called whenever the number of buttons has to be altered due to a change in CD.

When the user presses a track-number button, the button event handler has to know which button was pressed. updateTrackPanel() achieves this by sub-classing the DoAction class:

for (int i = prev_n; i 
class TrackAction extends DoAction {
int track; 
public TrackAction(int i) { track = i; }
void invoke() { pickTrack(track); } 
} 
addButton(trackPanel,  
 new Button(Integer.toString(i + 1)),
 new TrackAction(i + 1)); 
} 
Each TrackAction objects is initialised with the track number it is associated with.

The rest of the code in the Program class deals with the mechanics of programmed mode play. This includes switching the mode of the track panel between add (a track), del (a track), and play (immediately play a track). The new java feature introduced by this code is the use of the JDK Random class to select tracks at random on lines 152 to 169.


Summary


This concludes my description of how the CD player works. I started this whole exercise to try out as much Java as possible, both in terms of the compilers and tools, and in terms of the language and JDK libraries. I've found that the langauge, libraries, and compilers are stable enough to for me to write non trivial programs, the fully coded Jcd clocks in at 3600 lines of Java and 450 lines of C. The compilers work but are slow. The JDK libraries are quite functional and offer far more standard facilities than originally provided with C or C++. C integration is easily accomplished. Programming in a garbage collected environment is a real boost to productivity. Xemacs provided me with a really good Java editing environment.


Resources


See previous article in Linux Gazette issue 28 for detailed references.

Tar file containing all listings in this article

My home page containing more infomation on Jcd.

Jcd is available on Sunsite.

The Linux Java page--a good starting point.


Copyright © 1998, Michael Hamilton
Published in Issue 29 of Linux Gazette, June 1998


[ TABLE OF CONTENTS ] [ FRONT PAGE ]  Back  Next


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


EMACSulation

by Eric Marsden

This column is devoted to making the best use of Emacs, text editor extraordinaire. Each issue I plan to present an Emacs extension which can improve your productivity, make the sun shine more brightly and the grass greener.


Emacs as a server

Many people meet Emacs as the default program launched by Elm to edit an email message. Starting up Emacs in this way is a bit of a pain, because of the delay and memory use, but also because the fresh Emacs doesn't share buffers and a kill ring (storage for cut/copied text) with other invocations. Rather than starting up a new Emacs for each letter, you can set the environment variable EDITOR to emacsclient.

The Emacs server mechanism allows one Emacs process to service editing requests from other applications. To enable it you need to add a line like (server-start) in ~/.emacs. When you say emacsclient filename, the program searches for an Emacs process (launching one if necessary) and sends it a message asking it to edit filename. The caller process (the shell for example) is blocked while the file is being edited. When you're finished type C-x # and the client will be unblocked.

Gnuserv

Gnuserv is a more sophisticated remote invocation mechanism for Emacs, written by Andy Norman (also the author of ange-ftp). It allows arbitrary Emacs Lisp commands to be sent to an Emacs process running either on the local machine or on another machine on the network.

  1. If you're using XEmacs everything is already set up; you will only need to add a (gnuserv-start) to your ~/.emacs.
  2. Obtain the gnuserv-2.1alpha RPM from Red Hat contrib, or the .deb for Debian Hamm and skip to 6 ;
  3. Download the source ;
  4. Edit config.h (I suggest using #define DONT_USE_LITOUT) and gnuserv.h, where you choose the communication method (the default is Internet domain sockets, which is necessary if you want to be able to do the remote stuff) ;
  5. Put the file gnuserv.el somewhere in Emacs' load path. Let's assume you have an ~/elisp/ directory where you put your favorite Emacs Lisp extensions; an alternative is to copy gnuserv.el to a site-wide Emacs Lisp directory such as /usr/lib/emacs/site-lisp (type C-h v load-path in Emacs to see a list of possiblities) ;
  6. Add something like this to your ~/.emacs :
        (setq load-path (cons (expand-file-name "~/elisp") load-path))
        (autoload 'gnuserv-start "gnuserv" "Better Emacs server support")
        (setq gnuserv-frame (current-frame))
        (gnuserv-start)
    

    The second line tells Emacs that the function gnuserv-start is defined in a file called gnuserv.el, which Emacs will load on demand. The third line inhibits the default behaviour of opeing a new frame for each new file edited (leave this out if you prefer). The last line fires up the server.

To check that everything is working, type


    ~$ gnuclient <filename>

which asks Emacs to open <filename>, just like emacsclient. If this doesn't work (with a message like ``Refused connection'' or ``Broken pipe''), skip down to the Security section. You can also send off an arbitrary bit of Emacs Lisp :

    
    ~$ gnudoit '(message "Hi there, %s!" (user-full-name))'

Applications

Now you can do all sorts of silly things. You could get two Emacsen on networked machines to play ping pong, echoing messages back and forth. You could use Emacs as a CGI script server, profiting from its powerful library without incurring the overhead of launching an interpreter for each script (a little like the FastCGI mechanism). For example, let's hack together an external interface to Emacs' builtin psychologist :

     (defun eliza-start ()
       "Fire up the doctor."
       (interactive)
       (doctor)
       ;; We only have to type return once under this interface.
       (re-search-backward " twice" nil t)
       (replace-match "")
       (goto-char (point-max))
       (buffer-substring (point-min) (point-max)))

     (defun eliza-continue (str)
       "Send a string to the doctor and return her response."
       (interactive)
       (switch-to-buffer "*doctor*")
       (insert "\n" str "\n")
       (doctor-read-print)
       (save-excursion
         (re-search-backward "\n\n\\(\\(.+\n?\\)+\\)\n\n")
         (match-string 1)))

     (defun eliza-cleanup ()
       "Pay the bill and leave."
       (interactive)
       (let ((buf (get-buffer "*doctor*")))
          (if buf (kill-buffer buf))))

This can be used from the command line (for CGI use you'd have to think about the trickier question of concurrent accesses) with a script such as

     #! /bin/sh
     
     gnudoit '(eliza-start)'
     while read line
     do
         gnudoit "(eliza-continue \"$line\")"
     done
     gnudoit '(eliza-cleanup)'

You might even find constructive uses for the gnuserv technology, like starting Gnus (an Emacs news/email client) and ange-ftp transfers from a ``network Emacs'', so that your primary Emacs isn't affected by networking delays. You could also communicate with Emacs from a crontab, telling it to fetch some web pages with Emacs/w3, or send someone an email. You could use Netscape's third party email/news API to invoke Emacs instead of the builtin mail and news clients. It might also be useful for sending commands to Emacs from a window manager menu.

Security considerations

More and more Linux distributions use good X security as set up out of the box. You will notice for example that when you su to root on a modern system, you will no longer be able to launch X clients, because the X server is protected by an xauth cookie.

While allowing access to your X display is bad enough (someone could capture all your keystrokes, for example), giving remote access to your Emacs process is much more worrying, since Emacs can execute arbitrary commands under your id, delete files, send insulting email to the President of the United States, etc.

Since release 2.1, gnuserv is able to use MIT-MAGIC-COOKIE-1 authentication for remote requests. This protocol uses the contents of your ~/.Xauthority file, as described in the xauth(1) man page. Gnuserv requires a cookie for display number 999, which you can create as follows (blade is the name of the machine) :

    
      ~$ xauth add blade:999 . `cat /etc/passwd | md5sum` 
      ~$ xauth list
      blade/unix:0  MIT-MAGIC-COOKIE-1  bc1d627babdbabe9d1f288d2b57c348f
      blade:999  MIT-MAGIC-COOKIE-1  d89570b20925d401c05a79be67159cae

(`cat /etc/passwd | md5sum` is just a convenient way of generating a cookie; on most Linux systems you will be able to use the mcookie command, or you can bake a cookie by hand). Now you should be able to use gnuclient/gnudoit on the local machine. The next step is to transfer the cookie to each remote machine from which you plan to access Emacs, with a command such as :

    
      ~$ xauth extract - blade:999 | rsh remotehost.edu xauth merge -

If you don't run X you will have to fall back to a host-based access control system : the environment variable GNU_SECURE is assumed to point to a file which contains a list of machines which are authorized to open connections to your Emacs process. Finally, if your machine isn't networked, you've probably already skipped to the next section.

How does it work?

Your command takes a fairly convoluted route to reach Emacs. There are four parties involved in a transaction : the ``client'', or program which wants a service from Emacs (Elm for example), the gnuclient program (which runs on the requesting machine), the gnuserv process (which runs on the machine running Emacs), and of course the Emacs process itself. They communicate as indicated by the following diagram :

Communication diagram (3 kB)

The fragile aspect of the system is that if the gnuserv program dies for some reason, everything grinds to a halt. An alternative communication method which would involve fewer working parts could be inspired from the Netscape remote invocation protocol. The gnuclient capabilities would be added directly to Emacs, and a gnudoit request would look something like

    emacs -remote -lisp '(message "Hi")'

The new Emacs process would search for an existing Emacs process to which it could dispatch the request, or service it directly. The disadvantage is that each request would be slower, since an Emacs needs to be forked each time. The image is most often in the disk cache, so this wouldn't be catastrophically slow (it works OK with Mozilla, which is far bigger than Emacs).

Next time ...

I've received a fair bit of email asking how to customize various aspects of Emacs, so I'll try to scratch the surface of this vast topic next month, and discuss the Customize package. Don't hesitate to contact me at <emarsden@mail.dotcom.fr> with comments, corrections or suggestions (what's your favorite couldn't-do-without Emacs extension package?). C-u 1000 M-x hail-emacs !

PS : Emacs isn't in any way limited to Linux, since implementations exist for many other operating systems (and some systems which only halfway operate). However, as one of the leading bits of free software, one of the most powerful, complex and customizable, I feel it has its place in the Linux Gazette.


Copyright © 1998, Eric Marsden
Published in Issue 29 of Linux Gazette, June 1998


[ TABLE OF CONTENTS ] [ FRONT PAGE ]  Back  Next


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


The Importance of Adopting an In-House Linux Expert

By Carlo Prelz


Changes, even huge changes, are difficult to evaluate when you happen to live close to whatever is undergoing the change, be it a child, global politics, or the world of people who make a living with their knowledge of information technology (IT) matters.

In our world, as the most common computer-dependent tasks get standardized and as more and more raw computing power can be tapped by more people, the figure of the white-clad ``computer priest'' is about to vanish. But what is the world getting in exchange?

How is the young manager of a new company going to build its IT infrastructure? No, he most likely won't phone IBM. Instead, he will order a bunch of PCs, equipped with a various assortment of Microsoft software. Other Microsoft software will follow, because that's what everybody does.

Through a brief, fractal period, we have moved from one monopoly to another, with the added disadvantage that people who blindly accept the new easy solution end up with less-than-solid material. This material is much harder to adapt to local needs. In the past, companies who could afford a high level of informatization hire with a handful of COBOL or RPGII programmers who could customize the software that needed to be adapted.

Today, a manager will most probably be equipped with a NT server, a Microsoft Office suite on Windows 95 for each desk, an Ethernet network, and an assistance contract with some specialized firm (who has to deal with dozens of other companies). He may organize things so that his people have some limited sort of Internet access. All standard, on a path that is being walked on by a huge mass of people all around the globe.

As the path gets dug deeper and deeper, it gets harder to choose a different one. This has to do with gravity: the deeper the path and the steeper its sides, the harder the person, company or organization has to want to choose a personal way to its own IT goals.

But why would a reasonable IT manager want to get out of the mainstream? The keyword is customization.

Yes, you can program in Windows. But when it gets to having an ``intimate'' relationship with what actually happens, Windows leaves you in the cold. You may find books, but unless you have uncommonly strong links with the Microsoft engineering circles, you have no way to be confident in the fact that whatever OS feature you are using won't disappear without a trace in the next release. Which you will have to use because everybody will be using it at a certain time. You end up being dependent on the next brilliant idea they come up with at Redmond, WA.

This strategy is evident. Human beings' laziness is again tapped, at the benefit of a company that found itself at the right space-time coordinates, and has been as un-principled as needed.

But if our young manager were to dedicate a moment of thought to how to solve his IT problems, what are his choices?

Let me know if I missed some important options. But of all the above, the one that promises to bear more fruit is the Linux way. So, how to give it a try? The best solution for a manager who would like his computers do what is needed without learning the way himself, is to engage the services of one or more Linux aficionados.


The Linux Aficionado


Linux has been growing like a big, healthy forest plant. Each branch has been contributed by someone like us, who decided to spend a bit of their free time to make the tree look and live better. Not ``for free'': we humans always do things for a reward; it happens that money is not the only (nor the best) reward. The impulse behind the Free Software movement has been and still is to demonstrate to ourselves and to the world that we worked well, that we brilliantly solved a problem. That we created a handy tool, that was not there before. That is, that the world is now a little bit nicer now than before we started developing our ideas.

Of course, programmers need to survive, too. Here is what the Richard Stallman has to say about the topic (excerpt from the GNU Manifesto):

``Won't programmers starve?''

I could answer that nobody is forced to be a programmer. Most of us cannot manage to get any money for standing on the street and making faces. But we are not, as a result, condemned to spend our lives standing on the street making faces, and starving. We do something else.

But that is the wrong answer because it accepts the questioner's implicit assumption: that without ownership of software, programmers cannot possibly be paid a cent. Supposedly it is all or nothing.

The real reason programmers will not starve is that it will still be possible for them to get paid for programming; just not paid as much as now.

Restricting copying is not the only basis for business in software. It is the most common basis because it brings in the most money. If it were prohibited, or rejected by the customer, software business would move to other bases of organization which are now used less often. There are always numerous ways to organize any kind of business.

Probably programming will not be as lucrative on the new basis as it is now. But that is not an argument against the change. It is not considered an injustice that sales clerks make the salaries that they now do. If programmers made the same, that would not be an injustice either. (In practice they would still make considerably more than that.)

The above was written back in 1985, when programmers were still earning big money; 12 years later, our market and contracting power has diminished a lot. Gone are the days when a programmer could be the best paid man in the company thanks to writing huge bits of database access/data entry pieces of software that differed very little from their brothers.

When the need arises for an application that is somehow different, there is no other way than to call an actual programmer. Here are a few characteristics that make a Linux aficionado an ideal choice for such a special need:

I may like to add a couple of counter-indications:


No Need for Another Windows95


There are recurring, well-financed efforts to create a new good-for-everybody operating system on the robust structure of Linux. These efforts are justified by the hope of snatching even a small percentage of the huge market held by Microsoft. A very small percentage of a very large sum may promise reasonable earnings to those who follow this path.

Regardless of how things look like now, the omnipresent PC that we see today has a limited time to live.

A very big slice of the PCs that are currently in use in the world are used for standard operations: keeping one's correspondence, making spreadsheet calculations, maintaining one's agenda, playing games and looking around the Internet. How many PCs do you know are being used with software that has been written especially for them? The logical direction, one that much effort has been spent to hamper, is that of including everything that a secretary, a non-IT-oriented office worker or a common home user will ever need in an idiot-proof box.

This tendency has at last emerged in the shape of network computers. No matter which way is selected, the result of adopting an NC is that, from the prospective of the user, there will simply be a couple of plugs to insert into the respective sockets, and the user will be ready to work or play. No need to reinstall Windows95 for the nth time because the maintainer can't divine a better way to recover from the cryptic error messages.

Along this way, comes the demise of shrink-wrap software. If the server is the only place where a separate operating system needs to be installed, it will be much harder for Microsoft to maintain their stronghold on the computer market. NT has very little advantage compared to the many UNIX options in the field. In particular, it is not significantly easier to manage than UNIX by a knowledgeable person. And if or when the networked world becomes so easy to manage that a bunch of software wizards can do the job, the next step will be NSes (Network Servers, I think I'll patent the name...). Again, something that spells bad to a software-only company that is programmed to EARN.

Isn't it futile to try to be the new Microsoft? As if it really mattered much to have so much money that you will not have the material possibility to spend it all in your lifetime.


Meet the Ideal Entrepreneur


So, what is there that is not futile? Doing something nice, that makes the world a bit better. I said that before.

A human being has an idea. Some say they float around, and visit you when you become receptive enough. She finds all the resources that are needed to turn this idea into a practical product. After some time, other people can exchange some of their own wealth to take advantage of the idea of our entrepreneur.

Or the idea can be imported within a sufficiently fertile existing corporation, one that will recognize the value of the idea and give our human being enough space and resources to reach her goal.

Or the idea deals with bettering an established way of doing some task.

What kind of enterprise can you think of, that won't benefit from the use of IT? Most of the times, she will have to look for computer assistance. It is to all the entrepreneurs who are facing the problem of which way to informatize their pet project that I would like to speak.

Linux may well be the best choice for you. But for Linux to adapt well to your world, you will want to adopt one or more Linux aficionados. You will want to secure the continuing services of a person who deeply knows and appreciates the tools he works with. Who can craft your personal solution. Who can maintain the operating system that your solution works on abreast of the latest technical progress.

Linux cannot be eternal. Nothing is. But it has reached a solid, mature stage NOW. Especially, it is the ideal tool for tapping into the networked world. Now is the time not to be lazy and to profit from this situation. And keeping a Linux aficionado happy and well-fed now might also imply finding yourself in a more elevated position in the post-Microsoft world, tomorrow.


Copyright © 1998, Carlo Prelz
Published in Issue 29 of Linux Gazette, June 1998


[ TABLE OF CONTENTS ] [ FRONT PAGE ]  Back  Next


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


Mastering Kernel Modules with Caldera

By David Nelson


You shouldn't have to read this article. The concept of Linux kernel modules is fairly simple. Unfortunately, information needed to compile, install and use modules is scattered over several HOWTOs, READMEs, and man pages. Plus, the files which need to be modified are in several obscure directories.

I finally wrote this cookbook approach to get myself, and you, started. Once you are up and running with modules, you can dig into the details later. I tested this material on an X86 processor running Caldera Open Linux 1.1, which is close to Red Hat 4.2. You mileage with other processors and distributions may vary.

Why use modules? Modules let you compile a small, fast kernel, then install and remove device drivers on demand. Without modules the Linux kernel could bloat to resemble a certain commercial OS.

First, I recommend that you compile a base kernel that includes all essential capabilities for your system without modules. I know this sounds like we are going backwards, but you don't want to lose the ability to boot up because you messed up your modules. The README in usr/src/linux is your guide, but basically you execute the command:

make mrproper; make xconfig 
(or menuconfig or config) to include all needed capabilities, then run:
make dep; make clean; make zImage
Save your kernel configuration to a file named kernelconf.base, in case you need to recompile. The xconfig menu prompts you to save and load configuration files. If you use menuconfig or config, the current configuration is in the file /usr/src/linux/.config; copy that file to kernelconf.base. If you configured too big a kernel, final compilation will fail. If this happens, execute make bzImage instead of zImage. Your compiled kernel will be in the directory /usr/src/linux/arch/i386/boot.

You might have made a mistake in compiling your base kernel, so don't throw away your old one. If you are running LILO, rename your new kernel to zImage.base and copy it to the location of your current kernel, usually / or /boot. Add a section to /etc/lilo.conf that lets you select either your default or base kernel on boot up. My lilo.conf is shown here minus some comment lines:

# general section
boot = /dev/hda3
install = /boot/boot.b
message = /boot/message
prompt
timeout = 50

# default entry
image = /bzImage
        label = linux
        root = /dev/hda3
        read-only

# base kernel
image = /zImage.base
        label = base
        root = /dev/hda3
        read-only
The important addition to lilo.conf is the last section (#base kernel) which tells LILO about your new kernel. Also, be sure lilo.conf has prompt and timeout lines. Now execute lilo and then reboot. LILO will pause giving the prompt boot:. If you hit TAB, you will be given the choices linux and base. Enter base, and your new kernel will boot. You may get complaining messages about bad module dependencies, but if your base kernel is complete that shouldn't bother you. If something goes wrong, reboot and enter linux (or just wait the timeout interval) and your old kernel will boot. Make sure you have a working base kernel before proceeding. With this approach you never burn your bridges (or kernel) behind you.

If you don't use LILO, make a boot floppy for your base kernel. To do this, insert a floppy and execute make zdisk, instead of zImage.

You are now ready to compile a kernel with modules tailored to your system. Execute the same commands as above, but when you execute xconfig or menuconfig pick some features to compile as modules. I suggest you experiment first by picking nice-to-have, but not-necessary, modules to add to zImage.base. Good choices might be printer support or floppy support (unless you are booting from the floppy). Save your configuration as kernelconf.mod in case you need to go back. Also, write down which modules you are compiling. To know exactly which modules are compiled, I suggest you move or delete your old modules (if any). The Caldera release includes a lot of modules. They are in /lib/modules/2.0.29. I moved my old ones into subdirectories rather than deleting them in case I needed to back up. If you are working with a different release of the kernel, instead of subdirectory 2.0.29 you will have a subdirectory corresponding to your release number.

After executing make zImage, run:

make modules; make modules_install
As before, move (using cd) to the directory containing zImage, rename it zImage.mod and move it to the directory where LILO will look for it. Put a new section at the bottom of lilo.conf to let you boot this kernel with the label modules. If you don't use LILO, make another zDisk.

Now, execute depmod -aq. This creates /lib/modules/2.0.29/modules.dep, needed by module utilities. Next, execute the following:

modprobe -c | grep -v '^path' > /etc/conf.modules
This command sets up another file needed by the module utilities.

Now reboot, choosing label modules at the boot prompt. Next, move to the /etc/modules/2.0.29 directory. It should contain a file with a very long name like the following:

#1 Tue Feb 11 20:36:48 MET 1997.default
This file is read at boot time by /etc/rc.d/rc.modules. It contains a list of the default modules loaded when the kernel boots. You need to change both the name and the contents. Fixing the name is the hard part. In directory /etc/modules/2.0.29 execute the commands:
FILE=i`uname -v`.default
cp "#1 Tue"* "$FILE"
This magic creates a file with the name that rc.modules will look for on bootup. The name is based on the time when the kernel was compiled. If you recompile the kernel, you must repeat the magic.

Edit this file to contain just the modules you want loaded at bootup. For example, it might contain the lines

floppy
lp
which would load the floppy and printer modules, assuming you compiled them as modules. To get your editor to accept this file, you may need to put quotes around the name.

To load a module manually, execute insmod 'modname'. To remove it execute rmmod 'modname'. To tell which modules are currently loaded, execute lsmod.

The best toy is kerneld; it automatically loads and unloads modules as needed. Assume you have compiled the floppy driver as a module. Check whether it is loaded by executing lsmod. If it is, remove it by executing rmmod floppy. Then execute kerneld. Now execute mount /mnt/floppy (or whatever mounts your floppy). Magically, kerneld installs the floppy module when needed. It will also uninstall modules which haven't been used for a while, keeping your kernel lean and mean.

You now know enough to experiment with modules without crashing your kernel on bootup. Read the Module mini-HOWTO, the kerneld mini-HOWTO, and the man pages for the utilities to become a real expert. Happy moduling!


Resources


Module mini-HOWTO

kerneld mini-HOWTO


Copyright © 1998, David Nelson
Published in Issue 29 of Linux Gazette, June 1998


[ TABLE OF CONTENTS ] [ FRONT PAGE ]  Back  Next


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


Replacing Windows NT Server with Linux
Copyright (c) 1997 Quinn P. Coldiron
qcoldiro@unlinfo.unl.edu


Table of Contents

Introduction

Section 1--Outlining Our Situation

Section 2-- Why we chose RedHat Linux

Section 3--Under the Hood Appendix A--RedHat 5.0 Installation Guide

Appendix B--Samba

Appendix C--DOSEMU Manual
 



Introduction

Network Operating Systems (NOS) have many features and capabilities that allow the Information Systems departments of most organizations to better server your organization and help streamline work flow. Each NOS has different features and a excels in different areas. Traditionally, Novell Netware has been viewed as the best file/printer server, Unix was viewed as the premiere application and database server and recently, Windows NT has come in as a good choice for the smaller networks as a file/printer server or application server. The market has become very aggressive with each of these platforms branching out into each others market area. Microsoft has expanded NT into the midrange server market once dominated by Novell and is trying to get into the high end market which was once filled by Unix venders such as Sun, Hewlett Packard and Silicone Graphics.

I inherited an aging Novell Netware 3.11 server when I began my career at the University of Nebraska Press that was on an under powered Pentium 90 and had older disk drives that were failing. I also wanted to expand into other areas, so I knew this was going to be my first project. When I began looking at my options to replace our aging Novell Netware server, I of course turned first to the just released Windows NT Server 4.0. The marketing materials, magazines and television advertisements all told me that this was the one thing that would solve all my problems. The operating system promised to be easier to setup and maintain than the Netware product it was replacing and it could easily handle the 55 users on my network. Fourteen months later, we are running Linux as our server.

Linux is a completely free reimplementation of the POSIX specification, with SYSV and BSD extensions (which means it looks like Unix, but does not come from the same source code base), which is available in both source code and binary form. Its copyright is owned by Linus Torvalds <torvalds@transmeta.com> and other contributors, and is freely redistributable under the terms of the GNU General Public License (GPL). A copy of the GPL is included with the Linux source; you can also get a copy from ftp://prep.ai.mit.edu/pub/gnu/COPYING.

Linux is not public domain, nor is it `shareware'. It is `free' software, commonly called freeware, and you may give away or sell copies, but you must include the source code or make it available in the same way as any binaries you give or sell. If you distribute any modifications, you are legally bound to distribute the source for those modifications. See the GNU General Public License for details.

Linux is still free as of version 2.0, and will continue to be free. Because of the nature of the GPL to which Linux is subject, it would be illegal for it to be made not free. Note carefully: the `free' part involves access to the source code rather than money; it is perfectly legal to charge money for distributing Linux, so long as you also distribute the source code. This is a generalization; if you want the fine points, read the GPL.

Linux runs on 386/486/Pentium machines with ISA, EISA, PCI and VLB busses. MCA (IBM's proprietary bus) is not well-supported in 2.0.x and earlier versions, but support has been added to the current development tree, 2.1.x. If you are interested, see http://glycerine.itsmm.uni.edu/mca

There is a port to multiple Motorola 680x0 platforms (currently running on some Amigas, Ataris, and VME machines), which now works quite well. It requires a 68020 with an MMU, a 68030, 68040, or a 68060, and also requires an FPU. Networking and X now work. See news:comp.os.linux.m68k

Linux runs well on DEC's Alpha CPU, currently supporting the "Jensen", "NoName", "Cabriolet", "Universal Desktop Box" (better known as the Multia), and many other platforms. For more information, see http://www.azstarnet.com/~axplinux/FAQ.html

Linux runs well on Sun SPARCs; most sun4c and sun4m machines now run Linux, with support for sun4 and sun4u in active development. Red Hat Linux is (as of this writing) the only Linux distribution available for SPARCs; see http://www.redhat.com/support/docs/rhl-sparc/

Linux is being actively ported to the PowerPC architecture, including PowerMac (Nubus and PCI), Motorola, IBM, and Be machines. See http://www.cs.nmt.edu/~linuxppc/ and http://www.linuxppc.org/

Ports to other machines, including MIPS and ARM, are under way and showing various amounts of progress. Don't hold your breath, but if you are interested and able to contribute, you may well find other developers who wish to work with you.

Linux is no longer considered to be in beta testing, as version 1.0 was released on March 14, 1994. There are still bugs in the system, and new bugs will creep up and be fixed as time goes on. Because Linux follows the ``open development model'', all new versions will be released to the public, whether or not they are considered ``production quality''. However, in order to help people tell whether they are getting a stable version or not, the following scheme has been implemented: Versions 1.x.y, where x is an even number, are stable versions, and only bug fixes will be applied as y is incremented. So from version 1.2.2 to 1.2.3, there were only bug fixes, and no new features. Versions 1.x.y, where x is an odd number, are beta-quality releases for developers only, and may be unstable and may crash, and are having new features added to them all the time. From time to time, as the current development kernel stabilizes, it will be frozen as the new ``stable'' kernel, and development will continue on a new development version of the kernel.

The current stable version is 2.0.31 (this will continue to change as new device drivers get added and bugs fixed), and development has also started on the experimental 2.1.x kernels. If 2.0.x is too new for you, you may want to stick with 1.2.13 for the time being. However, the latest releases of 2.0 have proved quite stable. Do note that in order to upgrade from 1.2 to 2.0, you need to upgrade some utilities as well; you may wish to upgrade to the latest version of your Linux distribution in order to obtain those utilities. The Linux kernel source code also contains a file, Documentation/Changes, which explains these changes and more.

Most versions of Linux, beta or not, are quite stable, and you can keep using those if they do what you need and you don't want to be on the bleeding edge. One site had a computer running version 0.97p1 (dating from the summer of 1992) for over 136 days without an error or crash. (It would have been longer if the backhoe operator hadn't mistaken a main power transformer for a dumpster...) Others have posted uptimes in excess of a year. One site still had a computer running Linux 0.99p15s over 600 days at last report.

One thing to be aware of is that Linux is developed using an open and distributed model, instead of a closed and centralized model like much other software. This means that the current development version is always public (with up to a week or two of delay) so that anybody can use it. The result is that whenever a version with new functionality is released, it almost always contains bugs, but it also results in a very rapid development so that the bugs are found and corrected quickly, often in hours, as many people work to fix them.

In contrast, the closed and centralized model means that there is only one person or team working on the project, and they only release software that they think is working well. Often this leads to long intervals between releases, long waiting for bug fixes, and slower development. The latest release of such software to the public is sometimes of higher quality, but the development speed is generally much slower.

As of October 24, 1997, the current stable version of Linux is 2.0.31, and the latest development version is 2.1.59.

I will begin this report by covering the areas that we were concerned about and giving reasons that were chose options that we went with. I will not get very technical in this fist section, but will cover in detail how we implemented each part of the system and give examples of the configuration files in section two.


Section 1
Outlining Our Situation
Our Situation
When I became the Information Systems Department manager for the University of Nebraska Press I inherited a very tired and aging Novell Netware 3.1 server that was handling all the network serving duties for approximately fifty users. This is not a large network and our needs are not out of the ordinary, but this machine was due for replacement. Novell was on version 4.x, NT 4.0 had just come out and this machine was only a Pentium 90 with data drives that were noisier than Nebraska's memorial stadium.

It was time to begin the search for replacements and I had the same issues to deal with that my predecessors had, plus some new ones. The main issue was compatibility with our order fulfillment and inventory system called The Cat's Pajamas. This system was originally developed on the Data General line of mini and mainframe computers using its interpreted language. The system was ported to PC servers (mainly Novell Netware) when a company called Subject Wills ported the interpreter to the PC platform. It has a character based user interface, stores all its data in flat indexed text files and is pretty fast and stable on the Novell platform. Our new requirements were for remote access for our warehouse, and if possible, access for the five Macs that we have, but spend as little money as possible.

I was not very interested in upgrading our current Netware license, since at this time Novell was playing the CEO of the Month game which had caused me to lose much of my confidence in the company. The next logical choice was Microsoft Windows NT. I called Cats and asked if the application would run on NT and they told me that they had a few installations and things seemed to be running fine, but I would need a different version of the DBC interpreter, which they uploaded for me. I proceeded to copy the entire system and database to the NT server and logged on from my Windows 95 PC. I had to rewrite the batch file that Cats uses to start because they were using Netware network commands, but I was able to get them changed and get a session up.

At this point I thought this looked very good, so I ordered the production server. The server was a dual CPU Pentium 150 with built in Adaptec 2940UW SCSI controller and 256MB of RAM. I thought this would be perfect to act as the CATS server, file server and printer server for 50 people, especially since Netware was doing this on a Pentium 90 with 64 MB of RAM. I got the server a few weeks later, installed NT 4.0 and Cats. After I got Cats installed I had our business department and Customer Service department try running some large and CPU intensive reports on it and things seemed to run great, so we pushed it into service. At this same time I was setting up a RedHat Linux 4.1 machine on a Pentium 100 with 32 MB of RAM. I had used RedHat Linux in my previous position with great luck as a web server and StreamWorks audio/video server so I wanted to see if it could fit in here, but I didn't know where or how.

Life after moving Cats to NT was a nightmare. The system was crashing two to three times a day with no reason that I could find. I was on the phone with Microsoft and Cats constantly, but nobody could figure it out. Microsoft had me apply Service Packs one through three and a few HotFixes, which helped, but it still was crashing at least twice a week with the infamous "Blue Screen of Death". After many weeks and about $1500.00 in phone support from Microsoft, the technical support rep told me that I should find a better software package than The Cat's Pajamas. This is was not the solution I was looking for, since this is the package that a sizeable percentage of presses our size nationwide are running, so I was forced to bring the old Novell server back into production until I could figure something out.

By this time I had upgraded the RedHat Linux machine to version 4.2, but it still wasn't doing much, so I added two IDE 1.6 GB hard drives, installed SAMBA and copied CATS over to this computer to play a little. I was able to connect from my Windows 95 computer and run Cats without any modifications to the batch file I had created for the NT server. I had the Business manager and Customer Service manager try the reports again and everything seemed fine, but I still had my doubts, so I just kept the system up for myself and the IS department to test until a later date.

The Netware server was still holding on and doing its job until I got a call one Thursday night at about 9:00 from our Customer Service manager. He had been running the reindexing program to prepare for the month-end closing that was to start Friday, but the server had crashed. I worked on it until about 12:30 am and finally got it working, but the whole thing died again Friday morning at about 6:30 and again at 7:00, so I knew we were in trouble. The only option left was to replace the server now and the only thing I had was the Linux server, so I restored Cats off our Windows NT tape backup machine to the Linux server and changed the login scripts to connect the users to this server for the Cats drives. Within one hour, we were back in operation.

After completing the morning duties, we normally run a complete Cats backup before we continue with closing which usually would take two hours to complete on the Netware server. The Linux machine was able to do the entire backup in 45 minutes, cutting a little over an hour off our closing time. This increase in speed came from a decrease in hardware because the Linux server was running only 32 MB in RAM and IDE hard drives where the Netware server had 64 MB in RAM and SCSI drives. The speed increase has been noticed in daily work also. I get almost daily remarks that the system seems to be running faster and more reliable.

We have recently upgraded the CPU to a 200Mhz Pentium and have upgraded the Memory to 64 MB to handle the newest plans of making this server replace our Windows NT file/printer server, which still crashes about twice a month for no reason, even after an additional $1,500 in tech support with Microsoft. This single computer running RedHat Linux will replace both our Novell Netware 3.11 server and our Windows NT 4.0 server, while decreasing total hardware requirements. With the recent advances from the Samba team in supporting the NT domain structure and the December 1997 release of RedHat 5.0, I expect to have a very efficient and inexpensive server for our Windows 95, Windows NT and Macintosh clients.


Section 2
Why We Chose RedHat Linux
Linux Features
Linux is a very feature rich operating system. Many of its features are not found on its commercial competitor Windows NT due to the fact that Unix has been in constant development since it was invented in the early 1970's. Even though Linux has only been around since the early 90's, it benefits from the rich archives of Unix applications and utilities because of its POSIX compliance. Linux is unique in that the kernel does not use any code from previous Unix implementations, but can still tap into the libraries of BSD and System V distributions. I feel the strongest feature of Linux is the Internet itself and the many technical users that are responsible for the development of the many drivers and ports to other hardware platforms. Many Intel platform bug fixes are release for Linux before they are release in other ``mainstream'' operating systems mainly due to the fact the users are also the developers.
Reliability
The system has to be available 365 days a year.
The Linux server has proven to be as reliable as any other server operating system I have ever used, and more reliable than most. My past experience includes managing Novell Netware, Windows NT 3.51 and 4.0 and Irix (Silicon Graphics) servers. I must say that Novell has always been a steady performer, but I have always felt that it was more complex than it needed to be. The Silicon Graphics machines were always rock solid, but they should be when you pay more than $20,000 for a single server.

My Linux server was initially setup in January 1997 as a test platform to see if it could handle being a production server. At this time I had installed a copy of The Cat's Pajamas, Apache, StreamWorks (audio/video server) and Samba. Using Samba, I was able to connect the Information Systems Department to this server so we could run Cats and test the audio/video server. A typical day of testing the system would include reindexing and reformatting Cats while serving multiple 100 megabyte video files and acting as a file server. The Linux machine was able to handle all of this while running on only 32 megabytes of RAM and using a Pentium 100 CPU.

From January 1997 to July 1997, we experienced only three shutdowns of this server, two of which were caused by power failures in the building and the third time was due to stupidity on the administrator's part. This reliability was a key factor in our judgment to use Linux as our server platform.

The installation of NT was simple, and it was easy to get the system connected to all the printers, but it proved to be unreliable. We were experiencing crashes every day, even after installing service packs one and two. I then installed a hot fix to service pack two which was to fix errors in the Macintosh services which helped. I was down to crashing just one to two times a month. I also tried to run Cats off this system, which was a complete disaster since we could not get more than five users at a time in Cats, and reports would take forever to run.

Cross platform
The new server must be able to serve the Mac users as well as the Windows clients.
The server must be able to allow connections from Windows and Macintosh clients. All major server operating system allow for this, including Linux. To server Windows clients, Linux uses a package called Samba. Samba is server software for computers running under Unix or another Unix-like operating systems with standard TCP/IP available. Samba, as it stands right now, depends on Unix file structure, permissions, system calls and services. It provides file and printer services for clients using some variants of SMB (Server Message Block) protocol. SMB is a "native" networking protocol used by MS-DOS based (in a very broad sense, including derivatives) clients. They include those from IBM, ICL, Microsoft and even one particular Novell product. In particular clients are distributed with `Windows for Workgroups', `Windows 95', 'Windows NT', 'OS/2 Warp and others.

Some of Samba's server cousins include DEC Pathworks, Microsoft LAN Manager/X, OS/2 Lan Manager, IBM LAN Server, Syntax Server and Windows NT Server. Some clients such as Windows 95/Workgroups or Warp Connect can also act as low volume servers with limited management facilities.

SMB is becoming very popular, mainly owing to these factors:

 
   On the Macintosh side, Netatalk provides the connectivity services. Netatalk is a Unix implementation of the AppleTalk Protocol Suite, originally for BSD-derived systems. It includes support for routing AppleTalk, serving Unix and AFS file systems over AFP (AppleShare), serving Unix printers and accessing AppleTalk printers over PAP. A number of other minor printing and debugging utilities are also included.
 
Compatibility with Existing Applications
This server would have to be compatible with The Cat's Pajamas
When we tried to move to Windows NT, we were given a migration guideline from The Cats Pajama's to follow. The instructions were simple and the entire migration took little time, but performance was terrible. We needed a system that could handle serving the system to the network and help maintain the integrity of the Cats data files. I have been told that Unix heavily caches file I/O activity (more so than Windows NT or Novell Netware), so this added to my hopes that Linux would be a strong server platform for Cats, which is a file I/O intensive application.

My hopes were verified when we formally flipped the switch on the Linux server and turned off the Novell server. Cats ran smoothly and gracefully scaled up to the normal daily user level without any slowdowns or misfortunes. The Novell Netware server would normally experience periods when the system would slow down severely, and then speed back up to normal levels after 5 to 10 minutes. During these slowdowns, Cat's would become virtually useless, and sometimes users would be booted out of Cat's totally.

Another key area that I needed to be compatible with was the world Wide Web. I needed to be able to get CGI programs that were already tested and in use without having to develop them all myself. I also wanted to be able to get help easily and cheaply on setting up the web server and fixing it when it breaks. Linux uses Apache, the most widely used web server in the world. I can easily get support from mailing lists , news groups and Internet BBS's.
(http://www.netcraft.com/survey/)

Speed
After installing the Windows NT server, many users complained about slows access times for the network drives.
My users equate network drive access speed with network quality. They were very pleased with the speed of saving and opening files when they were on the Novell Netware server, but expressed disappointment in the speed of saving and opening files when we switch to the Windows NT server. One way that I have very unscientifically measured the speed of the Linux server was when we were using a Windows NT 4.0 machine to backup the Cats files off the Linux machine. This operation took 45 minutes while the exact same operation on the Novell server would take at least an hour longer. Currently I am backing up CATS by creating a gzipped tar file directly on the Linux server and it takes a little less than 45 minutes. Below is part of the output from the df command that shows the drive I have Cats on. This shows the current size of our Cats installation so you can get an idea of how much information is backed up in 45 minutes.

Filesystem 1024-blocks Used Available Capacity Mounted on

/dev/hdc1 2417493 1584580 707923 69% /usr/local/samba-sys

Inexpensive
I could not afford to go through another costly installation .
During the twelve months of running Windows NT 4.0 server, I have spent more than $3,000 in technical support with Microsoft to remedy various problems, including the frequent crashes and problems running Cats. The fix for the crashes was always ``Install the latest service pack or hot fix and call us back tomorrow.'' The fix for Cats was ``Get rid of The Cat's Pajamas and find a better system which was more Windows compatible to replace it.'' I wish I would have documented that support call with Microsoft so I had the name of the tech rep.

Technical support is no the only area of expense involved with Windows NT. The table below shows typical applications and the cost for each platform.
 
Service Microsoft Cost Linux Cost
Operating System Windows NT Server 4.0 $2,950.00 Linux RedHat 5.0 (CD) $49.00
Web Server Internet Information Server
$0.00
Apache
$0.00
E-Mail Exchange 5.0 Enterprise
$6,400.00
Sendmail,UW IMAP,POP-3
$0.00
Telnet server SLNet (4 user licensee)
$300.00
Included free unlimited licensee
$0.00
FTP server Included with IIS
$0.00
Included
$0.00
Relational Database SQL Server 6.5
$10,650.00
Just Logic SQL
$219.00
Proxy Server Microsoft Proxy Server
$995.00
Squid Object Cache
$0.00
Backup Software Included
$0.00
BRU, included
$0.00
Total Cost
$20,995.00
$268.00
Number of Users 100 100
Cost per seat
$212.95
$2.68
 

Low hardware requirements
I did not want to build the next Cray just to serve 55 users.
As at most University Press's, our operating budget is relatively small, especially when compared to commercial business and some other campus departments. This financial restriction did not allow me to purchase a server hardware platform that I would have like to have for the NT server, but the system was not low-end either.

Our Windows NT 4.0 server:
OS Windows NT Server 4.0 (SP3)
CPU 2 x Pentium 150
RAM 256 Megabytes
SCSI Adaptec 2940
-All data drives are SCSI
-Boot drive is IDE
Ethernet NE2000 clone
Our RedHat Linux 4.2 server:
OS RedHat 4.2
CPU Single Pentium 200
RAM 64 megabytes
SCSI DPT SmartCache IV
-RAID Station 3 (RAID 5)
-Boot drive is IDE
Ethernet NE2000 clone
The RAID which is listed on the Linux server was not purchased strictly for the Linux server, but was purchased to be placed on whatever server we decided to put into production.

Ease of administration
For myself and staff .
 
Unix usually gets the standard rap of being difficult to manage and requiring a steep learning curve. While many of the tools that will be used to manage the system are still command line based, a growing number are graphical and comparable to Windows in ease of use. This is especially true with the RedHat distribution, which includes a graphical control panel which allows the administrator to change system setting without working through the many text files which store this information. The control panels I use the most are the ones which setup the printers, file system, users and packages. If you use the included RedHat Package manager to install new applications, they are listed in the package manager, which allows you to graphically see what applications are installed on your system and remove them if wanted, much like the uninstall option on Microsoft Windows. 

Simple upgrade path
I don't want to start over each time a new version comes out.
RedHat Linux provides a very simple upgrade system in its installation set. The upgrade is actually better than the Microsoft Windows NT upgrade path, since you do not have to uninstall the previous version first.

While it is not required that you uninstall the previous version of Windows NT before installing the current release (4.0), it is recommended. This can be a very intensive installation, since you would need to setup all the user accounts again, along with reinstalling any software and automated systems and scripts.

When I upgraded from RedHat 4.1 to 4.2, the installation when smoothly whiteout any problems. While this was not a major revision step, RedHat has assured me that the soon to be released version 5.0 will offer a smooth transition from 4.2.

From the RedHat Linux manual:
 

1.5 Upgrading from a Prior Version 

The installation process for Red Hat Linux 4.2 includes the ability to upgrade from prior versions of Red Hat Linux (2.0, 2.1, 3.0.3, 4.0, and 4.1) which are based on RPM technology. Upgrading your system installs the modular 2.0.x kernel as well as updated versions of the packages which are installed on your machine. The upgrade process preserves existing configuration files using a .rpmsave extension (e.g., sendmail.cf.rpmsave) and leaves a log telling what actions it took in /tmp/upgradelog. As software evolves, configuration file formats can change, so you should carefully compare your original configuration files to the new files before integrating your changes. 

To upgrade a Red Hat Linux system, you must use a boot floppy (and possibly a supplemental floppy), just as if you were performing a full install. After selecting the medium to install from (and setting up networking information if it's required), the installation procedure prompts you to either Install or Upgrade; select Upgrade. This upgrade procedure is the functional equivalent of running the upgrade script in prior versions of Red Hat Linux. 

Please note that some upgraded packages may ``depend'' on other packages which may not be installed on your system. The upgrade procedure takes care of these dependencies, but it may need to install additional packages in order to satisfy them. 

 
 
Remote control and administration
One of the most attractive features of Linux (or Unix in general) is the ability to truly remotely control the server. Since Linux comes with a telnet server built in, you can use virtually any computer, regardless of operating system to telnet into the computer to do all administrative tasks. To remotely administer a Windows NT server, you must purchase a separate application to allow remote control. The most popular program for this is PCAnywhere by Symantec. This approach can become costly because you must purchase a copy for the server to act as the host, and a copy for each computer that needs to remotely control the server. How many remote computers need to control the server? This depends on each installation, but I have found that it save me a lot of running by having the ability to control the server from every PC on my network, and from home.

Telnet is text only, so this will be a drawback for many, but luckily for us, Linux supports X Windows. X Windows can be used locally on the server's console, like Windows NT, but can also be run remotely from any computer that can run an X client. These remote terminals can by other computers running Linux, or any other flavor of Unix and many X clients can be downloaded or purchased for Windows, Windows NT and Macintosh computers. Running X terminals does require more bandwidth, so I prefer just telneting into the server.

Another nice feature is the ability to display results of various system utilities in a web page. One of the things our Customer Service manager likes to know is which users have which files open and locked while using Cats. I wrote a simple Perl script to run the smbstatus program and print the results as a web page.

The output web page:
 
Snapshot of users for: Fri Dec 5   

11:41:18 CST 1997   

This page shows currently logged on users and locked files for the UNPLINUX server.  
Right-click this page and select REFRESH or RELOAD to force an update  

Samba version 1.9.17p1  
Service uid gid pid machine  
----------------------------------------------  
cdrom root root 11697 enterprise (129.93.31.35) Thu Dec 4 16:35:23 1997  
quinn root root 11697 enterprise (129.93.31.35) Thu Dec 4 16:35:23 1997  
M-DATA cbrumm cbrumm 11435 ds9 (129.93.31.14) Thu Dec 4 16:08:16 1997  
programs root root 11697 enterprise (129.93.31.35) Thu Dec 4 16:35:23 1997  
L-NE cbrumm cbrumm 11435 ds9 (129.93.31.14) Thu Dec 4 16:08:29 1997  
N-DBC cbrumm cbrumm 11435 ds9 (129.93.31.14) Thu Dec 4 16:08:29 1997  
O-WORK cbrumm cbrumm 11435 ds9 (129.93.31.14) Thu Dec 4 16:08:29 1997  
P-HIST cbrumm cbrumm 11435 ds9 (129.93.31.14) Thu Dec 4 16:08:29 1997  

<snip>  

Locked files:  
Pid DenyMode R/W Name  
------------------------------  
19818 DENY_NONE RDWR fileauth.txt Fri Dec 5 11:41:14 1997  
21212 DENY_NONE RDWR fileauth.txt Fri Dec 5 11:40:28 1997  
20590 DENY_NONE RDWR fileauth.txt Fri Dec 5 11:38:56 1997  
21384 DENY_NONE RDWR fileauth.txt Fri Dec 5 11:06:15 1997  

<snip>  

19818 DENY_NONE RDWR filebac2.isi Fri Dec 5 11:02:36 1997  
20590 DENY_NONE RDWR filebac2.isi Fri Dec 5 10:14:44 1997  
19818 DENY_NONE RDWR fileauth.isi Fri Dec 5 11:41:14 1997  
21212 DENY_NONE RDWR fileauth.isi Fri Dec 5 11:40:28 1997  

Share mode memory usage (bytes):  
92584(90%) free + 7728(7%) used + 2088(2%) overhead = 102400(100%) total 

 
 
The script that generates the above page:
 
#!/usr/bin/perl 
# ****************************************************** 
# * * 
# * Author: Quinn P. Coldiron * 
# * Date: 12-1-97 * 
# * Program: This program shows current users of the * 
# * Samba server. * 
# * * 
# ****************************************************** 
# Use cgi-lib CGI library for PERL. 

require "/home/httpd/cgi-bin/cgi-lib.pl"; 
$date = `date`; 
$users = `./smbstatus`; 
#Get the data from the form. 

&ReadParse; 
print &PrintHeader; 
print "<HTML>\n"; 
print "<HEAD>\n"; 
print "<TITLE>Logged In Samba Users</TITLE>\n"; 
print "</HEAD>\n"; 
print "<BODY BGCOLOR= #D4D4D4>\n"; 
print "<H1>Snapshot of users for: $date</H1>\n"; 
print "This page shows currently logged on users and locked files for the UNPLINUX server.<br>\n"; 
print "Right-click this page and select REFRESH or RELOAD to force an update<br>\n"; 
print "<PRE>$users</PRE>\n"; 
print "</BODY>\n"; 
print "</HTML>\n"; 

 

Windows NT provides a graphical program to show a chart us system performance, but it is recommended that you do not run it on the server that you want to monitor, because the monitor program itself takes too much of the system resources, and thus skews the data. Linux provides a system monitoring tool called TOP that is character based so it can be run on the server. Since it is character based, you can telnet into the server and run it from anywhere, getting an accurate picture of how the server is running.

Sample output of TOP:
 
11:55am up 1 day, 15:02, 3 users, load average: 0.08, 0.04, 0.00 
83 processes: 82 sleeping, 1 running, 0 zombie, 0 stopped 
CPU states: 2.7% user, 4.2% system, 5.9% nice, 93.7% idle 
Mem: 63204K av, 62336K used, 868K free, 38384K shrd, 5536K buff 
Swap: 114908K av, 368K used, 114540K free 29496K cached 

PID USER PRI NI SIZE RSS SHARE STAT LIB %CPU %MEM TIME COMMAND 
22390 root 10 0 540 540 400 R 0 2.8 0.8 0:00 top 
22388 cats 3 0 848 848 516 S 0 1.5 1.3 0:00 login 
22391 cats 10 0 660 660 524 S 0 0.7 1.0 0:00 bash 
6058 root 1 0 3568 3568 1396 S 0 0.5 5.6 1:25 tkdesksh 
22283 root 0 0 552 552 424 S 0 0.3 0.8 0:00 in.telnetd 
22387 root 1 0 552 552 424 S 0 0.3 0.8 0:00 in.telnetd 
21212 quinn 0 0 1084 1084 660 S 0 0.1 1.7 0:02 smbd 
20921 root 1 0 588 536 356 S 0 0.1 0.8 0:08 SWserver 
1 root 0 0 312 312 244 S 0 0.0 0.4 0:02 init 
2 root 0 0 0 0 0 SW 0 0.0 0.0 0:01 kflushd 
3 root -12 -12 0 0 0 SW< 0 0.0 0.0 0:00 kswapd 
19509 root 0 0 1092 1092 652 S 0 0.0 1.7 0:18 smbd 
331 root 0 0 812 812 480 S 0 0.0 1.2 0:00 login 
21 root 0 0 280 280 216 S 0 0.0 0.4 0:00 kerneld 
240 root 0 0 336 316 280 S 0 0.0 0.4 0:00 gpm 
128 root 0 0 368 360 276 S 0 0.0 0.5 0:00 syslogd 
137 root 0 0 496 488 268 S 0 0.0 0.7 0:00 klogd 

 
 


Section 3
Under the Hood
Setting up the server
Linux installation
The actual installation of an operating system is often used as a judgement on how good the system is. Just as with meeting people, you can never change the first impression. I have found that setting up a RedHat Linux server is as easy or even easier than setting up a Windows NT server. The setup includes two floppies have everything needed to get the system to the point that it can recognize the media (CDROM, FTP site, other server, etc.) that the installation files are on. Windows NT supplies three floppies for this purpose, but only supports CDROM installation. I have found that installing RedHat Linux on a laptop can even be easier, since it can detect the PCMCIA slots at installation time, while NT cannot. The most important factor is to be familiar with the hardware you have installed in your machine, including: You can install or upgrade Red Hat Linux/Intel via any of several basic methods. Depending on the method you use, you need either one or two formatted high-density (1.44 MB) 3.5-inch diskettes.

Installing from CD-ROM or via NFS requires only a boot diskette. Installing from a hard drive, via FTP, from an SMB volume, or from a PCMCIA device (including PCMCIA-based CD-ROMs) requires both a boot diskette and a supplemental diskette. Section 2.3.1 below explains how to create boot and supplemental diskettes.

CD-ROM

If you have a Red Hat Linux CD and a boot diskette you will need a supported CD-ROM drive and either a 3.5 inch floppy drive or an operational installation of MS-DOS on your machine in order to run the installation utility. If a boot diskette did not accompany your CD, you will need access to a computer running either Linux or MS-DOS to create a boot diskette from the CD.

NFS

If you wish to install over a network, you will need to mount the Red Hat Linux CD-ROM on a machine that supports ISO-9660 file systems with Rock Ridge extensions. The machine must also support NFS. Export the CD-ROM file system via NFS. You will need to have name services configured, or know the NFS server's IP address, and the path to the exported CD-ROM.

FTP

For an FTP install, you must have a boot disk and supplemental disk. You will need to have a valid name server configured or the IP address of the FTP server you will be using. You will also need the path to the root of the Red Hat Linux directory on the FTP site.

SMB Shared Volume

If you wish to install from an SMB shared volume, you will need to mount the Red Hat Linux CD-ROM on a Microsoft Windows NT or Windows 95 server that supports shared volumes. You will need to have name services configured, or know the server's IP address; you will also need the name of the shared volume containing the Red Hat Linux CD-ROM and the account number and password to use to access the volume.

Hard Drive

To install Red Hat Linux from a hard drive you will need the same boot and supplemental disks used by the FTP install. You must first create a RedHat directory at the top level of your directory tree. Everything you will install should be placed in that directory. First copy the base subdirectory, then copy the packages you want to install to another subdirectory called RPMS. You can use available space on an existing DOS partition or a Linux partition that is not required in the install procedure (for example, a partition that would be used for data storage on the installed system).

If you are using a DOS filesystem, you may not be able to use the full Linux filenames for the RPM packages. The installation process does not care what the filenames look like, but it is a good idea that you keep track of them so you will know what you are installing.

PCMCIA

If your CD-ROM, Ethernet card, or local hard disk is connected to a PCMCIA adapter, you must install with PCMCIA support. You need a supported PCMCIA controller and a supported PCMCIA SCSI adapter or Ethernet card. Installing via PCMCIA requires the use of a supplemental diskette.

Please See Appendix A for The Official RedHat Installation Guide.

Samba Installation/Setup
Installing the Samba RPM is the easiest way to install, as you only need to download the file and type rpm -I filename and it is installed. Setting up Samba is simple, as you just edit a text file to tell it what directories are going to be shared to the Windows clients. The text file's name is smb.conf and is located in the /etc. directory if you installed Samba using RPM. If you downloaded the .tar archive and installed Samba using the default installation, you will find the smb.conf file in /usr/local/samba/lib/.

An advantage to installing Samba using RPM is that it is easier. A disadvantage is that the versions are not as current, but they are usually more stable and reliable. I choose to go directly to the Samba web pages and download the most current non-beta release.

The picture on the left is the Network Neighborhood window on my NT workstation and is currently showing everything that I have access to on my Linux server.

If you installed Samba using RPM, it will automatically be started on system startup, but I had to manually add it to my rc.local script to have it start on bootup because I did not install from the RPM. I chose to install from the tarballs available at the official Samba site, so I could always have a current installation. To start the server manually, I just issue these commands:

/usr/local/samba/bin/smbd -D

/usr/local/samba/bin/nmbd -D

Extensive has been accomplished that allows Samba to act more like an NT server, including making a Linux server a Primary Domain Controller and more features are currently being added. I have listed the steps that I took in making my Linux server the Primary Domain Controller (PDC) for our network.

1. Set up the server.
       a. Create the smb.conf file.
       b. Create the netlogon directory. I put mine in /home.
       c. Restart Samba.

2. Setup the Windows 95 clients. (We set our up for roaming profiles.) Do not reboot until step 3!
       a. Control Panel
               1. Click Passwords, then Profiles and choose these settings:
                       a. Users can customize their settings.
                       b. Include desktop items.
                       c. Include start menu.
               2. In the Control Panel, select Network.
                       a. Under Identification, set your WORKGROUP name.
                       b. Access control = USER-LEVEL.
                       c. Obtain the list from YOUR SERVER NAME.
                       d. Under Client Configuration
                               1. Select CLIENT FOR MICROSOFT NETWORKS.
                               2. Under that client's properties.
                                       a. Log onto Windows NT domain.
                                       b. Enter your WORKGROUP name.
                                       c. Select LOG ON AND RESTORE CONNECTIONS.
                       e. Set primary network logon to CLIENT FOR MICROSOFT NETWORKS.
       b. Set up the user profiles.
               1. Install the Policy Editor from the Windows 95 CD.
               2. Create a new profile called config.pol and save it into the NETLOGON share on the Linux server. Make sure you add all the users on your server! This step only has to be
                   done once, not on each client.
               3. Using the Policy Editor, select Open registry from the File menu and select the options you want.
               4. Save it as config.pol and copy into the netlogon share on the Linux server. Set its permissions as 755.

3. Reboot the Windows 95 computer(s) and logon.

4. Possible problems.
       1. Windows95 OSR2 seems to send the passwords as uppercase, so try changing the passwords on the Linux server to uppercase.
       2. I had problems making my Linux server the WINS server, so you have some choices to fix this:
               a. If you do have another NT server, make it the WINS server and point all the clients to it.
               b. Disable WINS on each client and edit the c:\windows\Lmhosts.sam file and add the server and workstations to this file. Save the file as Lmhosts, NOT Lmhosts.sam This file can be appended to from a server, but
                   I haven't tried doing it from Linux/Samba. The entries look like this: xxx.xxx.xxx.xxx computername
               c. Disable WINS. At this time, we are running our Win95 clients with WINS disabled, but we do have a DNS server.

My Samba configuration (smb.conf) file looks like this:
 
; ******************************************************************* 
; * 
; * Samba config file for UNPLINUX 
; * Quinn P. Coldiron 
; * 
; ******************************************************************* 
[global] 
workgroup = UNP 
comment = Unplinux Server 
volume = RedHat5 
lock directory = /var/lock/samba 
locking = yes 
strict locking = no 
share modes = yes 
security = user 
os level = 65 
domain master = yes 
local master = yes 
prefered master = yes 
domain logons = yes 
wins support = yes 
;logon script = %m.bat ; per workstation (machine) 
;logon script = logon.bat 
logon script = %U.bat 
preserve case = yes 
short case preserve = yes 
case sensitive = no 
; printing = BSD or SYSV or AIX, etc.. 
printing = bsd 
printcap name = /etc/printcap 
load printers = yes 
print command = /usr/bin/lpr -r -P %p %s 
[netlogon] 
comment = Samba Network Logon Service 
path = /home/netlogon 
case sensitive = no 
guest ok = yes 
locking = no 
read only = yes 
browseable = yes ; say NO if you want to hide the NETLOGON share 
;admin users = @wheel 
create mode = 0755 

; ############################################################################### 
; # # 
; # Printers # 
; # # 
; ############################################################################### 
; I couldn't get the generic printers section to work, so I commented it out 
; and explicitly declared the printers. 
;[printers] 
; comment = All Printers 
; path = /var/spool/samba-print 
; browseable = yes 
; printable = yes 
; Set public = yes to allow user 'guest account' to print 
; public = no 
; writable = no 
; create mode = 0700 

[Technology] 
comment = Technology Printer 
path = /var/spool/samba-print 
print = Technology 
browseable = yes 
printable = yes 
public = yes 
writeable = yes 
create mode = 0777 

[Marketing2] 
comment = Technology Printer 
path = /var/spool/samba-print 
print = Marketing2 
browseable = yes 
printable = yes 
public = yes 
writeable = yes 
create mode = 0777 

[Marketing1] 
comment = Technology Printer 
path = /var/spool/samba-print 
print = Marketing1 
browseable = yes 
printable = yes 
public = yes 
writeable = yes 
create mode = 0777 

[CustServ] 
comment = Technology Printer 
path = /var/spool/samba-print 
print = CustServ 
browseable = yes 
printable = yes 
public = yes 
writeable = yes 
create mode = 0777 

[CanonColor] 
comment = Color Laser Printer 
path = /var/spool/samba-print 
print = CanonColor 
browseable = yes 
printable = yes 
public = yes 
writeable = yes 
create mode = 0777 

; ############################################################################### 
; # # 
; # Shared Volumes # 
; # # 
; ############################################################################### 

[homes] 
comment = Home Directories 
browseable = no 
writable = yes 
read only = no 
preserve case = yes 
short preserve case = yes 
;create mode = 0777 

[userdata] 
comment = All userdata that you are allowed to see. 
path = /home 
writeable = yes 
;Full control for your stuff, full in you group, nothing for other 
;people's stuff. 
create mode = 0770 

[sys] 
comment = System drive. Various Press utilities. 
path = /usr/local/samba-sys/ 
writeable = yes 
create mode = 0777 

[programs] 
comment = Program drive. Installation sets and programs. 
path = /usr/local/samba-programs 
writeable = yes 
create mode = 0777 

[ulrich] 
comment = Ulrich's PLUS. 
path = /usr/local/samba-programs/ulrich 
create mode = 555 

[cdrom] 
comment = Internal IDE cdrom. For temporary usage. 
path = /mnt/cdrom 

[dictionary] 
comment = Random House Dictionary. 
path = /mnt/scd1 

[bip] 
comment = Bowker Books In Print CDROM 
path = /mnt/scd0 

[msoffice] 
comment = Microsoft Office Bookshelf Reference. 
path = /mnt/scd3 

[encarta] 
comment = Microsoft Encarta 
path = /mnt/scd2 

[press] 
comment = Press share. Marketing maps this to U: 
path = /home/press 
writeable = yes 
create mode = 0777 

[CATS-VOL] 
comment = Entire Cats volume for backup 
path = /usr/local/samba-cats/ 
writeable = yes 
printable = no 
guest ok = yes 
public = yes 
create mask = 0777 

[L-NE] 
comment = Cat's root. Map as L. 
path = /usr/local/samba-cats/ne 
writeable = yes 
printable = no 
guest ok = yes 
public = yes 
create mask = 0777 

[M-DATA] 
comment = Cat's data drive. Map as M. 
path = /usr/local/samba-cats/ne/data 
writeable = yes 
printable = no 
guest ok = yes 
public = yes 
create mask = 0777 

[N-DBC] 
comment = Cat's program drive. Map as N. 
path = /usr/local/samba-cats/ne/dbc 
writeable = yes 
printable = no 
guest ok = yes 
public = yes 
create mask = 0777 

[O-WORK] 
comment = Cat's work drive. Map as O. 
path = /usr/local/samba-cats/ne/work 
writeable = yes 
printable = no 
guest ok = yes 
public = yes 
create mask = 0777 

[P-HIST] 
comment = Cat's history drive. Map as P. 
path = /usr/local/samba-cats/ne/hist 
writeable = yes 
printable = no 
guest ok = yes 
public = yes 
create mask = 0777 
 

My actual logon.bat batch file is here:
 
REM ******************************************************* 
REM * * 
REM * University of Nebraska Press network logon script. * 
REM * * 
REM * Last modified : 10-16-97 * 
REM * By: Quinn * 
REM * * 
REM * The drive letter scheme is leftover from the past * 
REM * network administrator and the Novell Netware 3.1 * 
REM * server he had. * 
REM ******************************************************* 
REM User's home drives 
net use e: \\unplinux\homes 
REM General network drives 
net use f: \\intrepid\sys 
net use g: \\intrepid\userdata 
net use h: \\intrepid\dictionary 
net use i: \\intrepid\bip 
net use j: \\intrepid\programs 
net use s: \\unplinux\ulrich 
REM CATS drives 
net use l: \\unplinux\l-ne 
net use m: \\unplinux\m-data 
net use n: \\unplinux\n-dbc 
net use o: \\unplinux\o-work 
net use p: \\unplinux\p-hist 
REM Temp entry for Robotronics 
REM The old system had robo on the T:\ drive but 
REM all new installations will run robo from the j:\ drive. 
net use t: \\unplinux\programs 
 
 

Netatalk Installation/Setup
Netatalk offers the same installation options as Samba, so you can choose either the RPM, or .tar archives. I would choose the RPM here, as they are the same versions as the .tar files and make life easier during installation. I really don't have mush to say about this installation, since it was very simple and straight forward. After installing the package, I just edited the AppleVolumes.system file and started the daemon. Below is a very simple AppleVolumes.system file that will give the Mac users their home directory and a few other volumes that might have stuff they need.
 
 
# 
# This file is read before (after if -u is specified) the user's 
# AppleVolume file. Add extension mappings and volumes here. 
# 
/usr/local/samba-sys Sys (F drive) 
/home Userdata (G drive) 
/usr/local/samba-programs Programs (J drive) 
# default translation -- note that CR <-> LF translation is done on all 
# files of type TEXT. The first line turns off translation for files of 
# unknown type, the second turns this translation on. 
. BINA UNIX 
# . TEXT UNIX 
# sounds 
.mod STrk STrk 
.mid Midi ttxt 
.aiff AIFF SNdm 
.wav WAVE SNdm 
.au ULAW SNdm 
# video 
.moov MooV mMPG 
.mov MooV mMPG 
.mpg MPEG mMPG 
.mpeg MPEG mMPG 
# formatted text 
.html TEXT MOS! 
.rtf TEXT MSWD 
.doc WDBN MSWD 
# compressed archives 
.bin BINA MB2P 
.zip ZIP ZIP 
.tar TARF TAR! 
.gz Gzip Gzip 
.Z ZIVM LZIV 
.sea ???? SITx 
.cpt PACT CPCT 
.sit SIT! SIT! 
.hqx TEXT SITx 
# graphics 
.tiff TIFF JVWR 
.tif TIFF JVWR 
.bmp BMPp JVWR 
.pct PICT ttxt 
.pict PICT ttxt 
.jpeg JPEG JVWR 
.jpg JPEG JVWR 
.gif GIFf JVWR 
The other file that you need to edit with NetaTalk is papd.conf. This file hold the printer information.
 
# Attributes are: 
# 
# Name Type Default Description 
# pd str ".ppd" Pathname to ppd file. 
# pr str "lp" LPD printer name. 
# op str "operator" Operator name, for LPD spooling. 
# 
# Some examples: 
# 
# On many systems (notably not Solaris), no papd.conf is required, 
# since papd shares the same defaults as lpd. 
# 
# A simple example: 
# 
# terminator:\ 
# :pr=lp:op=wes:\ 
# :pd=/usr/share/lib/ppd/HPLJ_4M.PPD: 
# 
# Note also that papd.conf can list several printers. 
 
 
Installing The Cats Pajamas
Installing Cats on the Server
Installing Cats on a Linux server can be as simple as copying all the files and directories from the old server to the Linux server's shared volume for Cats. The way that I set up out server was to install another drive in the Linux server to hold the Cats installation. I chose an IDE drive mainly because I didn't have a SCSI card in the server, didn't have an extra one handy and I was under an extreme time crunch to get Cats back online. My intentions were to eventually replace the IDE drive with a SCSI drive over Christmas break, but the performance has been more than satisfactory, so we are going to leave the setup alone. I mount this drive as /usr/local/samba-cats and have the permissions set open to the world by running the command chmod 777 /usr/local/samba-cats -R. This is a security risk, but Cats has told me that the files must be world writeable and readable for Cats to work properly. I also have the Samba configuration file set up with a mask of 0777, which will make sure that all files written will be readable by all the users.

The specific portion of the smb.conf file for Cats is listed here:
 
[CATS-VOL] 
comment = Entire Cats volume for backup 
path = /usr/local/samba-cats/ 
writeable = yes 
printable = no 
guest ok = yes 
public = yes 
create mask = 0777 

[L-NE] 
comment = Cat's root. Map as L. 
path = /usr/local/samba-cats/ne 
writeable = yes 
printable = no 
guest ok = yes 
public = yes 
create mask = 0777 

[M-DATA] 
comment = Cat's data drive. Map as M. 
path = /usr/local/samba-cats/ne/data 
writeable = yes 
printable = no 
guest ok = yes 
public = yes 
create mask = 0777 

[N-DBC] 
comment = Cat's program drive. Map as N. 
path = /usr/local/samba-cats/ne/dbc 
writeable = yes 
printable = no 
guest ok = yes 
public = yes 
create mask = 0777 

[O-WORK] 
comment = Cat's work drive. Map as O. 
path = /usr/local/samba-cats/ne/work 
writeable = yes 
printable = no 
guest ok = yes 
public = yes 
create mask = 0777 

[P-HIST] 
comment = Cat's history drive. Map as P. 
path = /usr/local/samba-cats/ne/hist 
writeable = yes 
printable = no 
guest ok = yes 
public = yes 
create mask = 0777 

At the time of this writing, we were still running Cats 2.3, so the major directories were as follows:
 
ne----+  
     |---> data  
     |---> dbc  
     |---> work  
     |---> hist
 While we are currently able to get all of our system onto a 2.5 gigabyte hard drive, I can see a day when we will have a large enough history that we will need more space. We could just get a larger hard drive, but an easier upgrade would be to just add another drive and mount it into the directory tree. We could actually run four drives for Cats by mounting a different drive into the ne directory for each subdirectory. By doing this, data would be running on a drive, dbc would be a drive, work would be a drive and hist would be a drive. In theory, the performance would increase, since drive access to data would not slow down history searches, or read/writes to the work drive.

I have written a CGI Perl script to make it simple for our Business Department and Customer service department to lock Cats during month-end closing and reindexing procedures. The script asks for a password, and then replaces the standard batch files to start Cats with another batch file that says Cats is locked for closing or maintenance. When they are finished, they can unlock Cats by running the unlock CGI script. The scripts are listed here:

Lock Cats:
#!/usr/bin/perl 
# ****************************************************** 
# * * 
# * Author: Quinn P. Coldiron * 
# * Date: 11-24-97 * 
# * Program: This locks Cats * 
# * * 
# ****************************************************** 
# Use cgi-lib CGI library for PERL. 
require "/home/httpd/cgi-bin/cgi-lib.pl"; 
#Get the data from the form. 
&ReadParse; 
print &PrintHeader; 
print "<HTML>\n"; 
print "<HEAD>\n"; 
print "<TITLE>Finished</TITLE>\n"; 
print "</HEAD>\n"; 
print "<BODY BGCOLOR= #b7b7b7>\n"; 
if ( $in{password} =~ "PASSWORD") { 
print "<P><B>Finished.</B></P>\n"; 
print "<P>Batch files written and CATS is <B>locked</B>.</P>\n"; 
print "<BR>You may access CATS by going to the M: drive and typing secret.bat\n"; 
print "This should only be used for Month-end closing, reindexing and system repairs.\n"; 
print "<BR><BR>Quinn.\n"; 
system ("cp /home/httpd/cgi-bin/cats/lock/*.bat /usr/local/samba-cats/ne/data/"); 
system ("chmod 777 /usr/local/samba-cats/ne/data/*"); 
} else { 
print "Wrong password\n"; 

print "</BODY>\n"; 
print "</HTML>\n"; 
Unlock Cats:
 
#!/usr/bin/perl 
# ****************************************************** 
# * * 
# * Author: Quinn P. Coldiron * 
# * Date: 11-24-97 * 
# * Program: This program copies that cats#.bat files * 
# * to the correct location. * 
# ****************************************************** 
# Use cgi-lib CGI library for PERL. 
require "/home/httpd/cgi-bin/cgi-lib.pl"; 
#Get the data from the form. 
&ReadParse; 
print &PrintHeader; 
print "<HTML>\n"; 
print "<HEAD>\n"; 
print "<TITLE>Finished</TITLE>\n"; 
print "</HEAD>\n"; 
print "<BODY BGCOLOR= #b7b7b7>\n"; 
if ( $in{password} =~ "PASSWORD") { 
print "<P><B>Finished.</B></P>\n"; 
print "<P>Batch files written and CATS is unlocked.</P>\n"; 
print "<BR><BR>Quinn.\n"; 
system ("cp /home/httpd/cgi-bin/cats/unlock/*.bat /usr/local/samba-cats/ne/data/"); 
system ("chmod 777 /usr/local/samba-cats/ne/data/*"); 
} else { 
print "Wrong password!\n"; 

print "</BODY>\n"; 
print "</HTML>\n"; 
 
 

Configuring your Windows clients
I have setup our Cats installation to share each required cats directory as a hard mounted drive letter. The specific portion of the login script that mounts cats is listed here:
 
REM CATS drives 
net use l: \\unplinux\l-ne 
net use m: \\unplinux\m-data 
net use n: \\unplinux\n-dbc 
net use o: \\unplinux\o-work 
net use p: \\unplinux\p-hist 
My cats batch file is here:
 
PATH=C:\;C:\WINNT;C:\WINDOWS;L:\;M:\;N:\;O:\;P:\ 
SET DBC_FILEPATH=L:\;M:\;N:\;O:\;P:\ 
Set DBC_PREP=M: 
Set DBC_FILES=140 
Set DBC_PGMSIZE=65024 
Set DBC_CMDLINE=OLD 
SET DBC_XKEYS=ON 
Set DBC_COMPAT=DOS 
Set DBC_PORT=24 
SET DBC_DBCPATH=N:\ 
M: 
DBC.EXE 
I have also followed the suggestions on the Cats web site http://www.tcpj.com for specific settings for Windows 95. I have found that all of these do help in getting Cats to run better.
Configuring the DOS emulator to run Cats
Linux has a very interesting program called DOSEMU which creates a ``DOS box'' that can run many DOS applications, including MS-DOS, PC-DOS, DR DOS, Open DOS, Windows for Workgroups 3.11, the Novell Netware client and many more. I had problems at first getting DOSEMU to run programs on the redirected drives unless I called them by the full name (go.bat instead of go) but tracked this down to the version of DOS that I was using. I was using Novell DOS 7.0 but switched to MS-DOS 6.22 on the advice of Hans Lermen (one of the DOSEMU developers) and this fixed the problem. He said that this has been reported many times and it seems to be a bug in the command.com code that many versions of non Microsoft DOS use.

DOSEMU uses an image file of a hard disk to emulate a DOS hard drive so you do not need to have a DOS partition. Using the /var/lib/dosemu/setup-hdimage program will step you through making a basic hdimage file. The only required item is a bootable DOS 6.22 floppy disk with whatever DOS tools you think you might need. I included EDIT.COM and QBASIC.EXE. After running through the setup-hdimage program, start the emulator with xdos or dos, depending on if you are in X-Windows or not. The default setup gives you the Linux hard drive as DOS drive D:\. To copy the programs I wanted off the floppy to the hdimage file, I opened another xterm window and mounted the floppy to /mnt/floppy, then switched back to DOSEMU, changed to D:\mnt\floppy and copied EDIT.COM and QBASIC.EXE to C:\. I could now run the MS-DOS editor to edit the config.sys and autoexec.bat files. If I wanted, I could also write a quick QBASIC program.

DOSEMU gives you a utility called LREDIR which redirects Linux directories to DOS drive letters. Below is the AUTOEXEC.BAT that I use with DOSEMU to give me the drive letters for Cats and for Robotronics.
 
@echo off 
path=c:\;l:\;m:\;n:\;o:\;p:\ 
prompt $p$g 
rem set temp=c:\temp 
lredir l: linux\fs\usr\local\samba-cats\ne 
lredir m: linux\fs\usr\local\samba-cats\ne\data 
lredir n: linux\fs\usr\local\samba-cats\ne\dbc 
lredir o: linux\fs\usr\local\samba-cats\ne\work 
lredir p: linux\fs\usr\local\samba-cats\ne\hist 
lredir t: linux\fs\usr\local\samba-sys\programs\nesb 
c: 
menu.bat 
This autoexec.bat file loads the redirected drives and displays a menu which allows the user to select the DOS application they want to run (CATS and Robotronics). I have set the dos emulator as the shell, so that as soon as the Mac users or remote users telnet into the Linux server the DOS emulator is started and they get the main menu. When they exit the DOS emulator, they are disconnected from the server.

Installing a RAID
The RAID that we chose to purchase was a kit that contained a SCSI RAID controller and subsystem storage cabinet from Distributed Processing Technology.

The SCSI card is a PCI card with a caching module added to it. The cache module has four SIMM slots on it and will accept any standard 32 pin SIMM up to 16 meg each for a total of 64 megabytes of cache. The card comes with a four meg module already installed, and that is what we currently are using.

The storage subsystem requires you to supply your own drives and comes in two style. One supports narrow SCSI drives and the other supports wide drives. We are using the narrow drive cabinet, mainly because I already had three drives that I wanted to use. Installing the drives can be tricky, as the data cable is not color coded and I could not tell what wire was for pin one. The first time around I had the drives installed backwards, but nothing was hurt. I called the tech support line and they were very helpful in getting the problem fixed.

After installing the card in the server, the next step is to configure the RAID with the RAD level of choice. We chose to run RAID level 5. While Linux does have built in drivers for the DPT controller card, DPT does not offer Linux utilities to configure the unit. What I did was temporarily plug a 200 meg IDE hard drive into the server to boot from and ran the DOS configuration utilities which are graphical and easy to follow. Using the mouse, I selected the three drives that I wanted to include in my RAID, then selected the RAID level I wanted, saved the configuration and shutdown the computer. I then unplugged the IDE DOS drive and reconnected the IDE Linux boot drive.

I kind of cheated when I installed the driver for the SCSI card by rerunning the Linux setup program. I had other things that needed fixing, so I thought this would be the best way. I could have just added the daemon by using the tools in the control panel as well or by typing insmod eata-dma at the command prompt and the driver would be loaded and I could see the report that the system now recognizes my SCSI card and RAID. During the installation, select YES when asked if you have a SCSI card and select correct driver (EATA-DMA) for the card you have. When you are finished and reboot the computer, you will see the RAID initialize and report the settings you configured under DOS, then the kernel recognizing the card.

Now, you need to create a partition and format the drive. To make a partition, use the fdisk command and follow the menu to make a Linux primary partition. Formatting the RAID is as easy as formatting any other drive. Remember that the system sees your RAID as a single, large disk. To format it in Linux, issue the mkefs2 /dev/sda1, or whatever SCSI drive it is. To actually use the disk after formatting, you need to mount it someplace. I wanted to use this disk for the home directories of our users, so I mounted it as /home/raid. But, whenever I added a user, they were still being added to /home and not on the RAID, so I edited the /usr/sbin/adduser script (which is just a Perl script) and changed the home directory location to /home/raid. Now, whenever I add a user, they are added to the RAID.

Daily administration
System backups
I have a SCSI Hewlett Packard SureStore 6000 4mm DAT drive that I am setting up for backup duties for our Linux server. Currently, I am backing up all data through Samba to our Windows NT server using

another SureStore 6000 tape drive and Cheyenne Arcserve software. I have also been known to make a quick backup to the RAID using tar. Tar is a simple utility that has been around Unix almost as long as Unix has been around.

To make a tar backup, just issue the following command:

tar cvf archivename.tar /directory-to-archive

This will create a tar file named archive.tar of the contents of the directory directory-to-archive. While this works fine, the resulting file might be very large because we did not apply any compression. By

modifying the command to look like this:

tar cvzf archivename.tar.gz /directory-to-archive

We compress the tar file with gzip after the file is made. At a later date, we might want to view what is in the tar file, so we can issue the tar tvf archivename.tar.gz to list the files in the archive.

While backing up to disk is OK for a temporary thing, you should always backup to tape for critical data. Linux supports two types of tape drives. The first is the style that connects to the floppy drive

controller, like the Colorado drives and Iomega Ditto. The other style connect to a SCSI controller. Floppy tape drives have the device names of /dev/ft0, dev/ft1 and so on. SCSI drives are /dev/st0, /dev/st1 and so on. These devices are "rewinding" devices which rewind the tape when the operation is completed. IF you are archiving more than one session to the tape, then use the non-rewinding devices /dev/nft0, /dev/nrft1, /dev/nst0, /dev/nst1 and so on.

After writing the archive to tape, you can use the mt (magnetic tape) command to rewind, retention and find sessions on tape. The table below shows the commands.

mt /dev/nft0 rewind

mt /dev/nft0 retention

mt /dev/nft0 fsf 1 skips the current session to find the next session on tape.

To use the mt command, you must use the non-rewinding devices.

Using tar to make backups has its good points and its bad points. On the bad side, neither tar or gzip are fault-tolerant. Compressing tar files with gzip will greatly reduce the amount of space on the backup

media, but if even one block of the archive gets corrupted, which can happen on tapes, the entire file can be useless. Usually, you will be able to retrieve all data up to that point, though. A better solution is to use a "real" backup system such as BRU (Backup and Restore Utility) that comes with a purchased version of RedHat Linux 5.0. Backup systems usually compress each file individually, so that if the media is damaged, you will not usually lose the entire archive.

BRU has both a command prompt interface and a graphical X-Windows interface and is included with RedHat 5.0. BRU offers automated backup scheduling and scripting, so it is very easy to setup a simple but effective and reliable backup system. I find the system as easy to maintain as ArcServe on Windows NT.

Scheduling events
Linux has a very easy to use scheduler program called cron that will run commands, scripts or programs at the scheduled times. To edit the list of events, issue the crontab -e command. This will start the default editor (usually vi, but I changed mine to joe). When you exit the editor, cron will install the new config file you just edited and schedule all the jobs. You can view the schedule by issuing the crontab -l command:
 
SHELL=/bin/bash 
PATH=/sbin:/bin:/usr/sbin:/usr/bin 
MAILTO=root 
# Run any at jobs every minute 
# * * * * * root [ -x /usr/sbin/atrun ] && /usr/sbin/atrun 
# run-parts 
# 01 * * * * root run-parts /etc/cron.hourly 
# 02 1 * * * root run-parts /etc/cron.daily 
# 02 2 * * 0 root run-parts /etc/cron.weekly 
# 02 3 1 * * root run-parts /etc/cron.monthly 
# Remove /tmp, /var/tmp files not accessed in 10 days (240 hours) 
# 41 02 * * * root /usr/sbin/tmpwatch 240 /tmp /var/tmp 
# Remove formatted man pages not accessed in 10 days 
# 39 02 * * * root /usr/sbin/tmpwatch 240 /var/catman/cat? 
############################################################# 
# WWW logs. I run 2 so I can compare results. 
############################################################# 
# Run web one web log utility 0 0-23 * * * /usr/bin/log 
02 1 * * * /usr/bin/log 
# Run the other web log utility 0 0-23 * * * /usr/local/mkstats/mkstats.pl -c mkstats.config 
02 1 * * * /usr/local/mkstats/mkstats.pl -c mkstats.config 
############################################################# 
############################################################# 
# Live stream management 
############################################################# 
# Create xdm file for live stream for Sports Nightly (5:45 pm) 
45 17 * * 1,2,3,4,5 livestream-on 
# Kill xdm file for live stream for Sports Nightly (8:10 pm) 
10 20 * * 1,2,3,4,5 livestream-off 
# Create xdm file for live stream for Saturday games (7:00 am) 
0 7 * * 6 livestream-on 
# Kill xdm file for live stream for Saturday games (10:00 pm) 
0 22 * * 6 livestream-off 
# Check the 3.0 server to see if it is running and not dead! (every minute) 
1-59 * * * * /usr/local/streamworks-3.0/checkSWserver 
############################################################## 
# Check to see if network volumes are mounted (at 10:00 p.m.). 
# These need to be mounted since this machine performs the 
# backup at 11:55. 
0 22 * * 1,2,3,4,5 checkmounts 
# copy BIP from Intrepid to exeter (WWW) 
0 23 * * 1,2,3,4,5 /usr/local/bin/mvbip 
# backup userdata from intrepid 
55 23 * * 1,2,3,4,5 bu-userdata 
# backup CATS 
55 23 * * 1,2,3,4,5 bu-cats 
# backup Marketing 
0 3 * * 1,2,3,4,5 bu-marketing 
# mail orders to quinn 
0 8 * * 1,2,3,4,5 /usr/local/bin/mailunporders.pl 
Each entry has a specific configuration to follow. If you want the command to run every day at 1:00 AM, specify the minute as 0 and the hour as 1. The other three fields should be asterisks, which means ``every day and month at the given time.

You might notice the entry

# Check to see if network volumes are mounted (at 10:00 p.m.).
# These need to be mounted since this machine performs the
# backup at 11:55.
0 22 * * 1,2,3,4,5 checkmounts

This calls a script I wrote to check that the NT server is mounted so I can backup all data on it. I mount the server using the smbmount command which allows a Linux machine to mount shares from a Windows machine. This script just verifies that a certain file or directory is actually at the mount point. I use these ``reference'' files for checking purposes, so they are read-only, so they can't be accidentally deleted by users. The script is listed here:
 
#!/bin/sh 
# Cronjob to remount network drives if they are not mounted. 
# Author: Quinn P. Coldiron 
if [ -z "`ls /mnt/exeter | grep InetPub | grep -v grep`" ] 
then 
umount /mnt/exeter 
/mnt/mountexeter 
echo "Exeter remounted `date`" 
fi 
if [ -z "`ls /mnt/intrepid-f | grep BLINE | grep -v grep`" ] 
then 
umount /mnt/intrepid-f 
/mnt/mountintrepid-f 
echo "Intrepid F remounted `date`" 
fi 
if [ -z "`ls /mnt/intrepid-g | grep QC | grep -v grep`" ] 
then 
umount /mnt/intrepid-g 
/mnt/mountintrepid-g 
echo "Intrepid G remounted `date`" 
fi 
if [ -z "`ls /mnt/intrepid-mrktdept | grep KK | grep -v grep`" ] 
then 
umount /mnt/mountintrepid-mrkt 
/mnt/mountintrepid-mrktdept 
echo "Marketing remounted `date`" 
fi 
echo "All network volumes mounted." 
 
 

Replacing your Desktop OS with Linux
Places to go: I have wanted to make Linux my desktop operating system for a long time, but I couldn't because I needed to be able to run the following applications: Microsoft Word, WordPerfect, Microsoft Excel, Microsoft Access, our internal mail system (Pegasus), Microsoft Access and Microsoft Visual Basic. I have recently narrowed the list of required applications that do not have a Linux counterpart down to Access and Visual Basic, which we will analyze later.

I have found that, for the most part, I can replace Microsoft Office with Applixware. Applixware is an office suite for Linux (an many other Unix platforms) that can read and write Word and Excel files, which allows me to share documents with the rest of the press. While I still cannot read Access databases, I am working out a solution for that which we will discuss later.

Applix Words

Applix Spreadsheets Applix Presentation Graphics Applix Mail Applix HTML Author The Extension Language Facility (ELF) and Macros Changes from Previous Version

This new version features advanced HTML authoring tools for adding pages to your website simply and directly. It also has dramatically improved filter technology enabling you, for example, to import and work on Word or WordPerfect files and export back in those formats. If you want the ``real thing'', Corel has version 7.0 of Word Perfect available for Linux.

The graphical user interface for Linux (and Unix in general) is X Windows. A typical X Windows setup is shown below. This system is running the Common Desktop Environment (CDE) window manager. X Windows is divided into two subsystems consisting of a server and a client and you are free to change either of these as your want. The main reason for changing an X server is to gain better speed and better support for your video cards and monitors. The main reason for changing window managers is to get the look and feel you desire. You can not change the server or window manager under any of the Windows products, because Microsoft has decided the look and feel you get. The closest they get is the Plus! pack and its themes.

Another possibility , which will save money and breath life into your old 486's is to install Linux on them and use them as a NC (Network Computer). Linux's GUI is X, so it is perfect for an X terminal (with either another Linux machine as the server, or any other Unix system) and you can run Insignia Solutions Inc.'s Keoke client under Java in order to turn your Linux workstation into a thin client that runs Windows (virtual NT) applications.

As a rule, Linux performs radically better than Windows 3.1 given the same amount of RAM. Linux can run complete with a graphical desktop on a 386 with 4MB of RAM, if you're patient. Add Netscape Navigator, and you can get away with a 486 and 8MB of RAM. Consider 16MB of RAM a performance sweet spot, especially if you use Communicator. Linux also has unimposing disk space requirements. The bare-bones Caldera graphical client uses about 68MB of disk space. You'll want to install a few more packages than that (Netscape, Java, and perhaps a friendlier window manager than the default Fvwm), and you'll need at least a 32MB swap partition. When you consider all the factors, a 200MB disk is plenty for most desktops.

 
Appendix A
RedHat 5.0 Installation Guide
Appendix B
Samba
Appendix C
DOSEMU Manual


Copyright © 1998, Quinn P. Coldiron
Published in Issue 29 of Linux Gazette, June 1998


[ TABLE OF CONTENTS ] [ FRONT PAGE ]  Back  Next


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


Revisiting VIM

by Andy Kahn
April 29th, 1998

 
Vim stands for "VI Improved", and certainly, it a very much improved version of the old text editor, vi. It's been a while since the gazette had an article on vim (over a year to be exact!), and a lot has changed since then, including a major version release. I decided to cover some of the new features (as well as some older features) that I find extremely useful in vim, but not in vi.

Features

First of all, let me just run down some of the big features of the latest version of vim:
  • Syntax highlighting
  • Win32 GUI version
  • BeOS version, including GUI
  • MacOS GUI version
  • VMS version
  • Built-in scripting language
  • Perl and Python support
  • Unlimited undo
  • Multiple windows
  • ...and a ton of other good stuff
  • Syntax highlighting

    Personally, I found the syntax highlighting to be one of the most useful features of vim. Syntax highlighting (or coloring, as some may call it), colors text according to their attributes. For editing code, this allows you to have different colors for commented text, keywords, numbers, etc. You may not think much of it, but believe me, after staring at code for long periods of time, all the text on the screen starts looking pretty much the same. It certainly helps to have some color differentiate between actual code, and comments in the code! A picture is worth a thousand words, so here's a screen shot of my vim setup editing main.c from the vim source:

    You may notice the curious string on the very first line of the file: "vi:set ts=8 sts=4 sw=4:" This is just a little formatting shortcut. If you write code that other people may look at and/or edit, if they also use vim, then the code will be properly indented as you intended it to be! This is just like the magic strings people use in emacs: "-*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-" to make indentation look consistent.

    Gui versions

    As for all the wonderful GUI versions of vim, here's a screenshot I found at http://polder.ubc.kun.nl/~rhialto/be/vim-5.0s-screen1.gif showing off the BeOS version: 

    Here is a BIG screenshot of the Unix version of vim with four different looks (vim in an xterm, vim using Athena, vim using Athena with Xaw3d, and vim using Motif (for Linux users, Vim also works with Lesstif)). Click on the image for the full size version: 


    There are plenty more screenshots here.

    Built-in Scripting

    The built-in scripting language is a small language (as opposed to Perl and Python) that let's you do some simple things in your vim startup file (.exrc or rather, .vimrc). For example, the simplest thing to do is to check for a version or feature:
        if version >= 500
        "   Switch on syntax highlighting.
            syntax on
    
            if has("cscope")
                set csexec=/usr/local/bin/cscope
                set csto=0
                set csta=1
                set csverb=0
                cs add cscope.out
                set csverb=1
            else
                map ^] g^]
            endif
        endif
    

    Visual Text Selecting

    A feature which is present even in the previous version of vim that I use frequently is its "Visual" capability. By hitting "v" when in command mode, you can highly lines and words and then perform just about any normal vim operation on the selected text! This includes, deleting, copying, pasting, running more ":ex" commands, and my favorite, reindenting. For example, let's say I highlighted the following code: 

    If I hit ">" (that's the greater-than sign, or Shift-.), the result will look like this: 

    Or if I were to hit "<" (the less-than sign, or Shift-,), I get this result: 

    If I really wanted to, I could highlight the entire function, and run then run it through the "indent" program: 

    Before:

      

    After:

     

    C and C++ tags

    Another feature programmers will find handy is vim's ability to deal with multiple tags. Vim comes with "Exhuberant Ctags", and with it, you can store multiple definitions in the same tags file. Once in vim, you can do use ":tselect" or ":tjump" on a tag, and vim will present to you a list of the multiple tag entries. Just select from the list, and vim will take you there as it normally would with a single tag entry!

    There's More!

    Of course, I could go on and on about all the little (as well as big!) things that make vim such a great editor.  But I won't bore you with the details. :)  You can go read about them yourself on vim's homepage: www.vim.org.  There's plenty of new things being worked on and added all the time, including more features in the various GUI versions (contact me if you are interested in doing a GTK and/or a QT version!), ports to other platforms (including the Amiga), and other nifty features.

    There are certainly a lot of text editors out there, and if you're a vi user, you should definitely consider using vim if you aren't doing so already!


    Andy works at Digital Equipment Corporation doing Digital Unix filesystems kernel development. He thinks he's just hacking away at more and more C code, and in his copious spare time, he hacks on lots of other things, including all the trees in his neighborhood. Feel free to send him email.


    Copyright © 1998, Andy Kahn
    Published in Issue 29 of Linux Gazette, June 1998


    [ TABLE OF CONTENTS ] [ FRONT PAGE ]  Back  Next


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


    A Linux Journal Preview: This article will appear in the August issue of Linux Journal.


    Sun Joins Linux International

    By Marjorie Richardson


    In May, Sun Microsystems joined Linux International. In a year where Netscape has released their source and many companies have announced that their products will be supporting Linux, I felt Sun's move was an interesting enough development to want to know more. Therefore, I did a short e-mail interview with Charles Andres, a Group Manager in Market Development Engineering at Sun Microsystems. Here's what he told me.

    Margie:Why has Sun made the decision to join Linux International?

    Charles: Sun Microsystems is responding to renewed interest in running Linux on its UltraSPARC products, such as the Ultra 5. SPARC products have always been designed to run UNIX extremely well. Linux runs well on UltraSPARC platforms.

    It is important to note that this move in no way diminishes Sun's support for Solaris, a proven reliable scalable operating system. The Solaris environment will still be provided with all SPARC systems and is considered by us to be the best operating system for enterprise and network computing.

    Margie: Is Sun planning to have Linux support for all its products?

    Charles: Sun Microsystems is not planning on selling any products that are bundled with Linux. Sun bundles Solaris with every workstation and server it currently ships. There are also no plans to provide support for Linux directly. However, there are a number of Linux vendors that support a variety of platforms. We are working to ensure that these vendors include UltraSPARC platform support for their Linux products.

    Margie: Does this move represent a shift in policy for Sun? Last year, we asked for a picture of a SunSPARC workstation to use on our cover, and were refused because ``Linux is a competitor.'' (We used a Ross SPARCplug instead.)

    Charles: Sun Microsystems has never had an official policy regarding Linux up to now. As stated above, Sun Microsystems has gone from having no policy regarding Linux, to helping to ensure that Linux runs on SPARC by assisting companies who sell supported versions of Linux.

    Margie: How does Sun feel about the ``Open Source'' movement? (Prominent in the news, because of Netscape source release.)

    Charles: Sun Microsystems has a long tradition of supporting open standards, typically through standardized interfaces, many of which Sun has invented. Providing source code may be appropriate in some specific instances, but typically works well only in situations where trademarks associated with the source code are licensed. Compatibility, consistency, reliability and upgrades require a business model that can finance the effort required to provide them.

    Users who want the freedom of Open Source take on the responsibility of maintaining their own source code, but cannot guarantee consistent results with other variants. This could become a problem for Netscape source variants if they are not uniquely identified. This is why we feel brand protection through licensing is so important.

    Margie: Some people feel that Java should be made Open Source. Any chance of that happening?

    Charles: Source for the Java language is available to anyone who signs the Java license which is free for non-commercial use. This is done to allow Java to run anywhere, and to avoid problems that could occur when source is modified to produce variants that are not consistent with the Java language specification.

    Margie: Anything else you'd like to add?

    Charles: We look forward to working with you and the Linux community to promote the advantages of UNIX and Linux on SPARC in the future.

    Margie:Thank you for your time.


    Copyright © 1998, Marjorie Richardson
    Published in Issue 29 of Linux Gazette, June 1998


    [ TABLE OF CONTENTS ] [ FRONT PAGE ]  Back  Next


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


    Tom's 2 cent Tips

    By Tom Bryant


    The notes listed below document the author's "show stoppers" which were made as he learned UNIX, after working on DOS, VMS, and other systems. There is a small chance that you will make exactly the same error, and this document will help you to solve it. What is far more likely is that you will skim through it, and hopefully learn one very important thing:

    Almost all errors are trivial, and result from your understanding a Unix function *almost* completely. Gross errors in understanding are very rare, although when you hit a show stopper, you usually get the initial impression that you are hopelessly in left field and will never understand this cryptic operating system. Not True!! *Do not give up*!

    I suppose that you have already guessed it, but the FAQs, man pages and emacs info documentation comes with Linux, and *really* help out. You have to really dig: there are bookshelves of documentation in the above sources. You will probably learn more about certain topics than you wanted to, but after a while all this knowledge begins to look good on your resume. While I have tried to avoid overlap in this document, some does exist. It should give you pause that there is so little overlap! A modern operating system is a complex, many faceted beast. Take it a facet at a time and you'll get around it!

    UNIX is largely free of the system crashes that plague DOS and the MAC. This is because a user account is almost incapable of accessing the system resources required to crash the system. When you're running in DOS or MAC mode, you (or more often, programs that you run) can crash the system. I once complexly wiped my hard disk while running Borland's C++ compiler. I have never had this happen with Linux. I've never, in five years, crashed the system so badly that I had to reset. Granted, some functions (X windows and the modem) required a reset, but I could always get to a root virtual terminal to shut down gracefully. I've merrily crashed VMS, other Unicies, and of course, anything Microsoft has ever produced, from DOS 3.3 to NT. Linux is robust.

    I suppose no introduction is complete without a testimonial. Here goes: I mentioned above that I had worked on a number of systems before embracing Unix. Unix (especially Linux) is the best system I have *ever* worked on. Give it a chance: it takes a while to collect a "critical mass" of Unix commands to make the system really fly, but once you do, you'll become one of those insufferable Unix propeller heads who claim (truthfully) that nothing else even comes close!

    Please Note: The author has made every effort to insure the correctness of the information which follows. However, there are NO warranties, expressed or implied, for this information. In other words, if something goes wrong, it's your problem.


    Contents:


    Alphabetical list of utilities with one or more tips with them:


    adduser

    You can only run this from root, but it is an essential command. Almost all of your time spent in Linux should be spent in a user account of your own creation, as this account is prevented from executing disastrous commands such as rm -rf /* (This cleans your disk in a disastrously complete fashion.)

    MORAL: Always run in a user account, not root unless you are doing some system administration which will only work in root.


    ar

    Ar creates a library file, which, after you get a utility program you'll be using in other programs, allows you to easily access the object files of that program. The files are created by the following command:

            ar -r libArchiveName.a objectfile.o
    
    ArchiveName is, by convention, named libArchiveName.a. However, you refer to in your make file only by ArchiveName. e.g
     
           LIBFILES = ... -lArchiveName ...
    


    Backing up.

    Having your system crash and not loosing valuable data is what separates the computer pros from the also rans. Here's how I do it.

    All of the software on my system is safely contained on the CD that I used to load it in. There's no reason to back up this stuff. CDs are more stable than any tape or disk backup I know of.

    I only back up files that I have fiddled with. My programs, configuration files, documents, etc. I have a script file, sall (save all) which goes to each directory that I have stuff in, tars it, gzips it and then saves it to floppy.

    This stuff all fits on one 1.44 Mb disk. It represents about 730 pages of single spaced typewritten output. That's a lot of typing. Most books aren't that big. If you have more stuff than this, I'd suspect that 80% of it is stuff you haven't touched in a year. You can back it up to a disk, put the disk in a safe place and pretty much forget it. Of course, if you gzip the result, you can usually more than triple the amount of stuff you back up.

    I have 15+ disks which I keep my backups on, and back up at the end of any day that I have done a substantial amount of input. This gives me access to a month or more of past versions.

    You'll find your own way in this. The important thing is to *do* it. Then you can feel almost smug when you hard disk finally dies.


    bash (and ksh and sh)

    To set an environmental variable with bash use the following syntax:

     
        VARIABLE=value
    
    For example, to tell bash that your are a vt100 type terminal, enter:
     
             TERM=vt100; export TERM
    
    NOTE: There are no spaces around the equal sign. This is true for all bash commands, not just setting environmental variables. Remember this and be saved frustration down the road.


    C

    1. As Unix is currently configured, there is no easy way to get a single keystroke without using curses or changing the terminal characteristics. Your users will just have to get used to hitting Enter after an input. If they can't, uses curses or the GCC C manual (actually a superb reference for C libraries well worth the $50+ bucks!)
    2. After you have output to an opened text file, it is a good idea to send a fflush(stdout) command. This will flush the buffer and keep you from overflowing it if you get over 2048 characters in it, which is easy to do.
    3. To use math.h functions in a c program:
      Link in the math libraries by typing:
       
              gcc source.cxx -lm
      
      Math libraries MUST be linked in last!!! Old UNIX linker convention!
    4. When declaring pointers, every variable must be proceeded by an asterisk!
       
             int *v1,
                  v2, 
                  v3; 
      
      Results in compiler complaints of bad unary operator arguments! Correct:
       
             int *v1,
                 *v2, 
                 *v3; 
      
    5. To capture the output of a compile which is causing problems, and outputting reams of digital vomit, use this construct from a sh based shell like bash:
       
             gcc -c flaw.cxx &> TextCapture 
      
      or
       
             gcc -c flaw.cxx 2> TextCapture
      
      The errors will be captured in TextCapture.
    6. A static variable is initialized only once in a function. All other calls to that function result in the existing value of the variable being used.
    7. Shifts in most Unix C compliers are actually integer divides and multiplies by 2. Never mind what the ANSI spec says:
      This code gives problems:
       
             long n = 0x80000000;
             for (i = 0; i < 24; i++) printf("\n n is now %lx.", n >> i);
      
      n must be declared as an unsigned long for this to produce reasonable results. The fact that n starts negative fowls the compiler up. This also indicates that right and left shifts are implemented as divide and multiply by 2 with the GNU C++ compiler.
    8. This is perhaps my favorite subtle error. If I only had a dollar for every hour I've spent searching for this self imposed klutziness...
       
          for (i = 0; i < upper_limit; i++);
          {
              this = cant_happen;
              the_loop = wont_execute;
          }
      
      See the semi-colon at the end of the for statement line? The program pauses for an empty loop of upper_limit cycles, and then proceeds to do just the first installment of the loop and nothing else. It's quite easy to to, too, even after you've been bitten a few times by it.
    9. You can core dump a program sooner than quicker by writing too much stuff into a string, so that it doesn't end with that all important 0. e.g.:
       
             double age; 
             char oops[52]; 
             int len; ...  
             sprintf(oops,"The age of the universe in nanoseconds is %f.\n",age); 
             len = strlen(oops); 
      
      The fragment will die at the strlen call, as the string is longer than 50 characters, even if it is 10 character in the sprintf statement. The age of the universe in nanoseconds is about 19 characters long.
    10. This code will pass a file pointer (tfile) to a function:
       
          #include <stdio.h>  /* fclose, fopen, printf.*/
          #include <stdlib.h> /* exit.                 */
      
          void main(int argc, char* argv[]) 
          {
              /* Function Prototypes:*/
      
              int openfile(FILE** tfile);
      
              /* Variables:*/
      
              FILE *tfile;       /* Test file.*/
      
              /* Begin:*/
      
              printf("Starting program.  tfile = %p.\n", tfile);
              openfile(&tfile);
              printf("Back in main.  tfile = %p\n", tfile);
              fclose(tfile);
          }
      
          /* Open the file and return the pointer.*/
      
          int openfile(FILE **tfile)
          {
              *tfile = fopen("junk","wb");
              printf("Tfile just opened.  tfile = %p, *tfile = %p.\n", 
                      tfile, *tfile);
              return 1;
          }
      
    11. This code will allow you to reference an array of characters as an array of longs without using a union:
       
          int bozo(void)
          {
              void use_long(long *array); // Function prototype.
              char *array;                // The character array.
          
              use_long((long*) array);
          }
      
          void use_long(long *array);
          {
              // Reference the array as longs here.
          }
      
    12. Profiling:
      Compile with the flag -pg (for gprof compatible output). Link with the -pg flag AT THE END OF THE LINK LIST. e.g:
       
          gcc  -o run_time_image my_main.o my_other_stuff.o -pg
       
      Even then, don't expect miracles. This does not work on an mpeg2 package I found on the net.
    13. Reading in a globbed (wildcarded) file list:
      If you want you program to work on all files in a directory, you can enter "myprog *". Argc will count the number of files out there, and argv will be the char **list of their names.
    14. The code
          
              string1[i++] = string2[i]; 
      
      Will take the nth component of string2 and put it the into the nth component of string1, then increment i. This is how GCC and the SGI C compiler do it.

      The Motorola C compiler takes the (n + 1)th component of string2 and puts it into the nth component of string1. I gets incremented *before* the assignment. Safer is to just use this code:

       
              string1[i] = string2[i]; 
              i++;
      
    15. The code
          
          if (index++ == NR_PTS) index = 0; // Fails to implement a circular buffer.
      
      Does not implement the desired buffer. Let's say that NR_PTS is 100, and index is 99. The comparison is made when index is 99. Index is not reset, by then it is set to 100 by the ++. Next time, of course, the index will be reset to 0, but by then, it's overwritten whatever was in buffer[100], which is the 101st entry in buffer, a 100 int (or whatever) array.

      use this instead:

       
          if (++index == NR_PTS) index = 0; // Implements the circular buffer.
      
    16. Occasionally, if you allocate a *huge* array (I needed one 10.7 MB to make this one happen) the program will bomb as it tries to pass the array to another function. For example:
       
              char moby[20000000];  // A really big text file.
      
      There simply wasn't enough room on the C/C++ stack to hold the array, and the program bombed as soon as it tried to access it. The compiler, of course, didn't complain.

      The fix is to malloc (or new, in C++) the array:

       
              char *moby;  // A really big text file. 
        
          moby = (char*) malloc(20000000);
          if (moby == NULL)
          {
              printf("Hey! I'm not big enough to hold moby!\n");
          }
      
    17. When it works on one machine and not on others, or in the debugger and not out of it:
      You might well be not initializing your variables properly. Sometimes one machine will just happen to initialize a variable to a non lethal value, and the others won't. See inexplicable errors item 3 as well.
    18. Inexplicable errors:
      Occasionally, you will face very odd errors. A function works perfectly *most* of the time. The rest of the time, it has very strange errors. Variables seem to change value in a capricious way, and your frustration index soars off of the charts. If you're a beginner, you decide that programming is beyond you, and give up. Don't despair, quite yet. There are a few tricks, not written in any book that I have seen, that I have developed over the years to help you over these rough spots. In general, try these in the order given.
      1. Rewrite your code until it is remorselessly neat.
      2. Step through it line by line with a good debugger (I recommend GNU's GDB for C code. It's a bit flaky (1998) for C++).
      3. If these steps did not fix the problem, try recompiling everything with a command like:
         
                            rm *.o     // Important!
                            make       // Or whatever compilation command you use.
        
      4. If you have inconsistent program results, so that the program works most of the time, and inexplicably fails occasionally, carefully check to see that all of your variables have been initialized properly.
      5. Sometimes the memory can be corrupted by new routines not fitting into word boundaries on your machine. Granted, this is *not* supposed to happen, but it does anyway, even in the best compilers and linkers. Try declaring arrays to be 1 index larger than they should be and see if that fixes it. (This is getting to be a rare C error (1998)).
        1. There are times when the program does not misbehave in the debugger, and if you put a few diagnostic printfs in it to further check it out, it still does not die. These temporary measures may need to be made permanent as the extra variables you created to let you see what is going on have pushed the memory usage boundaries of the function to a more robust spot (i.e. to a word boundary).
      6. Once you think you've fixed the problem, *TEST EVERYTHING* before you release anything.
      7. Keep at it. With practice, you can dumb yourself down to the intelligence level of a compiler. Good Luck!


    chmod

    The command chmod XXX .* can have unforeseen after effects. It affects the directory you're in as well as the files in that directory! You might find that only root can access the files, and then only after chmoding them back to where they were supposed to be.

    cpio (not often used, most Unix users use tar instead)

    To use cpio, for backups, specify:

     
        find (path name) [-name] | cpio -oc > (destination file and directory.)
    
    To extract a cpio file:
     
        cpio -i [-F (full file specification)] [-r rename files]
    


    cshrc

    To change the erase key from ctrl h to <-, one has to add the line:

     
            stty erase \x7F
    
    To the .cshrc file. Unfortunately, the C shell interpreter does not understand the sequence \x7F, and I needed to write a short C program to insert the byte with value 127 (7F hex) at the end of the file.

    To set the terminal from 'console' or 'Linux' to vt100 (needed by elm (a mail handling utility)) on an SGI, put this line in your .cshrc file in you SGI home directory:

     
            eval `tset -s -Q vt100`
    
    If your etc/ttytype file is set up to recognize vt100s, this should work.

    Note this does not work on all machines. These methods were useless on a motorola, for example


    find

     
        find (path name) -name (file name) -print
    
    wildcards at the beginning of a find names must be preceded by a \. e.g.:
            find / -name "\*bozo*" -print 
    
    finds all files with the letters bozo in them. Some systems require the quotes as well.


    ftp

    Make sure the line setting is binary. Zipped files will not transfer correctly if this is not set.


    gdb (and dbx)

    To examine a core file:

     
            gdb <executable file name> <core file name> 
    
    The core file name is usually "core".

    To examine an array:

     
    	p *arrayName@number_of_bytes_you_want_to_see
    


    imake

    The new way of handling compiling and linking programs is with a utility called imake. It makes programs easier to move around from machine to machine. To use it:

    1. Read the imake, make and xmkmf man pages. Also any README files that came with the program you're trying to build. If you're going to be getting into some serious program development, the emacs info page on make is a must read.
    2. Back up everything! Source, Makefile, imakefile, etc.
    3. imake
    4. If imake doesn't work, try xmkmf
    5. If it *still* doesn't work, go back to step 0.


    kermit (quick check of file integrity)

    This is true for any other data transfer protocol as well, such as ftp.

    Check the size of the files that you have transfered to the target system. If they are not the same size, something went wrong.


    login

    To disable the annoying wait after an unsuccessful login, edit the file /etc/login.defs. Change the parameter FAIL_DELAY from whatever it's set to to 0. You'll have to be root to do this.

     
    link (ln)
        
    to create a symbolic link:
     
            ln -s <existing file or directory> <Linked file or directory$gt;
    
    e.g.:
     
    	ln -s OldFile NewLink 
     
    This creates a symbolic link name NewLink that points to OldFile. When you access NewLink, Unix actually accesses OldFile.

    Links are mainly used to save disk space, allowing yu to have the same file in several different places without actually having maintain multiple copies of the file.


    less

    Less can't display ANSI color escape sequences like most of the other Unix text output utilities can. It instead tries to print them with ugly results. On other unicies, the work around is to use the pg function, but it's not avalible on Linux (yet).


    Linux

    To regain text that has scrolled off of the screen, try shift-PageUp and/or shift-PageDown. This will work on a given console until you shift to another one. When you shift back, however, you will find that the scrolled text has been lost.

    To change from virtual console to virtual console, use left alt (only the left alt key works on my machine) FX where FX is one of the function keys F1 thru F6. F7 will be your X window, and isn't set up for you to log into it, but see the note below.

    When you are in X, you can move back to the text consoles by simultaneously typing the control and alt keys, and then the function key of the virtual console you want to be in.

    To add more virtual consoles edit your /etc/ inittab file and add a line to the getty configuration section. I added this line to inittab and it allowed me to add another virtual console:

     
    c7:456:respawn:/sbin/agetty 38400 tty7
    
    This let me log into F7, but not as root. To log in as root, I added this line to the /etc/securetty file:
     
        tty7
    
    I did not add further consoles, as 7 is the canonical number for the maximum number of things you want to juggle at one time, and each virtual console takes up precious RAM even if it is dormant.

    When your screen gives weird output for lower case letters, try this:

     
          echo "^V^[c" 
    
    (that's E C H O space control-V escape C return) to fix it.


    mail

    To send a message with a subject:

     
        mail -s "This is the subject" recipient@computer.full.ip.address < message
    
    To forward your mail:

    Create a file in your root directory called .forward. This file should contain the address of the machine that you want to send the mail to:

    e.g. My .forward file reads:

     
            Thomas.V.Bryant.1@gsfc.nasa.gov
    


    make

    The make utility *requires* that commands (as listed under a target:dependency line) begin with a tab (ASCII 09).

    If your emacs tab stops are set to under 8, emacs will insert spaces (ASCII 32), and not a tab. This will stop make dead in its tracks. You'll have to reset your tabs to edit a makefile.

    If you break up the lines in your make file (a good idea: readability is king!) don't put anything after your backslash (line continuation symbol) or make will throw up on it:

     
           LIBS = Lmylib Lyourlib ... \
                                       ^
                                       |
                                       |
                         No spaces or tabs or anything after here!!!
    


    modem

    When you install linux, your serial ports will not be configured. You have to enable the call to /etc/rc.d/rc.serial in /etc/rc/rc.S:

     
        # Run serial port setup script:
        # (CAREFUL! This can make some systems hang if the rc.serial script isn't
        # set up correctly.  If this happens, you may have to edit the file from a
        # boot disk)
        #
        # You need to enable this line (remove the # comment symbol):
    
        . /etc/rc.d/rc.serial 
    
        #  for your modem to work.
    


    Networking

    Installation (for Author's PPP link -- a *very* brief reminder list):

     
        Load the networking module in the slakware file.
        Create or copy the /etc/hosts file.
        Create or copy the /etc/resolve.conf.
        Edit /etc/rc.d/rc.serial.
     
    Run time problems:

    Try the ifconfig and netstat commands to find out what your current network configuration is.

    Use the ping command to check you connections.

    Make sure that your linux kernel has drivers both for your network card and ethernet. Networking will not work without them.


    nroff

    Many text files are quasi-readable, and filled with control characters. If the file turns out to be an nroff man page, you can read it with the command:

     
            groff -Tascii -man file.name | less 
    
    Often a variation of this command is necessary. See the man pages for groff and grog. Grog tries to look at the file for you and suggest a command. This is one that repays a lot of fiddling. Back up the original file, and groff away. Usually you'll get it. Remember also that postscript files (usually denoted by a .ps suffix) are read with the ghostscript command from X.


    qsort

    Here's a wierd one. The qsort function has a hard time calling it's comparison function from a C file compiled with gcc. It works fine if gcc thinks it's compiling a C++ file. Here's a pixel value sort I did, heavily edited:

     
            int pixCmp(pixel*, pixel*); // Return -1, 0, or 1. For the qsort call.
            ...
            qsort(data, BigNumber, sizeof(pixel), pixCmp);
    	...
            int pixCmp(pixel* a,
                       pixel* b)
            {
                if (a->clr > b->clr) return 1;
                else if (a->clr < b->clr) return -1;
                else return 0;
            }
    
    If the file is named pixels.c, it produces the following gcc error:
     
                pixels.c: In function `readData':
                pixels.c:164: warning: passing arg 4 of `qsort' from incompatible 
                                       pointer type
    
    If the file is named pixels.C, it produces no errors:


    PPP

    Installing PPP to work with Linux can be done, but it is not trivial.

    I'll describe the steps that worked for me, so that you might get a variation on them to work for you.

    Don't expect it to work perfectly the first time. You'll have to futz with it, unless you are very lucky.

    PPP must first be installed in your kernel. To check if it is there:

     
            dmesg | grep -i ppp
    
    You should get something that looks like this:
     
            PPP: version 0.2.7 (4 channels) NEW_TTY_DRIVERS OPTIMIZE_FLAGS
            PPP line discipline registered.
    
    If you don't, you'll have to recompile your kernel, or get a copy of a kernel that has ppp on it from the net. Instructions for doing this are found in the file /usr/doc/ppp/README.linux.gz. This is where it is in my Slackware release, yours will probably be similar. You need to read this file now. Before you go any further. Otherwise, what follows will read like gibberish.

    Read the Readme? Good. Here's how my pppd/chat command looks:

     
        /usr/sbin/pppd connect '/usr/sbin/chat "" ATDT7035551212 CONNECT "" ogin:\
        tbryant word: secret_password' /dev/modem 38400 -detach crtscts modem    \
        defaultroute noipdefault
    
    Fill in your appropriate telephone number, user ID and password.

    Run the script from your root directory,unless you have given pppd suid privileges (recommended).

    When I am running the script, I do so from an X windows term, so I can start netscape (or whatever X application I want) easily.

    Once I've established the connection, then I can run netscape, ftp, or telent to other internet connected machines.

    My ISP (Internet Service Provider) assigns me a different IP address each time I log on. This IP address can be found with ifconfig, or from the /var/log/messages file.

    The last few lines have what you need:

     
            Aug 28 20:01:23 3C273 pppd[168]: local IP address 205.252.11.62
        
    To log off, the PPP-HOWTO.gz document has the following logoff script:
     
        #!/bin/sh
        DEVICE=ppp0
        #
        # If the ppp0 pid file is present then the program is running.  Stop it.
        if [ -r /var/run/$DEVICE.pid ]; then
                kill -INT `cat /var/run/$DEVICE.pid`
        #
        # If the kill did not work then there is no process running for this
        # pid.  It may also mean that the lock file will be left.  You may wish
        # to delete the lock file at the same time.
              if [ ! "$?" = "0" ]; then
                      rm -f /var/run/$DEVICE.pid
                      echo "ERROR: Removed stale pid file"
                      exit 1
              fi
        #
        # Success.  Let pppd clean up its own junk.
              echo "PPP link to $DEVICE terminated."
              exit 0
        fi
        #
        # The PPP process is not running for ppp0
        echo "ERROR: PPP link is not active on $DEVICE"
        exit 1
    
    Additional hints not in the README.linux file:

    All exchanges between you and you host computer will be logged in the /var/log/messages file. Deducing what's going wrong is much easier if you just look at the end of this file:

     
    	    tail /var/log/messages 
    
    Keep trying, don't be afraid to futz around. If you're well backed up (you *ARE*, aren't you?) you won't hurt any of you hardware, or permanently damage any software (even this is very unlikely). Good Luck!


    rm

    When a file absolutely refuses to go away, try surrounding its name with quotes. This might kill it. I needed to remove a file called #filename#. Here's how I fared.

     
          rm #filename#    Refused to work.
          rm "#filename#"  Worked.
          rm '#filename#'  Worked.
          rm \#filename#   Worked.
    
    The top command worked on the older versions of Linux and SGI's IRIX. This is probably a Posix compatibility problem that caused the more recent versions of Linux to stop working.


    Setup

    The setup script will not run unless you are in /usr/lib/setup, and running as root. Be careful. Back up everything before you start playing around with this. Don't be afraid to play, however, as you can always improve on the defaults Linux comes with.


    swapon

    To set up a swap file, (needed for installation)

    1. Start you new Linux box with the boot and root disks.
    2. make a partition (The rule of thumb is 1 - 2 times the size of the RAM on your machine.) using fdisk. Be sure and set the data type to Linux swap.
    3. Format the partition: mkswap -c </dev/partitionName>
    4. Enable swapping in /etc/rc.d/rc.S: /sbin/swapon -a


    tar

    To make a tar file:

     
           tar -cf tarfilename filename (or directory.  Directory is recursive)
    
    This creates the file.
     
           tar -rf tarfilename filename (or directory.  Directory is recursive)
    
    This appends to an existing file.

    To extract a tar file:
    Get into the directory where you want to have the files.

     
           tar -xf (Complete filespec of the tar file to be extracted.)
    


    test

    *NEVER* *NEVER* *NEVER* name an executable test. This is a very easy, logical thing to do. When you try and run it, the shell will invoke it's test utility, find nothing there, and exit silently, leaving you very puzzled.


    Time

    To set the system clock (CMOS) from Linux:

    Set the system time from the CMOS clock, adjusting the time to correct for systematic error, and writ- ting it back into the CMOS clock.

    This option uses the file /etc/adjtime to determine how the clock changes. It contains three numbers: The first number is the correction in seconds per day (for example, if your clock runs 5 seconds fast each day, the first number should read -5.0).

    The second number tells when clock was last used, in seconds since 1/1/1970.

    The third number is the remaining part of a second that was left over after the last adjustment.

    The following instructions are from the source code:

    1. create a file /etc/adjtime containing as the first and only line: '0.0 0 0.0'
    2. run clock -au or clock -a, depending on whether your CMOS is in Universal or Local Time. This updates the second number.
    3. set your system time using the date command. mmddhhmm[yy][.ss]
    4. update your CMOS time using clock -wu (for UT) or clock -w.
    5. replace the first number in /etc/adjtime by your correction.
    6. put the command clock -au or clock -a in your /etc/rc.local, or let cron(8) start it regularly.


    useradd

    When a user is added, you have to make sure that the user owns, or at least has read, write, and execute privileges on his/her home directory. If you neglect this step, the new user will be unable to function properly, and perhaps will not be able to log on!

    The /usr/bin directory must have its privileges set to 755 in order for users to be able to execute the UNIX commands contained therein.


    Virtual Terminals:

    To change from terminal to terminal:

     
                                    Left Alt + fn
    
    (n is the terminal number, from 1 - 6 and f is a function key.)

    To return to virtual terminal text mode from X:

     
                               Left Alt + Control + fn
    
    n is again the number of the terminal you want.

    To see text that has scrolled off of the screen:

     
                            Shift + Page up or Page down.
    
    Moves you up and down by half a screen each time.

    To see task information:

     
     + Scroll Lock
        
    To see memory information:
     
                                 Shift + Scroll Lock
    


    X:

    There are few short X tips. You need to read much of the documentation that is out there, and but the O'Rielly series in X and Motif if you intend to do serious developemt. It's an extrodinary, platform independent, system that solves some very difficult problems with accessing system resources in a uniform way. It's also very complex, with all sorts of redundant functions and kludges. Good Luck.

    If you're going to just start getting into building user interfaces, I suggest that you bypass X entirely, and concentrate on Java. Of course, Java for Unix platforms is based on X, but you shouldn't have to worry about that.


    Copyright © 1998, Tom Bryant
    Published in Issue 29 of Linux Gazette, June 1998


    [ TABLE OF CONTENTS ] [ FRONT PAGE ]  Back  Next


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


    A Linux Journal Preview: This article will appear in the August issue of Linux Journal.


    UniForum '98 Report

    By Phil Hughes


    I am writing this article as I fly back from the UniForum Association Spring '98 Conference. This was the first ever East Coast conference held by UniForum in its 17 year history. It was held in Ocean City, Maryland--a beautiful town by the Atlantic Ocean.

    UniForum is an advocacy organization that promotes the use of Open Computing solutions--or, to put it in succinct terms--the use of UNIX and UNIX-like solutions. UniForum and Usenix have tended to complement each other with UniForum being the conference for suits and Usenix the conference for T-shirts.

    The conference was a two and a half day event that looked light on paper. Once there, I discovered there was too much to do in such a short time. For the first two days, there were three tracks: New Open Software Development Model and Linux, Network Computing and Best of SCO Forum. All tracks included common Plenary and Keynote sessions. On the third day there were two three-hour sessions: one presented by the Open Group and the other by Linux International. I attended all the Linux track sessions as well as the common sessions.

    Monday's Plenary session was Eric Raymond's presentation of his paper The Cathedral and the Bazaar which is credited with convincing Netscape to take their Open Source stance. If you haven't heard the talk or read the paper, it is available on our Linux Resources page.

    After Jon Hall introduced the Linux track, Frank Hecker, who is a systems engineer at Netscape, gave a talk entitled The Why and the How that filled in the background of Netscape's decision to embrace the Open Source model. For those of us who have been involved in what I call ``revolution from below''--that is, attempting to sell Linux or Open Source to those in the trenches and let it move up the corporate ladder--Frank had some interesting things to say. He said the engineers didn't believe Open Source could happen with Netscape. So, Frank went to Marc Andreessen with the idea, and the rest is history.

    After Frank's talk, we got together for the keynote lunch where Ralph Nader (UniForum Press Release) spoke on the Microsoft monopoly and how Linux could be a big player in an alternate solution. It was a treat to get to meet Ralph and to hear the word Linux come out of his mouth just a few days after hearing Marc Andreessen saying it. I brought up how U.S. government procurements used to require a POSIX-compliant operating system be made available with any system they purchased, and Ralph and his staffers are going to look into why that requirement was dropped. I asked him to keep LJ up to date on any findings, but you might also wish to check out his web site at http://www.essential.org/.

    Two afternoon sessions were held in the Linux track. The first was presented by Ron Workman of Cygnus Solutions, and the second was presented by me. Covering mine is easy--I went through a series of articles which have appeared in our Linux Means Business column, illustrating how companies identified a problem, then used Linux to address that problem.

    Ron's talk addressed Open Source software from a different direction: how a company can succeed in the business of supporting freely available software. Cygnus was founded in 1989 to provide commercial support for open Internet technologies and has grown to 160 employees. The company has succeeded by offering consulting and support on such products as the Free Software Foundation's GNU C Compiler.

    Monday evening was filled with good food and bad beer (Coors Light?--lucky Linus wasn't there) at a beach party hosted by Red Hat Software. Like most parties at these conferences, the evening was filled with meeting others and talking about computers, the UNIX market and telling Microsoft jokes. I found it a valuable time to get to know people better, for example, Morgan Von Essen and Garry Paxinos of Metro Link, and to thank Alan Fedder and Kathy Goetz of UniForum for organizing the conference.

    Tuesday morning started with a Plenary by Eid Eid, President of Corel Computer (see LJ, Issue 48). If I had to choose one person who provided me with the most new information, I would choose Eid. I did cheat a little however, as I also talked to him extensively over lunch.

    Eid's Plenary was a pleasant combination of future fantasy and a look at what is available today. The fantasy part consisted of describing a day in the life of Mr. Twenty O'One, illustrating what we should expect in the near future (2001 isn't that far away) from our personal communicator: voice- and e-mail access, voice commands and an interface to the Corel NetWinder.

    At the office, Mr. Twenty O'One will have a typical Intel-based PC but most of his work will be done on his personal communicator and his NetWinder. The NetWinder is much faster for doing common tasks because, while it is a complete Linux system, common tasks (everything from e-mail to video conferencing and replying to e-mail with a voice message automatically appended to e-mail) are trivial to access.

    After this fictional introduction, Eid went on to cover the pieces which actually exist today, including the NetWinder, video conferencing, XML and capable portable systems. He went on to say that we need to make all the interfaces and standards open so any vendor can produce pieces which interoperate. I expect some people were surprised when he said, ``Corel, Lotus and others will have no choice but to provide some source code for commercial products in the near future.''

    Eid also pointed out that Microsoft controls over 50% of the money made on PC applications. Eid was the Chief Technical Officer for Corel Corporation, makers of CorelDraw and owner of Corel Computer before coming President of Corel Computer. He explained how Corel had been a Microsoft partner until Corel acquired WordPerfect, then Microsoft started hiding technology from them.

    As many of us have concluded in the past, Eid believes you cannot successfully fight Microsoft, but went on to point out what you can do. He sees the network computer as the new wave, being less costly and more maintainable. The network computer opens up a new market and, done right, it can become a market as large as today's personal computer market.

    The morning session in the Linux Track included a presentation by Don Rosenberg of Stromian Technologies on making money with Open Source as an OEM/VAR. Differing from Ron Workman's presentation of the previous day, Don's presentation was a mini-tutorial on how to get into a market and how to make the right distribution choices along the way.

    Next, Morgan Von Essen, President of Metro Link, with the help of Garry Paxinos, Vice President, presented a talk on Metro Link's cooperative work with the XFree86 community--another model of a commercial enterprise working with the free software community. In this case, they developed technology needed for their commercial customers and then gave that technology back to the XFree86 community. Doing this makes it easier for Metro Link to continue development, because their work becomes standard in new XFree86 releases.

    Tuesday's keynote lunch was presented by Janpieter Scheerer who was President of Sunsoft and has now moved to head the storage division of Sun. He talked about WebTone and made some very interesting points demonstrating how the non-Microsoft community is growing faster than the Microsoft community. His pointed out that while MS Windows sales are growing at 13% a year, companies like Cisco are growing at 30%, and that while there are over 100,000,000 MS/PC users, that number is a small minority of the six billion people on the planet. He also pointed out that every Quicken user who registers their product is a UNIX user since the Quicken on-line registration server runs on Sun systems.

    Janpieter explained that today most ISVs will port their product to either NT or Solaris. By mentioning an old Dutch saying, ``the enemy of my enemy is my friend,'' he clearly sees Linux as an ally. By the same reasoning, we need to see Sun ports as potential Linux ports of the future.

    Janpieter, like Eid, pointed out that the network computer is in--all we need is a $150 device to connect to the Internet. He then went on to talk about two subjects: first ``OPEN-standardization'' and then Java. This got a reaction from both Eric Raymond and Eid Eid, who both pointed out that for Java to be the answer, its standard needs to be open. There was no resolution, but I am sure we were heard.

    The afternoon Linux track brought Bob Young discussing the size of the Linux market or, more accurately, explaining how hard it is to come up with an accurate estimate. Bob also announced the availability of the Extreme Linux CD which includes all the Beowulf RPMs for those of you who want to build your own supercomputer. Jon Hall of Linux International closed the track with some general comments and preparation work for the workshop the following morning.

    On Wednesday the Linux track attendees changed their plans and attended the first hour of a presentation entitled What Exciting Technology is Emerging? by The Open Group, the organization that owns the UNIX brand and standards. In this presentation, the Open Group announced the UNIX'98 standard.

    Historically, vendors such as Digital, Hewlett-Packard and Sun have paid a lot of money to use the UNIX brand. This money goes to support The Open Group's work on the standards and enforcement of the trademark. While it would be great for Linux or a Linux distribution to be UNIX branded, the cost is prohibitive.

    The Open Group has now recognized the advantage of getting the Linux community on board. While Sun and others anchor the high end of the Open Systems community, having an entry-level system compatible with the standard would be a plus. This is not yet a done deal. While the use of the UNIX trademark is limited to those who have paid the fees, the opportunity will be present for a system to be conformant with the standard. Stay tuned, this could be the in necessary to tighten the bond between Linux and the rest of the UNIX community.

    For more information on the UNIX'98 standard, see the web page http://www.UNIX-systems.org/.

    The melding of minds with regard to UNIX standards, Open Computing and Open Source software needs a venue and UniForum has elected to be that venue. Here's what Alan Fedder (UniForum Press Release), President of UniForum had to say about it:

    UniForum Association is the only forum for open discussion and open debate about open computing. Where else could Eric Raymond and Mike Lambert [of The Open Group] debate each other, listen to each other, and have a better understanding of each other's position? Where else could you hear Ralph Nader, Eid Eid, Janpieter Scheerer, Eric Raymond--all quoting Eric Raymond? Momentous things happened at the UniForum Spring Conference in Ocean City--and I honestly believe that five years from now, 5,000 people will be telling each other they were there when UNIX was saved.

    In conclusion, I found attending the conference to be truly worthwhile and look forward to going again next year.


    Copyright © 1998, Phil Hughes
    Published in Issue 29 of Linux Gazette, June 1998


    [ TABLE OF CONTENTS ] [ FRONT PAGE ]  Back  Next


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


    Using rdist for Backups

    By John Pate


    In Linux Gazette Issue number 24 Gerd Bavendiek described his script which he calls "mirror." In this script he makes use of the utility 'rdist' which is widely available on Unix systems. In my article I shall explain how I use 'rdist' which I hope will give the beginning Linux user a background to Gerd's article and show how useful 'rdist' is to those with multiple computers (which should be every Linux user nowadays!)

    In the UK today you can get a complete 486DX66 system including monitor for a hundred pounds, which has got to be a bargain and ideal as a backup system for your "main" computer. Even if you feel its hard disk is too small (typically they have them in the 200-300meg range) today you can get a 2gig hard disk for under one hundred pounds or an 850meg one for sixty pounds. So for no more than a couple of a hundred pounds you not only have a backup device but a working computer you can use in emergency in the event of the failure of your "main" machine. I have two 486DX66s, both other peoples' discards which cost me nothing apart from extra RAM and a bigger hard disk for the "main" machine (and a modem of course - though now I have a couple of spare V32bis other people have junked, isn't progress wonderful). One has 40meg of RAM and is my "main" computer running Slackware 3.3. The other has 8meg of RAM and Slackware 3.3 again. The "backup" has a half gig hard disk given to me because it makes an unpleasant whine during operation. In spite of the noise, the disk works fine so is good for backup space. A couple of discarded network cards from a "parts bin" and a look at the NET-3-HOWTO (you can find this in the directory '/usr/doc/faq/howto' in Slackware 3.3) gets the two computers talking to each other. Other alternatives are PLIP or a null modem cable, but network cards are easy to come by nowadays. (Note: network cards with RJ45 interfaces can connect two computers together if you make a crossover cable, it works for me.)

    Once the computers are talking you can use ftp or even Samba to transfer files, as well as mounting various drives and partitions by NFS. All good clean fun. But the ideal way to maintain a "mirror" of your home directories so you don't lose any precious datafiles is to use 'rdist'. (Note: the following describes a Slackware 3.3 setup but the procedure should give the rest of you a start.) Firstly you must amend the file 'hosts.equiv' on the "backup" machine (i.e. the one you are going to back-up the files to) to allow users to 'rlogin' (see the man page for 'rlogin') to the "backup" computer from the "main" computer without having to supply a password. 'hosts.equiv' is found in '/etc' (Slackware), the stock 'hosts.equiv' has one entry, 'localhost'. Simply add the relevant name or IP address for your "main" computer (go back and read the NET-3-HOWTO, you know you have to) on a new line. If you have accounts (same user name) on both machines, you are now able to 'rlogin' to the "backup" from the "main" with the command 'rlogin <other_computer_name>' and it should not demand a password (unless you are 'root', but you don't want to mess around letting 'root' rlogin without a password, do you?).

    Now you're cooking with gas. Make a file called 'distfile' in your home directory on your "main" computer. Here's one I made earlier--

    
    HOSTS = ( johnny@pod )
    FILES = ( ~/ )
    EXCEPT = ( ~/.netscape ~/\(PROG\) ~/StarOffice-3.1 ~/.trash ~/.bash_history )
    
    ${FILES} -> ${HOSTS}
    	install -oremove,chknfs,younger ;
    	except ${EXCEPT} ;
    
    

    Now's the time for you to consult 'man rdist' to see what all this means. The first three lines set variables - it is possible to give 'rdist' command line switches to modify these, so it could be helpful when you get more adventurous. The last three lines are commands for 'rdist'. The 'install' command copies/deletes files/directories as specified. The 'except' command omits the specified files/directories from processing. (If you specify a directory it means that directory's files and subdirectories and files.) The '->' line tells it what to where. Note the 'host' is the "backup" computer and given of the form 'user@domain'. This should be an account you can 'rlogin' to without needing a password (modify 'hosts.equiv' see above). If you look at the above example, it says,

    "Copy the entire home directory to "pod," excepting the Netscape cache directory, the trash directory, the StarOffice stuff and the .bash_history file."
    The switches to 'install' say,
    "Remove any files on the backup that aren't on the main machine, don't follow through NFS links, and don't update files on the backup machine that are younger than the equivalent on the main machine."
    Note how 'remove'and 'younger' interact: 'remove' will remove any orphan files, so 'younger' won't keep brand new files on the backup that haven't been made on the main machine - decide what you want! In the case of a backup to an account you don't use then 'younger' isn't really necessary. If it's an account you do use, then don't use 'remove' but do use 'younger'.

    A perusal of the 'rdist' man page should make this all clear. Having made the 'distfile,' all you have to do to synchronize the files on your two machines is type 'rdist' at the prompt on the "main" machine and it will go ahead and do it all for you and tell you about it. 'rdist' will create directories as needed, preserve permissions, ownerships etc., will only change files that don't match (you can alter the criteria it uses to decide this, see the 'man' page). It is excellent! Run 'rdist' regularly and you need never "lose" your data-files. Even better if you back-up over the Internet to a remote location.

    Now you can go back to Gerd's article and see how he uses his script to keep his laptop and desktop in synch. A study of the 'rdist' man page will make evident that 'rdist' has great power and flexibility for the adventurous. There really is no excuse for not backing up your work!


    John Pate
    Last modified: Sat May 2 12:25:18 BST 1998


    Copyright © 1998, John Pate
    Published in Issue 29 of Linux Gazette, June 1998


    [ TABLE OF CONTENTS ] [ FRONT PAGE ]  Back  Next


    Linux Gazette Back Page

    Copyright © 1998 Specialized Systems Consultants, Inc.
    For information regarding copying and distribution of this material see the Copying License.


    Contents:


    About This Month's Authors


    Tom Bryant

    Tom has been working with computers since 1978. Since then, I wrote my thesis (on emission lines in planetary nebulae) on an Apple II, wrote the telemetry processing program with which NASA deduced some of the early problems with the space telescope (its direct descendant is still in use today), and lately a program that fixes a serious telemetry formatting error on the EOS AM-1 satellite. I've written programs that display tesseracts, simulate a star cluster with accurate stellar motions, implement a new language (related to forth), and play the piano! My interests include (in alphabetical order) 35mm photography, the American Civil war, Astronomy, Beethoven, Chopin, Classical piano, Cryptography, Explorer post 1275, Fixing old cars, History, Mathematics, Rachmaninov, Science, Single Malt Scotch, Sports cars, Telescope making... My wife and I have 2 kids, 2 cars, 2 birds and 1 18 year old cat.

    Jim Dennis

    Jim is the proprietor of Starshine Technical Services. His professional experience includes work in the technical support, quality assurance, and information services (MIS) departments of software companies like Quarterdeck, Symantec/ Peter Norton Group, and McAfee Associates -- 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. His wife, Heather Stern, is now doing the HTML for his column.

    Michael Hamilton

    Michael has been working as a freelance Unix C/C++ developer since 1989. More recently he's been working on web applications and Unix server administration. Michael tripped over one of Linus's postings back at the beginning of 1992 and has been hooked ever since.

    Phil Hughes

    Phil Hughes is the publisher of Linux Journal, and thereby Linux Gazette. He dreams of permanently telecommuting from his home on the Pacific coast of the Olympic Peninsula. As an employer, he is "Vicious, Evil, Mean, & Nasty, but kind of mellow" as a boss should be.

    Andy Kahn

    Andy works at Digital Equipment Corporation doing Digital Unix filesystems kernel development. He thinks he's just hacking away at more and more C code, and in his copious spare time, he hacks on lots of other things, including all the trees in his neighborhood. Feel free to send him email.

    Eric Marsden

    Eric is studying computer science in Toulouse, France, and is a member of the local Linux Users Group. He enjoys programming, cycling and Led Zeppelin. He admits to once having owned a Macintosh, but denies any connection with the the Eric Conspiracy Secret Labs.

    David Nelson

    David manages scientific research at the U.S. Department of Energy. Before that he earned his living as a theoretical plasma physicist. He started programming on the IBM 650 using absolute machine language and later graduated to CDC, DEC and Cray machines for his research. But Linux is the most fun. He and his wife, Kathy, live near Washington DC; they enjoy tennis, skiing, sailing, music, theater and good food.

    John Pate

    John works part-time at Café Cyberia Edinburgh and is looking for a full-time job in Unix System Administration. John has a first degree in Psychology and has been playing on the Internet since he first discovered it in the late eighties. Having worked for a while programming for Windows 3.1x he decided Linux was the way forward. He can be contacted at johnny@dvc.org.uk and his homepage is at http://www.dvc.org.uk/johnny

    Carlo Prelz

    Carlo is an Italian who does not live in Italy, an architect who does not work as an architect. He spent the last decade developing software for TV audience measurement calculation but he does not watch TV. His secret wish is to become the in-house Linux expert for the Tibetan government in exile in Dharamsala. Suggestions are welcome at his e-mail address: fluido@fluido.markdata.pt


    Not Linux


    Thanks to all our authors, not just the ones above, but also those who wrote giving us their tips and tricks and making suggestions. Thanks also to our new mirror sites. And a special thanks to Heather Stern for the great job she is doing on htmlizing "The Answer Guy". It looks good and she's saving me a lot of work. :-)

    My wonderful father-in-law, Ralph Richardson, has moved to Seattle from Southern California. He's been here almost 2 weeks now and it's been fun helping him get settled in and seeing him on a much more frequent basis. I know we'll get used to him being here all the time, but right now getting to see so much of him feels like vacation. And I can use as much vacation as I can get! :-)

    Have fun!


    Marjorie L. Richardson
    Editor, Linux Gazette, gazette@ssc.com
    Linux Gazette Issue 29, June 1998, http://www.linuxgazette.com


    [ TABLE OF 
CONTENTS ] [ FRONT 
PAGE ]  Back


    This page written and maintained by the Editor of Linux Gazette, gazette@ssc.com