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, linux-questions-only@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 w