PGTS PGTS Pty. Ltd.   ACN: 007 008 568               Mobile Version Coming Soon

point Site Navigation







Valid HTML 4.01!






   Brilliant XED lighting!
   Australian XED Lighting

   AXL

   Australia/NZ Distributor of
   Reming XED Lighting Products





Test Drive: Suse Linux 8.0

By Gerry Patterson

This article is an evaluation of Suse Linux 8.0 Professional. The installation procedure was tightly integrated and executed with Teutonic precision. In fact Suse is very easy to install and has an attractive and easy to use GUI environment. The distribution includes a huge number of applications including OpenOffice build 641c, Overall it appears robust, reliable and as the name says professional.


Starting Up.

The Suse Linux Package is well put together and has well-written accompanying documentation. The startup screen consists of background images with plain text windows that pop up, showing the results of probes etc. The probes seemed to be comprehensive. It detected my sound chips and CD-ROM automatically. The sound chips and VGA were integrated on the motherboard and I had been concerned that the configuration of the sound chips and CD-ROM would be ugly. This was especially true for the CD which was a MATSHITA Model UJDD410 CD-Burner (24x10x40), connected to the secondary IDE bus, and hence would have required the inevitable tweaking of cdrtools. This usually takes the form of a series of convoluted configuration steps designed to fool cdrtools into believing that the device is attached to a SCSI bus. The SCSI emulation certainly seems ugly in BSD. So I was very pleased that the SUSE install program did it for me.

Included with the package was a patch disk. The instructions attached to the disk directed me to The Control Centre, and then:

	Software->Online Update
	Click [Manual]
	Click [Expert]
	Click [Next]
	Follow the instructions ...
Which was ok. Although it seems (on my system) that you could get to the same menu by choosing Software->Patch CD Update.

Overall, the install was slick without going overboard on presentation. It would be one of the easiest Linux distributions I have installed, and should rate well with the general public. I chose to install the KDE environment. The last time I installed a GUI I chose GNOME. So I thought I would try I different environment.


Hitting The Road.

The first thing I saw that I did not like was that the hardware clock had been configured as GMT rather than localtime. There are a number of people who argue quite convincingly that it is a good idea to set the CMOS clock to GMT and allow the operating system to do all the necessary manipulations with timezones. While this may be true in theory, there are a large number of applications and (more importantly) operating systems that do not do this. If you occasionally run other operating systems on your workstation then setting your CMOS clock to GMT is not a good idea. There did not seem to be any options for changing this in SUSE. I checked the install suite again and noticed a check box in the timezone that I had overlooked, when I did the initial install. I then looked for a GUI menu to change the hardware clock. I couldn't find anything in the YasT2 menus. I seem to recall this was the sort of setting that Redhat would allow to change with one of the setup menus (might have been linuxconf). In any case since I couldn't find a menu to change it, I changed the setting in the configuration file /etc/sysconfig/config. There is a setting there which says:

	GMT="-u"
This was changed to:
	GMT="--localtime"
Still it looks like something to be aware of when doing future installations ... (i.e look out for that checkbox!)

Vim had not been configured to use the language specific colours feature. This has been one of the features I like about some of the pre-packaged Linux installations of vim that I have trialed. Having cut my teeth on vi, I haven't learned much about the newer features of vim and I had never bothered to find out how this smart colours thing is done. If you use vim for cutting code, it is an excellent feature. And since I had grown quite fond of it, I decided to find out how to enable it. It turns out to be switched on and off with the "syntax command" (one of the "new" vim commands). It would require the following line in my .vimrc file

	syntax on
I decided to put this in the system wide file which on SUSE 8.0 is /etc/vimrc

I checked the list of aliases that were defined for my shell. I usually remove the alias that substitutes mv -i for mv and rm -i for rm. I am used to having these commands executed without being asked if I am sure. Which is too much like Ye Olde DOS days. And while on the topic of DOS I found several aliases defined for ex-DOS users. These were defined in the file /etc/profile.dos (which is called from /etc/profile. Basically these alias common DOS commands to an echo command that sends text to stdout. This means that a users who types a DOS command gets a helpful message. Some examples:

	% format
	Error: The DOS concept of formatting disk media is screwed.
		If you want to create a filesystem use "mkfs". To format a floppy, use
		"fdformat /dev/fd0" and then "mkfs.minix /dev/fd0".

	% chkdsk
	Error: Your filesystems are checked on bootup.
		If you want to do it manually, use fsck.
		Use df and mount for an overview of your disks.
I didn't need it so I renamed /etc/profile.dos. Still I can think of a few more:
	% xcopy
    	Error: Sorry there is no xcopy which is shame because it was a
	       pretty good DOS command. You should use cp -Rp and remember
	       to put a "." at the end of the command if you want to copy to
	       the current directory.

	% dir
	Error: You really are a DOS user!

	% help
	Error: Linux helps those who help themselves
Ok, thats a bit unkind. It would be much more helpful to alias "ls" for "dir" and "man" for "help". Still stop me from getting too nostalgic for old operating systems but I did find the following DOS command neat:
	ren c:\something\*.dat *.old
There is no simple equivalent in Unix.

Cutting Disks.

Next I tested cdrtools. Everything worked fine, except that the system clock seemed to slow almost to a halt while cdrtools programs like cdrecord and readcd were operating on a CD. (is that a bug! ... or just an undocumented feature?). This only seemed to affect the software clock. The hardware clock was ok. Since this machine will be a workstation, I switch it off and on quite regularly -- so the clock will be ok when it is switched on.

The best way to get started with the cdrtools programs is to start with the command:

	cdrecord -scanbus
This prints out the pseudo SCSI device numbers that can be used by the suite of cdrtools programs. In my case this was the string 0,0,0. You should also be able to find these in the console startup probes (use "dmesg" to examine these). Once I had these device numbers it was possible to create a raw image of a disk with the following command:
	readcd dev=0,0,0 f=cdimage.raw
The raw image file was checked with the following command:
	mount -r -t iso9660 -o loop cdimage.raw /mnt
The raw image file appeared as if it were a CD mounted at /mnt. Since everything looked ok, this image was unmounted and a blank CD inserted in the drive. The target was then created with:
	cdrecord dev=0,0,0 cdimage.raw

To actually copy CDs I use the following general copy script which I call cpd:

	#!/bin/bash
	# /usr/local/sbin/cpd - duplicate a data CD in Linux
	# Author G. Patterson
	CD_DEV=0,0,0
	cd /tmp
	eject
	while true; do
		echo -e "\nInsert Source CD and press Enter (q to quit) ...\c"
		read REPLY
		if [ $REPLY"x" == "qx" ] ; then
			rm -f cdimage.raw
			exit
		fi
		eject -t
		readcd -dev=$CD_DEV -f=cdimage.raw
		eject
		echo -e "\nInsert Target CD and press Enter ...\c"
		read REPLY
		eject -t
		cdrecord -v -eject dev=$CD_DEV cdimage.raw
	done
And a similar script for duplicating audio CDs:
	#!/bin/bash
	# /usr/local/sbin/cpa - duplicate an audio cd in Linux
	# NB: The temp directory /tmp/audio must exist
	# Author G. Patterson
	CD_DEV=0,0,0
	cd /tmp/audio
	if [ $? -ne 0 ] ; then
		exit -1
	fi
	eject
	while true; do
		echo -e "\nInsert Source CD and press Enter (q to quit) ...\c"
		read REPLY
		if [ $REPLY"x" == "qx" ] ; then
			exit
		fi
		eject -t
		rm -f *
		cdda2wav -v255 -D$CD_DEV -B -Owav
		eject
		echo -e "\nInsert Target CD and press Enter ...\c"
		read REPLY
		eject -t
		cdrecord -v dev=$CD_DEV -dao -useinfo -eject *.wav
	done
These are simple scripts that open the tray and prompt for a source ... read it and then open the tray and prompt for a target. When the enter key is pressed again they write to the target, and open the tray when finished writing the target. The script will then loop through the process again (i.e. ask for a new source). When done copying, just remove the last disk and press 'q'. There is a GUI interface to the CD recorder that I did not test. I prefer these simple scripts, which are easy to understand and to operate. Together, they work like simplified versions of the DISKCOPY command which would be familiar to DOS Command prompt users. The data copy script leaves the tray open and deletes /tmp/cdimage.raw when it has completely finished. Needless to say, you must have a working version of the eject command, and enough space in /tmp to keep the temporary image(s).

It would be easy to add a question like "do you want to make another copy of this disk?" (as the DISKCOPY command does). However I don't think I ever used that feature back in Ye Olde DOS days, so I consider it to be a bit of nuisance. For asking questions I use a perl script, which has the advantage of working in the DOS command window as well as in Unix shell scripts.

If you wish to use these scripts just copy them and put them in your path. However you must make sure that $DEV_CD is set to the correct string. Remember to query the devices with cdrecord (use the -scanbus option). Needless to say, you should not use these scripts (or any scripts at this site) for making pirate copies.

Also, despite the fact that the setup program had detected the ATAPI CD burner and run all the (configuration) hard yards for me, the information about devices had not filtered through to /dev and /etc/fstab, which still had the mount point /dev/cdrom linked to /dev/hdc. Ok, that was very easy to fix. Compared to the hack work involved in getting SCSI emulation to work. So I am not complaining ... just commenting. Still if I was a newbie, I would be somewhat nonplussed by the fact that clicking on the CD-ROM icon on the desktop brings up a box with an intimidating error message about not being able to mount the device /dev/cdrom. If you are such a new user and you want a quick fix to the problem you can do so by issuing the following commands (as superuser):

	cd /dev
	rm cdrom
	ln -s sr0 cdrom

Testing the Office and Some Other Packages.

Suse 8.0 ships with Star Office 5.2. I have been keen to trial the StarOffice software for some time. Unfortunately 5.2 is a very poor version. It was buggy and broken. It looks as though it should not have been shipped at all -- it would just create a bad impression.

I did have time to have a brief look at OpenOffice, which was also included on the CDs. There does not seem to be a version number. The build number was 641c. And what I saw seemed very good. This would indicate that the most recent release of StarOffice would be just as good. I only had time to try creating a new document, a new spreadsheet and read and modify several Microsoft Documents and spreadsheets and some Lotus Spreadsheets. All the different versions I tried seemed to work ok. However, I must admit that most of the documents and spreadsheets that I tested were quite basic. Most probably documents that use advanced features might have problems. Although those problems may not be much worse than the problems of converting from Windows 3.11 to Windows NT.

There were numerous other packages, I wanted to install. Each disk in the set has an index file called INDEX.gz. Although there is a package management tool in YasT2, I found it easier to search the index. For example, suppose you wanted to install lynx (how could I have forgotten that). Put a CD (any CD) in the tray and type:

	mount /cdrom
	zgrep lynx /cdrom/INDEX.gz
The following two lines should appear on the screen
	./CD3/suse/n4/lynx-2.8.4-201.i386.rpm
	./CD5/suse/zq1/lynx-2.8.4-201.src.rpm
Which tells you that the lynx binary is on CD number 3 and the sources are on CD number 5. I keep a copy of this INDEX.gz on my hard disk so that I can search it without mounting a CD. If you then type:
	mount /cdrom
	rpm -iv /cdrom/suse/n4/lynx-2.8.4-201.i386.rpm
Then lynx will be installed.

In fact I found this method so easy that I preferred to search the INDEX.gz with a script ... ok, I'm always writing scripts. But this one was quite handy:

	#!/usr/bin/perl
	die "usage $0 keyword(s)\n" unless (@ARGV > 0);
	$key = shift;
	@srch = `zgrep $key /home/gerry/gz/INDEX.gz`;
	die "\nNo Match!\n\n" unless (@srch);
	while (@ARGV){
		$key = shift;
		@srch = grep(/$key/,@srch);
	}
	foreach $x(@srch){
		$c = substr($x,2,3);
		$x = "/cdrom" . substr($x,5);
		print "$c: $x";
	}
If this script is named srch, then upon entering the command srch lynx the answer comes back as:
	CD3: /cdrom/suse/n4/lynx-2.8.4-201.i386.rpm
	CD5: /cdrom/suse/zq1/lynx-2.8.4-201.src.rpm
Which is more useful since I can mount the disk and cut and paste the name for the rpm command. Also this script will search for multiple keywords. So if you entered srch lynx src it would return:
	CD5: /cdrom/suse/zq1/lynx-2.8.4-201.src.rpm

Rolling ...

One of the first things that I wanted to get working was recording from analog sources. This turned out to be quite difficult. I wanted to take an analog input and turn it into a digital format, preferably something compatible with CD format (which I believe is a compressed 44100 Hz sample). But initially I will be happy with any digital format.

According to everything in the man pages and the Internet, the tool to use is rec. I studied the man entries for rec (and play). Also I needed to set the input gain on my soundcard. This varies according to the soundcard. (some cards do not have a control for input gain). Also I had to find out how to set a device to "capture" (which is equivalent to routing an analog channel to your tape recorder when it is "rec" mode). There is a tool called amixer which interacts with the soundcard via the command line. It will be very good for scripts and I will certainly study how to use it. However as an interactive tool I prefer something that looks like a traditional mixing desk. There are a couple of console tools, alsamixer and nmixer which do a good job of interacting with stdin and stdout. Nmixer will also function as a command line tool. If you must have a GUI mixer then the program called smixer is very good. It delivers all of the functionality of alsamixer and nmixer. I did find the mouse controls for smixer a little bit twitchy however. I have a wheel mouse (the wheel also functions as the traditional middle button found on so many 'X' mice). The right mouse button seemed to interact strangely with some of the sliders.

Having figured out how to set the "capture" and Igain (input gain) I tried the following:

	rec -c2 -r44100 test.wav
	play -c2 -r44100 test.wav
The results were disappointing. The recorded wave file, when played back, was half the length it should have been, and rather severely mangled. A few tests confirmed that it was always exactly half ... of course with digital equipment a ratio of 2 always raises my antennae ... but I could find no obvious flaws in what I had done. I spent quite a long time exploring all the different sound file formats and sampling rates. It wasn't something simple like dropping every second sample. The results were still recognisable which led me to conclude that the interval of contiguous sample was greater than 50 milliseconds. It sounded as if something was interrupting the record process at a regular interval between 50 and and 150 milliseconds. I tried searching the web. I downloaded a copy of rawrec (and rawplay), in the hope that with a name that mentioned raw it might be a bit closer to the metal.

I noticed that my Ethernet card seemed to having a bit of a battle with the inboard sound chip for the same interrupt. I then went off on a tedious detour through hardware, interrupts, drivers, technical specs, and I even (shudder) had a look at some driver code! Fortunately I discovered a tool called arecord (which had been part of the original distribution). Arecord worked! After setting my Line input to capture and muting the output channels, the following command recorded a 2 minute cd-quality WAV format file:

	arecord -d 120 -f cd -t wav test.wav
This could be played by any program (I tried rec, rawrec, aplay and mp3blaster). The only discernable problem was a slight ringing squelchy overtone which is a typical artifact of digital sampling. Because the sampling process is a fixed frequency, it creates a type of false harmonic or "side band". Obviously I will need to get out my old text books and reacquaint myself with some of the theory around sampling and digital audio. I found I could get rid of these unpleasant effects by using the following commands:
	arecord -d 120 -f dat -t wav test.wav
	sox -r 48000 test.wav -r 44100 test1.wav resample
The -f dat option creates a 48000 hz sample (which is the max rate). The sox command then converts this to 44100 hz (CD quality) by re-sampling. The resampling algorithm must be ok, because the resulting file test1.wav has the characterstic "clean" digital sound, which, I might add, we all complained about, when our analog-trained ears first heard it, in eighties. But that hard-edged, crisp digital sound has since become the audio standard.

The arecord program just works! I still can't coax a decent sound out of the other (command line) utilities. I did not bother looking for GUI programs ... who needs a GUI for the ears?

I found the best way to translate WAV and CD format to MP3 was to use the lame utility. This was not on the CD distribution disks. I downloaded the latest stable release as a gzipped tar and have placed it on this site's download section.

When I compare the quality of the MP3 and CD files, it is very difficult to hear any difference. Certainly nothing worth the difference in file storage. The MP3 files seem to be one-tenth the size of the CD files.

I tinkered with gimp, but did not spend a lot of time with it. It seems as though it is a powerful graphics manipulation package. Unfortunately like most programs of this ilk it is difficult to use. It seems that graphics programs are either simple to use and lacking in features or rich in features and difficult to use.


Emergency Lane.

The rescue disk is easy to use. Simply place Disk number 1 in the CD tray and boot from it. While the first screen is still displayed, move the cursor down with the arrow keys and select "Rescue System". You get a login prompt. The only login name which seems to work is "root" (with no password). You will get a console window on a green Suse background and (on my system) five additional (plain) terminals that can be accessed with the alt-function keys in the usual manner. The rescue login has a comprehensive suite of Unix tools in its' toolkit, and should suffice to salvage all but the most severely damaged systems. Obviously you will not have access to your network. You will have to configure routes, mount other file systems (including NFS if you use it) etc. This will require knowledge of your own network. If your file system is more or less intact, you might be able to use the chroot command to change the root file system.


Conclusion.

Of the various Linux distributions I have tested so far, Suse Linux is one of the easiest to install. Also nearly everything worked, straight out of the box! Although I think it would be a mistake for Open Source Software to dumb down in attempt to match the lowest common denominator, it certainly makes life easy when an Install is seamless.

In summary I would say that Suse Linux is a tightly integrated professional package that has been well put together. I would recommend it to anyone who wants to setup a powerful general purpose workstation. It would make an excellent workstation for a user with a basic knowledge of analog and digital audio, who is looking for a multimedia workstation.