117
Issue 1: October 2000 l Comment: Keep an Open Mind! l News: StarOffice, Caldera, SuSE 7.0, Kylix l Community: The User Group pages: LUGs worldwide l Community: UKUUG Developers' Conference - London l On Test: RAID Controllers - 15 SCSI controllers in the Linux labs l On Test: AMD vs Intel - 1GHz CPUs compared in the Linux labs l On Test: SGI 230 - SGI 230 Visual workstation under review l On Test: Journaling filesystems - Four journaling systems tested and explained l On Test: Mandrake 7.1 - The latest Mandrake Linux distribution reviewed l Feature: Mainframe - Linux on the IBM s/390 mainframe l Feature: Virtual worlds - Creating and rendering 3D models l Business: Mailbox Internet Ltd - UK ISP with 100% Linux platform case study l Business: Media Industry - How the Internet will change the media industry l Business: Windows/Linux integration - Windows applications on Linux l Know how: RAID - Redundant Array of Inexpensive Disks l Know how: SoftRAID - Configuring SoftRAID solutions l Know how: BIND - DNS server configuration l Beginners: File Control - File permissions explained l Beginners: FAQ - Where to get free support and help for Linux l Beginners: FAQ - MIME cntent types explained l Software: Kruiser - File manager for KDE l Beginners: FAQ - How to get an application to open a program file type l Beginners: Command Line - tar & gzip l Beginners: FAQ - Adding items to the KDE Menu Página 1 de 2 Linux Magazine - Software RAID, RAID controllers, Linux Mandrake, GNOME 1.2, ... 13/04/2012 file:///K:/REVISTAS/INFORMATICA/INTERNACIONAIS/Linux%20Magazine%2010t...

Linux Magazine UK

  • Upload
    -

  • View
    289

  • Download
    4

Embed Size (px)

DESCRIPTION

Linux Magazine UK ed 01

Citation preview

Issue 1: October 2000l Comment: Keep an Open Mind!l News: StarOffice, Caldera, SuSE 7.0, Kylixl Community: The User Group pages: LUGs

worldwidel Community: UKUUG Developers' Conference -

Londonl On Test: RAID Controllers - 15 SCSI

controllers in the Linux labsl On Test: AMD vs Intel - 1GHz CPUs compared

in the Linux labsl On Test: SGI 230 - SGI 230 Visual

workstation under reviewl On Test: Journaling filesystems - Four

journaling systems tested and explainedl On Test: Mandrake 7.1 - The latest Mandrake

Linux distribution reviewedl Feature: Mainframe - Linux on the IBM s/390

mainframel Feature: Virtual worlds - Creating and

rendering 3D modelsl Business: Mailbox Internet Ltd - UK ISP with

100% Linux platform case studyl Business: Media Industry - How the Internet

will change the media industryl Business: Windows/Linux integration -

Windows applications on Linuxl Know how: RAID - Redundant Array of

Inexpensive Disksl Know how: SoftRAID - Configuring SoftRAID

solutionsl Know how: BIND - DNS server configurationl Beginners: File Control - File permissions

explainedl Beginners: FAQ - Where to get free support

and help for Linuxl Beginners: FAQ - MIME cntent types explainedl Software: Kruiser - File manager for KDEl Beginners: FAQ - How to get an application to

open a program file typel Beginners: Command Line - tar & gzipl Beginners: FAQ - Adding items to the KDE

Menu

Página 1 de 2Linux Magazine - Software RAID, RAID controllers, Linux Mandrake, GNOME 1.2, ...

13/04/2012file:///K:/REVISTAS/INFORMATICA/INTERNACIONAIS/Linux%20Magazine%2010t...

l Software: GNOME - GNOME 1.2 Desktopl Software: GNOME applications - A tour of

some new GNOME applicationl Software: Desktops - EPIwm - A small and

fast alternative Window Managerl Beginners: Software Installation - Package

installation made easyl Software: Internet Tools - Four download

managers reviewedl Software: XEphem - Astronomical ephemeris

software under Linuxl Software: Gnutella - Distributed file sharingl Cover CD: Installing Mandrake 7.1l Project: Setting up Freesco - Turning a

computer into an Internet gatewayl Programming: Crystal Space - 3D game

creationl Programming: Making wizards for GNOME

applicationsl Community: Brave GNU Worldl Cover CD: Mandrake 7.1

<= Previous Back To Archive

Next => Order Back Issues

Página 2 de 2Linux Magazine - Software RAID, RAID controllers, Linux Mandrake, GNOME 1.2, ...

13/04/2012file:///K:/REVISTAS/INFORMATICA/INTERNACIONAIS/Linux%20Magazine%2010t...

General ContactsGeneral Enquiries 01625 855169Fax 01625 855071

www.linux-magazine.co.ukSubscriptions [email protected] Enquiries [email protected] [email protected]

EditorJulian Moss [email protected]

Staff Writers Keir Thomas, Dave Cusick ,Martyn Carroll, JorritTyberghein

Contributors Richard Ibbotson, Adrian Clark, Jono Bacon, Rob Morrison

International Editors Harald [email protected] [email protected] [email protected]

International Contributors Heike Jurzik, Jo Moskalewski,Andreas Huchler, AndreasGrytz, Stefan Lichtenauer,Thorsten Fischer, Björn Ganslandt, Fritz Reichmann,Manuel Lautenschlager

Design Renate Ettenberger, Tym Leckey

Production Hubertus Vogg

Operations Manager Pam Shore

Advertising 01625 855169Neil Dolan Sales [email protected] Henry Sales [email protected]

PublishingPublishing Director Robin Wilkinson

[email protected]

Subscriptions and back issues01625 850565

Annual Subscription Rate(12 issues) UK: £44.91. Europe (inc Eire) :£73.88 Rest the World: £85.52Back issues (UK) £6.25

Distributors COMAG, Tavistock Road, WestDrayton, Middlesex England UB7 7QE

Linux Magazine is published monthly by Linux New Media UK,Europa House, Adlington Park, Macclesfield, Cheshire, England,SK10 4NP. Company registered in England.

Copyright and Trademarks(c) 2000 Linux New Media UK Ltd

No material may be reproduced in any form whatsoever inwhole or in part without the written permission of the publish-ers. It is assumed that all correspondence sent, for example, let-ters, e-mails, faxes, photographs, articles, drawings, are sup-plied for publication or license to third parties on a non-exclu-sive worldwide basis by Linux New Media unless otherwise stat-ed in writing.

ISSN 14715678

Linux is a trademark of Linus Torvalds

Linux New Media UK Ltd is a division of Linux New Media AG,Munich, Germany

DisclaimerWhilst every care has been taken in the content of the maga-zine, the publishers cannot be held responsible for the accuracyof the information contained within it or any consequencesarising from the use of it. The use of the CD provided with themagazine or any material providied on it is at your own risk. TheCD is comprehensively checked for any viruses or errors beforereproduction.

Technical SupportReaders can write in with technical queries which may beanswered in the magazine in a future issue, however LinuxMagazine is unable to directly provide technical help or supportservices either written or verbal.

INTROCOMMENT

10 · 2000 LINUX MAGAZINE 3

We pride ourselves on the origins of our magazinewhich come from the very start of the Linux revolu-tion. We have been involved with Linux market for

six years now through our sister European-based titles Linux Magazine (aimed at professionals)and Linux User (for hobbyists), and through seminars, conferences and events.

By purchasing this magazine you are joining an information network that enjoys the benefitof all the knowledge and technical expertise of all the major Linux professionals and enthusiasts.No other UK Linux magazine can offer that pedigree or such close links with the Linux Communi-ty. We're not simply reporting on the Linux and open source movement - we're part of it.

Keep an Open Mind!Welcome to this, the first issue of Linux Magazine UK. The magazine aims toaddress the needs of the entire Linux community, both professionals and enthu-siasts alike, as well as appealing to those who simply want to understand justwhat the Linux fuss is all about.

Whoever it was said "from tiny acorns, mighty oaktrees grow" might havebeen thinking about Linux. Who would have thought that a hobby projectstarted by a Finnish university student in 1991 would grow, in less than ten

years, into a worldwide industry worth billions of pounds? Only this month, worldwide IT researchcompany IDC, reported yet further growth of the Linux phenomenen.

Of course, the acorn wouldn't have flourished without the right climate and nurturing. For thatwe have to thank Richard Stallman's vision of "free software" that resulted in the GNU SoftwareProject. Belief in Stallman's ideal was enough to motivate thousands of programmers to spend mil-lions of hours developing not just this free operating system but hundreds of free utilities and appli-cations to run on it. That's why when we talk about Linux we should really be saying "GNU/Linux."

But Linux isn't the only important outcome of the GNU Project. It has started another ball rolling:the move to open source. Open source software and GNU software aren't the same thing, but theyshare one fundamental principle: the program source code - the text that programmers write inorder to create software - must be free for all to see and modify. An ever-increasing number of com-panies are starting to realise the benefits of open source including Sun Microsystems, which will bereleasing the entire code of its StarOffice suite very soon.

So what are the benefits of open source? For a software company one benefit is the potential forthousands of individual programmers to test and add features to their programs. Another is that cus-tomers increasingly want openness. They are starting to see the value of open standards and the dis-advantages of closed ones.

For you, the user, the benefit of open source is that you can once again take control. You aren'tforced to accept what a closed-source software company gives you. You aren't locked into expensiveupgrade cycles just to get rid of bugs that shouldn't have been there in the first place. If you find abug you can fix it. If you need a new feature you can add it. Or, if you don't have the necessaryexpertise, you can find someone who can. Try doing that without the source code!

Open source development directly addresses the problems that users of closed source softwareexperience every day. That's why more and more people are moving to Linux and open source. Linuxis now a mighty oak, strong enough to support business-critical applications.

At Linux Magazine we campaign for the Linux cause in every corner of the world - both physicaland virtual - and guarantee to bring Linux professionals and enthusiasts an unbeatable mixture ofhigh quality editorial and informed opinion.

We're at the dawn of a new era in computing - one where the users are back in control!

See you next month

Julian MossEditor

StarOffice, the cross-platform integrated officesuite acquired by Sun Microsystems from devel-oper Star Division last year, is released to theopen source community under the GNU Gener-al Public License on October 13th. News of therelease, which will be the single largest open-source software contribution in GPL history, hasbeen widely welcomed. It is hoped that themove will help establish the software as theleading office productivity suite on all majorplatforms.

StarOffice already runs under Sun’s Solaris,Linux and Microsoft Windows, with a MacOSversion due later this year. The prospect of anopen office suite based on open standards andrunning on all major platforms might beenough to encourage more users to switchfrom Microsoft’s closed, proprietary rival.

Central to the open source project will be anew foundation called OpenOffice.org. Mod-elled on the Apache Foundation,OpenOffice.org will be managed by Collab.Netwhich was formed a year ago to provide ser-vices for open, collaborative software develop-ment. OpenOffice.org will host the StarOfficesource code as well as specifying XML file for-mats for documents and language-independentAPIs. It will also provide Microsoft Office file fil-ters so that other open-source developers canincorporate compatibility with Microsoft’s wide-ly used file formats into their own programs.

Access to the source code will be by meansof the Collab.Net Sourcecast platform whichprovides the infrastructure and open source

tools developers will need.The source code base forOpenOffice.org will be that of StarOffice 6, thenext version of the suite which is currently indevelopment. This will use an architecture ofseparate applications and componentised ser-vices, rather than the integrated architecture ithas today. Sun will continue to develop andmarket new versions of StarOffice Suite whichwill be based on OpenOffice.org. StarOffice 6.0,when released, will be a branded version of theOpenOffice.org reference implementation.

Copyright

Sun will retain copyright to the source code butSun’s ongoing development work will be doneas part of OpenOffice.org. The intention is thatall code contributions to the OpenOffice.orgproject, including Sun’s contribution of theStarOffice source code, will be made availableunder the Sun Industry Standards SourceLicense (SISSL) in addition to the GPL. This dual-licensing approach is designed to allow allorganisations and individuals to use the sourcecode freely and openly as they choose. Animportant requirement of the SISSL license isthat it requires compatibility with the GPL refer-ence implementation of the OpenOffice.orgsource code, including APIs and file formats.Copies of both the GPL and the SISSL licensesare available athttp://www.openoffice.org/licensing/ .

Leading open source exponents have

voiced their support for the OpenOffice.org pro-ject. Tim O’Reilly, founder and CEO of O’Reillyand Associates said: “Microsoft’s lock-in on itsOffice file formats is arguably at least as impor-tant to its monopoly position as control of theoperating system itself. The availability ofStarOffice under the GPL will give Linux a booston the desktop. But more importantly, the wideavailability of StarOffice Suite’s code for readingand writing Microsoft Office formats will allowother open source projects to provide compati-ble functionality as well. Open data is the otherside of the open source coin.”

Miguel de Icaza, president and founder ofHelixCode Inc. said: “When I started GNOME Ihad two goals: a 100 per cent free, easy-to-usedesktop environment and component architec-ture for GNU/Linux. With Helix Code and Sunworking together, we can finally see this visionrealised. The GNOME community is now investi-gating the very best way to integrate these.”

Info

Sun: 01252 399570 http://www.sun.com/ developers/openoffice/OpenOffice.org:http://www.openoffice.org

NEWS OPENSOURCE

6 LINUX MAGAZINE 10 · 2000

Star Office: soon to be open source

StarOffice going open source

As announced earlier this year, Inprise hasnow open sourced the code for its cross-plat-form SQL relational database managementsystem InterBase 6.0. However, plans to sellthe InterBase product line back to a start-upventure led by Ann Harrison have been termi-nated. “After careful consideration, we deter-mined that it was not in the best interest ofInprise/Borland stockholders for us to sellInterBase to a start-up entity that would ini-tially be dependent on us for funding,” saidinterim president and CEO of Inprise/BorlandDale Fuller. The move has caused little reac-tion from the developer community, some of

whom had felt that the open sourcing ofInterBase was intended primarily to generatepublicity for a product that had failed to makemuch impact on the market.

InterBase 6.0 is the latest version of thedatabase and introduces several new featuresincluding long integer, date, time and date-time data types, extended compliance withSQL92, an open interface for defining newnational character sets, plus performance andsecurity enhancements. It runs under Linux,Solaris and Windows.

InterBase 6.0 has been released under avariant of the Mozilla Public License (MPL) ver-

sion 1.1. Developers using InterBase under thislicense will be able to modify the code ordevelop applications without being required toopen source them. Both source and binary ver-sions of InterBase are available for downloadfrom the Inprise/Borland website.

Info

Inprise/Borland: 0118 932 0022http://community.borland.com/InterBase: http://www.inprise.com/inter-base/

InterBase goes open source too

NEWSLETTER

Caldera’s announcement in early August that it was toacquire the Server Software Division and the Profession-al Services Division of The Santa Cruz Operation, Inc.(SCO) caused some surprise. Caldera plans to operatethe Professional Services Division as a separate businessunit of Caldera to provide services that meet the Inter-net and e-business needs of customers. The new com-pany will offer what it calls an “Open Internet Plat-form” combining both “the low-cost, developer-accepted Linux operating system” and the “robust scal-ability” of UNIX services and solutions. Caldera Systemswill form a holding company, Caldera Inc., to acquirethe SCO assets. In return SCO will receive 28% ofCaldera, Inc.

“This acquisition is an industry-changing eventthat puts Caldera front and center as the answer tothe enterprise question,” said Ransom Love, Presi-dent and CEO of Caldera Systems, Inc. “Caldera willfurther broaden and validate both the Linux andUNIX industries and communities by providing openaccess to its unified Linux and UNIX technologies,and by offering support, training and professionalservices to customers worldwide.”

David McCrabb, president of the SCO ServerSoftware Division, said: “The new company will be a

very strong entity that we believe will compete suc-cessfully on a worldwide basis. Caldera, Inc. willincorporate a worldwide network of sales and sup-port offices, a strong commercial UNIX system busi-ness and a rapidly growing open source company.This combination will be a force to contend with inthe worldwide market for Internet solutions on highvolume platforms.”

Industry watchers are still pondering the signifi-cance of the acquisition. It’s unlikely to lead to whole-sale open sourcing of SCO’s UnixWare source code.However, some UnixWare technology (such as NonStopclustering) may find its way into Caldera Open Linux.

Info

Caldera Systems: http://www.calderasystems.com/SCO: http://www.sco.com/

Computing giant IBM plans toinvest more than $200 million overfour years in a series of initiativesaimed at speeding up the migrationof customers’ and key Europeanindependent software vendors’(ISVs) systems to Linux. The initia-tives will include setting up Linuxdevelopment centres across Europe,alliances with other companiesfocussing on Linux developmentand the deployment of around 600Linux consultants, hardware andsoftware specialists and servicesprofessionals.

IBM has already opened devel-opment centres at Greenock andHursley in the UK, as well as Parisand Montpelier in France, Boeblingen in Germany,Warsaw in Poland and Budapest in Hungary. IBM isproviding technical specialists as well as servers, stor-age systems and software. The centres will supportLinux development on IBM platforms from Netfinityservers right up to IBM S/390 mainframes. They willbe open to all ISVs interested in developing for Linux.

The development centres will offer a range offacilities including training and technical support ser-vices. Testing facilities will include on-site or remote

access to IBM System 390, RS/6000,NUMA, AS/400 and Netfinity systemsand IBM software. Performance mea-surement tools will also be providedto test how software performs underreal-world workloads. Key industrypartners such as Intel and Logix areworking with IBM in these develop-ment centres.

“As customers and partnersrecognise the growing importance ofLinux as a key e-business operatingsystem there will be a tremendousdemand for Linux-ready applicationsthat can meet the workload needs oftoday’s e-business environment,” saidMike Lawrie, General Manager, IBMEMEA. “With these centres and these

investments IBM will dramatically speed up thisprocess and start getting applications on Linux-readyservers into the marketplace aggressively during thesecond half of 2000.”

Info

IBM: 01256 343000 http://www.ibm.com/linux/europ

SuSE Linux has released thefirst distribution of Linux forthe IBM S/390 platform. Apreliminary version wasmade available in July andincludes the Linux operatingsystem together with morethan 400 applications includ-ing Apache, Samba, Send-mail and Bind, various devel-opment tools and a selectionof other applications. Bycompiling them from sourcecode, most other Linuxapplications will of coursealso run on the IBM S/390.

The availability of Linuxon the IBM S/390 platformoffers the benefits of relia-bility, security, scalability andhigh availability for busi-nesses running mission-criti-cal applications under Linux.It is also expected to showsignificant cost savings forISPs running server farms.The use of VM/ESA makes iteasy to add new Linuxguests, so a new web servercan be created and up andrunning within minutes.

The IBM S/390 architec-ture allows IBM operatingsystems such as OS/390,VM/ESA and VSE/ESA to runindependently of each otherallowing existing IBM main-frame users to use SuSE Lin-ux to run web applicationslike Apache and Sendmailwhile at the same timemaintaining their existingenvironment. This newrelease means that SuSE Lin-ux now runs on all IBMproducts from ThinkPad toS/390 and establishes SuSELinux as a major player inthe enterprise server market.

Info

SuSE Linux:0208 387 4088www.suse.de/en/

NEWSBUSINESS

10 · 2000 LINUX MAGAZINE 7

Caldera acquires SCO

SuSE releases Linuxfor IBM S/390

Caldera Systems is to acquire SCO.

Mike Lawrie, General Manager, IBM EMEA

IBM to sponsor EuropeanLinux development

NEWS HANDHELDS

8 LINUX MAGAZINE 10 · 2000

Red Hat and Ericsson have announced an initiative to jointly developproducts using industry standards such as Java and open source tech-nologies like Red Hat Embedded Linux. The first product from thispartnership will be the Ericsson Cordless Screen Phone, expected to be

commercially available by theend of the year. As part of

this initiative Ericsson willwork with Red Hat to

establish open tech-nologies such as the

Embedded Red HatGNU develop-

ment toolswhich will bemade freely

available to

developers through redhat.com.Both Red Hat and Ericsson believe there is huge market of open

source and third party developers ready and waiting to design, port anddevelop new applications for innovative Linux based products such asthose being developed by Ericsson Home Communications. Ericsson andRed Hat are also jointly establishing new mechanisms for the creation ofweb content and certification of applications for these Internet appli-ances. For operators this will mean new Linux-based infrastructure tech-nologies and services, that will provide easy to manage upgrades acrossthe Internet. For consumers, this will mean a range of easy to use and funHome Communications appliances. For Linux fans it will mean one morestep along the road to world domination and Linux everywhere!

Info

Red Hat: http://www.europe.redhat.com/Ericsson: http://www.ericsson.com/

Compaq has announced the Open HandheldProgramme, a new initiative designed to stimu-late innovation and research on handhelddevices. Derived from Compaq CorporateResearch’s “Itsy” pocket computer project, theOpen Handheld Programme will enable develop-ers and researcherslooking to exploreapplications forhandheld computingto experiment withCompaq’s iPAQhandheld by gainingaccess to the Linux-based source codefor the device.

Compaq is mak-ing available a port of the Linux operating sys-tem to the iPAQ handheld. This exploits the iPAQhandheld’s flash memory which allows the unit’soperating system to be easily upgraded. In addi-tion to the core Linux operating system, Com-paq is providing other software componentsincluding drivers, X-Terminal emulation, hand-writing recognition, touch screen and multi-media support. Compaq will also provide hard-ware specifications for both the iPAQ handheldunit and its innovative Expansion Pack system.Resources available to researchers and opensource developers will include a developmentexpansion pack for the iPAQ handheld computerthat allows prototyping of application circuitry.This is in addition to the commercially availableCompact Flash and PC Card expansion packs.

“The Compaq iPAQ Linux port is designedto encourage the development of novel userinterfaces, new applications and innovativeresearch projects for the future,” said Bob Ian-nucci, vice president of corporate research forCompaq. “Through the Open Handheld Pro-

gramme we hope tounleash the futurepotential of handheldand wearable comput-ing and spark inventionon the Linux platform.”

To encourage inno-vation and the sharingof information, Compaqalso is hosting a website( www.handhelds.org )

dedicated to open source handheld develop-ment. The website provides development tools,code, executable files and links to other sitesincluding support for hardware. This site isdesigned to be a vendor-neutral repository ofshared information for any handheld and wear-able computing devices. For more informationabout the Open Handheld Programme visit thesite.

Info

Compaq: 0845 2704222 http://www.com-paq.co.uk/Open Handheld Programme:http://www.handhelds.org

Compaq to sponsor open handheld development

Major new distributions onthe wayDespite the reluctance of kernel 2.4 tomake its appearance, many distributionvendors are preparing major new releases.Corel has announced that the Second Edi-tion of Corel LinuxOS will be previewed atthe LinuxWorld show in San Jose, Califor-nia on August 15, 2000. The new versionis claimed to offer new functionality, bet-ter compatibility, new features andexpanded hardware support. Corel Linux-OS Second Edition will have been availablefor download from http://linux.corel.com/since August 15th, and should be avail-able in retail stores during October.

Red Hat has also announced “Pin-stripe”, a beta release of the long-await-ed Red Hat 7.0. This could be down-loaded as we went to press fromftp://ftp.redhat.com/pub/redhat/beta/pin-stripe. Core system improvementsinclude kernel 2.2.16, glibc 2.1.91,XFree86 4.0.1 and GNOME 1.2. USB sup-port for mice and keyboards is nowincluded, and there is expanded hard-ware accelerated 3D support. New pack-ages to be found in the distributioninclude gphoto, MySQL, AbiWord anddia.

Info

Corel: http://linux.corel.com/Red Hat http://www.redhat.com

Red Hat gets embedded with Ericsson

First fruit of the partnership between

Ericsson and Red Hat

You can hold Linux in the palm of your hand

Teamware has released Teamware Office 5.3 for Linux. Itis a ready-to-run groupware product with a customisableuser interface and state-of-the-art communications fea-tures.

Teamware claims that the product is easy to installand set up. It is supplied in RPM format ready for instal-lation on Caldera Open Linux, Red Hat Linux, SuSE Linuxamd TurboLinux systems. No Windows clients are need-ed. All the functions of the product can be carried outusing WebService, which permits access using a webbrowser such as Netscape. This includes the ability tocreate groups, libraries and discussion forums. Usermailboxes can also be accessed using standard mailclients and the POP3 or IMAP4 protocols. The user inter-face is customisable using HTML templates and thereare nine language variations to choose from.

Teamware Office 5.3 for Linux could be the ideal intranet solutionfor small or medium sized organisations. The product provides mod-ules forfor electronic mail (Teamware Mail), discussion groups(Teamware Forum), document storage and retrieval (TeamwareLibrary), meeting scheduling, resource allocation and time manage-ment (Teamware Calendar). Automatic meeting reminders can begenerated and documents can be attached to appointments. The

product can be purchased online and is available as a single serverpackage for up to 1,000 user accounts at a cost of $1,000.

Info

Teamware: 01344 472068 http://www.teamware.com/

The long awaited SuSE Linux 7.0 has beenannounced, and should be available by the time youread this. The product will be sold in two versions.The Professional version is aimed at experiencedusers and those wishing to use Linux as a serveroperating system. The Personal version is tailoredfor new Linux users and desktop users.

SuSE Linux 7.0 Professional provides IT profes-sionals and advanced home users with a comprehen-sive collection of over 1500 of the latest Linux toolsand software packages. The box contains six CD-ROMs and one DVD. There are additional softwarepackages on the DVD which would not fit on to theCD-ROMs. The distribution includes software forimplementing Internet and intranet solutions includ-ing web, proxy, mail, news, print and file servers. It isalso suited to use for large database server applica-tions thanks to its enhanced raw device support andthe ability to address up to 4GB of main memory.Support for fully automated installation across a net-work is provided by means of the new ALICE tool(Automatic Linux Installation and Configuration Envi-ronment). Installation support for the SuSE Linux 7.0Professional includes access to the SuSE Hotline and90 days support. The price is £41.70 + VAT.

SuSE Linux 7.0 Personal targets newcomers toLinux and home users. The package includes threeCD-ROMs which contain the core operating systemand multiple applications including games, multime-dia, imaging and Internet software. It also includesStarOffice 5.2. Installation is largely automatic usingthe YaST2 set up tool which has extended its hard-ware recognition to include devices, such as soundcards and printers. Internet access configuration usingeither a modem or an ISDN TA is now straightforward.Three easy to read manuals plus 60 days installationsupport should enable any user to get SuSE Linux upand running. The price is £24.70 + VAT.

SuSE is also releasing version 7.0 ProfessionalUpdate for experienced Linux users. The software isthe same as for SuSE Linux 7.0 Professional butinstead of the full SuSE manual there is only briefinformation on the most important enhancements.

Info:

SuSE Linux: 0208 387 4088http://www.suse.de/en/

NEWSSOFTWARE

SuSE Linux 7.0 released

New TeamwareOffice nowshipping

Teamware Forum provides a group discussion board accessible using a web browser

The sixth annual UK Inprise/Borland Developers’ Confer-ence will be held at the Royal Lancaster Hotel in Londonon September 24th, 25th and 26th. The conferenceprogramme contains much that will be of interest to Lin-ux developers. A pre-conference training session held onthe Sunday will include a first look at the long-awaitedDelphi for Linux – code-named Kylix – which is expectedto be launched at the conference. Other conferencetopics will cover moving to Kylix and a session on thenew cross-platform object-oriented component librarycalled CLX that the new development tool will use.

The conference will also feature sessions on

JBuilder, Borland’s Java-based enterprise develop-ment tool. Version 3.5 of JBuilder, which has nowbeen available for several months, enables thedevelopment of applications which run withoutmodification or recompilation on Linux, Solaris andWindows platforms. Other sessions will cover Inter-Base, Borland’s database server which is availablefor Linux and other platforms.

Inprise/Borland, which recently announced areturn to profitability after years of losses, is rapidlybecoming the major player in the Linux develop-ment tools market. Its flagship product Delphi haslong been regarded as the best rapid applicationdevelopment (RAD) tool for the Windows platform .The launch of a Linux version will be a milestone fordevelopers wishing to deploy Linux in both backand front office applications. According to Borland,Delphi for Linux will support Apache Server applica-tions and facilitate a migration path to Apache fromother web servers (including Microsoft InternetInformation Server and Netscape servers) for exist-ing applications developed using Delphi for Win-dows, C++Builder and Microsoft Visual Basic.

Info

Conference: 0208 789 2250http://www.InpriseConference.com/Borland: 0118 932 0022http://www.borland.co.uk/

NEWS DEVELOPMENT

10 LINUX MAGAZINE 10 · 2000

VA Linux Systems has launched what itclaims is the first 8-drive 2U Ultra2 SCSIstorage enclosure system. The VA Linux9008 2U storage system features eighthot-swappable disk drives in an ultra-dense 3.5in. high enclosure and can pro-vide up to 584GB – over half a terabyte –of storage capacity for customers in Inter-net co-location environments.

Designed for high reliability and avail-ability, the VA Linux 9008 storage systemhas both redundant power supplies and

redundant cooling modules as standardfeatures. The eight disk drives are hot-swappable, and the system uses a cable-less design that allows access to fans, pow-er supplies and drives without removing itfrom a rack. Like the VA Linux 2200 seriesservers, the 9008 storage system has LEDsthat enable enclosure monitoring of tem-perature, drives, fans and power.

The 9008 storage enclosure currentlysupports hard disk drives of up to 73GBwith speeds of up to 10,000 rpm and isdesigned to support next-generation harddrives when they become available. Thedriver carrier design is the same as that ofthe VA Linux 2200 series server so thesame spare hard drives can be used inboth. Both 1” and 1.6” drives are support-ed. The VA Linux 9008 storage systemextends current storage options for the VALinux 2200 series and 3500 servers andwill be a component of larger network-attached storage (NAS) solutions plannedfor release later this year. ■

Kylix tops the bill at Borland conference

Rapid application development comes to Linux

New compact RAID enclosure from VA Linux

The VA Linux 9008: Over half a terabyte of storage in a single 2U rack-mount unit

The Apache Software Foundation will hold its firstEuropean conference ApacheCon 2000 Europe atthe Olympia Conference Centre, London on Octo-ber 23rd - 25th, 2000. The conference is beingsponsored by Covalent Technologies, IBM and SunMicrosystems. Billed as Europe’s first open-sourcesoftware conference for developers, at least 400developers are expected to attend.

Three concurrent lecture streams will runthroughout the three-day programme. Topics tobe covered will include writing Apache modules,using Python, Tcl and Perl, Java applicationservers, PHP, SSL, XML and migrating Netscapeservers to Apache. Sessions will be presented byleading experts from around the world. An associ-ated trade show will be open on 24th and 25thOctober.

Info

Conference: http://www.apachecon.com/

London to host first European Apache Conference

NEWSHARDWARE

10 · 2000 LINUX MAGAZINE 11

Cyclades has launched a new entry-level Multipro-tocol Access Router aimed at small to medium sizedoffices and Internet Service Providers (ISPs). TheCyclades PR1000 offers both Ethernet LAN and seri-al WAN routing capabilities for LAN-to-LAN andLAN-to-Internet applications.

Designed to be easy to install and use, therouter has a menu-based configuration. Monitoringand management tasks can be carried out using aconsole port on the device, or from anywhere onthe network using SNMP or Telnet. The router soft-ware is held in flash memory and can be upgradedover the LAN or WAN, helping to cut the cost ofmaintenance.

The Ethernet 10/100 Mbps LAN interface andV.35/RS-232/X.21 serial WAN interfaces support avariety of network protocols and ensure network

inter-operability. Features such as VPN, NAT, packetand service filtering, password control, RADIUS/TACACS, PAP and CHAP authentication make theCyclades PR1000 secure and protect the networkfrom unauthorised access. Support for traffic shap-ing, dial on demand, and dedicated WAN supportallows flexible and reliable remote networking.

There are two models: the PR1000/RSV (V.35 orRS-232) and the PR1000/X21 (X.21). Each has a listprice of £ 430.

Info

MPT Data Products: 01724 280814http://www.mptdata.co.uk/Cyclades: http://www.cyclades.com/

The new router from Cyclades offers easy use and low maintenance costs

VA Linux Systems has introduced the VA Linux 1150 server, a customis-able entry-level 1U (45mm, 1.75in. high) Linux server designed for Inter-net data centres.

The VA Linux 1150 is a customisable, low-cost 1U Web server thatuses a single Intel Pentium III processor. Options include capacity for upto 2GB of memory and one or two front-accessible SCSI hard drives.Standard features include dual Ethernet network interface cards and aslim CD-ROM and floppy drive. Like all VA Linux systems the 1150 serveris supplied configured for optimal Linuxcompatibility and includes VA’s TotalLinux Coverage (TLC) supportand service. Pricing starts ataround £ 1,700 for a basicconfiguration.

The new server comple-ments VA Linux Systems’1000 series of high-perfor-mance 1U servers to create what the company says is the industry’sbroadest offering of ultra-dense rack-mount Linux servers for Internetinfrastructure. “Leading ASPs, e-businesses and Internet hostingproviders today are demanding customised Linux server solutions as theybuild out their Internet infrastructure to support the rapid growth thatcomes with success,” said Robert Patrick, director of product marketingfor VA Linux Systems. “The VA Linux 1150 server offers a cost-effectivesolution that can reliably scale, backed by expertise and services thatmove at the speed of Open Source. All of our product designs take fulladvantage of the flexibility of the Linux operating system, enabling us tocombine build-to-order hardware and software in a way that no othervendor can.”

Info

VA Linux: 0870 2412813 http://www.valinux.com/

New entry-levelserver from VA Linux

The VA Linux 1150 server has a compact size and

low cost

SuSE Linux has restructured its technical supportservices in order to provide 24 hour a day, 365 daysa year support for its enterprise customers. It willnow be possible to choose from two service planscalled Basic and Productive.

The Basic service is aimed at Linux novices andusers who are migrating from other operating sys-tems. Customers receive 60 days of installation sup-port by telephone, fax or email when they purchasea packaged SuSE Linux distribution. If support isneeded which goes beyond installation, customerscan then purchase Callpacks. A Callpack entitlesthe user to up to 20 minutes of support time.

The Productive service extends the existing SuSEtechnical support offering to meet the needs of pro-fessional Linux users. The service provided can be tai-lored to individual requirements. Options range fromsupport during office hours only through to the 24hour a day, 365 days a year availability of specificallyassigned SuSE support engineers who are familiarwith the customer’s system. The Productive servicealso includes support of specific applications and theLinux system itself at the source code level.

Announcing the new support programme, Rudi-ger Berlich, Managing Director of SuSE in the UK said,“24/7 support is a crucial prerequisite for the use ofLinux in business-critical applications. With 100 sup-port engineers worldwide we have an unrivalledinfrastructure to offer support services at this high lev-el, strengthened by our continuing training pro-grammes and world class developer laboratories.”

Info

SuSE Linux: 0208 387 4088http://www.suse.de/en/

24/7 support now available from SuSE

Cyclades launches entry-level router

NEWS SOLUTIONS

12 LINUX MAGAZINE 10 · 2000

Red Hat has extended its strategic alliance with DellComputer Corporation to provide bundled techni-cal support for buyers of Dell computers. Dell cus-tomers will now be able to purchase a range of RedHat Services direct from Dell, including annual perserver support. Customers with large numbers ofservers will also be able to purchase a dedicatedtechnical support account. The annual supportoffering will include unlimited access via telephoneor the web for installation, basic and advanced con-figuration and systems administration plus one yearof software updates via priority ftp access.

“Dell and Red Hat recognise the importance ofbeing able to offer One Source Alliance customersthe highest quality Linux support,” said Ian Cole,Professional Services Director Red Hat Europe. “TheAnnual Per-Server support is our most flexible,scaleable programme for keeping systems support-ed and secure. The solution is designed to expandas an organisation grows and is ideal for companiesacross the spectrum from small businesses to largeenterprises. It also provides customers with enter-prise support at a fixed price per server.”

Info

Red Hat: 01483 563170http://www.europe.redhat.comDell: 0870 1524699 http://www.dell.com/linux

A new tool for open-source software endusers has recently been launched in the UKby Massachusetts-based Acrylis, Inc. It willbe sold by Linux reseller LinuxIT. WhatifLinux.com is a subscription-based serviceaimed at making the management of opensource software simpler and more reliable. Itprofiles the software running on subscribers’servers and then provides the system admin-istrator with information about relevantupdates and new releases. “WhatifLinuxenables companies to take full advantage ofthe flexibility and continuous evolution ofopen-source software, whilst removing theassociated headaches for sysadmins” claimsReg Broughton, president of Acrylis.

WhatifLinux.com is based on a three-tier service architecture that includes Intel-ligent Agents, a console and a KnowledgeBase. Intelligent Agents are small Java-based applications that run on each of thesystems being monitored. The agents usepolicies that are set up for each system todetermine when defined thresholds arecrossed and whether corrective or diagnos-tic action is required. The agents constantlycheck the WhatifLinux.com knowledgebase for news and updates.

The console is a repository for statusinformation collected from the agents andis accessed using a web browser. Designedspecifically for system administrators and

support staff, it warns them of mattersrequiring attention and allows them totake corrective action such as installing oruninstalling software packages, patches orupdates. Administrators may also invokedecision support analysis using the “Whatif” feature which analyses software depen-dencies in order to determine the conse-quences of installing or uninstalling patch-es and other software. This allows theadministrator to be confident that a patchor new program will work on the serverbefore installing it.

The Knowledge Base contains informa-tion about software dependencies andconflicts, software alerts and problems.Software components tracked by theKnowledge Base include system software,utility software and application software.Information on the packages to be moni-tored is collected from the agents on eachcustomer’s system. This enables WhatifLinux.com to send alert information direct-ly to customers who are using the affectedsoftware.

Info

LinuxIT 0117 905 8718 http://www.linuxit.com/Acrylis: http://www.acrylis.com

System minderarrives in UK

TurboLinux announced that its innovative EnFuzionsoftware has been deployed at leadingfinancial company J.P. Morgan & Co. Incor-porated to power the firm’s worldwide riskmanagement system for fixed income deriv-atives. TurboLinux EnFuzion is software thatruns on Linux, all major Unix versions andWindows NT. It turns a computer networkinto a high speed, high availability, fault tol-erant supercomputer. It integrates into anexisting IT infrastructure and uses the idletime on workstations and servers to boostcomputation speeds by up to 100 times.The software works with existing customerapplications without requiring modification.It provides node failover and automated jobscheduling that takes advantage of idle CPUcycles on cluster nodes.

Evaluated at J.P. Morgan’s London officefor the past year, EnFuzion is now in produc-

tion use. The firm is now increasing its deployment tomore than 1,000 cluster nodes, including an installa-tion at J.P. Morgan’s New York corporate headquarters.

“As a market leader in fixed income swaps andderivatives, our firm’s demands for computingpower in this field are virtually limitless” saidMichael Liberman, head of Global Swaps andDerivatives Technology at J.P. Morgan. “DeployingEnFuzion has allowed us to harness the power ofhundreds of powerful desktop workstations duringtimes when they would otherwise be sitting idle.We continue to move more of our critical calcula-tions and processes to this architecture.”

Info

TurboLinux:01752 313190 http://www.turbolinux.com/

TurboLinux provides super-computing solution

Red Hat to provide support for Dell customers

The Linux 2000 UK GNU/Linux Developers Confer-ence took place recently Hammersmith in London.It was organised by the United Kingdom Unix User’sGroup (UKUUG) and sponsored by SuSE Ltd andSistina Software.

The VA Linux team kicked off proceedings witha talk about Source Forge. Tony “fusion 94” Gun-tharp, one of the original developers, opened withan excellent presentation about Source Forge pro-jects. He explained that developers must find a wayto be more organised and more effective in theirmanagement of open source software. Tony leadsand manages the Source Forge team.

He was followed by Sebastian Rahtz fromOxford University with an exposition on XML andthe documentation associated with it. Sebastianalso covered how TEX and LaTEX could be made towork with XML. When he asked „what use couldthis be to anyone?« the delegates responded withthe expected burst of laughter.

Things began to liven up with the talk by Miguelde Icaza, CTO and Chairman of Helixcode, aboutthe GNOME project. The development of Unix hasstagnated over the years and GNOME is one of theprojects that will change this. Many more peopleare now using Unix because of the GNOME andKDE projects. Miguel gave a very thorough expla-nation of the GNOME project and even showedhow to produce the NT 4 blue screen of death usingGTK code.

Rik van Rial, who writes kernel code for Conec-tiva in Brazil gave delegates an interesting insightinto his work on memory management and thechanges that he thinks will take place. He also dis-cussed the VM changes in kernel 2.4.

Enlightenment

The conference was treated to a rare appearance byCarsten Haitzler or “The Rasterman” as he is betterknown. Carsten is a senior software engineer at VALinux Systems in Sunnyvale California and the pro-grammer who developed Enlightenment, ElectricEyes, Gtk theme engines, Imlib and much more. Hisknowledge of X programming is extensive and hispresentation was on the topic of performance pro-gramming. It began with Enlightenment shown inall its glory on the wide screen. Later, he went intothe use of functions and other programming meth-ods used in X-windows.

Alan Cox gave chapter and verse on the latestdevelopments in the 2.4 kernel which will bereleased soon. Delegates were asked what theywanted to hear about and almost everyone wantedto hear about the 2.4 code. USB, PMCIA driversand security fixes: Alan covered them all with hiscustomary detailed insight.

Saturday’s full programme started with Red Hat’sStephen Tweedie and a more than competent talkabout clustering. Stephen worked at DEC for twoyears on VMS kernels for high availability clustered

Aisdair Kergonof the UKUUG,

organiser of theconference

COMMUNITY CONFERENCE

16 LINUX MAGAZINE 10 · 2000

The UK Unix User Group held

its annual GNU/Linux

Developers Conference in

London. Richard Ibbotson

from the Sheffield Linux

User Group attended and

sent us this report.

THE FUTUREIS BRIGHT

RICHARD IBBOTSON

A report on the UKUUG - GNU/Linux Developers Conferencewhich was held in London on 7th - 9th July

Phot

os: R

icha

rd Ib

bots

on

10 · 2000 LINUX MAGAZINE 17

filesystems and his presentation was full of authority.Then Stephen Lord, a senior filesystem developer

for SGI who has followed GNU/Linux developmentsince 1993, presented XFS Journalling filesystem andcaused a great deal of interest. XFS would seem toraise more issues than you might think, and is a topicdevelopers would do well to find out more about.

Stephen was followed by Michael Meeks,whose business card just says „hacker«. As hedemonstrated, he’s a bit more than that: in fact he isdefinitely one of the more intellectual and influen-tial open source programmers around just now.Michael gave an inspired talk about the GNOMEcomponent model.

Adrian Cox, the man who brought us transput-ers, gave a talk on the sort of thing that changesentire civilisations. His current project is a Beowulf ina box. His main problem, he explained, is gettinghold of various types of hardware. However, mostof the project is now finished. After his talk he tookthe lid off his demo machine and invited delegatesto look inside.

Next, John Edwards from VMWare took thestage and is a fluent advocate and demonstrator ofVMWare. He admitted that in its earlier incarna-tions there were problems, but version 2.0 is muchimproved. John demonstrated how VM Ware canrun Windows NT 4 and all the other versions ofMicrosoft Windows very well under GNU/Linux.Even IBM OS/2 and different distributions of Linuxcan be run under GNU/Linux. Among the manyusers are computer virus labs, which test viruseswith the aid of VMWare. Even if Windows is wipedout by the virus, VMWare and the GNU/Linux hostsystem continue to run.

Security

Owen le Blanc from Manchester Computing Centre,the man famous for having written the GNU/Linuxfdisk program discussed CODA. The security aspectsof this aren’t easy to grasp, but Owen’s talk waswell presented with clear diagrams. This was fol-lowed by a talk by Steve Whitehouse of ChygGwynLtd on GFS, a journaled, fault-tolerant clustered file system that gives high performance and greatstability.

Heinz Mauelshagen gave a presentation abouta Logical Volume Manager for Linux. This is a sub-system for online disk storage management: a fea-ture of great value to enterprise computing usersthat will help GNU/Linux become more widelyestablished in large organisations. It is implementedusing an additional layer between the peripheralsand the I/O interface in the kernel. Heinz is current-ly working on version 0.9 version of his logical vol-ume manager.

The session by Wichert Akkerman, an MSc com-puter science student at Leiden University whoworks part-time for Cistron as a GNU/Linux devel-oper, provoked some lively debate. In January 1999

he succeeded Ian Jackson as Debian project leaderand his talk concerned the future of package man-agement. This is a controversial subject in theGNU/Linux world. The proponents of the Red Hat.rpm package think that nothing else exists, whileDebian users see the .deb package to be the onlyway forward. Debian packages give more informa-tion and simple and easy to understand error messages when something goes wrong. Wichertgave a good account of these issues and went on todiscuss the possibility of a single package that couldbe used with both Red Hat and Debian type systems.

It was by Linda Walsh, who works for the TrustTechnology group at SGI, on the topic of GNU/Linuxsecurity policy left delegates in no doubt thatGNU/Linux needs a security policy which defines theallowed methods of access by processes to variousobjects in the system.

Sunday’s programme began with Hans Reisertalking about Reiser FS. His explanation of the Reiserfilesystem was a masterpiece from beginning toend. He explained that “this is just a very small stepin the right direction”. He thinks that everyoneshould be using systems that are fail-safe. Reiserfsis a journaling filesystem that uses classical balancedtree algorithms. Sponsors include SuSE, mp3.comand several other organisations.

Stephen Tweedie explained ext3 file system isbasically ext2 with a few bits added on. There isn’tthat much information circulating about ext3 rightnow so this talk generated many questions.The final talk by Luke Leighton who works for Lin-uxcare was “Samba the next Generation”. The pre-sent round of Samba development is looking intointegration with MS Windows 2000. By Luke’s account it’s probably best to sit back and wait for this. All who attended agreed that thefuture for open source software has never beenbrighter. ■

Wichert Akkerman’s session on package managers provokedlively debate

COMMUNITYCONFERENCE

Adrian Cox (left of centre) demon-strates his Beowulf in a box

Miguel de Icaza gives his talk on GNOME

ON TEST RAID CONTROLLERS

18 LINUX MAGAZINE 10 · 2000

Fig. 1: IBM ServeRAID

There are a great many RAID-compatible hostadapters for Linux. For this test we concentratedsolely on current SCSI-3 RAID controllers for PCservers. Besides pure performance, handling was of

particular interest as was what monitoring toolswere supplied. However, it often turned out thatwhat was true about one controller could beapplied to others in the same family.

For testing of the ServeRAID controller from IBMand the competing products from Compaq, ourhardware lab was also supplied with high-poweredservers from these same manufacturers. Thanks tothis, we took the opportunity to have a look atthese as well.

Any moderately recent Linux distribution shouldrecognise the RAID controllers on installation, provid-ed that the RAID array has previously been preparedusing the controller BIOS or support CD as requiredand the controller BIOS is a sufficiently recent version.

RAID controllers under the microscope

DOING ITTHE HARD

WAYBERNHARD KUHN

Linux supports a

wide range of SCSI

RAID controllers.

Linux Magazine

benchtested ten

examples, together

with two top-class

servers.

Bernhard Kuhn

delivers the verdict.

IBM ServeRAID

Commendably, IBM has some web pages dedicatedto Linux ServeRAID support and this makes it con-siderably easier to get started. We tested the RAIDcontroller in its native IBM environment in the IBMserver also reviewed here. The BIOS screen of thehost adapter only allows, via the set RAID configura-tion option, one choice: loading the factory defaultsettings. For the initial set-up the IBM ServeRAIDSupport CD must be used (see Netfinity 7600.)

With the monitoring tools for Linux, IBM leavesit up to the administrator to choose between com-mand line operation (IPSSEND) and the ServeRAIDManager which boasts a GUI (see Figure 2). Usingthe latter you can remotely administer Linux Netfini-ty boxes that have the ServeRAID adapter installed.The necessary daemon is automatically installed atthe same time as part of the RPM package (whichruns to 11 MByte).

Fig. 2: Successful hot-swap: the mostcolourful monitoring tool at presentcomes from IBM for its ServeRAIDcontroller – but it demands Java.

ON TESTRAID CONTROLLERS

10 · 2000 LINUX MAGAZINE 19

IBM Netfinity 7600The Netfinity 7600 from IBM comes in a classy black housing that can accom-modate up to 8 units, which means that at least two grown men are neededto move it about. The device can, however, be completely dismantled withinminutes without the aid of any tools (see below). If necessary it can also bedismantled and transported as individual components. The machine we test-ed had a XEON 550 processor, 512Mb RAM and three 9.1 Gb hard disks,which leaves ample room for additional expansion. Up to four redundantpower supplies provide plenty of current and can obviously be changedwhile the server is running. As with other manufacturers, and as a generalrule, all components marked in bright red can be changed when the server isrunning. This list of red components includes all the fans in the system,whose accumulated noise level remains, perhaps surprisingly, within limits.However, IBM should have a think about the lack of guide rails for the swap-pable components.

Four out of the six 64-bit PCI slots are hot-swap-capable. This means thatslot-in cards can be exchanged while the computer is running. Unfortunately,Linux isn’t yet able to exploit this useful characteristic – at least, we couldn’tfind any information about this at IBM itself or anywhere else in the Linuxuniverse.

As is usual in a four-Xeon mainboard machine, voltage regulation modulesfor the processors are present. They bump up the cost and are perhaps ulti-mately unnecessary. There are a few manufacturers who include more than theabsolute minimum – after all, they want to be able to give customers tailor-made processor upgrade kits, in return for the usual small change, of course.

In combination with the ServeRAID-controller, hot-swapping the SCA harddisks worked as expected, although they were marked light blue and so strictlyshould only be swapped in the “cold” condition. They were this colour becauseof the standard and otherwise normal Adaptec 7896 controller which is presentonboard. Also on the motherboard is a S3 graphics chip, for which, however, wewere unable to find a usable X server configuration.

You don’t get the usual BIOS menu with the Netfinity. Instead it has to beinitialised using one of the Windows bootable support CDs. During theServeRAID set-up you’re asked about the operating system you’re going toinstall – of the selection on offer, we were forced to choose “other”.

In all, the Netfinity 7600 left a good impression and proved fully compatible as a Linuxserver. With IBM’s repeated announcements that it is going to align its products better withLinux it shouldn’t be too long before we get PCI hot plugging features too. ■

The Netfinity 7600 can be completelydismantled within minutes.

Mylex AcceleRAID 250

At present, Mylex is keeping Linux at arm’s length.Linux drivers are available, but this is not down toMylex but to Leonard Zubkoff, who created the dri-vers by means of reverse engineering when thehardware was released. As customer demandincreased, Zubkoff was commissioned by Mylex todevelop the official software. But on the manufac-turer’s web pages Linux is still not mentioned any-where. Nevertheless, Linux is aware of almost all theAcceleRAID- and extremeRAID family and can there-fore cope with them in the usual fashion.

AcceleRAID 250 has, like its big brother, aneasy-to-understand BIOS menu with which you canperform the initial RAID set-up. The configurationwhich is necessary after that for higher RAID levelsoccurs in the background. The priority to be usedfor the synchronisation procedure can be selectedas required – 50% is the default setting.

After installing and booting the operating sys-tem only the Proc-Filesystem is available for monitor-ing and configuration purposes which is very unsat-isfactory. In an emergency few administrators wouldhave the nerve to delve into the README in order tofind the magic solution. But, thanks to SAF-TE (SCSIAccessed Fault-Tolerant Enclosure) this should rarelybe necessary: all Mylex controllers obviously recog-nise defective disks and take them out of the group.After changing a disk during operation (assumingthere is an appropriate swap cradle) the controllerimmediately begins the reconstruction.

Thus we have to conclude that Mylex controllerscan be used under Linux within certain limits. In thenear future an easy monitoring and configurationtool for Linux should be available with Mylex’s ownGlobal Array Manager.

In our tests, the AccelerRAID 250 refused toperform in the Netfinity test machine (the SCSI dri-ves could not be found). With an old BIOS from1998 on the extremeRAID 1100, Linux did notknow where to start with either test system.

Fig. 3: MylexAcceleRAID 250

ON TEST RAID CONTROLLERS

20 LINUX MAGAZINE 10 · 2000

Compaq Proliant 6400RThe Proliant server comes from the Compaq 6400 series. It seems a case ofCompaq in name and compact in nature as the inner workings of the com-puter are extremely densely packed but don’t fundamentally restrict thefunctionality. The only limitation we found is that the drive bay can only befitted with a maximum of four hard disks. The low height of the device may

well force you to buy a sec-ondary hard disk unit.

All mechanical compo-nents give the impression ofbeing solidly built and are fit-ted with guide rails if they canbe swapped during operation(the hot-swap colour isbrown-red). The Proliant wetested had only two spaces forredundant power supplies,though most buyers shouldfind this adequate.

All six PCI slots (64 bit) arehot plug capable. A little doorin the cover of the housinggrants easy access to the slot-in cards. But it’s a shame thathot swapping can only bedone on systems runningMotorola’s CompactPCI-Busand the corresponding Linuxkernel patches.

Like the Netfinity, the Compaq server has no BIOS menu and is initialisedusing the tools on the supplied bootable Windows CD. Here, too, Linux doesnot appear in the list of supported operating systems. Compaq’s Linux sup-port Web pages advised us to enter “UnixWare”, which did the trick.

The onboard SCSI controller from Symbios Logic serves the SCA harddisks as usual. However, our test configuration was also equipped withthree Compaq RAID controllers which were able during the test to makeuse of the three 9.1 Gb media one after another.

The compact server makes a splendid platform for web services basedon Linux. However, the deafening noise of the fans might make a fleet ofservers too loud for many. ■

You could hardly get more compact than this – butin the Proliant 6400R it’s still not a tight fit.

Compaq Smart Array221/3200/4200

Initialisation of the RAID stack on the Smart Arraywas child’s play, thanks to the “SmartStart” sup-port CD supplied. Five minutes later the Linuxinstallation could begin. However, monitoring andreconfiguration on the fly is a bit thin: unfortunate-ly /proc/array/ida0 gives no indication of the statusof the RAID system. The only Linux monitoringtools – status and gtkstatus – only make one ioctl()query. They could, it must be said, be compiled veryeasily, but the hoped-for results (see Figure 7) didnot appear. Also, after removing a hard disk duringoperation the report from status was still “LogicalDrive OK”. Nevertheless, the hot-swap took placewith no problems. During reconstruction the middle

Fig. 4: CompaqSmart Array 221

Fig. 5: CompaqSmart Array 3200

ON TESTRAID CONTROLLERS

10 · 2000 LINUX MAGAZINE 21

Hot swap with SCARAID 5 makes a disk stack safe in the eventof a crash but without special swap cradlesthe server still has to be turned off toreplace a defective medium. However, thehigh signal frequencies present on a SCSI-3bus cause trouble with the cradle to harddisk connector. For this reason, larger serv-er systems provided by big name manufac-turers have tacitly started using fast SCSIhard disks with the Single ConnectionAttachment (SCA) interface. This is an 80-pole Low-Voltage Differential(LVD) connector that includes the voltage supply. The SCSI ID of the disk isalso no longer defined using a jumper but is determined automaticallyfrom the socket on the SCA backplane in the drive bay.

Normally the SCA connector is foundonly in OEM systems and module recognition is done optically.

Table 1: FeaturesManufacturer Product Pre-OS Monitoring/Conf- User Interface RAID Block- Hardware PCI LVD/SE LVD/SE Cache

configuration iguration-Tool for M/C-Tools Levels Device Support Bit intern extern [ MB ]DPT/Adaptec SmartRAID VI Decade BIOS/Floppy-Disk Storage Manager Utility Lesstif-GUI and 0,1,5,10,50 SCSI + 32 2 2 128

command lineDPT/Adaptec SmartRAID V Century BIOS/Floppy-Disk Storage Manager Utility Lesstif-GUI and 0,1,5,10,50 SCSI + 32 1 1 128

command lineAMI MegaRAID 1400 BIOS MegaRAID Manager Text-UI (Slang) 0,1,3,5,10,30,50 SCSI + 32 3 3 16-64IBM ServeRAID Bootable ServeRAID Manager Java-GUI or 0,1,5 SCSI + 64 1 2 4

Support-CD command lineMylex AcceleRAID 250 BIOS /proc (Global Array Proc-filesystem 0,1,3,5,10,30,50 /dev/rd/ O 32 1 1 64

Manager i.V.)IPC Vortex GDT 7538RN BIOS Ipcmon und ICPD Text-UI (Ncurses) 0,1,5,10 SCSI ++ 32 3 2 8-128IPC Vortex GDT 6538RS BIOS Ipcmon und ICPD Text-UI (Ncurses) 0,1,5,10 SCSI ++ 64 4 3 8-128Compaq Smart Array 221 Bootable - (Gtkstatus) Ioctl()-System 0,1,4,5,10 /dev/ida/ - 32 1 1 6

Support-CD invocationCompaq Smart Array 3200 Bootable - (Gtkstatus) Ioctl()-System 0,1,4,5 /dev/ida/ - 32 1 2 16-64

Support-CD invocationCompaq Smart Array 4200 Bootable - (Gtkstatus) Ioctl()-System 0,1,4,5,10 /dev/ida/ - 64 2 4 16-64

Support-CD invocation

LED flashes and so the end of the approximately 30minute synchronisation process (in the 4200 usingRAID 5 with 3 times 9.1 Gb drives) could at least beseen.

AMI MegaRAID 1400

AMI’s web pages provide the Linux driver and moni-toring software for its MegaRAID family. They’re

shown as having equal status with SCO, Solaris andWindows NT – hooray!.

The initial set-up of the RAID system occurs inmuch the same way as usual with an overview menuin the controller BIOS. Synchronisation for a RAID 5-configuration consisting of three 9.1 GByte-harddisks took about five minutes in the IBM test system.During the installation of Red Hat 6.2 the controllerhesitated a little (“SCSI-input/output error”), butafter repeatedly ignoring the error in the popup win-dow, the controller finally gave in. Maybe the syn-chronisation was not quite perfect, but no moreanomalies appeared later. As is the case with theCompaq Smart Array, the MegaRAID-controller alsorequires a separate boot partition (because of thetroublesome 1024 cylinder LILO limits).

After the Linux installation the hard disks can bemonitored and/or reconfigured using “MegaRAIDManager”, a text-based user interface. Hot swap-ping, tested with the Compaq machine, was a suc-cess. However, the monitoring tool merely reportedthe status of the system (degraded, see Figure 9). Itdidn’t say how much longer the rebuild would take.The end can only be determined by observing theactivity of the hard disk.

DPT SmartRAID Decade and Century

Distributed Processing Technologies, who make theSmartRAID Decade and Century, treat Linux like anyother operating system. And that’s been the casefor a while. So together with the obligatory devicedrivers there are also Lesstif-based configurationand monitoring programs as well as boot diskettesfor Red Hat Linux ready for downloading. Anyonewho won’t tolerate a graphical user interface on hisserver can opt for the opulently equipped commandline instruction dptutil.

The BIOS is used for setting up the RAID stack.However, it is only possible to install one maximumsize logical device per RAID group. The initialisation ofa level 5 configuration is run from the BIOS menu andtakes more than two hours for the Decade using three9.1 Gb disks. Although this is performed in back-ground, the BIOS made three engineeres believe thatleaving the Menu will abort the syncronisation.

Let’s hope that after the take-over of DPT byAdaptec the promising development of Linux driversand tools will continue.

IPC Vortex 6538 and 7538This company started development of the Linux driver on day one. This is why Vortex controllers have far and away the best support forthe free operating system. Apart from the comprehensive monitoring/configuration tool ipcmon (formerly gdtmon), you also get ipcd. RAIDserver systems can be remotely monitored via a network (using TCP/IP) with this daemon. Thismeans that monitoring for an entire fleet of servers

Fig. 9: Limited powers ofexpression: the MegaRAID

Manager

ON TEST RAID CONTROLLERS

22 LINUX MAGAZINE 10 · 2000

Fig. 8: AMI MegaRAID 1400

[above]Fig. 6: Compaq Smart

Array 4200:

[right]Fig. 7: At present there are

no more monitoringoptions from Compaq

can be performed centrally with just one ipcmonprocess running on the administrator’s workstation.As with some products from other manufacturers,the controllers from Intelligent Computer Peripheralsalso have a comprehensive BIOS for the initial con-figuration of the RAID stack.

The flag ship GDT7538RN was reluctant to doits duty at first in either of the two test systems. Atip from the support hotline – they told us to openJumper S4 – at least allowed us to make it work inthe Compaq Proliant. Its little brother GDT6538RSwas also unable to make friends with the specialBIOS variants from IBM and Compaq. After sometweaking, the initial set-up was extraordinarily fastand easy, but then Linux refused to boot up.

Benchmarks

During the performance tests of the RAID con-trollers, bonnie was used for booting (Option -s1000). The virtual file system layer with its cachingalgorithm has a considerable effect on the mea-sured values. This can largely be prevented usingthe boot option mem=32M. The RAID 5 systems,consisting of three fast SCA-SCSI hard disks with amaximum throughput of 80 Mb/sec, were preparedwith the ext2 file system for the 1 Gb test file(approx). Since not all the controllers in both com-puters wanted to run, the measurement results inTable 2 should be taken with a pinch of salt. TheGDT6358, for example, did not want to do its dutyin either of the two high-end servers so we had toswitch to a third system from a lower performanceclass (“IBUS”).

The measured values for Adaptec and SymbiosLogic relate respectively to the onboard controllersof the two test machines. The test with single harddisk drives (“Single HDD”) shows that the hard diskdrives of both systems are approximately equal inspeed. This means that the test results of the con-trollers can be compared with each other, despitethe fact they were calculated with different comput-ers. Interestingly, SoftRAID 5 comes out astonishing-

Fig. 13: IPC VortexGDT7538RS

Fig. 12: IPC VortexGDT6538RS

[top]Fig. 10: DPT SmartRAIDVI Decade

[above]Fig. 11: DPT SmartRAIDV Century

ON TESTRAID CONTROLLERS

10 · 2000 LINUX MAGAZINE 23

ly well on the Netfinity but constantly loads theprocessor to full capacity. This could be counteract-ed by having more CPUs, although it would becheaper to acquire a hardware RAID controller thana higher-performance XEON processor.

Missing values in the “hdparm” column, by theway, indicate that the corresponding controllers didnot register as adapters for storage media in the sys-tem. The benchmark findings were created with theco-operation of Dipl.-Ing. Axel Dittrich and Dr.-Ing.Hans Pfefferl, systems administrators at AGFA-Gevaert Munich, Germany.

Conclusion

Apart from one Mylex controller with its old BIOS,all the test products ran on the whole satisfactorily.Only the extremely poor performance of the DPTDecade (which, by the way, had an Ultra 160 inter-face) left a lot to be desired.

The fact that quite a few of the controllers hadproblems with the test systems may have been dueto incompatibilities, in particular with the BIOS ofthe servers. The GDT controllers in particular werebetter able to make friends with normal PC serversand demonstrated their full power. With theServeRAID from IBM and the Compaq Smart Arraysone must rely on the bootable support CD to per-form configuration. ■

Info

Linux IBM ServeRAID device driverhttp://www.developer.ibm.com/welcome/netfinity/serveraid.html

Dandelion Digital’s Linux DAC960 Pagehttp://www.dandelion.com/Linux/DAC960.html

Mylex Disk-Array-controller under Linuxhttp://sdb.suse.de/sdb/de/html/mylex_dac960.html

Linux Driver for Compaq Smart-2http://www.insync.net/~frantzc/cpqarray.html

Compaq Linux pages http://www.compaq.com/linuxMegaRAID Drivers and Utilities

http://www.ami.com/megaraid/mr_drivers.htmlLinux DPT Hardware RAID HOWTO:

http://www.ram.org/computing/linux/dpt_raid.htmlDriver and Monitoring/Configuration-Tools:http://www.dpt.com/techsup/sr5drv.html#LINUX

IPC-Vortex Linux drivers and Monitoring/Configuration Toolshttp://www.vortex.de/supp/down/linux/linux_d.html

ON TEST RAID CONTROLLERS

24 LINUX MAGAZINE 10 · 2000

Table 2: Test resultsManufacturer Controller Mode hdparm Char-out Block-out Rewrite Char-in Block-In Seeks normal geom.

MB/sec MB/sec MB/sec MB/sec MB/sec MB/sec /sec average/1000DPT SmartRAID IV Decade RAID5 11.59 3378 3431 2504 18892 26804 231.0 5.8DPT SmartRAID V Century RAID5 11.59 10289 10202 5349 19924 27913 243.6 9.4AMI MegaRAID 1400 RAID5 11.99 3713 3692 3604 18708 25399 246.0 6.2IBM ServeRAID RAID5 14.61 15258 15501 8441 19981 24479 206.8 10.7ServeRAID AcceleRAID 250 RAID5 8614 8623 5045 26777 36786 249.9 10.0IPC Vortex GDT 7538RN RAID5 37.21 19656 20868 9459 25765 36244 265.4 14.3IPC Vortex GDT 7538RN RAID5 26.67 22608 30414 8939 33310 35918 272.8 16.2IPC Vortex GDT 6538RS RAID5 34.41 18344 18423 8845 33143 35877 270.3 14.1Compaq Smart Array 221 RAID5 6901 6881 4730 23752 31606 230.0 8.6Compaq Smart Array 3200 RAID5 6871 7001 6076 23050 36011 246.8 9.3Compaq Smart Array 4200 RAID5 7032 6923 5714 23278 36499 252.0 9.3IBM Adaptec 7896 Single-HDD 21.77 22916 24228 10967 24612 26104 166.4 13.0IBM Adaptec 7896 SoftRAID5 30.19 16021 18734 11512 27511 33343 250.3 13.6Compaq Symbios 53c876 Single-HDD 22.38 20243 28207 11825 27004 28822 175.4 14.0Compaq Symbios 53c876 SoftRAID5 31.68 15753 15894 4249 6048 6509 263.3 5.7

Weight 1 2 1 3 1 1

RAID 5 Speed Index

0 2 4 6 8 10 12 14 16 18 20

SmartRAID IV Decade 5,9SmartRAID V Century 9,5

MegaRAID 1400 6,2ServeRAID 10,7

AcceleRAID 250 10,1GDT 7538RN 16,2GDT 6538RS 14,2

Smart Array 221 8,6Smart Array 3200 9,3Smart Array 4200 9,4

Adaptec 7896 13,7Symbios 53c876 14,1

Fig. 15:Speed Index: the controller in overview

Fig. 14: the ipcmon for the GDT controller series is teeming - especialy with statistical functions

New processors with high clock frequencies seldomwork satisfactorily with older motherboards. Thus inaddition to the Coppermine processor (Slot 1 with256 KByte on-chip cache), Intel loaned us a VC820motherboard with an audio/modem riser slot. Alsobundled was a high-grade 128 MByte RDRAM mem-ory module (Rambus DRAM) from Kingston Tech-nologies. A dummy is required for the unused secondRIMM slot (Rambus Inline Memory Module) to ensurethe whole thing worked – unlike SDRAM, Rambus isextremely sensitive to such things (see Fig. 1).

AMD loaned us an entire computer for test pur-poses. They too have not yet achieved the proclaimedsocket changeover – the processor on our testmachine was an old K7-based chip with 512 KByte ofexternal level 2 cache on the slot A motherboard.AMD provided 384 MByte of main memory distrib-uted over three slots, which we reduced to that ofthe Intel system in order to achieve fair conditions fortesting. The remaining components on the Irongate

chip set AMD motherboard did not have any signifi-cant effect on the test results.

With floating-point-intensive benchmarks suchas the “Blenchmark2” (Figure 2, Blender Version1.80a) and the Povray-Skyvase-Test (Figure 4), theAthlon chalked up a clear lead: 15 to 20% betterperformance compared to Intel. This is fairlyremarkable.

With the “Developer Benchmark” the result isthe other way round. The kernel compilation (seebox and Figure 4) was completed by the Intel chiproughly 20% faster than from the AMD. A similarresponse was seen with Ralph Hlsenbusch’s perfor-mance test from the “Shared Services BenchmarkAssociation” (iX-SSBA), version 1.21E. However, inthis combined server/application test with a run-time of about ten minutes (564 seconds), a lead of18 seconds is poor testimonial for the RDRAM,which is supposed to be ideally suited to thesetasks. With the stream benchmark we again foundno evidence of the alleged two to three times high-er transfer rate of RAMBUS compared to conven-tional SDRAM, and nbench verified AMD’s positionas a wonder weapon for being in the black even inthe higher memory index (6.0 versus 4.5 with Intel).

Duel with the gladiator

An Elsa Gladiac (32 MByte DDR-RAM) was used forthe graphics-dependent performance tests with24 bit colour depth. The combined force of Nvidia’sGeforce 2 GTS chip and Intel’s Pentium III allowedthe highest 2D speed index recorded so far (see Fig-ure 5). The Quake3 results in Figure 6 and theSPECviewperf-Suite cannot be compared directly,however. Unfortunately, the Intel equipment wasloaned to our lab for only one week and our testswere performed with the then current SGI/Nvidia dri-ver 0.93. A week later when we came to test theAMD chip it proved not to like this driver, so anupdate was necessary – forcing us to use the betterperforming version 0.94. As Figure 7 shows, this hadscarcely any effect at all for high resolutions: in theQ3 demo even a Pentium III 550 MHz can easily keeppace with the gigahertz systems we had on test.

ON TEST AMD AGAINST INTEL

26 LINUX MAGAZINE 10 · 2000

Gigahertz processors compared

HIGHCLOCKRATES

Processors with clock

speeds of 1000MHz

were announced

months ago but have

only recently begun

appearing in stores. We

investigate the effects

of the higher clock

speeds under Linux.

Bernhard Kuhn gets off

the starting blocks.

Fig. 1: To avoid trouble, Rambus requires all the RIMMslots to be filled, using a dummy if necessary

Incidentally, for computers with AMD proces-sors, the beta status of the SGI/Nvidia driver fre-quently made itself apparent with X-server freezesor entire system crashes. It wasn’t possible to repro-duce this behaviour with the gigahertz Pentium,suggesting that SGI and Nvidia possibly develop andtest their Linux drivers with Intel systems only.

To sum up

As was to be expected, both the gigahertz systemsare faster than their predecessors. But they werealso significantly more expensive. Whilst AMD hasan enormous lead over its competitors, there wouldreally need to be compelling reasons to pay such aprice – more than three times higher – for a 20%increase in performance compared to a machinerunning at 800 MHz. On top of this you must con-sider the cost of RIMMs for Intel’s RAM bus. Andapplications that fully exploit this type of memoryare few and far between.

In the end, fast processors are like fast cars.Common sense by and large compels most of us tochoose a medium-class product even though weknow they will provide less pleasure at the wheel. ■

Sense and nonsense about the kernel compile benchmark

USENET newsgroups frequently refer to the kernel compilation time as a measureof a computer’s performance. Whilst the result reflects perhaps the suitability of asystem as a development machine, without specifying the exact configurationalong with compilation time, the times people come up with are meaningless as abasis for comparison. Depending on the kernel version, the number of featurescompiled into it and also the compiler options (and version) used, the time tocomplete the task can vary enormously. Consequently for the “Developer Bench-mark” we used a virgin kernel 2.2.0 with the default configuration. Following amake menuconfig; make dep the time for the compilation is derived from thearithmetic mean of the execution times (elapsed) of three passes of the commandtime make bzImage.

ON TESTAMD AGAINST INTEL

10 · 2000 LINUX MAGAZINE 27

Quake3 (Demo1)

Blenchmark2

Pentium III 550 5,69

Pentium III 1000 3,25

Athlon 1000 2,72

0 1 2 3 4 5 6 7

Povray

Pentium III 550 59

Pentium III 1000 28

Athlon 1000 24

0 20 40 60 80

Kernel compilation

Pentium III 550 255

Pentium III 1000 101

Athlon 1000 121

0 100 200 300

2D Speed Index

Pentium III 550 198,3300,1

Pentium III 1000 224,5353,9

Athlon 1000 218,2337,9

Depth■ 24bpp■ 16bpp

640x480 1280x1024

79,9

119,1 115,2

33,9 32,4 34,2

■ Pentium III 550

■ Pentium III 1000

■ Athlon 1000

SPECviewperf

Light-0.3 DX-0.5 AWadvs-0.3

2,2 4,0 3,8

24,31,

40,647,5

74,5

85,4

Fig. 2: The Athlon’s floating-point units are just in the lead. Fig. 3: AMD’s Athlon is almost as quick as two 667MHz Alpha 21264 proces-sors combined (22 seconds for pvmpov).

Fig. 4: For Linux developers Intel’s Pentium III is only slightly more suitable. Fig. 5: An amazing combination: Pentium III and Elsa Gladiac

■ Pentium III 550

■ Pentium III 1000

■ Athlon 1000

Fig. 6: During the textures computation even a weakerprocessor can keep pace with the four pixel pipelines ofthe Nvidia flagship.

Fig. 7: Unfortunately these figures cannot be compared directly: in the AMD system a newer version of the graphics driver had to be used

Let’s look at the hardware first, working from theoutside inwards. The box is basically a tower butcomes with a purple side panel that disguises therectangular appearance a bit. Depending on yourpoint of view, this either gives it a stylish appearanceor is a pointless adornment: I rather like it myself.The case is easy to open and the internals are welllaid out. The system has a 300W ATX power supply.

The majority of the components in the reviewmachine were things that could easily be bought offthe shelf. The motherboard is a VIA Apollo with theusual ports including an Intel 10/100 Mbps Ethernetinterface and a sound device (which seems to beunused by Linux). The heart of the machine is a735MHz Pentium III with a huge fan and256Mbytes of ECC RAM.

There are five PCI slots, two of which are occu-pied by an Ensoniq ES1371 sound card and a top-of-the-range two-channel Adaptec 3950 SCSI controller(Linux’s lspci command identifies it as a 3940). A sin-gle 9Gb IBM DNES series hard drive sits in one of thefive drive bays. The choice of SCSI card seems a littlestrange: it can drive up to 30 SCSI devices but surelyno-one is going to connect that many to a 230!

The 48x CD-ROM drive connects to theUDMA66 IDE controller on the motherboard. (There

appears also to be a version of the 230 with aUDMA HDD.) A standard 3.5” floppy drive hidesdiscreetly behind the front cover. One minor irrita-tion is that it has no drive active light so if you dumptar files directly to floppies you need to wait a fewseconds after synching.

SGI machines have always had a reputation fortheir graphics performance and the 230 follows thistradition. The 4x AGP slot carries SGI’s VR3 64Mbyte3D graphics card, a mid-range VPro card whosedesign originates from Nvidia. The great plus pointabout this card is that it is supposed to handle ver-tex transformations and lighting on the card, whichshould help when rendering geometrically-complexscenes – this has certainly been a problem area withmany of the other PC-class graphics solutions I’velooked at in the past.

On the odds and ends front, the reviewmachine had a badged 19-inch monitor capable ofdoing 1600x1200 at 75Hz, with on-screen controlsfor everything under the sun. The keyboard wascompact with a soft feel, but the mouse was dire. IfI bought a 230, I’d have to replace it straight awaywith the only Microsoft product worth buying. Thepowered speakers sound fine when playing Quakebut are certainly not what I consider to be hi-fi.

ON TEST SGI 230

28 LINUX MAGAZINE 10 · 2000

The SGI 230 Visual Workstation

FASTER THANA SPEEDING

BULLETThe SGI 230 is a machine any Linux fan

would be keen to get their hands on.

Dr. Adrian Clark has used SGI systems for

about 10 years on and off before being

converted to Linux, so was keen to see

the two come together in

something affordable.

The main board runs at a frequencyof 133 MHz.

The Linux Installation

Of course, the thing that makes the 230 interestingto us is the fact that it runs Linux! On booting, themachine displays a huge SGI logo and then self-tests. Lilo’s boot prompt makes an appearance,after which you can choose the regular Linux kernel(2.2.13) or one that incorporates SGI’s patches. Ionly looked at the latter.

The system comes with Red Hat 6.1 pre-installed,with extra goodies like the drivers for the graphicscard. SGI also provide their additions on a CD-ROM inRPM format: the accompanying documentation statesthat they can be installed on top of SuSE as well asRedHat. Apart from the kernel and X server, this seemsto be a straight-from-the-box RedHat installation.

The review system boots X directly and presentsa GDM-type login box. After logging in, you get theGNOME desktop by default. This isn’t my prefer-ence (I still use fvwm v1!) but is easily changed. TheX server is XFree 4.0 with GLX extensions anddefaults to 1280x1024 at 24 bits per pixel, but withonly a 60Hz refresh rate. I noticed that there was akernel module that deals with the graphics card,and that the kernel had the kni patch, which allowsusers to run Pentium III SSE code (the “floating-point MMX”). The SCSI driver doesn’t seem to havetagged command queueing enabled, which I havefound improves disk throughput substantially, espe-cially when the system is being thrashed.

Putting it through its paces

As usual, the first thing to do is install Quake III, turnall the settings to their maximum and give it a go.Rendering at 1280x1024, the frame rate averagedat about 60 fps, peaking at 80 and never droppingbelow 40! The rendering is also flawless, with noneof the cracked edges or corrupted textures that yousometimes see. The GLX hacks that come withxscreensaver all work; in fact, most of them run tooquickly! The same is true of the Mesa 3.1 demosand the GLUT demos that come with SuSE. Forthose of you who know it, the “gears” Mesa demogives a staggering 1465 frames per second! (Forcomparison, my trusty G400 card in a 450MHz Pen-

tium III gives just 312.) I have a VRML model ofsome buildings with over 44,000 quadrilaterals in it;the 230 was able to render this at between 4 and11 frames per second, which is stunning.

I was interested in the stability of the OpenGLdrivers under Linux, so I pushed them quite hard byrunning several applications at once, includingsome home-grown ones. Nothing unexpected wasfound, though killing an OpenGL program cansometimes make the system pause for several sec-onds before coming back to life: not a major prob-lem but something of an irritation.

The raw processing power of the machine ispretty much what you’d expect. Benchmarks aren’ttremendously meaningful in this reviewer’s opinion;but if you’re into them nbench, the Linux version ofBYTEmark, is one of the better ones. It reports aninteger index of 11.4 and a floating-point one of10.2, with ECC error correction turned on in theBIOS. In practical terms, encoding a 5-minute audioCD track into an MP3 file took all of 45 seconds.The disk performance was better than expected,giving (curiously) 18.9 Mbyte/s for writing and 16.8Mbyte/sec for reading.

The manuals are up to SGI’s usual high stan-dard. Every port had its pin-outs labelled and theBIOS settings were all explained. There were no Lin-ux documents, though there’s so much informationaround in one form or another that this won’t con-cern anyone but a total Linux newbie. It would havebeen nice if the system had included a boxed ver-sion of Red Hat or SuSE for those people who won’tbe connecting their machines to the Internet.

Verdict

In conclusion, the 230 is a well-engineered piece ofhardware with a solid Linux installation and solid-looking drivers for the specialised hardware. Thegraphics performance is stunning, so if your applica-tions are able to exploit that or you’re a dedicatedQuake-player with deep pockets, it’s an excellent buy.If you don’t need the graphics performance there areprobably better buys available elsewhere, though thebuild quality and expansion space remain attractive.I’m already saving up for one! ■

ON TESTSGI 230

10 · 2000 LINUX MAGAZINE 29

Drives can easily be changed thanksto the ingenious plug-in system

Info

Price: £3424SGI: (0118) 925 7500http://www.sgi.com/

[left]The graphics card deliversoutstanding performance.[right]A perfect, but ratherexpensive, games machine

Linux is rock solid in terms of workstation and serverfunctionality. But those of us who simply have tohave the latest red-hot kernel patches and hardwaredrivers, or who are simply involved in kernel devel-opment, will be no stranger to system crashes. Andof course, not even the best system can keep goingif there is a power cut (unless it has a highly expen-sive UPS system!).

No matter what the circumstances are that forceLinux to its knees, after rebooting the rule is to do ahard disk check first of all. This inspects all the filesand rarely completes inside ten minutes. Dependingon the size of the file system and number of harddisks, the procedure may even take several hours.Worse still, in rare cases a manual intervention mayeven be necessary (fsck). Although it is unlikely, thedata SNAFU will have played itself out completely ifthe file system can no longer be repaired. At thispoint the only thing that will help is to restore a hope-fully up-to-date backup.

But this makes things sound worse than theyreally are. The Extended2-Filesystem has providedsterling service since 1993 for countless Linuxservers, whose rare unplanned downtimes put thepotential problems into perspective. However, Linuxbeginners and pros are longing for a file system

which is completely ready to run after a nasty crash,without human assistance and within a few seconds.The magic word for the solution to this problem isjournaling.

Journaling

The “ordinary” ext2-filesystem sets a flag on sign-on(mount). This flag is only cancelled on an orderlysign-off (unmount). So after a crash the operatingsystem can tell whether the disk has been cleanlyunmounted or not: in other words, whether there ispotentially inconsistent data on the disk.

In order to correct this fault all files must bechecked individually, which can be a very tedious pro-cedure (called Recovery). A solution to the problem isto record in a journal which files are being processedat any moment. Then, after a power cut, only the

ON TEST JOURNALING FILESYSTEMS

30 LINUX MAGAZINE 10 · 2000

JFS Comparative Test

ACCOUNTINGFOR THE

HARD DISKA journaling file system is essential if Linux is to break into

the enterprise market. At the moment there are four highly

promising approaches, all at various stages of development,

from virtually non-existent to ready to go.

Bernard Kuhn delves deeper

Table 1: File systems with journaling at a glanceName B-Tree 64-Bit clea Development stage LicenceReiserFS Yes No Ready for everyday use with restrictions GPLext3 No No Fully-functioning Alpha test version GPLjfs (IBM) Yes Yes Alpha test version GPLxfs (SGI) Yes Yes Beta test version for kernel 2.4-series GPL Fig.. 1: unbalanced (below) vs. full balanced tree (top)

files that were open at the time need be checked. Inmodern file systems a transaction-oriented approachis used, more often than not as long as any procedurehas not been completely executed, the old data fromthe previous transaction retains its validity. This isespecially important if for example a write processhas had an unplanned interruption.

Balanced trees

Apart from brief recovery times, modern file sys-tems are characterised by greater accessibility. Thisis achieved by using so-called B-Trees instead of theusual linear arrangement of data blocks. So, forexample, in the ext2-filesystem directory entries aremade in a linked list (see Fig. 1). If a directory hase.g. 1,000 entries, then on average some 500

search steps are necessary to find a file, while in anideal balanced tree (binary tree) after just ten steps(ld 1000) the result is brought to light (compare Fig.1 with four entries). The improvement in perfor-mance is, however, obtained at the expense of aconsiderably more complex (and thus error-prone)program code. In particular, after each new entrythe tree has to be “re-balanced”, so that all pathsfrom the root to the most distant leaves remainroughly the same length. Seen like this, linked listsare completely degenerate balanced trees.

Practice

So much for dull theory. The complexity of B-Treeand journaling algorithms have so far made conver-sion into Linux reality difficult. Apart from the ready-

ON TESTJOURNALING FILESYSTEMS

10 · 2000 LINUX MAGAZINE 31

Fitting an existing ext2-file system with journaling capabilities is,thanks to the backwards-compatible ext3-filesystem, almostchildsplay for an advanced Linux user. Linux beginners have onlyto overcome the hurdle of the kernel compilation and installa-tion. Obviously it is essential to back up all important filesbefore carrying out this step, which does have its risks.

1. Firstly, you will need an unmodified kernel and the ext3 patch.

cd /tmpwget ftp://ftp.uk.kernel.org/pub/linux/kernel/v2.2/linux-2.2U.13.tar.gzwget ftp://ftp.uk.linux.org/pub/linux/sct/fs/jfs/old/ext3-0.U0.2c.tar.gz

There already exists a ext3-0.0.2f version, but thisone only applies to a prepatched Red**Hat kernel (2.2.16-3).

2. Now the kernel has to be unpacked, patched, configured andinstalled. Don’t forget: during kernel configuration in the sec-tion File systems the option Second extended fs developmentcode must be activated for ext3. After installing the kernelyou should first ensure by doing a reboot that the system stillstarts up as usual.

cd /usr/srcrm linux # delete old linktar -xzf /tmp/linux-2.2.13.tar.gztar -xzf /tmp/ext3-0.0.2c.tar.gzcd linuxpatch -p1 <\<> ../ext3-0.0.2c/linux-2.2.13-ext3.diffmake menuconfigmake clean && make dep && make bzImagemake modules && make modules_install# after /boot over write kernel and instal by LILO

3. Now all non-root-partitions can be converted to the ext3-filesystem. To do this the user must manually install and ini-tialise a journal file on the partition. Depending on the activi-ty the journal should have a capacity of about 10 to 30 MB. Forthe initialisation the inode number, which the journal on thepartition represents, is needed. This number can be foundusing the command “ls” with the option “-i”. In the followingexample /usr is a correctly mounted ext2-formatted partition(/dev/hda4).

# in /etc/fstab for the /usr-input, replace the# file system identifier “ext2” by “ext3”vi /etc/fstab

# prepare /usr unmount (otherwise “busy”)init 1

# install journal (30MB)dd if=/development/zero of=/usr/journal.dat bs=1k count=30000

# determine inode number (here e.g. 666)ls -i /usr/journal.dat

666 /usr/journal.dat

# mount /usr as ext3-fs and initialise journal with# calculated inode number umount /usrmount -t ext3 /dev/hda4 /usr -o journal=666

So far, so good. Unfortunately the above method cannot beused on the root partition, since this cannot be unmounted dur-ing operation. The chicken-and-egg problem can be solved byperforming the journal initialisation as a kernel boot option. Soto do everything in sequence:4. As with the above example, the computer has to be informed

in /etc/fstab for future system starts that the root file systemwill henceforth be an ext3-filesystem (replace ext2 in the “/”-entry by ext3).

5. The journal is (as above) installed by hand on the root parti-tion and the inode number (in this case, 7777) of the journalmust be assigned as a kernel parameter

dd if=/dev/zero of=/journal.dat bs=1k count=30000ls -i /journal.dat

7777 /journal.datreboot

The computer now starts up again. When the LILO promptappears a couple of additional kernel options including theinode number of the journals must be added to the initialisation:

LILO: linux ext3 rw rootflags=journal=7777

The root partition will now be available after a hard reset withina few seconds recovery time (or at least, it should be). The wholeprocedure can also be cancelled by again replacing ext3 in/etc/fstab by ext2.

Recipe 1: ext3fs-retrofitting

made, free open-source ReiserFS, IBM and SGI arenow rushing to ship their tried-and-tested androbust implementations JFS and XFS to Linux. But foranyone who was already satisfied with the ext2-filesystem and is only interested in short recovery times,a closer look at the ext3-fs will be worthwhile.

ext3-fs

The ext3-filesystem is merely an expansion of thewell-known ext2-filesystem with journaling func-tionality and has no performance-boosting bal-anced trees. This means that existing Linux installa-tions can continue to be used immediately on anext2 base without reinstallation or time- and space-wasting copying actions, since ext3 is built on thebasis of the existing structures [1]. On top of this,for advanced Linux users, installation and gettingstarted are not especially complicated (see method1). However, ext3fs is, according to the chief devel-oper Stephen Tweedie, only in the alpha test phaseand a long way from being suitable for everydayuse. Nevertheless, there is a lot of positive feedbackbeing gathered in news groups and other Internetforums. Also, a short test in our hardware lab didnot find any weaknesses. But at the same time youmust not forget that alpha test versions in Linuxwould be regarded by the ‘marketing’ departmentas the equivalent of Version 1.0 in many other oper-ating systems.

ReiserFS

What began as a private study by the file systemspecialist Hans Reiser has now developed into apowerful file system which is suitable for everydayuse [2]. Tests and experiments are however not yetcompleted and research is continuing into possibleimprovements - now at the request of SuSE GmbH.

The ReiserFS arranges files and directory entriesinto balanced trees. Small files or remnants of files

(tail ends), directory entries and references to nor-mal 4K file blocks (Unformatted Nodes) are allaccommodated in 4K blocks (Formatted Nodes) inorder to make best use of the available disk space(cf. Figure 2). A beneficial side effect of this arrange-ment is that you get more data in the buffer cacheand therefore fewer disk accesses are necessary.With ReiserFS a watch is kept at all times to ensurethat the data is kept close to its references anddirectory entries so that large movements of thewrite/read heads are avoided.

All these refinements have meant that thesource code has grown five-fold compared with theext2 file system. Nevertheless (or even because ofthis) there are currently still some restrictionsimposed on ReiserFS: only 4k blocks are allowedand the use of SoftRAID is completely prohibited.Hardware platforms other than the x86 are alsounsupported.

Unfortunately it is considerably more complicat-ed to start up ReiserFS than it is with ext3 (seeRecipe 2). As an alternative to time-consumingmanual installation you may install Mandrake Linux7.1 or SuSE Linux 6.4: both distributions offer Reis-erFS as an alternative filesystem even on the level ofthe graphical installer.

After intensive tests by SuSE, some kernel devel-opers consider ReiserFS is still not ready for missioncritical use. In day-to-day work this file system has,however, already proven itself ideal for more thansix months on the workstations of the author of thisarticle. Daily backup of all important data on an NFSserver (with tried and trusted ext2fs and a tape dri-ve) is nevertheless vital in case of a full crash.

XFS

More than a year ago, SGI announced their “jewel inthe crown” to be made available under GPL condi-tions for Linux. Unlike the other numerous and suc-cessful Open Source Projects from SGI, the XFS hasgot off to a sluggish start - the reasons for this being,among other things, that it just wasn’t “open” for awhile. SGI’s programmers were in the process ofremoving foreign intellectual property from thesource code and replaced it with their own re-imple-mentations. First impression of the alpha test versionproved that these radical measures didn’t take downthe robustness of the code with it. Currently, XFS forLinux is in Beta test stage and according to SGI, aproduction stable version for the kernel 2.4 serieswill be available soon [3].

JFS

IBM’s Journaling File System for Linux wasannounced, surprisingly, at this year’s Linux WorldExpo in New York. The currently available version(0.0.9) however is still at a very early stage of devel-opment. The robust, tried and tested source codefor this is available as drop in replacement for the

Fig. 2: The structure ofthe ReiserFS (simplified)

in UML notation

ON TEST JOURNALING FILESYSTEMS

32 LINUX MAGAZINE 10 · 2000

Info

[1] Ext3-Download:ftp://ftp.uk.linux.org/pub/lin-

ux/sct/fs/jfs

[2] ReiserFS-Homepage:http://devlinux.com/projects/re

iserfs

[3] XFS-Homepage:http://oss.sgi.com/projects/xfs

[4] JFS-Homepage:http://oss.software.ibm.com/developerworks/opensource/jfs/i

ndex.html

kernel source tree. Unfortunately the roughly 1.3Megabyte tgz package [4] contains only sparse doc-umentation. Nevertheless a glance at the sourcecode reveals that the JFS also makes intensive use ofbalanced trees and appears to be 64bit-clean.

Conclusion

Four highly promising approaches for journallingraise great hopes that Linux will shortly be ascend-ing into higher spheres. This feature is important,not only for enterprise servers, but also for theembedded Linux market, which is growing like wild-fire. (In this application it is quite common for com-

puters to be switched off without shutting down.)With XFS and JFS, two projects which have arisenout of commercial products have entered the race.Their existing and robust code is currently beingbrought up to scratch for Linux by the developers.But the easily-installed ext3 and in particular theReiserFS are already there. The latter can even bechoosen as alternative to ext2 within the graphicalinstallers of the latest SuSE and Mandrake distribu-tions (SuSE encourages their customers to do so).Although there are rumours that tell that ReiserFSisn’t production stable, at least the author spent sixmonth of daily work on ReiserFS-enhanced work-stations – without any data loss! ■

ON TESTJOURNALING FILESYSTEMS

10 · 2000 LINUX MAGAZINE 33

Anyone wanting to convert their computer to ReiserFS has atpresent got their work cut out. Just as in the case of the ext3retrofit, this procedure is not without hazards. However, sincethe existing system has to be copied across in the course of theretrofit, there is no need for a backup - provided no errors aremade during repartitioning and there is a suitable boot disketteavailable in the case of a reconfigured LILO.

As part of the preparation a free partition is required, whichhas to be big enough to be able to accommodate the existingLinux installation (obviously the system can still consist of severalpartitions). In addition you will need an approx. 30 MB /bootpartition (with ext2 file system), since LILO will not work with akernel on a ReiserFS. /boot is mounted as read-only in normaloperation, so that after an abrupt interruption to operationsthere is no need for fsck. But now, step by step:

1. First the kernel sources and the patch for the journaling Reis-erFS are needed. Warning: there is also a ReiserFS withoutjournaling!

cd /tmpwget ftp://ftp.uk.kernel.org/pub/linux/kernel/v2.2/linux-2.2U.16.tar.gzwget http://devlinux.com/pub/namesys/linux-2.2.16-reiserfs-3U.5.24-patch.gz

Unpack, patch, configure and install the kernel (Warning: Don’tforget the option Filesystems/ReiserFS in configuration)

cd /usr/srcrm linux # delete old linktar -xzf /tmp/linux-2.2.16.tar.gzcd linuxgzip -cd /tmp/linux-2.2.16-reiserfs-3.5.24-patch.gz | patch -p1make menuconfigmake clean && make dep && make bzImagemake modules && make modules_install# copy kernel over after /boot and install via LILO

3. After rebooting the tools (especially mkreiserfs) can now beprepared:

cd /usr/src/linux/fs/reiserfs/utilsmakecp bin/reiserfs /sbin

4. Setting up the new file systems and copying across data: in thefollowing example /dev/hda2 is the current root partition (inc.

/boot), /dev/hda6 is the future (journalled) root partition and/dev/hda5 the future /boot partition (ext2, r/o). The virginjournaling ReiserFS requires, after formatting, as much as 30MB for the journal.

# Set system to “back-up” modeinit 1

# back up root partition mkdir /tmp/newrootmkreiserfs /dev/hda6mount /dev/hda6 /tmp/newroot(cd && tar cplf - . —exclude boot) | (cd /tmp/newroot && tar xUpf -)

# copy over /boot mkdir /tmp/newbootmke2fs /deb/hda5mount /dev/hda5 /tmp/newboot(cd /boot && tar cpf - . ) | (cd /tmp/newboot && tar xpf -)

5. Adapt fstab. Instead of ext2 for root, reiserfs must be substi-tuted. Also, the root partition has now moved (hda2 afterhda5). And don’t forget the entry for the new /boot partition.So: instead of the old /etc/fstab entry for the above example

/dev/hda2 / ext2 defaults 1 1

the relevant part of the new /tmp/newroot/etc/fstab must looksomething like this:

/dev/hda5 / reiserfs defaults 1 1/dev/hda6 /boot ext2 ro 0 0

6. The best way to check whether this comprehensive move hasworked, risk-free, is with a boot diskette. This means the deli-cate Master Boot Record will be unaffected for now:

# Create boot diskette dd if=/usr/src/linux/arch/i386/boot/bzImage of=/dev/fd0rdev /dev/fd0 /dev/hda6 # define new root partition sync && reboot

Once the computer (hopefully) has booted up in the copied sys-tem, all that remains is to modify /etc/lilo.conf for the new envi-ronment. Before calling up LILO, however, the /boot partitionhas to be mounted writeable, since otherwise “lilo” will

mount -o remount,rw /boot

Method 2: ReiserFS conversion

This is a distribution designed with modern hard-ware in mind. The precompiled kernels and most ofthe applications are Pentium optimized giving betterperformance than you’ll get from Red Hat - which isdesigned to run on everything from a 386 up.

The kernels (version 2.2.15 in this release) alsohave USB support built in. Mandrake has one of thebest graphical installers there is, ensuring thatalmost everyone will get Linux up and runningquickly. The result is a distribution that shouldplease all but those who still believe that installingLinux and locating software to run under it isn’tsupposed to be easy.

Mandrake 7.1 comes in two distinct retail pack-ages (plus a GPL version available for download orfrom places like The Linux Emporium.) Linux Man-drake 7.1 Complete is the cheapest version and con-tains three CDs. There’s also the seven-disc Linux Man-drake 7.1 Deluxe. You pays your money and you takesyour choice, which isn’t as simple as you might think.

In both the Complete and the Deluxe versionsthe first two discs contain the installation files andsource code, while a third Applications CD containsnon-open source applications. These include Acro-bat Reader 4.0.4, StarOffice 5.2, Borland’s InterBaserelational database, CompuPic: a nice graphics filemanager that’s free for non-commercial use , anevaluation copy of AC3D: a 3D object modeller,RealPlayer 7 Basic, the Macromedia Flash plug-in forNetscape, an MPEG TV Player (shareware), a trial

version of the Open Sound System (with a 3 hourevaluation period!) and an evaluation of IglooFTPPro, a graphical FTP clientbased on the free gFTPthat timed out after one day.

In the Complete version the Applications disc alsoincludes PowerQuest’s PartitionMagic 5.0 plus AdobeAcrobat editions of five books: Special Edition - UsingLinux, Teach Yourself Linux in 24 Hours, Teach YourselfKDE in 24 Hours, Teach Yourself Gimp in 24 Hoursand Red Hat Linux 6 Unleashed.

The more expensive Mandrake 7.1 Deluxe versiondoesn’t contain these items; however, there’s an extraapplications CD-ROM containing more than 20 otherpackages including the Sun Java JDK 2.2, evaluationcopies of VMWare, Executor (a MacOS emulator), Cit-rix ICA Client for Linux, Arkeia Network Backup andVariCAD. You also get AVP AntiVirus - a Linux pro-gram that checks files for Windows viruses - and theIBM ViaVoice SDK.

The Deluxe version of the distribution includesXFree86 4.0 among other goodies and the installationset spills over on to a third CD containing both bina-ries and their source code. On top of this there aretwo Contributors CDs containing over 500 extraRPMs of applications, documentation and sourcecode. In fact, the Deluxe package is more completethan the Complete version! Mandrakesoft claims thatthe Deluxe version as a whole contains over 1,800 dif-ferent applications making it probably the most com-prehensive collection of Linux software you can buy.

ON TEST LINUX MANDRAKE 7.1

34 LINUX MAGAZINE 10 · 2000

Linux Mandrake 7.1 reviewed

NOT JUST FOR BEGINNERS

JULIAN MOSS

In little more than a year,

Linux Mandrake has

gone from being an easy-

setup version of Linux

intended mainly for new-

bies to the distribution of

choice for many gurus.

It isn’t surprising. Linux

Mandrake is based on Red

Hat’s familiar distribution

but MandrakeSoft has

made significant improve-

ments with each new

version.

[below]Mandrake’s graphical installer

makes setup easy even for complete beginners.

[below right]The KDE desktop comes

preconfigured with useful icons.

Existing Mandrake users will want to upgrade asthe changes since version 7.0 are considerable. Videocards based on the i810 chipset are now supported,wheel mice now work in many more applications,power management has been improved and there isnow support for USB modems, printers and Zip drivesas well as UDMA 66 hard drives. A version of GNOMEis included which works with the Sawmill windowmanager, while an updated version of Qt adds sup-port for Chinese characters to KDE. XFree86 4.0 hasalso been included as a option in the Deluxe versionfor those who like to be at the leading edge (andwhose graphics cards are supported by it.)

On a more mundane level, packages have beenreorganized into more logical (or at least smaller)groups so that instead of searching through a few bigmenus looking for an application you must now huntthrough a lot of smaller ones. Menus are updatedautomatically in all graphical environments whenpackages are added or removed, as long as you useMandrake’s own package installer RPMDrake.

Mandrake 7.1 may have a lot of appeal for experi-enced Linux users but it still has many features thatcontinue to make it the best choice for first-timers.The installation CD auto-runs under Windows to givea choice of setup options including Lnx4Win. This is asetup that installs into a Windows partition so that norepartitioning of the drive is needed, and which canbe uninstalled as easily as removing a Windows appli-cation. If Linux co-resides with Windows, Setupinstalls a TrueType font server that can pick up theuser’s fonts straight from the Windows fonts directory.This will help smooth the transition path by helping toensure the new user’s documents look the sameunder Linux as they do under Windows.

PainlessThanks to Mandrake’s excellent installer first-timeusers are likely to find their introduction to Linux apainless experience. There’s a fully automated installoption that requires the user to make a minimum ofchoices. Gurus can choose the Expert option while therest of us will select Customized which gives you con-trol over the disk partitioning if you want it and offersa choice of setups for office use, development or useas a server. These choices affect the packages that areinstalled on the system by default, but they are a bittoo broad for convenience. Inevitably, whatever youselect, you end up spending time removing packagesyou don’t want and adding those you do, but whichdidn’t get installed automatically.

Package selection apart, the Mandrake installerdoes a first-class job of creating a fully working sys-tem. All the system’s users, not just root, can be setup during the installation. Network configuration isthorough: there’s even an option to configure dial-up Internet access if your computer has a modem.Printer configuration is comprehensive too, evenhandling the setup of remote Unix, NetWare or SMBprinters and concluding by printing a test page to

verify that the printer works. Mandrake offers you achoice of GNOME or KDE graphical environments. Itexhibits no particular preference although the userguide includes a chapter on using KDE but none onGNOME. Mandrake is one of the few distributions toinclude kruiser, a file manager for KDE similar to theMidnight Commander of GNOME or the Windows95 Explorer. The latest version, 0.4, boasts featureslike a graphics file preview and the ability to book-mark folders and add external drives and FTP sites tothe directory tree. These enhancements make it oneof the most versatile tools of its type, though wefound some of the new features to be a little fragile.

A welcome improvement in this version of Man-drake is the use of grub as the default boot loader.Grub allows users to pick a boot option from acolourful menu instead of the cryptic LILO prompt:it is also unaffected by the 1,024-cylinder limit oflilo, a stumbling block for many new users. Howev-er, despite its use of three methods to attempt todetermine the available RAM you may still need toedit the kernel parameters to get Linux using all ofyour system’s memory. Grub is configurable usingthe DrakBoot graphical configuration tool but, con-fusingly, the klilo graphical boot configuration toolis also present which could result in the inadvertentoverwriting of grub by lilo.

One reason for paying good money for a pack-aged Linux distribution is the manuals that comewith it. Mandrake includes two manuals: an Installa-tion and User Guide and a so-called Reference man-ual. They are quite useful, falling somewherebetween those of Corel (well presented but toobasic to be useful) and SuSE (full of useful informa-tion but a bit daunting for a beginner.) Like mostLinux distributions, the support you can expect fromMandrake only covers installation.

So which version should you buy? Enthusiastsshould certainly consider buying the Deluxe version.Beginners would be better off buying the Completeversion for the additional books supplied as Acrobatfiles on the CD. But neither choice is likely to causedisappointment. Both are easy to install and bothcontain plenty of useful software. When everythingis considered it’s fair to say that Linux Mandrake 7.1is one of the top Linux distributions available. ■

ON TESTLINUX MANDRAKE 7.1

10 · 2000 LINUX MAGAZINE 35

kruiser, a file manager that will

seem familiar to Windows users,

is included.

Far from our humdrum IT world, far from theoverhyped markets and the poorly written soft-

ware that gets debugged by the paying customerand the “Broken by Design” hardware architecturelies the kingdom of the mainframe.

There, almost everything is different from whatwe are used to. So different, that for example harddisks are not called hard disks, but DASD, pro-nounced “Daz-dee”, which stands for DigitalAccess Storage Device. There are computers living inthis kingdom which are only ever run up once intheir lives and whose address space can be occupiedby several different operating systems. If, in themanner of the king in the fairytale, you ask whoowns all the nice, stable hardware and software,you almost always get the same answer: it’s IBM.

FEATURE LINUX ON THE MAINFRAME

36 LINUX MAGAZINE 10 · 2000

There must be few Linux developments

that have excited more attention

at the moment than the Linux/390 port.

Ulrich Wolf shows us what is especially

interesting about it is not just the power

of the exotic architecture but also the

number of new application options which

the mainframe opens up for Linux.

Linux running on the IBM S/390

BIGBLUEPENGUIN

The Mainframe Market

The S/390 architecture from IBM and its predeces-sors S/370 and S/360 plays, in the field of main-frames, the role of a standard in the same way asthe architecture of “IBM-compatible” PCs at theother end of the scale. Except that in choosing theoperating system of the “big iron” IBM has not letitself be taken for a ride by a second-class garagefirm, but has retained control over the system soft-ware. Not least for this reason: the mainframe divi-sion is regarded by many in the know as a cash cowfor the company.

But even if IBM dominates in this market seg-ment, it is not an autocrat. When it comes to S/390-compatible machines, Hitachi, HDS, Amdahl andothers are active world-wide, while those withregional importance include Olivetti, Comparex andPQ Data. According to an analysis by the Gartner-Group in 1999, S/390-compatibles account forsome 85% of the mainframe market. In Europe,Siemens with its BS/2000-based business serverseries is also important, even if this has reducedsomewhat in recent times.

Apart from its extremely high reliability, thereare two main advantages of a mainframe architec-ture. These are the I/O performance and the highnumber-crunching power of the processor. The for-mer is achieved through the design of the architec-ture. Each device comes with its own high-perfor-mance controller which completely takes over theadministration of physical addressing. For this rea-son, the S/390 could also be seen as an asymmetri-cal parallel computer.

Rise or fall of the big iron?

The decline of the mainframe world has often beenheralded, for various reasons, yet it keeps beingpostponed. In recent years it has become apparentthat highly accessible Unix servers represent only alimited threat to mainframes. On the whole it is nowbeing assumed that there will be a return to moder-ate medium-term growth of the mainframe sector.

In particular, in this respect, new tasks are beingcreated for the “old iron” in the domain of e-busi-ness. This is why IBM is currently staking two princi-pal claims, especially by means of marketing activi-ties, for mainframes. Firstly, everything which comesunder the heading of “Management InformationSystems” (MIS). Many companies have been usingS/3x0-systems for decades, on which their entiremission-critical data and processes are hoarded overa period during which the world of Microsoft, butto some extent also that of Unix, has been stum-bling due to incompatibility with its neighbours. Sowhat could be a better idea than letting loose MIStools on these gigantic, consistent databases? Andwhy should a Sun server or perhaps somethingIntel-based with Linux or NT be necessary for appli-cations?

Management information is, to put it bluntly in asingle phrase, an attempt to distil from the totality ofthe business data of a company, information that isvaluable to its management. The process of data cre-ation and the extraction of information and ultimate-ly knowledge is described by terms such as DataWarehousing, Data Mining or Online Analytical Pro-cessing at a very high level of abstraction. These tech-nologies are currently being implememted usingdatabases and middleware on the S/390 architecture.

The second application area which IBM is hot-housing for mainframes has now, unlike MIS, itselfbecome a byword known even by the man in thestreet: “Dot.com-isation”. Much of the data hoard-ed on the “big box” is, of course, also highly suit-able for use as the basis of “e-commercialisation”of the company.

FEATURELINUX ON THE MAINFRAME

10 · 2000 LINUX MAGAZINE 37

Inside S/390 Enter-prise Server. The IBMflagships is availablein 24 versions.

But the Internet and the mainframe world aretwo universes which have long since been develop-ing alongside each other. Internet technology is tra-ditionally Unix technology and a stalwart MVSdeveloper has little interest in Unix. On the otherhand, in the Unix world there is an untold numberof established applications, protocols and toolsavailable which are fine-tuned to each other, andwhich are also mostly still free software. So it wouldbe a shame not to be able to use them.

In fact, the new OS/390 does “talk” to a Posix-compatible Unix, but many developers are not reallyhappy with this mixture from two worlds. It is in thisconnection that the initiative of IBM to make Linuxavailable for the S/390 architecture must be seen.This will in fact make it possible to run all applica-tions available for the “de facto standard” Unix, onextremely high availability hardware.

Nothing like home

In principle there are three ways in which an operat-ing system can run on an S/390. The first way isdirect on the hardware, in which case it takes con-trol of the complete resources of the system.

More usually, however, the hardware available ispartitioned. Note that this does not mean the samething at all as partitioning a hard disk under Linux.On the S/390, all resources (such as CPUs, RAM, IOchannels) can be assigned to different logical parti-tions (LPARs). This allocation may be static ordynamic, depending on the resource. This means,for example, that a CPU can belong to two parti-tions and can be made available as required to oneor other of the partitions (floating CPU). A largeS/390 machine from Generation 6 (G6) has 16CPUs. Two of these are dedicated IO CPUs and arenot directly available to the OSs. Another two CPUsare “reserves” in case one or more CPUs of theremaining 12 fail. The same technology whichallows floating CPUs also makes the reserve CPUsavailable transparently for the operating systems(i.e. without the operating systems even noticingthat a CPU has failed). Each LPAR represents a sepa-rate and complete system within the physicalmachine. The OS mounted on it has full control overthe assigned resources. The S/390 architecture per-mits up to 15 such LPARs.

Guest system

The third option for operating a “foreign” OS, is asa “guest system” within the VM (Virtual Machine)operating system. VM multiplies the resources of acomplete system or an LPAR by a time-slicing proce-dure almost as many times as it likes. The individualduplicates of the hardware are called VM guests. Bymeans of a log-in process very similar to that used inthe world of Unix, a user can now obtain access tothe system console of this virtual 390 system. UsingCP (Control Program) the user can configure thehardware of this virtual system and boot up operat-ing systems located on the disks or tapes accessibleto it. Booting, in the 390 world, is known as IPL-ing.IPL stands in this case for “Initial Program Load”. Inthis way more than 40,000 different Linux kernelshave been run in parallel on a ten-processormachine.

Originally VM/ESA was conceived by IBM as aninteractive multi-user operating system. VM takesover the multi-user section, providing each userwith their own little 390 machine. Each interactivesession then runs a small single-user operating sys-tem specially written for it, which is started in theVM guest. This system is known as CMS, whichstands for “Conversational Monitor System”.

The predominant operating system on theS/390 is OS/390, which has a long line of direct pre-decessors going back 35 years. The last of thesepredecessor versions, MVS, is to a large extent com-patible with the current OS/390. Developers andadministrators are still fond of using MVS as a syn-onym for OS/390. On the other hand MVS can alsocurrently be regarded as a subset and/or lower layerof OS/390. This operating system is best suited tothe special requirements of mainframe hardware.

FEATURE LINUX ON THE MAINFRAME

38 LINUX MAGAZINE 10 · 2000

A few terms from the S/390 environmentChannel Processor-controlled unit that permits the transfer of data between

main memory and peripherals.CMS Conversational Monitor System The native operating system for virtual

machines under VM CTCDASD Direct Access Storage Device In the broadest sense, any main memory,

but more precisely hard disks including the controller unit EBCDIC Extended binary-coded decimal interchange code A set of symbols sim-

ilar to ASCII, but coded differently. ESCON Enterprise Systems Connection A sort of IBM in-house network stan-

dard. There are special ESCON channels, processors etc.IPL Initial Program Load Synonym for the boot process under Unix/Linux,

also used for loading a configuration file into the main memory in orderto restore a working environment. Is often used as a verb: “to IPL”.

LPAR logical partition Logical partition of the complete hardware. Parts of allresources are assigned to an LPAR - CPU, RAM, I/O - and after that it isa fully autonomous computer inside the mainframe. Once installed,LPARs run for a long time.

MVS Multiple Virtual Storage Operating system for the S/390. Predecessorof the OS/390. Also used as a name for the MVS part of the OS/390 or,not quite correctly, for the OS/390 as a whole.

Open Edition The Unix Interface of OS/390OS/390 Current standard operating system for S/390 mainframes SNA IBM-specific network architecture with layer structure. Defines own

logic structures, protocols and formats. VM Virtual Machine The virtual CPU, virtual memory and virtual I/O chan-

nels available to the user of a guest operating system under VM – Thus,the virtual hardware.

VM/ESA Virtual Machine/Enterprise Systems Architecture The software whichmakes it possible to create virtual machines. The “enterprise system”

Sysplex System Complex A cluster of MVS- or OS/390 operating systems onone or more real machines.

Minidisk under VM, a DASD or a logical part of a DASD with its own virtualdevice number and virtual cylinders.

Among other things, it also contains UNIX Services,which provide a Posix-compatible interface to MVSfunctions. MVS was originally only intended to exe-cute batch jobs entered using punched cards. Thesepunched cards were still in use well into the 1980s.Batch processing is still one of the primary tasks ofcomputers in this size class, and the JCL (Job Con-trol Language) developed for this is one of the mostpolished languages available for non-interactiveapplications.

Besides this, VM is often run for interactive appli-cations and for software development. VM is usefulfor software development because its simulation ofS/390 hardware is so good that any operating sys-tem which runs on the S/390 architecture will alsorun there. This makes it possible to make available toevery software developer his own S/390. For operat-ing system development this is especially handy asthe developer will not hurt anyone else if there is asystem crash and it is not necessary to provide eachdeveloper with his own real 390 machine, whichwould probably be too expensive, even for IBM.

One of the great advantages of VM in develop-ment (including, of course, the development of Lin-ux for S/390) is the debugging options availableunder CP. It is possible to track accesses to memoryareas and to step through the program running inthe guest instruction by instruction. By doing this itis possible to watch how contents of registers andthe real or virtual memory alter.

Enter Linux

The idea of transferring Linux onto mainframes isnot new, and nor was it born in the IBM lab. An ear-lier project going by the name of Bigfoot had theaim of supporting the earlier version S/370 too.

Bigfoot was (or is) a normal free software pro-ject, whose initiator Linas Vepstas worked for IBM.Linas Vepstas is also famous for such things as Gnu-Cash and is involved in various projects in the fieldof Linux Enterprise Computing. Most readers will,however, certainly know him as the author of LinuxSoftware RAID Howtos. For various reasons, theS/370 project he initiated was at first put on ice, andrumours say that IBM did not exactly welcome theBigfoot people. The background, from the subjec-tive viewpoint of Linas Vepstas, can be read onhttp://linas.org/linux/i370.html. Had it come about,this project would have made it possible to makeLinux run on older hardware, too. However, it isdoubtful whether this would have been useful,since older hardware designed using bipolar tech-nology is a power-guzzler par excellence and istherefore now scarcely used.

The developers at IBM did, however, ensure thatthe IBM port uses instructions which are only avail-able on relatively new machines (G2 onwards).These instructions make it possible for a new com-piler to function very much more simply in somepoints than that of Linas Vepstas and in addition to

generate faster code. This difference is, however, sofundamental that no part of Vepstas’ code could beincluded.

The competing project with the official name of“Linux for S/390” was started at IBM Germany inBˆblingen and was developed in secret until the ker-nel and Binutils were finished. On 15th December1999 the almost-complete port was demonstratedfor the first time. The result can be seen: A Linuxwhich runs on “bare iron”, on LPARs and under VM.

The latter is probably the most potentially usefulmethod of operation since with this it is possible tostart literally hundreds, even thousands of kernels,which run in completely separate address areas. Butrunning it in an LPAR is also useful because of thecost advantage. In August IBM offered licensingmodels with dramatically reduced costs for Linux,compared to OS/390, both for Logical Partitions andVirtual Machines.

VM is the fastest

The installation of a Linux for S/390 under VMrequires only a little knowledge of VM and a VMguest account. The account must have access to atleast two minidisks of a specific size and two dedi-

FEATURELINUX ON THE MAINFRAME

10 · 2000 LINUX MAGAZINE 39

Info

Official Linux/390 page: http://oss.software.ibm.com/developerworks/open-source/linux390/index.htmlS/390-Hardware: http://www.s390.ibm.com/hardware/ Linas Vepstas’ pages onLinux for mainframes: http://linas.org/linux/i370.htmlThink Blue Linux, the distribution for Linux/390: http://linux.s390.org/Hercules-Homepage: http://www.snipix.freeserve.co.uk/hercules.htmLinux/S390 under Hercules: http://penguinvm.princeton.edu/hercules/index.htmlPrivate Homepage with gigantic collection of links: http://os390-mvs.hypermart.net/homepage.htm

One of the S/390’sprocessors. This multichip carrier is the mostcomplex one in thewhole world produced in series.

cated device addresses for the network connection.All this has to be provided by the VM administrator.Once these requirements have been fulfilled theinstallation process proceeds in a manner familiar toanyone who has installed Linux.

One interesting feature under VM is the so-called Virtual Reader. (Reader in this case stands forpunched card reader.) This behaves in a similar wayto magnetic tape. When Linux is booted up for thefirst time the Linux kernel, the parameter line andthe image for the RAM disk in the virtual reader arecopied under VM. Then you give the instruction tomake an IPL (initial program load = boot up) fromthe virtual reader. In this way the content of thereader is loaded into the main memory and execut-ed from a defined address.

When Linux has been successfully run up usinga file system in the RAM disk, the hard disks (mini-disks or dedicated DASDs) can be mounted, format-ted and provided with the necessary content (rootfile system). Now the system is in a condition toallowing booting without a RAM disk.

After this there are two options for booting upLinux for S/390 under VM. The first is to continueloading and IPL-ing the kernel and the parameterline in the Virtual Reader. The second is to cancelthe IPL instruction for a specified hard disk. In thiscase, a bootloader must be installed on the corre-sponding disk. Similar to the LILO loader used toboot Linux on Intel hardware, the bootloader forLinux for S/390 is known as SILO.

Naturally there are some differences of principlein an architecture which deviates so far from the PC,the “home planet” of Linux, which are visible fromthe outside. Since the DASDs of the S/390 are a spe-cial kind of hard disks, they are not addressed viathe device names for SCSI or IDE disks. The devicenames for DASDs are /dev/dasda, /dev/dasdb, etc.(In the previous versions of Linux for S/390 the DAS-

Ds were still referred to as /dev/dd<letter>, whichwas changed on the advice of Alan Cox). The prob-lem that, due to this naming system, the DASDs canonly address 26 disks will presumably be resolved bythe device file system in 2.4, because up to 65536devices can be connected to an S/390 machine.

There are now several Linux distributions basedon this port.. One of the first is mounted on theserver of Marist College, which co-operates closelywith IBM. On the basis of this, the German compa-ny Thinking Objects has developed its own distribu-tion based on RPM packages named “Think Blue”But soon SuSE entered the bandwagon with theirown mainframe distribution. Red Hat CEO MattSzulik, however, told “Linux Magazine” that hiscompany had no such plans.

Hercules - a “giant emulator”

Hercules was around even before Linux/390 wasborn. This is an emulation of the S/390 instructionset including the channel program under Linux 2.2x.Together with Linux/390 it enables, on a home PC(with at least a Pentium processor) one of whatmust be the wildest “emulation orgies” currentlypossible. When Hercules is up and running (it isreported that it takes some time before the firstprompt appears), it is possible to install Linux/390on this emulated mainframe. So everyone whoseappetite has been whetted by this article for theworld of the mainframe can at least get a taste ofthis on the PC.

Anyone who would rather have a “real” main-frame OS can also use the since-released OS/360.For anything else a licence is needed. VM, in princi-ple, does not run with Hercules: the ultimate goal ofrunning several Linux kernels in the virtual area ofan emulated mainframe thus remains a dream.

The emulator is released under a special licence,which the author refers to as the Hercules PublicLicence. This allows use only for “educational andhobby use” and prohibits among other things thedistribution of modified versions or the use of partsof the code in other programs. But anyone who issimply curious about how an S/390 feels should beable to live with this. ■

A little too big for thedesktop, but just fine

for big business

FEATURE LINUX ON THE MAINFRAME

40 LINUX MAGAZINE 10 · 2000

Anyone who talks about 3D modelling usuallythinks of powerful workstations from SGI or clustersof a few hundred computers sharing the load. AndLinux has seen a great deal of use running thesekind of systems. But someone who wants to openup virtual worlds on their home PC can use the freeoperating system too, allowing at least a taster ofvirtual reality with no worries and without having topay a penny.

3D programs perform two tasks: they have tocreate three-dimensional scenes and models, andthey have to render these scenes (computing the‘coloured in’ three-dimensional image from themodels). The two tasks are fundamentally differentand also impose different demands on the hard-ware. This is why professionals use separate pro-grams. A modeller program on a graphics worksta-tion is used to construct scenes and a software

FEATUREVIRTUAL WORLDS

10 · 2000 LINUX MAGAZINE 41

Creating and Rendering 3D Models

LIGHTS! CAMERA!

ACTION!Many people find creating

their own three-dimension-

al worlds a fascinating

idea. It’s no wonder, then,

that there are numerous

high-performance tools for

modelling and rendering

that run under Linux

and require no professional

experience. Manuel Lauten-

schlager sheds some light

package called a renderer, specially developed forthe purpose, builds up an image or an animationfrom the descriptive data.

Rendering is an enormously calculation-inten-sive process and takes a lot of time on low-poweredmachines. For demanding tasks, such as the workrequired for the film Titanic, entire clusters ofmachines were put together, forming so-called ren-der farms. The virtual ship in Titanic came aboutwith the aid of a specially written modelling pro-gram and was rendered on a cluster of 160 Alphacomputers, 55 of them using Windows NT and 105of them running Linux.

Because artists usually like to get an idea, whilestill drawing, of roughly how the finished scene willlook, all current modeller programs include a renderengine. The results of these come nowhere nearthose of dedicated renderers but are adequate forhome use.

Layers and Filters

In the case of large projects, on the other hand, stu-dios push dedicated program development evenfurther. It’s fairly common to have each part of anarea, such as the water or the landscape, calculatedby specialised programs. They’re all then editedinto a single image at the end. In order to be able toperform this task, data also has to be stored with an

extra characteristic which isn’t normally containedin a normal, two-dimensional image – depth data inthe form of the Z-Buffer. This indicates how far thepoint shown is from the viewer. Each pixel of theimage holds one of these values, which enables dif-ferent scenes to be matched-up on the 3D stage.

Instead of depth data, “alpha layers” are oftenused, which can make an image transparent wher-ever you want. So for example a program whichspecialises in water areas and landscapes such asarete Digital Nature (http://www.areteis.com/) canrender the ocean, but mask the Titanic ship with analpha layer so that it can be produced by a differentprogram.

Advantages of such layers include specificeffects, which can also be masked by an alpha layer.Then a normal image-processing program like Gimpcan add the effect again after rendering. Thisprocess is applied at the point when computer-gen-erated images are to be combined with real filmedscenes, since it allows the light conditions to be tak-en into account as well.

The basic principles are the same in all model-ling programs. The main differences are in user-friendliness and in the range of functions. Almostanyone can render their own movie and get up andrunning using free tools.

Blender

Blender is perhaps the most popular modelling pro-gram under Linux. It is a commercial program. Thereis a free useable version with limited functionality.This can be turned into the full version on paymentof a fee of £57. The program is fully scriptable withPython, controlling radiosity, environment mappingand other advanced functions.

There are numerous plug-ins, some good tutori-als and a lively user group, which recently met at theoffices of NotANumber (the company behind theprogram) for a one-week conference. The programoriginally stems from the Commodore Amiga,believe it or not, but has since been ported onto anumber of platforms.

[left]Comparison of render quality:

a cylinder, first processedwith an integrated renderer

(Maya Version 2.3) ...

[right]... and again with a dedicated

program (Blue Moon Rendering Tools Version 2.5).

The difference in quality isclear, especially on the edges.

[left]Here is a normal

two-dimensionalimage...

[right]... and the depth

data on it.

FEATURE VIRTUAL WORLDS

42 LINUX MAGAZINE 10 · 2000

Interface

The interface shows signs of its Amiga history. Atfirst glance it looks a bit crowded and jumbled.There are no menus. Instead, you must press certainbuttons to display tools and alternative workscreens. It isn’t immediately apparent which buttonsdo what.

In the full version the whole interface can becustomised using a Python script. This effectivelylets the program be restyled and altered with a fewcommands in order to adapt it to the current task.In allowing this the program is following a populartrend because many high-end programs now have asimilar option for workflow optimisation. Since theinterface can use OpenGL, it is even possible tohave 3D elements in it.

As mentioned, Blender doesn’t actually provideany standard menu structures. However, the inter-face can be made more interactive than in manymore expensive programs. Anyone who can get thehang of adapting the workspace will be able towork surprisingly quickly with this program.

Use

The numeric keypad and the space bar are impor-tant controls. The viewer can use the number keysto change the view of the scene, such as “walking”or “flying” around it. When the space bar is presseda menu, containing important functions such as

creating objects and storing scenarios, pops upunder the mouse cursor. The buttons in the controlwindow then allow fine adjustments. This space barmenu is also found in Maya.

By pressing [Tab] you can toggle back and forthbetween Edit and Move mode (or rather Transfor-mation mode). No matter what mode you are in youcan always move the object. The crucial difference isthat the centre point of the object in Move mode isshifted along with it. This doesn’t happen in Editmode.

Processing

The modelling process, like the interface, can takesome getting used to. Functions like “move”,“rotate” and “scale” can be activated not onlyusing keystrokes but via drawing certain symbols inthe viewing window. So drawing a rotated L switch-es into rotate mode and a pointed V switches intoscaling mode. Mouse users might not think much ofthis but it will delight users with a graphics tablet.However, mouse users aren’t left in the cold – bypressing the mouse button simultaneously with“Ctrl” and/or “Shift”, the view can be turned,moved and zoomed.

The interface can be customisedin almost any way butunfortunately it’s not anintuitive procedure

FEATUREVIRTUAL WORLDS

10 · 2000 LINUX MAGAZINE 43

Starting Blender properly Anyone using a window manager withseveral virtual image screens (not to beconfused with “multiple desktops” whichare found for example in KDE) will comeacross a problem with Blender whenswitching to another screen. Blender sim-ply crashes after a few minutes of mess-ing around this way because it is notallowed to draw directly on the visiblescreen. For this reason, it is best to runBlender on an X-Server of its own - thewhole thing can be automated as follows:

#!/bin/bash

set -x MAXDSP=$(ls /tmp/.X*-lock|tail U-1|cut -c 8)NEWDSP=”$(( $MAXDSP + 1 ))”DISPLAY=”:$NEWDSP”X $DISPLAY &while [ ! -f /tmp/.X”$NEWDSP”-lock ] ; Udo sleep 1 ; doneexec /usr/local/bin/blender

This script, however, only functions cor-rectly if the server is running as “root”,so either the suid bit has to be set or anXwrapper mechanism must be installed.

A scene from the Film: “The Fifth Element”: The surface of the waterwas rendered with arete and theship with Maya.

The main functions can once again be quicklycalled up using the space bar menu. Additionallythere are aids such as the 3D cursor, which candefine the creation position. This can prove itselfhighly useful. For any view it is possible to definefive levels of detail at which the processing viewshould be rendered or displayed respectively.

Modelling and animating

There are a large number of functions such as“Nurbs modelling”, “Meshsmooth” (a rounded offand weighted Quad-Poly-Object) and Metaballs,which can create nicely rounded objects. The pro-cessing of Nurbs objects functions smoothly, but thesuccessful creation of the Nurbs curves necessary forthis does depend somewhat on the circumstances.

The important functions for moving images, likeanimation paths, keyframes, inverse kinematics andobject hierarchies are integrated fully. The keys canbe processed with the built-in graph editor. All othercharacteristics of the objects can be entered andedited at this point as Bezier curves.

Materials, colours and lights

There are only two shaders directly built into theprogram: a standard shader and the halo shader.Others are available as plug-ins, however, it isn’tpossible to nest the characteristics of entire materi-als. Instead, you get an option for combining vari-ous textures. To apply texture to a frame there areseveral mapping types including bump maps (whichcan to a certain extent “dent” the object, in orderto give it some structure.) Other mapping optionsaffect the transparency of an element (the “Opaci-ty” button) or its luminosity (“Self Illum”.)

The program provides the most important pro-cedural textures such as wood, clouds, noise andcolour shading right from the start. There aren’t anyvolume maps at this stage (these can, for example,make clouds look more real from the inside.) Inorder to refine the textures, filters loaded as bitmapscan be used on the images.

So-called vertex colours can be used in Blenderto paint directly onto the object with a brush. Thisworks in a similar way to Artisan in Maya, but isn’tquite as intuitive to use. All textures, including theprocedural ones, are then also displayed in themodelling view.

There are two types of light sources: point-shaped lights and spotlights. The standard optionssuch as shadows and colours of lamps can be setseparately. Effects like halos, rings and so on can beset in the material editor. The light conditions canalso be previewed in the OpenGL-view.

Rendering

Rendering is done very quickly. The renderer is capa-ble of 16 times oversampling to improve quality.One interesting feature is that it is possible to renderdirectly in the processing view.

Integrated into the Render menu are effects likeparticle systems. This means that smaller objectssuch as particles of smoke are assigned reciprocalphysical interactions, with the result that they act asa unit. These options are not found in any otherprograms since particles are really allocated to

FEATURE VIRTUAL WORLDS

44 LINUX MAGAZINE 10 · 2000

Some user interfaces in Blenderappear truly chaotic; these are the

rendering options.

GlossaryModellingPrimitive The most basic elements of a model.All other, more complex, objects are assembled from these.Nurbs A Nurbs object is not described by polygons but by Bezier curves.This makes the surface appear more

rounded.Trims Methods by which the holes in Nurbs areas can be cut.Polygon An object made out of triangles.QuadFace /Quad-Poly Two triangular polygons which are combined into a quadrangle.The objects resulting from this are

required for clean subdivision surfaces.Metaballs Objects made up from balls that merge into each other. The properties of Metaballs can be weighted.Pivot The point of origin within the object matrix to which changes of translation, rotation and scaling relate.Subdivision Surfaces A new type of object for modelling in which a rudimentary control object such as a cube controls the

actual object. Lines and points of this control object can also be weighted and thereby refine theappearance of the target object.

Construction History The working steps by which an object was created can be reprocessed with this at a later stage; alter-ations to an object then have an effect on objects built using it.

MaterialsShader A generic term for render options. Shaders define and calculate the properties of materials.Volumetric materials Procedurally created material, comparable with mist from the point of view of properties.This enables

the inside of an object (such as a cloud) to be realistic.Weighted materials Refers to the attraction or the effect of a point on an object.Texture A two-dimensional image which when imposed on a 3D-body via Mapping Term that describes wrapping a texture around an object. There are various types, the most important

being a normal texture, when an object is to be coloured in or painted.Another type is called Procedural textures Textures produced with algorithms, such as shadings, wood and marble textures and textures pro-

duced with a noise filter.Filters Texture filters, similar to those in an image processing program; these are used to improve textures.AnimationSkeleton Basic frame on which objects can be fixed. If the skeleton moves, the added objects also move accordingly.Skinning Geometry which is distorted with the aid of a basic skeleton.Inverse kinematics The end points of the skeleton can be freely moved and animated; the position of the joints is calculat-

ed by the program.Forward cinematic Each joint can be moved individually.Path animation A curve or line along which objects move.Morph Creates a smooth transition between objects; the control points of the objects are interpolated

between various positions.Motion capture Capture of motion data using cameras and sensors placed over the clothing of actors. In this way, their

movements can be digitised and a natural-looking movement of an animation is generated from this.Keys Key points which define the animation process. Keys can relate to all parameters.LightsPoint Light Point-shaped source of lightSpotlight Cone of lightArea Light An certain area defined as a light source, such as a neon tube. Enables creation of soft ray-trace shadowsShadow map The shadow is calculated from the position of the light source. Its precision depends on the size of the

Shadow map.This process never produces a 100% accurate result.Raytrace Shadows Each ray of light is traced back. In this way, the result is absolutely precise, but resultant shadows

appear very hard.Caustic Light Extended light computation: the light can be concentrated as with a magnifying glass.RenderingDiffuse to Diffuse A computing method in which coloured areas reflect coloured light.Light transferSpecular to Diffuse In general, this refers to the reflected rays of light such as the light reflected back from a mirror.Light transferRadiosity With this method of computing each object is assigned an energy value which is a function of the energy

radiated by the surrounding object.This process, unlike Raytracing, produces very soft light conditions.Raytracing All rays of light are traced back to their source.This makes exact reflections possible with reflective

surfaces and refractions in the case of transparent objects.Oversampling Refers to the number of render passes, where the quality of the rendered image improves with each

additional pass.Render farm / Many computers, networked with each other, undertake a single computing task - this shortens.Distributed Rendering the processing time accordingly

geometry and the effects attributed to the particlesare in any case amalgamated two-dimensionally inthe renderer.

The chief developer of Blender, Ton Roosendaal,has announced version 2 of the software andreleased a beta version (1.8) which is said to have allthe features of the full version.

RenderMan, the modern classic

Like Pixar, the manufacturing company behind it,RenderMan has an interesting history. It evolvedfrom a collection of 3D tools which were used inmovies such as “Toy Story” and “Bugs”. Since then,RenderMan has become a commercial product andcosts £5,655. The program is nevertheless beingbriefly discussed here because the RenderMan fileformat (rib) is slowly turning into a quasi-standard.RenderMan is available as an RPM package forRed Hat Linux.

A rib-file contains all the scene data in an ASCIItext file. This includes stored objects, references toshading lists, lights and scene parameters, if neces-sary for each individual frame of the animation. Alight definition, for example, looks like this:

LightSource “pointlight” 1 “intensity” [9.5U] “lightcolor” [1 1 1] \

“from” [-1.5198 7.76837 -3.877]

Shading lists – ASCII files which describe nested andprogrammable materials – must first be compiled.They can then be installed in the rib file like a program-ming library in a C program in the following way:

Surface “Nice_new_surface”

There are graphical front-ends for both the cre-ation of the rib file and also the shading list files.They can also be exported from many programs.However, exporting requires reprocessing, which isoften time-consuming. Pixar uses, among others,the program MTOR to create objects.

The advantages of RenderMan lie in the quality,flexibility and high processing rate. Another greatadvantage is the sub-division of surfaces wherein itis possible to create complicated organic objectswithout having to work at higher resolutions. Theobjects created are converted optimally by Render-Man into polygons. The main advantage of thismethod compared with Nurbs is that surfaces can

be refined and weighted better. This is shown togreat effect in the eye parts of the figures in “Toys-tory II”, for example.

In addition there is a Shader language whichmakes it possible to create complex materials.Unfortunately RenderMan has no radiosity and noproper ray-tracing. Nor is there an area light orcaustic light. To compensate for these drawbacks,the rather remarkable “Blue Moon Rendering Toolk-it” (BMRT) was created.

Blue Moon Rendering Toolkit

BMRT costs considerably less then RenderMan. Tobe precise, it costs nothing at all. It produces betterresults but is slower. However, it has additional con-trols such as radiosity, extended light source meth-ods and many other effects. Apart from that thetwo are compatible. It is even possible to combinethe fast processing performance of RM with thequality features of BMRT. RM calculates the geome-try whilst BMRT takes care of reflection, refractionand radiosity. BMRT can be found as a binary for allnormal Linux distributions at the following website:http://www.bmrt.org .

Mops

Mops is a modeller for RenderMan-compatible ren-derers and was written in Tcl. The program workssolely with Nurbs objects but offers an adequatenumber of functions. For example, you can draw aline or Bezier curve and then use the revolve func-tion to produce a rotating object. With the trimfunction parts of a Nurbs object can be cut out anda skin object stretched over it.

The program is operated by a combination ofmouse and keyboard, though the program isdesigned primarily for keyboard use. All key combi-nations can easily be found in the comprehensivedocumentation.

In one part of the window the program offersan overview of all the objects present in the sceneand their characteristics, which correspond to thoseof the rib specification. In addition there is anotherconsole in the window, providing access to the Tclinterface. This means that the program can to someextent be scripted, although it is a long way frombeing as flexible as Blender.

FEATUREVIRTUAL WORLDS

10 · 2000 LINUX MAGAZINE 45

In this view the light conditions can now also be seen – the spotlight over the aircraftproduces realistic shadows.The surface of mops enters, in the guise of Tcl/Tk

This OpenGL view shows the object with asurface but without any other effects

Wireframe view - here it is also possible to seethat the object is made up of quad-polygons

The simplest view - the bounding box definesonly the scale of the object

An under water panorama, producedand rendered in Blender.

All the options correspond to the settings whichare available in the RenderMan format. User-definedparameters can also be added. This means that it ispossible to achieve very high quality in combinationwith RenderMan or BMRT. The light source functionsare a real weakness, however. It would also be niceto be able to import files in the RenderMan format.

Lightflow Rendering Tools Version 2.0

The author of Lightflow, Jacopo Pantaleoni, is just21 years old. He has been involved in programming3D effects since he was 12. Lightflow is more anobject-oriented C++- and Python library than a pro-gram in its own right, and is designed to be expand-ed. The example in Listing 2 shows how simplescenes can be programmed and visualised. Thestrength of Lightflow lies in the description of shad-ings of light in three-dimensional space. This is alsoits chief advantage: it can undertake proceduraldefinition of surfaces, volumetric patterns andmaterials, lighting systems or camera positions.

Both programming interfaces are freely avail-able for non-commercial use. Plus, there is a com-prehensive set of tools for volumetric rendering orradiosity, which allow the conversion of simplescenes into truly impressive images. This can be

FEATURE VIRTUAL WORLDS

46 LINUX MAGAZINE 10 · 2000

Listing 1: interface.c01 #include < Lightflow.h >0203 int main (int argc, char* argv[])04 {05 LfLocalSceneProxy* scene =06 new LfLocalSceneProxy();07 LfArgList list;0809 list.Reset();10 list <<”position” <<LfPoint(5.0, -5.0, 4.0);11 list <<”color” <<LfColor(1.0, 1.0, 1.0)*3e2;12 scene->LightOn(scene->NewLight(“point”, list));131415 list.Reset();16 list <<”ka” <<LfColor( 0.0, 0.0, 0.5 );17 list <<”kc” <<LfColor( 1.0, 0.5, 0.5 );18 list <<”kd” <<0.5;19 list <<”km” <<0.1;20 LfInt plastic =21 scene->NewMaterial(“standard”, list);222324 scene->MaterialBegin( plastic );2526 list.Reset();27 list <<”radius” <<1.0;28 scene->AddObject29 (scene->NewObject(“sphere”, list));3031 scene->MaterialEnd();323334 list.Reset();35 list <<”file” <<”ball1.txt”;36 LfInt saver =37 scene->NewImager(“saver”, list);383940 scene->ImagerBegin( saver );4142 list.Reset();43 list <<”eye” <<LfPoint(0.0, -4.0, 0.0);44 list <<”aim” <<LfPoint(0.0, 0.0, 0.0);45 LfInt camera =46 scene->NewCamera(“pinhole”, list);4748 scene->ImagerEnd();495051 scene->Render( camera, 400, 300 );5253 delete scene;54 }

Depending on the pattern used the same model can produce either an ocean with sunset or …

… a cloudscape with thundery atmosphere.

[left]When performing scientific

visualisation, realisticdepiction of surfaces and

light effects matters.

[right]Clock with striker: Light-

flow makes this kind thingpossible, too …

seen to great effect in the sample images. Bothocean scenes are based on the same model, a sur-face and a sky, but using different multifractal pat-terns – in one case waves are created and in theother it is clouds.

In a similar way, motifs such as a glass objectwith near-perfect light conditions or an alarm clockwith hammer striker effect are created

Realsoft 4D

Unfortunately there is very little information onRealsoft 4D [7] to be found on the Web. It’s thesuccessor to Real 3D and has been available fornearly ten years. It is primarily a commercial prod-uct from the company Realsoft, Inc. for the Win-dows NT platform, but it is now also available in abeta for Linux.

There are a few tutorials on the website under“Links”, along with the obligatory galleries. Butthere are only vague references to the technicalinnards which would be of interest to specialists.The results appear primitive compared to otherpackages too. It is Lightflow that sets the standardsin the quality of lighting conditions on surfaces.

Not just for hobbyists

Linux is the perfect platform for learning how tohandle 3D graphics – the available tools are justwhat you need and won’t plunder your bankaccount. Through Renderman-compatible softwareyou even have a path into professional modelling.For truly large-scale professional projects, however,a pure Linux-based solution is not yet practicable.The modellers available for Linux are not yet settingany standards, even if the actual render programhas long been among those at the very top. Never-theless, for the pro or the semi-professional usermodelling under Linux is a serious alternative, solong as the size of the project stays within limits. ■

Info

Blender links: http://www.fly-ingsnail.com/blenderseven.htmlMops homepage:http://www.informatik.uni-ros-tock.de/~rschultz/mops/RenderMan specification:http://www.pixar.com/products/renderman/toolkit/RISpec/Product info on Pixar’s Ren-derMan:http://www.pixar.com/products/renderman/Lightflow Tools:http://www.lightflowtech.comRealsoft 4D: http://www.real-soft.fi

FEATUREVIRTUAL WORLDS

10 · 2000 LINUX MAGAZINE 47

Overview: Renderers and ModellersModeller Blender MopsPolygon editing yes noNurbs yes yessubdivisions yes noMetaballs yes noSkripting yes yesMaterials built in RenderMan/ShadereditorImport Inventor, Blender 3DMFExport RenderMan,VRML1,VRML2, dxf,VideoScape 3DMF, RenderManRenderer built in RenderManHomepage http://www.blender.nl http://www.informatik.uni-rostock.de/~rschultz/mops/Modeller ac3d Realsoft4DPolygon editing yes yesNurbs no yessubdivisions no yesMetaballs no yesSkripting no Visual Shading LanguageMaterials very few VieleImport 3ds, dxf, lightwave, triangles, vectors, vrml1, triangles rplExport vrml1, vrml2, pov, r3enderman, dive, massive, dvs,Triangle rpl, dxfRenderer RenderMan, povray built in, Raytracing onlyHomepage http://www.comp.lancs.ac.uk/computing/users/andy/ac3d.html http://www.realsoft.fiRenderer Renderman Blue Moon Rendering Tools (BMRT)global illumination no yesVolume Materials yes yesNurbs yes yesdisplacementmaps yes yessubdivisions yes noField of Vision yes yesMotion blur yes yesBinarys available for Red Hat i386 (libc/glibc)speciality rather fast, subdevision surfacesFreeware no yesCompatibility Maya RenderMan, mayaHomepage http://www.pixar.com/products/renderman/ http://www.bmrt.orgRenderer Mental Ray Lightflowglobal illumination yes yesVolume Materials yes yesNurbs yes yesdisplacementmaps yes yessubdivisions yes noField of Vision yes yesMotion blur yes noBinarys available for Intel Linux 2.2, SuSE 6.1, Red Hat 6.0 Red Hat 6.1, Debian 2.1speciality subdivision surfaces, global illumination additional engines for lighting (i.e.Arealights)

Integrated in Modeller »Softimage« Multithreaded, C++ API with Python-WrapperFreeware no yesCompatibility Softimage, maya, RenderMan 3dsmaxHomepage http://www.mental-ray.com http://www.lightflowtech.com

This close-up of a face rendered with Realsoft 4D still looks rather plastic.

But Realsoft*4D has done a really goodjob with a water surface and waves.

Although relatively unknown at the time, MailboxInternet was one of the first independent Internetproviders in the UK. The company was establishedin 1992 to provide Internet services to public rela-tions agencies as an offshoot of parent companyMailbox, which supplies services to the PR and fulfil-ment industries. To this day the company is still awholly owned network, with no outsourcing ofsoftware or hardware requirements so common tothe virtual Internet providers of today.

The story starts in 1992. In the beginning, wewere primarily useing Solaris machines (a batch ofSun SparcStation 20 servers provided the core ser-vices such as web, mail and DNS), and a sprinklingof Apple kit. The reasons for this were that thehardware was readily available at the time and theequipment was familiar to the staff contracted toset up the ISP from the outset.

In the fullness of time however, the scaleabilityand security of such machines and the cost of run-ning them began to cause problems: a replacement

part for a SparcStation at that point was quiteexpensive, not to mention the cost of licences forthe only operating system available at the time,Solaris. The in-house administration system export-ed details every so often to a Perl script called “Sys-Setup”, whose task it was to compile the relevantbits of DNS zone file, email alias file, authenticationetc. and throw it out to the relevant servers. It wasreferred to quite frequently in the office as “that bitof voodoo which makes things work!”

I must admit I feel somewhat responsible forMailbox Internet’s migration to Linux. In 1998 Ijoined the company and found a network whichwas creaking at the seams. Personally I’d been usingLinux since around 1993: a fan of the Slackware dis-tribution introduced to me by a friend. AdditionallyI’d replaced the core systems at three separate com-panies with Linux servers by the time I got to Mail-box, and it proved to be quite a speedy way of fix-ing problems for good.

A question which was asked of me by the com-pany Chairman several times throughout the re-implementation was “why Linux?”: why indeed?Well, mostly it was the reliability of the operatingsystem itself. We’d been using Solaris on most ofthe servers and the frequent need for patches hasbeen well-documented - it was a mix of versions2.5.1 and 2.6 with OpenWindows and CDE, whichdidn’t seem all that efficient on the limited hard-ware we had available.

A second issue was cost: for the price of a sec-ond-hand SparcStation 20 we could have purchaseda brand new multi-processor x86 server, without anysoftware licencing charges or ongoing support costs(99% of problems we could fix ourselves in any case).

A final issue – and certainly one which borethinking about – was security. There are all sorts ofhorror stories floating around the Net about mostoperating systems (including Linux) but it all comesdown to how you configure your server. Indeed, aproperly configured Solaris can be locked down, butit takes all sorts of security patches and non-stan-

Technician Shish Batal installs

a new server at Telehouse-1

BUSINESS CASE STUDY: MAILBOX INTERNET

48 LINUX MAGAZINE 10 · 2000

Internet migration to Linux

100% LINUXIn 1999, Mailbox

Internet was the first UK

Internet Service Provider

to successfully migrate

100% to a Linux platform.

Joel Rowbottom tells

the story…

dard tweaks. Linux can be tightened up quickly andeasily with the aid of “ipchains” and taking a longhard look at what you really need to run on yourmachine (do you really need to run “inetd” if you’rerunning a mail server?).

Keeping the Net alive

The main issue of course was that we had to do allthe replacement work without impacting the thou-sands of customers whom we already serviced, so itwas going to be a lot of testing and a lot of latenights! Next we put together a schedule of whatwe need to provide to our users.

First on the list was the news server, which for atypical full newsfeed of the time (May 1998) wouldeat up to 10Gb of disk space a day. We’d recentlyfound a manufacturer who was willing to part witha stack of 18Gb SCSI disks and installed these intothe dual Intel PII-400 motherboard. SMP was still inits infancy so we only put one CPU on the board tostart with and added the other as soon as kernel 2.2was released.

A brief installation of our slimmed-down versionof Linux, use software RAID to “glue” the partitionstogether into one big mount, install INN2.2 and wewere ready to go. The machine performedadmirably (first time!) and there was much rejoicing:we’d put the first Linux box onto our network andthe users had a reliable Usenet feed. No problem!

After that, it was quite easy: we replaced the DNSservers very quickly utilising a copy of ISC’s “bind”package, and our dialup authentication system wasprovided by a copy of Cistron RADIUS. Intel Celeronboxes proved to be great servers. It’s worth pointingout by the way that where space is a considerationthere are some fantastic 1U-high cases out there ifyou look around, which will usually work quite happi-ly with standard all-onboard motherboards.

Mail system

Email proved to be a problem: we knew we’d needfailsafe machines, but there was the problem oflegacy UUCP and all sorts of problems rebuildingsendmail configuration files from SysSetup. Send-mail at that point didn’t have any of the advancedspam filters, ETRN or monitoring hooks which weneeded, and after a series of discussions with peersat other ISPs we decided to plump for Phillip Hazel’s“exim” package instead.

Exim is a drop-in replacement for sendmail thatdoesn’t have a configuration file which looks like anexplosion in a punctuation factory. It has got itsdrawbacks, but it’s reliable and simple to fault-findin the event of a glitch. We had a steep learningcurve to climb but there’s an experienced Exim sup-port network which proved very useful.

The email system itself finally consisted of fourmachines, with a clustering method designed tomake addition of extra machines simple: one

machine would run a POP3 daemon and twomachines would act as redirections for the virtualhosts. The POP3 daemon machine would access afilestore via a networked filesystem. We patched aversion of CuciPOP to allow us to authenticate froman alternative password file in order to create virtualPOP3 users and enable locking for a networkedfilesystem rather than the scoreboard-styleapproach which it already used.

Core Web server

The system flew, first time as well – it’s very impor-tant that it’s controlled quite closely when youmigrate an email system, as one single bouncedemail is enough to let the cat out of the bag andmake your users annoyed.

The final chief service to migrate to Linux wasthe core web server. This had the potential to be theiceberg under the Titanic: the previous systemadministrator allowed incoming telnet and FTPaccess to the entiremfilesystem so the possibilityexisted of hidden architecture-dependent codewithin customer user areas. In any event, we decid-ed to stop telnet access since almost all users wereaccessing the system via FTP.

The solution we eventually went for involvedmoving blocks of sites to one of three separateservers and running a mount to a network filesys-tem. Users were locked into their own directoriesthanks to the security features in the ProFTPd dae-mon and a copy of Apache appropriately configuredgave us the capability for serving webpages.

Admittedly, that one didn’t work completelyfirst time round. We had a lot of older customerscoming out of the woodwork within a few weeks:it turns out they’d been accessing throughabsolute paths, or had been uploading compiledSolaris programs! A brief chat about securitysolved that one.

BUSINESSCASE STUDY: MAILBOX INTERNET

10 · 2000 LINUX MAGAZINE 49

Exhibiting at Linux Expo 2000

After that final server we’d completed theprocess of migrating all core services from Solaris. Itwasn’t that difficult. Certainly the biggest pitfallsencountered were converting the Solaris-standardpaths to the Linux-standard paths and making surethat custom-written software was recompiled.Because of the SysSetup script (now rewritten intoour in-house Intranet admin system using mod_perland Apache) it’s a quick job to rebuild the entire ISPfrom scratch: nobody can manage that much sub-scription data manually!

Administration Systems

I mentioned earlier the “SysSetup” script that wehad written. In the early days the administrationmachine was an old Altos running via a UUCP linkto a Sun SparcStation clone which fed the text-based report to a Perl script! This might sound allvery convoluted but it was certainly an imagina-tive way of setting things up automatically. Thetime came though when the Altos was ready togo and we had to replace it.

There were two alternatives: either we founda shrink-wrap system or we built one. There wereno shrink-wrap systems for Linux which were doc-umented or complete at the time so it was up tous to write one.

We tried quite a few approaches to creatingthe user interfaces: an ncurses interface, usingGTK widgets, Java applications, and so forth. Thefinal approach we chose was the obvious one - aweb-based system with client-side verificationusing Javascript. Server-side operations were writ-ten in Perl, powered in the first instance via aMySQL database. Apache with SSL meant that wecould write several different interfaces for cus-tomers and resellers while still retaining a “masterconsole” system for ourselves.

Nowadays it all links together with the sup-port ticket database, billing system, reporting sys-tem, and event logging. It even talks to our Pana-sonic DBS phone system, automatically loggingwhen a customer calls, who they were passed toand how long they were on the call.

More recently, we’ve been taking a look atrunning SuSE on the desktops of all the adminis-

trative staff at Mailbox. It saves us a lot of hassleon maintenance since one of the technical staffcan always telnet in and fix it, kill an errantprocess, or whatever it takes. Additionally it’s giv-ing us that extra bit of security which you can’tlock down if you’re using Windows, althoughinvariably we get the “where’s Microsoft Office?”type questions! The receptionists have been hap-py with it for the past eight months and we’vestarted running it for the marketing staff. Thetechies, of course, have been running Linux foryears…

During 1999 we launched our £35 per monthcolocation deal and a sudden boom meant thatwe had to expand our network. We also ran into aproblem with logging and network monitoring.Of course, when a server or a router dies you needto get straight on to fixing it (even if it’s the mid-dle of the night) so we had to sort out some sortof monitoring software.

On that note I can thoroughly recommend“NetSaint” as a monitoring application: combinedwith a copy of “sms_client” it has the ability topage you out of hours if things go wrong. Net-Saint will try to relay an email, carry out a DNSquery, ping a router or check a webpage. If any-thing is amiss it’ll try again, only alerting youwhen something is really broken. We liked Net-Saint so much in the end that we began using itto monitor our entire network: while it can behard getting out of bed, it’s better than having areputation for being a broken ISP!

Bandwidth

The other issue with providing colo is that ofbandwidth. We use managed switches at Mailboxwhich have SNMP capability: handy for queryingwith MRTG - the Multi-Router Traffic Grapher. Wealso occasionally use the network monitor Ethere-al to pinpoint troublesome servers though we’veonly ever had to do that twice.

Out of bizarre mix of servers which we colo-cated at our Fulham facility, I can safely say that asubstantial portion of them run Linux: there’s anApple Network Server (fondly referred to as “Erik’sFridge”), an Acorn Archimedes, a whole raft ofx86 machines, various ex-University Sparc boxes;the list goes on. It’s good for those customers tobe able to email us and say “I don’t suppose youknow how to tweak Exim to do this, do you…?”.

The Mailbox network is one to be proud of:it’s expandable, reliable, and received a lot offavourable comments at the recent Linux Exposhow at Olympia. All our core servers are sited atTelehouse-1, a lights-out facility in Docklands: werarely need to visit it to do upgrades. Now we’reworking in preparation for the roll-out of businessand domestic ADSL, upgrading the core routingkit to deal with the demand of our colocation ser-vices. It rarely stops round here! ■

Info

Mailbox Internet:http://www.mailbox.net.uk

Joel: [email protected]

BUSINESS CASE STUDY: MAILBOX INTERNET

50 LINUX MAGAZINE 10 · 2000

The Fulham low-cost colocation facility: a bazaar

of server hardware

THE AUTHORJOEL ROWBOTTOM BSC (HONS)

IS MANAGING DIRECTOR OFMAILBOX INTERNET LTD, UK

Linux on a SparcSo what happened to the SparcStations? We tried originally to build our owndistribution: it was a struggle andeventually we gave up. A year latersupport for Linux on Sparc was a lot morevisible and after a brief brush with theRed Hat Sparc distribution we settled onDebian. The servers are still quite happilyticking over as backup machines for mailand DNS.

The last decade of the 20th century saw a wave ofuncertainty in the media business. The key questionwas who would own the two main stages of digitalentertainment: production and distribution.

As a result of that turmoil, a number of differentcompanies have converged on the media industry.Broadcast and content providers such as Sky andonDigital began competing for digital TV subscribers.Telecommunication companies such as BT and Cable& Wireless promised to deliver video on demand. Ser-vices such as pay per view and on-line shoppingadded a new dimension to digital broadcasting.

But those services also created new complexitiesfor media companies. The bar is quickly being raisedfor companies that want to succeed in the world ofmedia commerce. Consumers have been shown aglimpse of a more flexible future and their expecta-tions in terms of choice, convenience and qualityare higher today than ever before.

For all of those reasons, it’s clear that there areplenty of organisational and technological chal-lenges ahead. The first hurdle is the very real imper-ative to create digital content and to ensure thatexisting material is digitised for broadcasting overthe Internet and by digital service broadcastersacross the world. Whatever delivery mechanism isinvolved, the broadcast media are increasingly con-tent hungry.

Reducing the cost

Companies also need to consider the fact that thedigitisation of media reduces the cost of entry tomedia production. A piece of film that took days ofwork and hundreds of dollars to produce ten yearsago can now be shot digitally, stored and broadcastfor a fraction of the cost – and within much shortertime-scales.

The net effect is that smaller players are able tomove much more quickly into the digital media pro-duction space just as the desktop publishing (DTP)revolution of the 1980s moved the production ofcamera ready text and pictures out of the sole pre-serve of typesetters and designers.

The pressures that these trends create are nottrivial. Organisations need to move quickly to meetnew competitors head on and to ensure that theassets that they own in the form of film and TV pro-grammes are available in a digital format. They needto reduce the complexity of managing that materialso that they can provide a cost-effective, reliableservice to customers and partners.

Technology clearly plays a vital role. Oncecontent is in a digital format, it can be stored,managed and distributed as just another infor-

BUSINESS LINUX IN THE MEDIA INDUSTRY

52 LINUX MAGAZINE 10 · 2000

Meeting the challenges of the global media industry in the 21st century

DELIVERINGCONTENT ONDEMAND

ROB MORRISON, BROADBAND INTERNET SOLUTIONS MANAGER FOR SGI NORTHERN EUROPE

The merger between AOL

and Time Warner

announced in January

made history as one of

the biggest mergers

ever. Worth around $340

billion, the combined

‘clicks and mortar’ giant

also signifies massive

change in the media

business. It is the

strongest indicator ever

that entertainment and

the media – like

every other business

sector – is about to be

revolutionised by

the Internet.

By Rob Morrison

mation resource. The challenge is that it is aresource that places massive demands on tech-nology platforms.

To meet the expectations of consumers, broad-casters need to provide services of the highest possi-ble quality and availability. They also need platformsthat can be re-sized and extended to meet futurerequirements as well as current needs. A thirdimperative is that systems can be installed and usedquickly by new start-ups moving into the digitalbroadcasting industry: they must not take organisa-tions into a technological backwater.

Enter Linux

The overall requirement is for a hardware/softwareplatform that is based around open IT standardsand flexible technology. Out in front is Linux, anoperating environment that has been developed notby an individual software company but by a com-munity of open-source developers. Many major ITcompanies are engaged in aspects of introducingLinux. For example SGI is supporting Linux as amainstream operating system on its Intel-basedplatforms.

The main benefit of Linux is that it is a trulyopen system. Unlike Unix, which was developedand extended by individual companies to the extentthat scores of different flavours were introduced tothe marketplace, Linux can only be changed withthe full agreement of the open-source community.

The ability of Linux to handle large volumes ofcomplex website and server traffic has already madeit an obvious choice for organizations that are run-ning e-commerce organizations via web sites. It isestimated that Linux servers are at the heart of morethan half of the world’s websites and that a growingnumber of e-businesses are choosing Linux as theway forward.

Media companies face similar challenges to e-businesses. Both need to handle an unpredictablenumber of enquiries and requests for informationand digital products/services over the internet.Both need to manage on-line payments and haveaccess to multiple databases. Both are running

their businesses on IT, and require zero interrup-tions to service.

Internet Server

To meet the needs of the growing Internet marketSGI developed the SGI Internet Server, designedspecifically for ISPs, application service providers(ASPs) and colocation facilities. Based upon the SGI1200, the Internet Server includes Internet-specificmanagement, monitoring and security tools withintegrated basic services for Web serving and mes-saging.

SGI will also introduce mainstream support forcluster based systems via the Advanced Clusterenvironment (ACE) product. Clustering bringstogether a number of standard computer proces-sors that perform as a single, fast, highly powerful,highly reliable resource. Clusters can handle multi-ple jobs or applications simultaneously and can bescaled up quickly when the requirements of thebusiness change.

Working with the Linux community, SGI hasdeveloped and tested best of breed clustering soft-ware and management tools. It has also introduceda range of managed services that help companies toget highly reliable, ready to run Linux clusters up tospeed in a matter of hours. Overall, SGI LinuxAdvanced Cluster Environment and its Internet serv-er environment bring together SGI’’s heritage inscalable computing, its knowledge of the globalmedia industry and its requirements from technolo-gy, plus the latest developments from the open-source Linux community.

Conclusion

Pressures on the global media industry are set togrow more quickly in the next decade than everbefore. As content, infrastructure and communica-tions companies jostle to find their place in the newmedia world, the importance of implementing reli-able technology that supports digital content pro-duction, management and delivery cannot be over-stated. ■

BUSINESSLINUX IN THE MEDIA INDUSTRY

10 · 2000 LINUX MAGAZINE 53

The SGI 1200 Internet Server

It’s unfortunate, but true, that the success of anoperating system depends not on its own excellencebut on the quality and quantity of the applicationsthat run on it. This is one reason why Microsoft Win-dows dominates the PC market despite its flaws.

New users choosing a computing platform forthe first time will tend to choose Windows becauseof the wide range of applications that are availablefor it. Once they have made that decision it becomeshard for them to change because the applicationsthey are using lock them in to the original platform.

Any benefits that could be gained by switchingto a superior operating system such as Linux must

be offset against the money and time that will haveto be spent converting to alternative applications. Insome cases there may be no obvious alternativesavailable. Therefore many companies or individualswho wish to adopt Linux will only be able to do so ifa way is found to run these legacy Windows appli-cations for as long as they are needed.

Fortunately, as is almost always the case in theLinux world, where there is a problem there is asolution. In fact, as is also often the case, there ismore than one solution. In this article we will look atthree ways in which users may run - or appear torun - Windows applications on their Linux worksta-

BUSINESS WINDOWS/LINUX INTEGRATION

54 LINUX MAGAZINE 10 · 2000

Running Windows applications under Linux

PUTTINGWINDOWSIN ITS PLACE

JULIAN MOSS

The need to continue to run key Windows applications for

which there are no suitable alternatives can often be an obstacle

that prevents the adoption of Linux from being considered.

In this article we look at three possible solutions

tion. These three methods may not be the only wayto integrate Windows systems with Linux but theyare commonly used, inexpensive and capable ofworking well.

Virtual Network Computing

Virtual Network Computing, usually known by itsacronym VNC, is a technology that allows you toview the desktop of one computer system onanother. Readers with Windows experience mayhave used similar technology in remote accessproducts like PC Anywhere. It is the easiest of thesolutions described here to set up, but the mostexpensive in terms of hardware, because the Win-dows software must run under its own copy ofWindows on its own computer, just as it didbefore [Fig. 1] right.

VNC is a simple protocol whose implementationconsists of two components: a server and a viewer.The server runs on the computer whose desktopyou want to be able to access remotely. You use theviewer on a different computer to view it. Currentlythere are implementations of both servers and view-ers for Unix (Solaris, DEC Alpha), Linux , Windows(32-bit) and Macintosh (PPC and M64K.) There isalso a beta version of a viewer that runs under Win-dows CE and a Java viewer that will run on any plat-form that supports Java. VNC is free and is releasedunder the GNU General Public License so you candownload the source code as well as binaries fromthe developer’s web site.

VNC’s developers originally foresaw VNC beingused to allow users to access Unix applications run-ning on a big Unix system in the computer roomfrom the PCs on their desks. However, with thegrowing popularity of Linux many people are nowusing VNC to view Windows screens from their Lin-ux desktops. Unlike some proprietary remote accessproducts the VNC software is small and needs nocomplicated installation. The Windows versioncomes with a setup program which installs the serv-er in the Registry so that it starts automaticallywhenever you start the PC. For Linux there is a pre-compiled binary version that will run under any dis-tribution that uses glibc.

First, you need to make sure that the VNC serveris running on the remote PC. Then, to view its desk-top on your screen you simply start the viewer, enterthe remote system’s name or IP address and itsaccess password. Once the desktop is visible youcan interact with it as if you were actually sitting atthat computer. You can copy and paste betweenLinux and Windows. If you need to share filesbetween Windows and Linux you can enable filesharing on the Windows box and use smbmount tomount the Windows drives from Linux. You havefull control over the Windows computer, includingthe ability to shut down or reboot it, so it is perfectlypossible for the Windows box to run without itsown keyboard, mouse and monitor.

VNC allows you to view the remote desktop ona system on which the VNC viewer has not beeninstalled. Launch Netscape, enter the addresshttp://remote:5800/ (where remote is the name orIP address of the remote computer) and, after thepassword has been entered, the Windows desktopwill appear in the web browser. This is possiblebecause each VNC server is also a web server thataccepts connections on port 5800 which serves theJava viewer to any web browser that connects to it.

The VNC server uses a fair bit of processor timeon the host machine and response times can be a lit-tle bit sluggish even over a 10MB/s Ethernet connec-tion with no other traffic. You may experience prob-lems with parts of Windows not being updated in theviewer display: in that case there are settings whichcan be changed on the VNC server. VNC may not bethe most efficient way to provide access to Windowsprograms when you’re running Linux but it provides amethod that is very easy to set up and use.

Using VMWare

If you want a solution to the problem of running Win-dows applications from Linux that doesn’t require aseparate computer to run Windows you could tryusing VMWare. As the name implies, VMWare createsa virtual machine under which you can run anotheroperating system. You can get VMWare for Linuxwhich allows you to run Windows under Linux, or youcan use VMWare for Windows NT and Windows2000 which enables you to run Linux under Windows.The latter solution may be attractive if you are dippinga tentative toe into Linux waters and would like to beable to switch between operating systems withoutthe inconvenience of dual-booting. VMWare is a com-mercial product and costs £199 US for a licence, or£66 for home use, but it is available for download and30-day evaluation [Fig. 2].

Fig 1: VNC puts a Windows desktop in a window on your Linux desktop

BUSINESSWINDOWS/LINUX INTEGRATION

10 · 2000 LINUX MAGAZINE 55

You’ll need a reasonably powerful PC to useVMWare, since in effect it will be running two oper-ating systems at once. VMWare recommends a sys-tem with a minimum 400MHz processor and128MB of RAM for one virtual machine with appli-cations active on both the guest and the host. We’dgo along with that. The product is supported underrecent versions of Red Hat, Caldera OpenLinux, Tur-boLinux and SuSE Linux and requires XFree86 ver-sion 3.3.4 or higher. It will run on other distribu-tions: for the conditions check VMWare’s web site.

Setting up a Windows guest operating systemon a Linux host involves the following steps:installing VMWare, configuring a virtual machineusing the VMWare Configuration Wizard; installingWindows and installing VMWare Tools for Win-dows. The process is very straightforward and takesabout a couple of hours, most of which is spentinstalling Windows.

The virtual machine is created in its own directo-ry under the Linux file system, along with a virtualhard disk which is created in a file under the Linuxfile system. You specify its size when you run theConfiguration Wizard, and it must be partitionedand formatted before you can install Windows.

The operating system running in the virtualmachine cannot see the real hard disk, so even if aWindows virus activates it can’t possibly harm yourLinux system. In fact, anti-virus companies useVMWare in their labs to see what happens whenviruses activate. To restore a clean system they simplyrestore a copy of the virtual machine from a backup.

VMWare allows you to install Windows 95,Windows 98, Windows NT 4.0 or Windows 2000 aswell as various distributions of Linux. Using VMWareyou can create multiple virtual machines and installmultiple operating systems within them. You caneven run them all at the same time if the PC is pow-erful enough. One of the most popular uses of the

product is by developers and technical support staffwho need access to different setups for test purpos-es. Windows developers also benefit from the factthat when their program crashes and brings theMicrosoft operating system down with it only thevirtual machine is affected, not the host.

With Windows running under VMWare you cansee the Windows desktop in a window on your Lin-ux desktop and use it just as if it was a real Win-dows machine. You can copy and paste betweenLinux and Windows. If you need to share filesbetween Linux and the virtual Windows machinethis must be done using Samba, since the virtualmachine’s hard disk is not a real hard disk and can-not be mounted in the usual way.

VMWare has two networking options: host-onlynetworking and bridged networking. Using host-only networking only the host can communicatewith the virtual machine’s drives. Using bridged net-working the virtual machine appears as if on a virtu-al network connected to your real network and itcan see and be seen by other systems that have theappropriate access privileges.

VMWare 2.0 has a feature called Suspend andInstant Restore. This allows you to save a snapshotof the virtual machine with all the windows and filesthat are currently open. You can then instantlyrestore from this image. This is a big time-saver as itavoids having to boot up the guest operating sys-tem from scratch each time you need it.

Compared to VNC, VMWare is less expensive asit avoids the need for a separate Windows PC,though a commercial license for VNC itself is quitecostly. Because of its hardware requirements yoursystem might need upgrading and you’ll still need aWindows software license. However, if you want torun Linux but still need to run Windows VMWaremay be the best technical solution to your needs.

Using Wine

The trouble with both of the solutions described sofar is that they still require you to have a Windowssoftware license, so depriving you of the cost bene-fit of moving to free software. A better method stillwould be to use Wine, an open source free soft-ware project that aims to allow programs writtenfor Microsoft Windows to run under Linux withoutany Microsoft software being present at all. Howev-er, Wine is still under development. In its currentstate there’s no guarantee that the Windows pro-grams you need to use will run under Wine. But it isgetting better all the time. It’s certainly worth a try.

The name Wine is said to be a recursiveacronym derived from “Wine Is Not an Emulator.” Ifso, it’s a little disingenuous, because what Winedoes is provide an environment that looks to a Win-dows program like Windows even though it isn’t,thereby allowing the program to run under Linux. Itdoes this by providing functional equivalents to allthe Windows Application Program Interfaces (APIs)

Fig 2: VMWare lets yourun Windows under

Linux in a virtual machine

BUSINESS WINDOWS/LINUX INTEGRATION

56 LINUX MAGAZINE 10 · 2000

the program may use. That seems to me a lot likeemulation.

Importantly, Wine doesn’t have the performancepenalty usually associated with emulators that needto simulate a different hardware environment insoftware. All Wine has to do is implement each Win-dows API function under the environment of X Win-dows running on Linux: converting Windows graph-ics operations to X calls, making the Linux file systemlook like a DOS drive and so on. Wine is an interfacebetween the Windows program and Linux and X.Because of the greater efficiency of Linux someapplications might actually run faster than theywould under Windows on the same computer!

Windows is not a monolithic whole so much as acollection of dynamically linked libraries (DLLs) work-ing together in approximate harmony. Since Microsoftoften adds to these DLLs (as well as periodically modi-fying them to make them incompatible with oneanother) the Wine developers have a moving target tohit. The likelihood that a particular program will rununder Wine depends on whether it uses any APIs thathaven’t yet been fully implemented.

Most older Windows programs written in C,and many programs developed using Borland C++or Delphi, run well under Wine since they use fewAPIs other than those provided by the Windowscore components. These basic APIs have long beensupported by Wine and are pretty thoroughly test-ed. Programs developed using Visual C++ or VisualBasic, which are dependent on the Microsoft Foun-dation Classes and COM / ActiveX components,generally won’t run, or behave unacceptably whenthey do. This means, for example, that Wine won’trun Microsoft Office, The only way to find outwhether any given program will work is to try it.

As an interim measure, some programs thatdon’t work well under Wine can be made to workbetter by letting them use the original WindowsDLLs instead of the Wine replacements. This can bedone by setting up a Windows directory on the Lin-ux file system, copying over the relevant WindowsDLLs and making some changes to the Wine config-uration file. Of course, if you use even oneMicrosoft DLL in order to get your program to workof course you are legally obliged to have a MicrosoftWindows software license for the system.

A good example of what is possible using Wineis Corel’s WordPerfect Office 2000 for Linux [Fig. 3].Corel did not port the applications in this officesuite to Linux. Instead, it invested in the Wine Pro-ject to accelerate development to the point at whichthe Windows executables in the suite would run.This work has undoubtedly helped Wine to runmany more applications than WordPerfect Officebut there is still much work to be done. Neverthe-less, the fact that a major office suite now runsunder Linux using Wine is a feather in the cap of theWine developers.

Using Wine is a matter of downloading andinstalling the latest version of the software and then

editing the configuration file /etc/wine.conf to mapWindows drive letters on to directories in your Linuxfile system. You must also set the location of thedirectories that will substitute for the Windows, sys-tem and temporary files directories and set a path.You can point Wine at real Windows directoriesmounted on your PC, but if you do, you won’tknow whether your application is only runningcourtesy of files on the Windows PC.

To run a Windows program type “winemyprog.EXE params” into a console window andsee what happens. You may see messages appear inthe console window as the program runs. They canprovide useful diagnostic information if the pro-gram doesn’t run properly or crashes. Don’t thinkyou are home and dry if the program’s main win-dow comes up. It’s important to test every featureof the program thoroughly to be sure that it allworks as it would under Windows itself.

Conclusion

The best way to run Windows programs under Lin-ux, if you can, is to run them using Wine. It uses theleast resources, performance is better and youshould not need a Windows software license. ButWine may not yet support your program, particular-ly if it was developed using Microsoft tools. Wine isan open source project, however, so if you have theskills consider trying to solve the problems that pre-vent your application from running and so con-tribute to the project.

If you can’t get your Windows programs to runusing Wine, running them under Windows usingVMWare or on a separate PC running VNC willalmost certainly solve the problem. Whichever solu-tion you adopt, the fact is that the need to run cer-tain Windows programs need not be an obstacle tomigrating from Windows to Linux. ■

INFO

VMWare:http://www.vmware.com/ VNCHome Page:http://www.uk.research.att.com/vnc/ The Wine HQ:http://www.winehq.com/

BUSINESSWINDOWS/LINUX INTEGRATION

10 · 2000 LINUX MAGAZINE 57

Fig 3: Corel WordPerfectOffice runs under Linux using Wine

Three scientists at the University of Berkeley first hiton the idea more than 13 years ago of making aresilient and high performance storage medium outof separate hard disks: They defined five variants ofthis design and called it a “Redundant Array of Inex-pensive Drives”, RAID for short. This acronym isoften also said to stand for “Redundant Array ofIndependent Disks”. In RAID levels 1 to 5 one drivecan fail without the system having to stop working.Later, two more configurations were added: RAID 0with no error tolerance and RAID 6 with additionalfault tolerance.

Hard or soft?

Big corporations are the main users of RAID tech-nology. This isn’t surprising: the hardware isn’tcheap since apart from the bus controllers (PCI/SCSI)it must include a complete processor unit and a few

megabytes of buffer memory (see Fig.1). A RAIDcontroller acts just like an ordinary hard diskcontroller, although special drivers are often neededby the operating system. For information aboutspecific controllers see the test report on hardwareRAID controllers with Linux support in this issue onpage18.

As the performance of processors and the com-plexity of operating systems has increased, it has alsobecome possible to implement error correction usingredundant disks in the server itself. This variant,known as “Software RAID” (or “SoftRAID” for short)is enjoying ever-increasing popularity, especially withthe home user who is looking for a useful and cheapway to use any old hard disks that may be lyingaround. (Software RAID is also dealt with in moredetail in another article in this issue on page 62).

At the other extreme, an external SCSI-to-RAIDbridge can be used without the need for any special

KNOWHOW RAID PRINCIPLES

58 LINUX MAGAZINE 10 · 2000

Redundant Array of Inexpensive Disks

REDUNDANCYIS GOOD!

BERNHARD KUHN

When a single hard disk

isn’t fast enough, or its

storage capacity is

insufficient, one

solution is to connect

several drives together.

As an added benefit,

this can be done in a

way that increases

reliability by allowing

individual drives to fail

without losing data.

device drivers. From the point of view of the SCSIadapter in the server this behaves like an ordinarySCSI drive. Figure 2 shows a RAID array with inte-grated SCSI converter.

A RAID array owes its fault tolerance to the factthat it contains at least one extra hard disk which,by a variety of methods, allows the data on a faileddrive to be recovered. If a drive fails it should never-theless be replaced as soon as possible since if a sec-ond drive fails all the data will probably be lost.

Fail safe

According to the laws of probability a redundantdisk array, when used correctly, should only be outof action for a brief period about once every twentythousand years. However, leaving aside for amoment the symptoms of ageing of the other com-ponents, it’s possible for a defective hard disk tocripple the whole (SCSI or IDE) bus (for example,turning it into a “babbling idiot!”) so that other dri-ves are also temporarily unable to function. If thishappens it will cause the entire system to stopworking.

It’s true that SCSI hard disks usually die quietly:they just fall silent. But to play it completely safe, it’s

best to devote a separate channel to each hard disk.This will also avoid any bottlenecks in slower bussystems, but the improvement obviously comes atgreater cost.

In order to be able to exchange faulty mediaduring operation (a process known as “hot swap-ping”) hard disks are mounted into special car-tridges, which slot into a cage. These cartridgesensure that destructive electrical potentials are dis-charged on insertion and that the power supply tothe drive starts cleanly on insertion and is cut offbefore removal. The RAID controller software mustalso be able to correct any transfer errors that mightoccur due to signal interference during the swapprocedure, for example by repeating the read orwrite cycles affected.

When a defective drive is replaced, reconstruc-tion of the data or error correction codes is per-

formed. Because this can involve examining everybit of data in the RAID system the process can takeseveral hours. During this time, use of the servermay be subject to a few restrictions on perfor-mance, although the reconstruction should only runwhen no data read or write operations are pending.

If a disk fails on a Saturday, which is the admin-istrator’s day off but a day when the system’s usersare very busy, the weekend can be saved for every-one by using a “hot spare” hard disk. With this, if adrive fails the data reconstruction on to the sparedrive starts automatically. Replacing the defectivemedium is then not quite so urgent. The price topay for this is that the capacity of the spare diskremains unused during normal operation. For thisreason, this solution is only deployed in mission-crit-ical applications.

In all there are more than a dozen differentRAID levels, each involving descendants or combi-

KNOWHOWRAID PRINCIPLES

10 · 2000 LINUX MAGAZINE 59

Fig. 3: Special cartridges are used to allow drives to be hot-swapped

Table 1:RAID Level for servers at a glanceLevel 0 1 2-4 5 6 10minimum hard disks 2 2 3 3 4 4data hard disk+ n+0 1+1 n+1 n+1 n+2 n+nerror code carrierReading performance n 1 to 2n n n n n to 2*nin normal operation (Factor)Ideal reading performance 0 1 n n n n to 1.5*nin case of disk failureWrite performance n 1 n n n nFail-safe -- ++ + + +++ ++Performance/Price ratio ++ 0 - + -- 0

[above]Fig. 1: a multi-channel RAID controller

[above]Fig. 2: SCSI-to-RAID bridge based on BSD:configuration is done via a serial interface

nations of the basic forms. An administrator shouldspend some time thinking about precisely whichlevel is best suited to the needs of the applicationsthat will use it. The overview in Table 1 should betaken with a pinch of salt: depending on the appli-cation, it could look completely different.

‘Striptease’ with RAID 0

At the lowest RAID level data is stored without anyredundancy. There is therefore no resilience or faulttolerance. Data is written in blocks or “chunks”: thefirst block to the first drive in the array, the secondblock to the second drive and so on. For this reason,RAID 0 is often referred to as “data striping”.

The benefit of RAID 0 is not automatic errorrecovery but improved performance. It is possible toachieve almost n times the performance of a singlehard disk, where n is the number of drives in thearray. This is achieved because n read or write oper-ations can take place simultaneously instead ofsequentially. However, the probability of failure alsoincreases n-fold.

Since a RAID 0 subsystem has no redundancy, ifthere is a fault the data is normally lost. Files of asize smaller than the block size – depending on thefile system used – do have a certain chance of sur-vival, but restoring them manually is tiresome andtime-consuming. RAID 0 is thus certainly not aRedundant Array of Inexpensive Disks and is suit-able only for applications in which large amounts ofdata must be recorded very quickly only to be dis-carded after a short processing period, such as incompressionless non-linear video editing.

Mirror on the wall

RAID Level 1 is the simplest form of RAID, and isalso known as “disk mirroring.” It creates redun-dancy very simply by writing all data twice: once toeach of two disks. If a hard disk goes down, thedata is still there, intact, on the second drive.

Since each block of data is synchronously dupli-cated on the two disks there is no performanceincrease (or decrease) compared to using a singlehard disk. Reading small files also isn’t faster, butbig files can be read from the two disks in parallel (if

the bandwidths of the busses allow such a thing).ie. Chunks 1, 3 and 5 from disk 1 can be read alongwith chunks 2, 4 and 6 from the other disk. Howev-er, the blocks have to be re-interleaved.

RAID 1 can be useful in applications like webservers, file servers or news servers, where somefault tolerance is needed and data tends to be readmore often than it is written. However, the disad-vantage of it is that you are giving away half yourdearly bought storage capacity.

RAID 2/3/4: One more dosen’t hurt

If a striping array (RAID 0 with n drives) is providedwith an additional drive that is used to store errorcorrection and checking (ECC) codes, higher trans-fer rates and a lower risk of unrecoverable errors arecombined. If one disk from the stripe array goesdown, the lost data can be completely restoredfrom the contents of the remaining drives plus theerror correction information. The transfer rate dur-ing write operations (and the speed of restoring) is afunction of the processing power of the ECC calcu-lation unit.

RAID levels 2 and 3 both use an algorithmdeveloped in 1950 by R W Hamming to calculatethe ECC codes; they differ only in the chunk sizethat is used. RAID 2 uses a chunk size of just one bit:its benefits are more theoretical than anything elseand you won’t find any RAID 2 arrays in real life.There are commercial implementations of RAID 3(with small chunk sizes) but they are seldom used.Higher RAID levels are preferred.

RAID Level 4 uses considerably larger chunksthan its predecessors, (usually 4 to 128KB) and usesa simple exclusive-OR operation to generate theerror correction codes and to restore data. Figure 5shows an example with a chunk size of four bits.

The compromise

If data and error codes are distributed equally overthe N+1 hard drives according to Fig 6, then theycan read n+1 data blocks at once. For example toget the first six data blocks, the RAID-solution readsthe boocks 1 and 6 from the first, 2 and 3 from the

[left]Fig. 4: Not really a RAID:

RAID increases transfer speed at the

cost of reliability

[right]Fig. 5: Redundancy and

high transfer performanceare achieved by

combining RAID with anerror correction process.

KNOWHOW RAID PRINCIPLES

60 LINUX MAGAZINE 10 · 2000

Info

D. A. Patterson, G. Gibson, andR. H. Katz, „A Case for Redun-

dant Arrays of InexpensiveDisks (RAID)”, Report No.

UCB/CSD 87/391, University ofCalifornia, Berkeley, CA 1987.

Nick Sabine, “An Introductionto RAID”: http://www-stu-

dent.furman.edu/users/n/nsabine/cs25/

Storage Technology Corporation: http://www.

stortek.com/StorageTek/hard-ware/disk/raid/raid.html

second and 4 and 5 from the third drive (two blockoperations per drive). With RAID 2/3/4, the blocks1, 3 and 5 would be read from the first drive and 2,4 and 6 from the second (three blcok operations perdrive being necessary). The redundancy informationis not used for read operations in normal situations.The amount of space used for error correction pur-poses is the same as for RAID 4 so, given the bene-fits, it is hardly surprising that RAID 5 is the pre-ferred level used in practical applications.

No worries!

In especially critical applications provision must bemade for the simultaneous loss of two disks. RAID 5isn’t up to this and so to meet this requirement wehave RAID 6. RAID 6 calculates two different errorcorrection values from n data chunks and, as inRAID 5, distributes these evenly on to all hard disks.The Reed-Solomon error correction code is fre-quently used. Calculating this requires considerablecomputing power: consequently RAID 6 systems arenot exactly cheap.

Other configurations

A duplicated disk stripe with at least four media asshown in Fig. 8 is also often referred to as RAID 10(0+1). The hardware RAID controllers needed toimplement this are relatively cheap, which helps tooffset the cost of providing twice the storage capac-ity that would otherwise be needed. This solution isusually implemented using ordinary disk controllerswith the operating system taking over the RAIDfunction, so in fact it is really a cleverly-disguisedsoftware RAID solution.

Other RAID derivatives are RAID 30 or 50. InRAID 50, for example, three RAID 0 arrays are usedas data storage for a RAID 5 configuration.

Other RAID levels are also defined, though theyare rarely used in practice.

RAID 7 works in a similar way to level four, butrequires a microcontroller which processes all I/Oactivities asynchronously, sorts them appropriately

and buffers data. All current RAID controllers (andsoftware solutions) have this ability built into themanyway, so this RAID level is obsolete. However it isstill sometimes used in marketing to make a productappear to have something special.

The term “RAID 100” refers to parallel accessesto a RAID 1 system. This is also only possible withthe aid of a dedicated microcontroller and is nowrarely used.

Software RAID 0 evenly distributes data chunksover all the available hard disks. The same effect canbe achieved using the Logical Volume Manager byspecifying the “strip” parameter. The Linux LVM,incidentally, is planned to include support for equiv-alents of RAID 1 and RAID 5.

Conclusion

A RAID for all seasons does not exist! Each RAID lev-el has its own advantages and disadvantages. Thereis usually a price to be paid for high performanceand fail-safe features and so the final decision willoften be subject to budgetary constraints.

RAID Level 5 is an outstanding compromise andfor this reason it is widely used. Depending on theapplication, however, adequate protection for thedata on a server can be economically obtained usingthe “poor man’s RAID” – RAID 1. ■

KNOWHOWRAID PRINCIPLES

10 · 2000 LINUX MAGAZINE 61

[left]Fig. 7:dataflow under RAID 5 in normal operation and reconstruction.

[right]Fig. 8: RAID 0+1: Parallel accesses as with RAID**1 usinglow-cost controllers

Fig. 6:RAID**5 is now stateof the art in industry

Software RAID is not an option favoured by everyserver administrator. It steals valuable processor timefrom the server. However, nowadays even inexpen-sive computers such as you can buy at your localsuperstore have computing power that would makethe super-computer of a decade ago look puny. Atthe same time, small workgroup or intranet serversoften only have to serve a couple of web pages orfiles via the bottleneck of Fast Ethernet, and perhapsdistribute the occasional email. These tasks on theirown are not enough to make the processor breakout into a sweat. In this situation it is possible tobypass the usual hardware solution and save a tidybit of money by using a software alternative instead.

SoftRAID isn’t the right solution if you are con-sidering a heavyweight multiprocessor server withlots of capacity and hot-swap capable components.In that situation the cost of a true RAID controllerwill add an insignificant amount to the cost. Thesimpler commissioning and maintenance of the

hardware disk jugglers also has advantages in mis-sion-critical domains. Where the demand for peakperformance is vital a hardware-based system is theonly possible choice. But if your demands are moremodest and you are prepared to compromise oncommissioning and maintenance you can manageperfectly well with this free software solution.

Obtaining the software

Since the official release of the first SoftRAID imple-mentation in Linux kernel 2.0 a lot has happened.Originally only RAID Level 0 was supported. Also,anyone who wanted to install a bootable root filesystem on it had to patch the kernel and grapplewith the Initial RAM disk. However, from kernel ver-sion 2.2 hard disk configurations using RAID 0, 1and 5 can be recognised automatically by the(patched) kernel. Using an (also modified) LILO onecan also boot up without any problems from RAID 1.

KNOWHOW SOFTRAID

62 LINUX MAGAZINE 10 · 2000

Configuring software RAID

SOME LIKEIT SOFT

BERNHARD KUHN

High performance hardware RAID controllers are expensive. But there is a

cheaper alternative. Software RAID is also available for Linux. However, before

you can use it the hurdle of installation and configuration has to be overcome.

Readers who are put off by the description ofinstallation and configuration that follows would bewell advised to consider the latest Red Hat distribu-tion. From version 6.1 on, the graphical installersupports the option of bootable RAID 1 and therebysaves a great deal of challenging work.

Configuration

After installation comes the configuration of theRAID array. You will be spoilt for choice here as towhich RAID level is best suited to your needs. (Tohelp you choose, see the article “Raid Basics” in thisissue.) Configuration is equally easy whichever vari-ant you choose. In the file /etc/raidtab the RAID dri-ves must be defined and then initialised just oncewith mkraid. Later, the kernel starts the RAID con-figuration automatically, so any leftovers in/etc/rc.d/boot.local should be removed.

Listing 1 shows a simple RAID 1 configuration.The options are largely self-explanatory: this is alevel 1 RAID device /dev/md0 consisting of twopartitions (/dev/sda4 and /dev/sdb4) using a chunksize of 8 KByte. The statement “1” in persistent-superblock is needed so that the RAID configura-tion is automatically recognisable by the kernelright from boot-up. All RAID partitions must alsopossess the ID “fd” using fdisk (“Linux raidautodetect”). md stands for “Multiple Device”.With this type of device, besides a RAID array harddisks can be arranged in a linear fashion withrespect to each other so as to make what lookslike one big hard disk.

Listing 1: RAID 1raiddev /dev/md0raid-level 1nr-raid-disks 2persistent-superblock 1chunk-size 8

device /dev/sda4raid-disk 0device /dev/sdb4raid-disk 1

Listing 2 shows a RAID 5 configuration consist-ing of three hard disks. Defective disks are removed

KNOWHOWSOFTRAID

10 · 2000 LINUX MAGAZINE 63

No need for backups?Among home computer users SoftRAID is enjoying increasing popularity. Home users don’ttend to be very diligent about making backups and are reluctant to fork out for an expen-sive but rarely used tape drive. Writeable CD-ROMs aren’t the answer, since a full backupwon’t usually fit the storage medium. For this reason it often seems a good idea to back upby making a copy of the system on a second hard disk. Hard disks are relatively inexpensiveand markedly faster than either CD-RW or tape.

Using a hard disk for backup isn’t very practical if you need to install and then removethe drive from the system each time. But if the second drive is fitted permanently inside thecomputer it is no trouble at all. In that case, as long as the two drives are identical, they caneasily be run as a software RAID 1 array to make the most of the potential increase in per-formance (see the article “Raid Basics”, also in this issue.)

If you consider it important to keep your backup separate from the computer you canstill do so. To perform a backup all you need to do is connect the disk and wait for synchro-nisation to occur in the background (see the box “Background Rebuild”) After an hour or sothe mirror disk will contain a copy of the system and can be removed from the computerand put back in a safe place. If your main drive fails this will save you the extremely tediousbusiness of restoring from a backup. Instead, you simply replace the failed drive with thebackup drive and switch on.

This may sound too good to be true. And there is a small catch: if a voltage spike orsome other disaster were to zap both drives during the synchronisation process it is likelythat all your valuable data would be lost. However, the chances of that happening are, asyou can imagine, very slight. Nevertheless, for anyone who installs SoftRAID to increase fail-safety and improve transfer performance in a commercial environment a traditional backupstrategy remains an absolute must.

Background Rebuild

Defective or replaced hard disks are not allowed into the SoftRAID array untilthey have been manually integrated using raidhotadd. After that, backgroundreconstruction can commence. The operating system and the applications run-ning on it are largely unaffected by this: recovery of data will take place onlywhen no other I/O transfers are pending.

[root@bee /root]# cat /proc/mdstat Personalities : [linear] [raid0] [raid1] [raid5] [translucent] read_ahead 1024 sectorsmd0 : active raid1 hda2[0] 2297216 blocks [2/1] [U_]unused devices: <none>

[root@bee /root]# raidhotadd /dev/md0 /dev/hda3

[root@bee /root]# cat /proc/mdstat # disk reconstructionPersonalities : [linear] [raid0] [raid1] [raid5] [translucent] read_ahead 1024 sectorsmd0 : active raid1 hda3[2] hda2[0] 2297216 blocks [2/1] [U_] recovery=6% finish=23.3minunused devices: <none>

Info

RAID-Patcheshttp://people.redhat.com/min-go/raid-patches/

Software-RAID HOWTOhttp://www.linux.org/help/ldp/howto/Software-RAID-HOW-TO.html

from the RAID system using raidhotremove and raid-hotadd and after the swap, reconnected. If removablecradles are used, defective SCSI hard disks can evenbe swapped while operations continue or “hot spare”disks added later. The kernel interface is used for this:

echo “scsi [add-single-device|remove-single-Udevice] <controller> <bus> <target> <lun>” > U/proc/scsi/scsi

In this way, SCSI disks can be entered into orremoved from the device table. (This can be used tosimulate crashes.) Unfortunately hot-swapping doesnot work with IDE drives yet. Also, with IDE-basedRAID it is also only possible to connect a maximumof eight devices. When an IDE channel is occupied

by two hard disks the transfer rates sometimesreduces considerably. However, the performance isstill adequate for many applications.

configuration 2: RAID 5raiddev /dev/md0raid-level 5nr-raid-disks 4nr-spare-disks 0parity-algorithm left-symmetricpersistent-superblock 1chunk-size 32

device /dev/sda4raid-disk 0device /dev/sdb4raid-disk 1device /dev/sdc4raid-disk 2device /dev/sdd4raid-disk 3

RAID 10 can be obtained simply by creating aRAID 1 array consisting of two RAID 0 configura-tions. For device the corresponding /dev/md* isentered instead of an actual partition.

Booting up ReiserFS-RAID

At present, SoftRAID only works well with LILO usingRAID 1. For all other variants it is still necessary tostruggle with initrd and other tedious matters. In themeantime RAID works with Root-ReiserFS which notlong ago would not have been possible:

...[test@lab1 test]$ mount/dev/md0 on / type reiserfs (rw)...

When formatting an ext2 partition it is also possi-ble to tell the file system driver by means of the“stride” parameter what chunk sizes the device underit prefers to process. The choice of chunk size for thefile system and multiple device has a significant effecton the performance of the SoftRAID system.

Kernel 2.4

Unfortunately the RAID implementation in theupcoming 2.4 kernel series is not yet ready to go.But since the new kernel is still awaited (what’smore, everyone is cordially invited to help out!), wecan hope that the RAID support will be completedby the time it comes out.

More productive

Linux Software RAID is already bomb-proof and hasbeen in use for some time in mission-critical applica-tions. For example, the web server of Linux NewMedia AG (publisher of “Linux-Magazin” and “Lin-ux-User” in Germany) has been running a RAID 1configuration without any problems since it was setup almost a year ago. ■

KNOWHOW SOFTRAID

64 LINUX MAGAZINE 10 · 2000

RAID kernel installation

The following installation instructions have been tested with Red Hat 6.1 andKernel-2.2.14. But the process should work just as well with other distributionsand more recent kernel versions. A normal version 2.2 Linux kernel does in factalready know about RAID levels 0, 1 and 5, but it has trouble automatically recog-nising the partitions being handled by them. Because of this, some assistance inthe form of a kernel patch is required. Also, it won’t hurt to install the latest RAIDtools. Both of these can be found on the Red Hat web site. In addition, the origi-nal kernel sources will be needed.

cd /tmpwget http://people.redhat.com/mingo/raid-patches/raid-2.2.14-B1wget http://people.redhat.com/mingo/raid-patches/raidtools-dangerous-0.90-200U00116.tar.gzwget ftp://ftp.uk.kernel.org/pub/linux/kernel/v2.2/linux-2.2.14.tar.gz

In the first step of installation, the kernel has to be unpacked, patched, config-ured and installed. When performing the last two steps you may find the manualthat came with your Linux distribution to be helpful. RAID-specific options in thekernel configuration are used, and all RAID levels are compiled in.

cd /usr/src && mv linux linux.oldtar -xzf /tmp/linux-2.2.14.tar.gzcd linuxpatch -p1 < /tmp/raid-2.2.14-B1make menuconfigmake clean && make dep && make bzImagemake modules && make modules_installcp arch/i386/boot/bzImage /boot/zImage-raidvi /etc/lilo.conflilo && reboot

After rebooting, the command cat /proc/mdstat will shows whether the previousprocedure was successful. Now the latest RAID tools should be installed. Then theRAID configuration can begin.

cd /usr/srctar -xzf /tmp/raidtools-dangerous-0.90-20000116.tar.gzcd raidtools-0.90 && ./configure && make && make install

Table 1: RAID-Tools 0.90mkraid one-off installation and boot up of a SoftRAID configurationraidhotadd insert replacement or spare diskraidhotremove remove defective disk from the groupraidstart start multiple device — only needed in exceptional cases raidstop stop multiple device

Name allocation and resolution in the Internet andother IP-based networks has a long history. Since32-bit addresses, by which network nodes are actu-ally addressed, are hard to remember, computersquickly began to be given names. At first peoplemade do by setting up a file, HOSTS.TXT, whichallocated a name to each IP address in the network.

This file, which is still in use today (and is calledin Linux /etc/hosts), contains an IP address, an allo-cated host name and optional alternative aliases bywhich this computer can also be accessed. In theearly days of the ARPANET, with a few dozen com-puters, that was adequate. Even today in some sim-ple intranets this is still a workable solution, but notin the modern hierarchical structure of the Internet(the successor to ARPANET). So pretty soon thesearch was on for a solution which, firstly, makes themost of the advantages of this hierarchy and sec-ondly, makes it unnecessary to maintain separate,but nevertheless consistent, host files on each com-puter. This search resulted in several Requests For

Comments (RFCs), including RFC 1035 (DomainNames – Implementation and Specification) and RFC1034 (Domain Names – Concepts and Facilities).

The Domain Name System

To make it possible to manage the millions of com-puters of the Internet a hierarchical name structurewas introduced. The root of this name is a period”.”, followed by one of the global top level domainslaid down by the IANA (Internet Assigned NumbersAuthority), for example com, edu, org, uk or is. Foreach of these name domains, in turn, variousorganisations assign subordinate domains. Thus, forexample, Nominet is responsible for all names in theuk domain.

If you register a name, you can yourself create ahierarchy with as many additional subdomains asyou like, i.e. subordinate names. The ”.”, whichspecifies the root, is left out in everyday use, whichmeans that for example penguin.production.ja-guar.com uniquely identifies a computer called pen-guin, which is part of the subdomain production,which in turn are subordinate to jaguar and the toplevel domain com.

When TCP/IP has been installed on a computer(which is the case for all computers running Unix orLinux computers) then at least one name servermust be specified. This name server will resolve thehost names into IP addresses. Often, particularly inthe case of dial-up connections using the PPP proto-col, the name server is assigned dynamically. Eitherway, a name server must be known to the computerbecause only a name server can convert host namesinto IP addresses, and only IP addresses can be usedfor communication across the network.

If an application wants to resolve a host name todetermine the associated address, the procedure thatis followed is governed by the file /etc/host.conf, inwhich the search sequence is defined. Normally, thefile /etc/hosts will be searched first. After that, if no

KNOWHOW

66 LINUX MAGAZINE 10 · 2000

BIND

Configuration and operation of DNS servers

NOT JUST A NUMBER

STEPHAN LICHTENAUER

The nameserver BIND is

practically standard under

Unix and Linux.

Unfortunately, it is very

sparsely documented.

The man pages for example

are at best useful as a

reference. And yet well-

maintained name servers

are essential for users

of all Internet services in

any organisation.

matching name has been found there, the nameserver is contacted. The name server then eitherprocesses the enquiry itself, if its database holds thedata for the name domain in question, or it passes iton to the next server in the hierarchy.

Let’s look at an example. If the server responsiblefor jaguar.com receives an enquiry fornathan.rover.com, it will pass on the enquiry to theserver for the entire top level domain com. On theother hand it could resolve venus.production.ja-guar.com by itself. The com server knows theaddress of the rover.com name server and deliversthis to the enquirer, which can then repeat theenquiry to it.

The BIND8 IP-Name server packet

The Internet Software Consortium (ISC) designedand implemented the domain name system whichhas been the standard used to date. This system iscalled BIND (Berkeley Internet Demon). AlthoughBerkeley is actually using BSD as its operating sys-tem, BIND is now used on practically all importantplatforms and included in almost all Unix systemsand Linux distributions. With the change fromBIND4 to BIND8, the current version, a major alter-ation (resulting in a certain amount of simplifica-tion) of the configuration occurred.

In BIND slang a domain is referred to as a zone.The server responsible for the zone has the data-base containing the master data. Any available sec-ondary servers, which intervene in the event of afailure or overload of the primary master server,have a copy of this data (the slave zone.) Whenthere is any change in the configuration of the zonethe slaves are automatically provided with the newdomain data by the master.

The server consists of a daemon process callednamed, which is usually started or stopped on con-figuration in System V style by a boot script (usually/sbin/init.d/named.) If the configuration is changed,the daemon process must be persuaded using kill -HUP to do a new read-in of the files. Any error mes-sages and the results of communication with theother name servers, which must be informed of thechanges, are found in the system log. So that thesemessages are not overlooked, it is recommendedthat this file is always displayed on a console usingthe command tail -f /var/log/messages.

Configuration of named

BIND8 has a central configuration file /etc/named.conf,which, apart from general parameters, determinesthe zones that are controlled and their associatedzone configuration files (Listing 2).

Slave zones

Operating a secondary name server – in otherwords, controlling a slave zone – is not difficult.

Once the brief zone definition has been made in/etc/named.conf, which defines the master server,and entering the name of a file in which BIND is tostore the data, the job is done. All necessary data-base updates are fetched automatically by named,as long as the associated primary server is correctlyconfigured.

Zone files

For those domains for which your name server isconfigured as the primary server, however, morecare is needed. In particular the divided, hierarchicalarchitecture of the Internet domain concept doesnot permit trial and error methods of configuration.You must bear in mind that you have no accesswhatsoever to most servers which have zone datadefined by you, whether it is a secondary server (forexample your ISP’s name server), or some other serv-er which after a query has temporarily stored yourdata in its cache. You yourself can to a large extentdefine the lifetime of such invalid details throughthe time-to-live of the records defined by you (wewill show you how later.)

Usually, you will define the root zone and atleast two master zones. For each of the masterzones there are two database files; one for resolu-tion of names into addresses and one for thereverse procedure of resolving addresses into associ-ated names (reverse lookup). Apart from this thereis a file with the addresses of the root name serverswhich control the data on the top level domains andwhich your name server may need to contact as alast resort. This file should be checked at regularintervals to make sure it is up to date; it can beobtained from

Fig. 1: The position of penguin.production.jaguar.comin the name hierarchy of the Internet

KNOWHOWBIND

10 · 2000 LINUX MAGAZINE 67

Listing 1: HOSTS.TXT-Example file192.168.1.1 poseidon.qthree.uk mysql192.168.1.2 venus.qthree.uk ftp mail www192.168.1.3 client1.qthree.uk192.168.1.4 client2.qthree.uk

ftp://rs.internic.net/domain/named.root. Copy thisfile into the directory with your zone files (usually –and as stated in the sample configuration file – thisis /var/named) and give it the name which you havealso specified in named.conf (here, root.hint).

As the starting point for your own zone files, if

your /etc/hosts file is large, you can use the toolh2n. This tool converts /etc/hosts files into BINDzone databases. You can execute this program atregular intervals if your /etc/hosts file always con-tains the latest data. Usually, however, zone data-banks are managed by hand.

KNOWHOW

68 LINUX MAGAZINE 10 · 2000

BIND

/* Sample configuration for BIND 8.1 or new* install as /etc/named.conf ** Author: Stephan Lichtenauer* Note: All IP addresses/host names have been found*/

## General server parameters#options {

# Directory in which the zone databanks are storeddirectory "/var/named";# by default in case of errors in the master zone files

# the server will be stopped check-names master warn;

pid-file "/var/named/slave/named.pid";

datasize default;stacksize default;coresize default;files unlimited;recursion yes;multiple-cnames no;

# by default at Port 53 there is a listen-out for all available

# interfaces, following commands could# specify this more precisely:#listen-on { 5.6.7.8; };#listen-on port 1234 { !1.2.3.4; 1.2/16; };query-source port 53;

};

## Logging options for various problems:#logging {

category lame-servers { null; };category cname { null; };

};

## Pre-defined "Access Control Lists" (ACL):# "any" Lets any hosts in# "none" Prohibits all hosts# "localhost" Allows connections from this computer# "localnets" Allows connections from LANs (192.168.0.0/16)## Define own ACL:acl secondaries { 193.158.2.17; 152.133.12.18; };

## With the »server« instruction, other servers can be assigned# certain properties.## A server marked as »bogus« is never queriedserver 193.158.24.28 { bogus yes; }# if the other server has also installed at least BIND 8.1,# zones can be transferred more compactly.server 193.158.24.29 { transfer-format many-answers; }

## Defining the root zone#zone "." IN {

type hint;file "root.hint";

};

## Defining the »localhost« zone #zone »localhost« IN {

type master;file "localhost.zone";check-names fail; // errors here would be fatalallow-update { none; }; // of local interest only

};

## Defining of reverse lookup for local host (addresses into names)#zone »0.0.127.in-addr.arpa« IN {

type master;file "0.0.127.zone";check-names fail;allow-update { none; };

};

## Defining reverse lookup for an address zone#zone "36.158.193.in-addr.arpa" IN {

type master;file "36.158.193.zone";check-names fail;allow-update { none; };allow-query { any; };allow-transfer { secondaries; };notify yes;

};

## A master zone#zone "jaguar.com" IN {

type master;file "jaguar.com.zone";# Restrict zone transfers, to make work harder for# spiesallow-transfer { secondaries; };allow-update { none; };allow-query { any; };notify yes;

};

## A slave zone#zone "rover.com" IN {

type slave;file "slave/db.rover.com";masters { 194.238.99.128; };

};

Listing 2: Example of a /etc/named.conf file.

As an example, let’s set up the file for thedomain jaguar.com. According to our details in/etc/named.conf this must be stored under/var/named/jaguar.com.zone (Listing 3).

The ”SOA” record represents the start of thedatabase file. jaguar.com. defines the describeddomain. Take note at this point of the dot on theend, which stands for the root name domain. Youmust always write this dot afetr all fully qualifiednames, otherwise named assumes the name has yetto be completed and appends the current domain.

poseidon.jaguar.com. (again with a dot at theend) stands for the current computer, on whichnamed is running. root.poseidon gives the emailaddress of the DNS administrator, with the dotstanding for the otherwise usual ”@”. Since thistime the name does not end with a dot, BIND com-pletes the entry, making itroot.poseidon.jaguar.com., which represents themailing address ”[email protected]”.

So that the other name servers storing your data(either as secondaries or in their cache) can checkthat they are up to date, you must specify a serialnumber for the data record, which you incrementwith each amendment. The concrete format is up toyou; often the current date is used (as in this case 7Jan 2000 is represented as 20000107.)

The refresh value states in seconds how oftenthe secondary name servers should ask for updates(in this instance, ten hours). If the primary servershould fail to answer this request in retry (in thiscase: 1800) seconds a new attempt will start. Ifwithin the period defined by expire no response isreceived from the primaries, the secondary serverstops answering requests for this domain on thebasis that no answer is still better than a wrong one.

TTL (time to live) is sent with all answers andshows how long the data record will remain validand can remain in the cache. Choose this value withcare, as with large values changes (and correctionsfor typing errors) take a very long time to spreadthrough the network.

The following data records are each namedaccording to the third column of the zone file (Listing3). The two lines following the SOA record list thename servers (NS) for the domain. The first is thecomputer on which the master zone is located, thenfollow all the secondaries (just one in this case.)

The file then continues with the MX records.These state the addresses of the MaileXchanges, inother words, the mail servers. The number beforethe address is the priority value, representing a sortof inverse priority of this server. An SMTP serverwhich wants to send an email first tries to connectto the server with the lowest priority value. Only ifthis fails will it look further down the list accordingto the nearest priorities.

A-records define the mapping of the hostnames onto IP addresses. Thus poseidon for exam-ple is completed, making it intoposeidon.jaguar.com. If the request matches this

name, 193.158.36.58 is returned as the associatedaddress.

CNAME data records make aliases available.”news” – since, without a dot at the end after com-pletion it becomes news.jaguar.com – is translatedinto venus.jaguar.com and the A-record associatedwith this host name is searched for and evaluated.

The zone for the localhost (Listing 4), which hasto be included in every configuration, correspondsto the same syntax as the file for jaguar.com, exceptthat the scope is considerably more manageable.However, a few small abbreviations are used: With$ORIGIN, localhost. is named as a macro for the cur-rent domain, to which the @ symbols then refer.

Reverse Look-ups

Some programs, such as for example telnet, try to findout the host names associated with IP addresses. Thesereverse lookups are resolved by BIND using in-addr.arpazone files (Listing 5). In our file /etc/named.conf wehave defined a zone 36.158.193.in-addr.arpa IN … ,containing the addresses 193.158.36.0/24 (thus as amaximum in the domains 193.158.36.0 to193.158.36.255). For historical reasons, IP-addressesfor reverse-lookups are also written backwards (so noprinting errors…) and must end in in-addr.arpa (and inthe zone file, of course, with in-addr.arpa.).

The SOA-Record has the usual format (whereone can also see the possible, self-explanatory andvery practical abbreviations for units of time), onlyhere the reverse lookup is defined. For this reasonthe zone name is 36.158.193.in-addr.arpa. WithNS, again, the primary and secondary name servers

KNOWHOWBIND

10 · 2000 LINUX MAGAZINE 69

Listing 3: The zone file /var/named/jaguar.com.zonejaguar.com. IN SOA poseidon.jaguar.com. root.poseidon

( 20000107 ; serial36000 ; refresh1800 ; retry3600000 ; expire86400 ) ; time to live

jaguar.com. IN NS poseidon.jaguar.com.IN NS pns.bt.uk.

jaguar.com. IN MX 1 193.158.36.59IN MX 2 193.158.36.60

localhost IN A 127.0.0.1poseidon IN A 193.158.36.58phoenix IN A 193.158.36.59venus IN A 193.158.36.60

ftp IN CNAME phoenix.jaguar.com.www IN CNAME poseidon.jaguar.com.ns IN CNAME poseidon.jaguar.com.news IN CNAME venus.jaguar.com.irc IN CNAME venus.jaguar.com.

jaguar.com. IN SOA poseidon.jaguar.com. root.poseidon( 20000107 ; serial36000 ; refresh1800 ; retry3600000 ; expire86400 ) ; time to live

are defined, then come the PTR data records. Theseare the counterpart to the A-Records of forward res-olution and allocate the host names to the IPaddresses. Great care must be taken here to ensureconsistency between the A- and the associated PTR-records. Together with the reverse-mapping file forthe 127.0.0.0-address zone, this makes configura-tion complete. Since the 1 in the last line is not fullyqualified and does not end with a dot, it is automat-ically completed to make 1.0.0.127.in-addr.arpa.

Troubleshooting

As already mentioned, the fact that data is distrib-uted to all possible configuration files and in thenext step to all possible computers does not make iteasy to find and to correct any errors. The most fre-quent error – apart from not rebooting the named-daemon – is forgetting, after making modifications,to increment the serial numbers of the zones, sothat the connected computers do not notice that

something has changed. You must also bear inmind that due to caching it may take some timebefore your amendments spread through the net-work (so at this point think of a reasonable TTL val-ue.) In the event of problems with other zones thebest thing to do is use whois or finger to find thecontact information on the administrator responsi-ble and speak to them.

You will find many errors as soon as you look atthe system log (/var/log/messages) after a new read-in of the configuration. Syntax errors are also nor-mal, if named quits in such a situation (this shouldnot be the case if you have specified in/etc/named.conf check-names master warn). Checkwhether your fully qualified names in the zone filesend in a dot (thus for example poseidon.qthree.uk.If you write poseidon.qthree.uk, this will be com-pleted as poseidon.qthree.uk.qthree.uk., which isprobably not what you want).

If applications such as telnet, which performreverse look-ups, run very slowly, reverse look-up isprobably not correctly configured. Test this with thetool nslookup, found in both Unix and Linux, andwhich acts as an all-purpose tool in the toolbox ofthe BIND administrator. In the following examplethe allocation of addresses to names does function,but the reverse is not true (193.158.24.68 is theaddress of the name server tested):

[email protected] ~ # nslookup poseidon.ieee.Ucom 193.158.24.68Server: ieee.comAddress: 193.158.24.68

Name: poseidon.ieee.comAddress: 193.158.24.69

[email protected] ~ # nslookup 193.158.24.69Server: ns.phade.comAddress: 195.35.22.1

** ns.phade.com can’t find 193.158.24.69: NoUn-existent host/domain

nslookup will be able to help you in most cases.There is also dnswalk, which searches configura-tions for common errors such as inconsistent A- andPTR-data records. Don’t forget to notify changes tothe IP-address of your name server to the compe-tent authority (Nominet, INTERNIC etc.).

Lame or Missing Delegations are also very com-mon: In the first case a name server which is higherup in the hierarchy, when queried, delivers theaddress of the server which is supposedly responsi-ble, but which is in fact completely ignorant of thisgood fotune. In the latter, reverse case, the serversimply does not bring back the address of the oneresponsible. In order to avoid this it is necessary tohave good co-operation with your ISP. And don’tforget to check from time to time that your root fileis up to date (in the example in this article this isroot.hint). You can, of course, automate this withcron (but then make sure that whatever happens,you don’t mail the log outputs from named). ■

KNOWHOW

70 LINUX MAGAZINE 10 · 2000

BIND

Listing 4: The zone file /var/named/localhost.zone# /var/named/localhost.zone contains the allocation# of the loopback names and addresses

$ORIGIN localhost.42 ; serial3H ; refresh15M ; retry1W ; expiry1D ) ; minimum

1D IN NS @1D IN A 127.0.0.1

Listing 5: The zone file /var/named/36.158.193.zone# /var/named/36.158.193.zone contains the allocation# of host names to IP-addresses

36.158.193.in-addr.arpa. IN SOA poseidon.jaguar.com. root.poseidon (

20000107 ; serial3H ; refresh15M ; retry1W ; expiry1D ) ; TTL

36.158.193.in-addr.arpa. IN NS poseidon.jaguar.com.IN NS pns.bt.uk.

58.36.158.193.in-addr.arpa. IN PTR poseidon.jaguar.com.59.36.158.193.in-addr.arpa. IN PTR phoenix.jaguar.com.60.36.158.193.in-addr.arpa. IN PTR venus.jaguar.com.

Listing 6: The zone file /var/named/0.0.127.zone# /var/named/0.0.127.zone contains the allocation# of local host to the address 127.0.0.1

0.0.127.in-addr.arpa. IN SOA poseidon.jaguar.com. root.poseidon (

43 ; serial3H ; refresh15M ; retry1W ; expiry1D ) ; minimum

IN NS poseidon.jaguar.com.1 IN PTR localhost.

BEGINNERS FILE CONTROL

Permissions are at the heart of how Linux works.Some operating systems (such as MS-DOS and somevariants of Microsoft Windows) treat all files in thesame way. This means that any user can change anyfile. Usually, there is only one kind of user.

Linux does things in a completely different way.Under Linux many different users may be using thesystem at once (that’s why you need to log in whenyour system has booted.) Each user has their ownslice of the system that they can use to store theirfiles (the path /home/username). When you havemore than one user using the system you need toensure that other users cannot modify your files ifyou don’t want them to, and that users cannot lookinto files that you wish to be private. Examples ofthis are the system configuration files in directory/etc which cannot be viewed by users other thanroot. (This is because those files may contain detailsthat a malicious user could use to attack the system.)

You may be wondering how this is useful if youare the only person using your system. You mayeven be thinking that this is just a time-consumingirritation. Many new users think this at first. But youwill come to realise that permissions offer manyadvantages. An example of this is on my own sys-tem. I run the latest developer version of KDE, butsometimes I need to use KDE1.x and GNOME. So

that I don’t have to constantly move files around torevert to these systems I simply have a differentlogin for each, and a general directory where allusers can share files. This saves a lot of time overchanging the settings the manual way.

Linux permissions are basically split into two areas.These are:• File ownership• File access permissionsEvery file has an owner. This is usually the user whocreated the file, although this can be changed.Users can also be classed into groups, so similarusers can be grouped together.The other element is the access permissions for thefile. These are split into three areas:• Who can read (view) the file• Who can write to the file• Who can run the file (this only applies to files that

can be run)Each file has three sets of permissions: permissionsfor the owner of the file, permissions for the groupthe file is assigned to, and permissions for all otherusers on the system.Let’s look an example. Open a console and do adirectory listing by typing:

ls -al

at the command line. The result on my system canbe seen in Fig 1. This is simply a directory listing, butlets look at one line as an example:

-rw-r r 1 jono jono 1701 Jul 13 U15:23 nickmail.txt

A lot of information is given. Reading the informa-tion from left to right, this is what it means:

- File type indicator (- meanUs normal file)rw-r r File permissionsjono Ownerjono Group1701 File sizeJul 12 15:23 File creation time and datenickmail.txt Filename

Fig 1: An example directory list

72 LINUX MAGAZINE 10 · 2000

Getting to grips with Linux Permissions

DO IT WITHPERMISSION

With any operating

system it is important to

ensure that users remain

in control of their files

and directories and are

prevented from

tampering with those

belonging to other

users, or the system.

This is what the Linux

permissions system is all

about, as Jono Bacon

explains.

BEGINNERSFILE CONTROL

The parts we are interested in primarily are the firstfour elements; file type indicator, file permissions,owner and group.

The file type indicator tells us what type of file it is.Everything in Linux is treated as a file, even thingssuch as devices (just do an ls -al in /dev to see whatI mean). With everything being treated as a file, it ishandy to have something to say whether it is a nor-mal file, a directory, a device or whatever. Below aresome examples of different uses:

drwxr-xr-x 4 jono jono 1024 Jul 2U7 00:36 .kde

This line shows that .kde is a directory as the filetype indicator is set to ‘d’.

brw———- 1 jono floppy 2, 0 May 5 U1998 fd0

This line shows that fd0 (the floppy drive) is a blockdevice by the ‘b’ in the file type indicator.Now look at the permissions part that is next to the filetype indicator for nickmail.txt. This reads as:rw-r–r–.The permissions part is split into three sections, eachhaving three characters. Each section reflects a typeof user on the system, and whether they can read(r), write (w) or execute (x) the file. On this file eachsection breaks down as:

rw- The owners section. The owner can (r)ead and(w)rite to the file. The owner (see below) can-not execute the file, but this can be changed asthe owner can (w)rite to the file.

r— The group section. The group (see below) canjust (r)ead the file but cannot write to it.

r— The ‘all other users on the system’ section. Allother users who are not in the same group anddo not own the file cannot write or execute it.

To find out who the owner of the the group the filebelongs to, we need to look at the next two pieces ofinformation in the file’s listing. For nickmail.txt we can

see that the owner is ‘jono’ and the group is ‘jono’.Now we know what the different bits of a file listingmean and how we stop certain users using oraccessing files. How do we change the permissions?

Changing a files permissions in KDE

To change permissions using KDE is very simple.1. Start the KDE file manager (kfm for KDE1.x and

Konqueror for KDE2.x).2. Right-click the file whose permissions you would

like to change.3. Select Properties from the menu. Click on the Per-

missions tab (Fig 2).4. To change the file’s permissions, click the relevant

check boxes to select the Owner, Group and Oth-er permissions that you need.

Bear in mind that to change permissions on a fileyou need to have permission! You must have writeaccess to the file. You will notice that there are threeadditional boxes you can select; Set UID, Set GIDand Sticky. These are explained in the box »SpecialPermissions.«

Changing a file’s permissions in GNOME

Changing permissions in GNOME is virtually thesame as in KDE. 1. Start the GNOME file manager (gmc).2. Right-click the file whose permissions you wish to

change. Select Properties from the menu. Click thePermissions tab.

3. A box like Fig. 3 will appear. As you can see it looksvery similar to the one in KDE, and functions inexactly the same way.

Changing a file’s permission in the command line

In Linux, virtually every operation that you can do ina GUI such as KDE or GNOME can be done usingthe command line. Changing permissions is no dif-

10 · 2000 LINUX MAGAZINE 73

[left]Fig 2: The KDE filepermissions tab

[right]Fig 3: The GNOME filepermissions tab

BEGINNERS FILE CONTROL

ferent. To change the permissions on a file we usethe chmod command, which has the format:

chmod <permission(s)> <filename(s)>

The chmod command is a very versatile command,and can change the permissions in a number ofways. Probably the easiest way to remember is bychanging the permissions using the same letters toset them as they are displayed (r, w and x). To do thisyou must first specify the section that you want tochange (owner (u), group (g) or other (o)). You mustthen specify + or - to indicate whether you are giving (+) permissions or removing (-) them. Sup-pose that you would like to change the file nick-mail.txt so that all other users on the system canread and write to it. You would use:

chmod o+rw nickmail.txt

This command basically says »give every other useron the system (o) addition permissions (+) that areread (r) and write (w) on the file nickmail.txt«. Nowlet’s assume we had a change of heart and wantedto let any other user read the file, but not write to it.To take away write access we would use:

chmod o-w nickmail.txt

Here are some more examples of changing permis-sions:chmod u+x file.txt Lets the owner execute the

file.chmod g+wx file.txt Lets the group write and exe-

cute the file.chmod o-r mydir Stops any other user seeing

what is in the directory mydir(e.g - when doing an ‘ls -al’).

As we said, permissions are based around whoowns the file and what group the file belongs tonaturally need commands to change the owner ofthe file and their group. Those commands arechown and chgrp. The chown command is very sim-ple. Let’s assume we want to make Bob the newowner of the file nickmail:

chown bob nickmail.txt

It’s as simple as that. When you list the file now witha ‘ls -al’ you’ll see that the owner section of theinformation has changed to Bob. Luckily, the chgrpcommand is just as easy to use as the chown com-mand. Suppose we want to change the group ofnickmail.txt to bob as well. We would type:

chgrp bob nickmail.txt

Again, if you look at the file by doing an ‘ls -al’ youwill see that the group section of the informationhas changed to Bob. However, this can only bedone by root.

Are permissions useful?

After all this, you may be wondering what all ofthis has got to do with anything. Well… quite a

bit actually. The first thing that it is useful for solv-ing problems. Many problems that you canencounter on Linux are simply down to the factthat a particular user does not have permission todo something. A common example of this is whenmounting disks. Traditionally, only root can mounta disk (such as a CDROM or floppy) but there aremany cases when a normal user needs to do so aswell. Another use of permissions is to make shell scriptsexecutable. This is done by setting the ‘x’ permis-sions bit. To demonstrate this create a plain text file(call it diskfree for the sake of example) using yourfavourite text editor containing the following text:

echoecho »Hello...I am now going to list your harUd disk space:«echodfechoecho »There we go...all done. :-) »echo

Once you have created it, set the execute bit by eitherchanging it in as described above, or by typing:

chmod a+x diskfree

You can now run the file by typing:

./diskfree

As you can see some text is printed and your diskspace is shown.When you created the file it was simply text,although the text contained commands understoodby your command shell. By setting the executablebit the file can be run so that the commands areexecuted. This is called a Shell Script. Although theexample was pretty trivial, shell scripts can be usedto do some amazing things.

Conclusion

Permissions are not just an important part of Linux, butan essential part. A good understanding of how per-missions work and how to deal with problems withpermissions is important if your system is to work well.Like many things in Linux, we can always delvedeeper into the subject. For further information onworking with permissions look at the followingresources:• the chmod, chown, chgrp man pages• the Linux Documentation Project manuals and

documents http://www.linuxdoc.org/• IRC Chatrooms (#linuxuk on irc.openprojects.net

or irc.linux.com, #linux on efnet.demon.co.uk)If I can offer one final piece of advice it is: »Assumenothing«. Don’t assume that your system is going towork the ways you think it will, and don’t assume yoursecurity is tight enough for a networked environment.Permissions are there to protect you both as a user anda system administrator, and if you are the only user ofone Linux computer you get to wear both hats! ■

Special Permissions

Linux has some special permis-sion settings. You won’t

often need to use them, butthis is what they are:

Set UIDThis setting causes the processthat is executed by the file to

run with as if the file ownerwas running it. This can be

useful in cases where you needroot access to do something

(such as using a device). Becareful when using this settingas it could infringe some secu-

rity on your system if usedincorrectly.

Set GIDThis is similar in many ways to

Set UID except that the process will execute with thesame group ID as the owner.

StickyThis unusual bit will save the

image of the program into the system’s swap memory for

increased performance.

Check the chmod man page(run man chmod) for more

details on using these specialbits if you ever need to.

74 LINUX MAGAZINE 10 · 2000

BEGINNERSFAQ

Graphical interfaces like GNOME and KDE may makeLinux look similar to other operating systems but it’san illusion. Linux has its own way of doing things. Ifyou’re an experienced user of another operating sys-tem this can become a source of frustration.

Some new users eventually give up because theycan’t find out how to do something they could doeasily using the operating system they are used to.So for a successful first experience with Linux one ofthe most important things you should do is find outwhere to go for help when you need it.

It may seem obvious, but if you bought a pack-aged distribution the first place to look for help is themanual that came with it. A good manual is one wayin which distribution vendors can add value and maketheir product better than their competitors’, so themanuals are getting better and better and you’ll find alot of useful information within their pages.

Every distribution also includes online documenta-tion, usually in the form of HTML pages. The contentvaries, but usually the online help includes distribu-tion-specific FAQs. If you have a common problem thiscould be the quickest route to finding a solution to it.

If you can’t find the answer there, what you’llprobably be tempted to do is call your distributionvendor. Unfortunately, the support that’s providedwith packaged distributions is generally limited toinstallation . Once Linux is up and running the vendorwon’t be obliged to help you. But that’s no reason todespair. You have the means to access a wealth ofhelp resources. And although your distribution vendormay not answer your question by phone, email or faxyou can still visit their website. There, you’ll find a lotof extra support material including the latest FAQs,patches and software updates to download.The fact that you may not qualify for free technicalsupport isn’t a disaster because Linux is probably thebest documented operating system on the planet. It iscertainly the operating system with the most accessi-ble documentation. The open-source nature of Linuxmeans that all the documentation is freely availabletoo. If there is any cause for complaint, it is that thereis so much documentation it can be hard to find what

you’re looking for. If you have no idea what might becausing your problem you can waste a lot of timereading the wrong documentation.

Every Linux user should know what documenta-tion is available, and a good place to start finding outis http://www.linux.org/ – the Linux Home Page at Lin-ux Online. Amongst other things, it is a portal to justabout everything there is to know about Linux. Clickthe Support link and you’ll see all the different kindsof information resource that are available. If youhaven’t tried Linux yet you’ll even find informationabout what it is, whether it will run on your computerand how to choose a distribution.

Top of the list of resources you’ll find here are linksto the Linux Documentation Project (LDP.) This is aproject with the aim of creating the “official” docu-mentation of Linux. The documentation includes fre-quently asked questions (FAQs), how-tos coveringspecific topics and man pages, the help for individual

10 · 2000 LINUX MAGAZINE 75

Where to get free support and help with your Linux problems

FREESUPPORT

JULIAN MOSS

Linux is a sophisticated and

powerful operating system

and there’s a lot to learn

before you can make it do

everything you want. If

you’re a beginner that

learning curve can look

impossibly steep. If you hit a

problem it can seem

insuperable.

Fortunately when you use

Linux you’re not merely a

customer of a software

supplier: you’re part of a

community. There’s a lot of

information, resources and

groups of people out there

ready to help you out. And

like Linux itself, it’s all free!

Linux Online Support Centre, with links to all knownLinux information resources

BEGINNERS FAQ

commands which you can read by typing “man com-mand” in a console window. If you installed Linuxfrom a CD-ROM there’s a fair chance that much of thisdocumentation is already present on your system.

The LDP also includes guides such as the LinuxInstallation and Getting Started Guide by Matt Welsh,the Linux System Administrator’s Guide by Lars Wirze-nius and the Linux Network Administrator’s Guide byOlaf Kirch. The Guides are complete books that pro-vide in-depth coverage of a topic. Like all the LDPmaterial they are available for download in a variety offormats: text files, html pages or pdf documents. It’salso possible to buy printed copies of most of this doc-umentation in books like Linux, the Complete Refer-ence published by Walnut Creek CD-ROM. Oneadvantage of reading the documentation online,ofcourse, is that you can be sure you are seeing the lat-est, most up-to-date version.

This type of documentation is all very well but itmay not have the exact answer to your specific prob-lem. When you are just trying to get something towork it’s tempting just to ask somebody else for thesolution. Newsgroups are ideal for this, but for thesake of everyone involved they should not be your firstresort. Many of the people who regularly frequentnewsgroups get tired of answering the same oldquestions and if you ask something that they know iswritten down somewhere you may be told to go andread the ****** manual (RTFM.) You’ll have a muchbetter chance of receiving a helpful or sympatheticresponse if it’s obvious from your question that you’vedone your homework first.

If you’ve not visited a newsgroup before, it’s agood idea to check previous messages to see if yourproblem has been brought up before and beenanswered. A good way to do this is to use deja.com’sUsenet search tool at http://www.deja.com/usenet .Just type in some keywords that you’d expect toappear in discussions relating to your problem and thesearch engine will pull out the most recent messagesthat include them. There’s a wealth of valuable infor-mation contained in Usenet and browsing the mes-

sage archives will more often than not turn up a solu-tion to your problem. If it doesn’t, deja.com evenallows you to post a message to a newsgroup online,which is great if you haven’t set up a newsreader.

Even if a search at deja.com doesn’t produce theanswer to your question it will certainly help you toidentify the most appropriate newsgroup to post yourquestion in. There are a great many newsgroupsdevoted to discussion about Linux including a com-plete hierarchy of groups with names starting with“linux”. Some of the groups that will be useful to newusers with a problem are listed in the panel. For thefull list see the Linux Home Page or search the list ofgroups displayed by your newsreader.

IRC channelsA more immediate way to communicate with otherLinux users is through Internet Relay Chat (IRC). ManyIRC channels are used by members of the Linux devel-oper community to discuss their work but there are afew that are intended for newcomers and which try tocreate a friendly environment where you can get helpif you need it. These channels now have their ownweb sites where you can find out more about them,and which are being developed into repositories ofuseful information for people who are getting goingunder Linux. They are worth a look.

For a start try the Linux Support Project(http://www.linuxsupport.ab.ca/). This project startedas an IRC support channel for beginners, advancedusers and system administrators, but it is now devel-oping into a major online resource. A search engineprovides access to over 12,000 documents and newsections of the site are opening all the time.

Also worth a visit is the Linux Internet SupportCooperative (http://www.linpeople.org/). This groupprovides 24-hour support via IRC on irc.linpeople.orgchannel #LinPeople, for new and experienced usersalike. Another IRC channel worth trying is #linuxhelpon the Undernet, whose website is at http://linux-help.dyndns.org/.

76 LINUX MAGAZINE 10 · 2000

[left]The Linux Documentation

Product – the “official” documentation of Linux

[right]deja.com’s Usenet search

engine will locate the answerto most common problems

INFO

The Linux Home Page at LinuxOnline – http://www.linux.org/The Linux Documentation Pro-ject – http://www.linuxdoc.org/

Deja.com Usenet search –http://www.deja.com/usenetLinux Support – http://www.

linuxsupport.ab.ca/ LinPeople:Linux Internet Support Cooper-

ative – http://www.linpeople.org/ LinuxHelp on the Undernet

– http://linuxhelp. dyndns.org/MandrakeUser.org –

http://www.mandrakeuser.org/Linux Winmodem Support –http://www.linmodems.org

Winmodems Linux informa-tion page – http://www.o2.net/

~gromitkc/winmodem.htmlVirtual Dr – http://www.virtual-

dr.com/ Linux Support Services – http://www.linux-

support.net/ Linux Free Support – http:// www.lin-

uxfreesupport.com

BEGINNERSFAQ

Yet another way to contact other Linux users andeven meet up with them in person is to join a usergroup. There’s a user group section elsewhere in thismagazine which contains information about how tocontact local groups in the UK. Many Linux usergroups hold regular meetings, but all have a webpage and those that don’t have meetings enablemembers to communicate by means of mailing lists.

Besides those run by local user groups there aremany other mailing lists devoted to various aspectsof Linux, although few are intended to be used bybeginners looking for technical help. If you like theidea of using a mailing list to seek advice and infor-mation check your distribution vendor’s website asthere are a number of mailing lists that cater forusers of a specific distribution. There’s an unofficialsupport mailing list for Red Hat Linux users ategroups.com (http://www. egroups.com/groups/red-hat). Mailing lists run by egroups are convenient ifyou’re concerned about receiving dozens of mailmessages a day because you can have the discussionsent to your mailbox in digest form or even browse itonline at egroups’ website.

If you don’t want to plough through reams ofdocumentation and aren’t keen on participating indiscussions via newsgroups, mailing lists or IRC chan-nels you might like to try some of the free supportsites that are available on the web. If you’re using thepopular Linux-Mandrake distribution try visiting Man-drakeUser.org (http://www.mandrakeuser.org/) whichpromises to answer questions about Linux-Mandrakeand questions about GNU/Linux in general.

Some support sites cater for very specific prob-lem areas. If you’re trying to get a Windows soft-ware modem such as a Winmodem to work underLinux there are two websites you should definitelyvisit. The Linux Winmodem Support site is athttp://www.linmodems.org. Another good sitepacked with useful information is the snappily-named “Winmodems are not modems; Linux infor-mation page” which can be found athttp://www.o2.net/~gromitkc/winmodem. html.These sites are testimony to the fact that wherethere is a need, Open Source developers find a way.

There are free support websites that are lessspecialised in nature and which are worth tryingwith more general problems. One that has been

around for quite a long time and has a good recordfor coming up with appropriate solutions is the Vir-tual Dr at http://www.virtualdr.com/ . Some freesupport websites are advertising-funded or exist todraw attention to a paid-for business-oriented sup-port service. An example is Linux Support Services athttp://www.linux-support.net/. This site is operatedby a company that provides commercial support forUS companies using Linux. The free support is pro-vided by volunteers, and comes with no guarantees.

For UK residents one to try might be Linux FreeSupport, which you’ll find at http://www.lin-uxfreesupport.co.uk . A service provided by Linux-sure (http://www.linuxsure.com) which providesprofessional evaluation, migration, integration andsupport services to paying customers, it supports alldistributions and applications and promises a guar-anteed response from certified experts. The serviceseems to live up to these claims as our test querywas answered in a few minutes. Go on, give it a try.

With all these information and support resourcesat your disposal it would be surprising indeed if youcouldn’t find an answer to your Linux problem. Itmight take a little while, and involve a bit of work,but that’s all it will cost you. If you need a reply with-in a guaranteed time and are prepared to pay for itthen companies like Linuxsure or your distributionvendor will have a support plan to suit your needs.But that’s not the subject of this article. ■

10 · 2000 LINUX MAGAZINE 77

Some helpful Linux newsgroups

comp.os.linux.alpha – discussion about Linux on Digital Alpha machines.comp.os.linux.answers – disseminates the latest Linux FAQs. HOWTOs, andREADMEs. comp.os.linux.apps – discussion about Linux applications. comp.os.lin-ux.hardware – discussion of Linux hardware compatibility issues.comp.os.linux.networking – discussion about networking and communicationsissues. comp.os.linux.powerpc – discussion relating to Linux on Power PC.comp.os.linux.setup – discussion about Linux installation and setup issues.comp.os.linux.x – discussion relating to the X Windows System. alt.os.linux.caldera– discussion about Caldera’s Open Linux distribution. alt.os.linux.slackware – discus-sion about the Slackware distribution. linux.debian.user – discussion about theDebian distribution linux.redhat.* – a set of newsgroups related to Red Hat’s distribu-tion linux.samba – discussion related to using Samba linux.wine.users – discussionfor users of WINE uk.comp.os.linux – discussion group for Linux users in the UK

[left]linuxhelp on the undernet– Linux help using IRC

[middle]The Virtual Dr, offeringsupport for all popular operating systems

[right]Free Linux support for all UK users

BEGINNERS FAQ

MIME stands for Multipurpose Internet Mail Exten-sions. It’s an Internet standard that was originallycreated to enable information other than plain textto be sent across the Internet using electronic mail.MIME defines standards for a number of things: theway the various parts such as the message text andattachments are combined into a single file (themail message), the way the content type of eachpart of a message is specified, and the way itemsare encoded for electronic transmission so that theycan be handled by software designed to processmessages containing only ASCII text.

The role played by MIME in the sending andreceiving of electronic mail messages and attach-ments is normally invisible to the user, who needn’tbe concerned about it. However, MIME standardshave been adopted for use by more than just elec-

tronic mail. Web servers use them to tell webbrowsers the type of material they are about toreceive. And MIME content types are used by graphi-cal environments that run on Linux such as KDE andGNOME to identify different types of file and associ-ate them with the applications that should be usedto open them. For this reason, it is a good idea forLinux users to know a little bit about them.

MIME content types consist of two parts, a maintype and a sub-type, which are separated by a for-ward slash. Main types that are commonly encoun-tered are “application”, “text“, “image“, “audio“and “video“. The “text“ main type contains varioustypes of plain text file. Examples are: “text/plain“(unformatted text); “text/html“ (text containingHTML coding); “text/rtf“ (text in rich text format).The “application“ type contains data files. Examplesare: “application/msword“ (Microsoft Word docu-ment) and “application/x-zip“ (compressed archivein Zip format). The “image“ type is used for stillimages. It includes a number of subtypes like“image/gif“, “image/jpeg“, image/png“ and so on,whose content is probably obvious, as will be thetype of material covered by the “audio“ and“video“ main types. Table 1 shows a list of com-monly encountered MIME content types.

MIME content types are assigned and listed bythe Internet Assigned Numbers Authority (IANA). A

78 LINUX MAGAZINE 10 · 2000

An explanation of MIME content types

SAY IT WITH MIME

JULIAN MOSS

Linux graphical envi-

ronments use the

Internet standard MIME

content types to

determine what the

content of a file is.

Julian Moss explains

how to use them.

INFOIANA Home Page:

http://www.iana.org/ RFC EditorHomepage: http://www.rfc-

editor.org/ RFC tree (short):http://www.magres.nottingham.ac.uk

/~rourke/links/rfc/ MIME ContentTypes: ftp://ftp.isi.edu/in-

notes/iana/assignments/media-types

How to add a new Mime type in KDE

2. An easy way to create a new Mime type in KDE is todrag a similar one to the desktop to copy it, right-click itand click Properties. On the General tab, change thename. On the Binding tab change the Pattern entry sothat it contains the file extensions used by files of thistype. In the Mime Type field type the full content typedescriptor. Add a comment that describes this type offile. If you wish, you can also select an application thatwill be used by default to open it. Then move the newMime type icon back to the KFM window.

1. From a KFM window select Edit, Mime types (to makechanges that affect only the current user) or Edit, GlobalMime types (while logged in as root, to make changesthat affect the entire system.) You will see a set of fold-ers that represent each of the main Mime types. Click onone of these folders to open it and you will see a set oficons representing all the Mime sub-types defined with-in it. To change the program used by default to open afile of a particular type, edit the icon’s properties.

BEGINNERSFAQ

full list of the officially recognised types can befound at ftp://ftp.isi.edu/in-notes/iana/assign-ments/media-types. The list includes standard con-tent sub-types and vendor-specific sub-types (theones with names beginning “vnd.“) In real life youwill also come across sub-types that start with “x-“.

These are sub-types that have no official status.If you need to invent a content type in order toassociate some type of file with a particular pro-

gram (perhaps one you have written) you shouldgive it a sub-type that starts with “x=”.

If you use KDE you will need to have a MIMEcontent type for any file that you want to have asso-ciated with an application for opening it. If you usethe GNOME file manager you don’t have to useMIME content types - it can use just the file exten-sion to work out which program to use - but theyare supported as an option. ■

10 · 2000 LINUX MAGAZINE 79

Table 1: Common MIME content typesMIME Type Description</B>

application/acad AutoCAD drawing files (*.dwg)application/dxf Drawing Exchange Format drawing files (*.dxf)application/msword Microsoft Word file (*.doc)application/octet-stream Unknown binary dataapplication/pdf Adobe Acrobat file (*.pdf)application/postscript PostScript (*.ai, *.ps, *.eps)application/rtf Microsoft rich text format (*.rtf)application/vnd.ms-excel Microsoft Excel file (*.xls)application/vnd.ms-powerpoint Microsoft PowerPoint file (*.ppt)application/x-debian-package Debian Package (*.deb)application/x-javascript JavaScript source file (*.js)application/x-gzip GNU zip archive (*.gzip)application/x-msaccess Microsoft Access file (*.mdb)application/x-msexcel Microsoft Excel file (*.xls)application/x-mspowerpoint Microsoft PowerPoint file (*.ppt)application/x-rpm Red Hat Package (*.rpm)application/x-zip ZIP archive (*.zip)application/zip ZIP archive (*.zip)audio/basic Basic audio (*.au, *.snd)audio/x-aiff AIFF audio (*.aif, *.aiff)audio/x-midi MIDI file (*.mid)audio/x-mod MOD audio (*.mod)audio/x-mp3 MPEG audio (*.mp3)audio/x-wav WAV audio (*.wav)image/bmp Microsoft Windows bitmap image (*.bmp)image/cgm Computer Graphics Metafile (*.cgm)image/gif GIF image (*.gif)image/jpeg JPEG image (*.jpg; *.jpe; *.jpeg)image/png Portable Network Graphics image (*.png)image/tiff TIFF image (*.tif; *.tiff)image/x-portable-pixmap PBM Pixmap image (*.ppm)image/x-xbitmap X Bitmap image (*.xbm)image/x-xpixmap X Pixmap image (*.xpm)text/css Cascading style sheet (*.css)text/html HTML file (*.htm; *.html)text/plain Plain text (*.txt)text/richtext Internet standard rich texttext/rtf Microsoft rich text format (*.rtf)text/sgml SGML file (RFC1874)text/xml XML file (*.xml)video/mpeg MPEG video (*.mpg; *.mpe; *.mpeg)video/quicktime Apple QuickTime video (*.mov; *.qt)video/x-msvideo Microsoft Windows video (*.avi)video/x-sgi-movie SGI movie player format

For a complete list of MIME types see: ftp://ftp.isi.edu/in-notes/iana/assignments/media-types

How to add a new Mime type in GNOME

2. Now the new Mime type is added to the list, clickEdit. You can now set the Open, View and Edit actionsto be performed on files of this type by selecting pro-grams to carry out these actions. By clicking on theicon button you can also change the icon used for thistype of file.

1. Open the GNOME Control and select Mime Typesfrom the tree on the left. Check in the list on the rightthat the type you want doesn’t already exist, then clickAdd. In the Add Mime Type dialog box type the fullcontent type descriptor in the Mime Type field. Typethe file extensions used by files of this type in theExtension field, separated using commas if more thanone extension is used. Click OK.

Previously known asKExplorer – kruiser is afile manager that emu-

lates Windows Explorer. Itisn’t generally available in

binary form, however (unlessyou use the Linux Mandrake distribution,

which contains a binary and installs it as standard)so you’ll need to compile it from the source code.For convenience, the source code is provided on thecover CD.

Installation

You can find the package containing the sourcecode of kruiser on the CD in the directory Soft-ware/kruiser/. For the most up-to-date version, visitthe home page of the kruiser project whichis:http://devel-home.kde.org/~kruiser/. The currentversion (0.4) can be downloaded by FTP from

ftp://khnopff.emic.ucl.ac.be/pub/kruiser/distribu-tions/kruiser-0.4.tar.gz.

After downloading the package or copying itfrom the CD, switch to a suitable installation direc-tory (e.g. /usr/local/src/) and unpack it there. Admin-istrator rights are needed to do this so you shouldfirst switch to root using the su command:

[blue<\@>dual ~]$ su -Password: *****[root<\@>dual ~blue]# cd /usr/local/src[root<\@>dual src]# tar xzf /tmp/kruiser-0.U4.tar.gz

The last command unpacks the source codearchive – assuming that the kruiser package is locat-ed in the /tmp directory. If not then insert the cor-rect path (e.g./mnt/cdrom/Software/kruiser/). In thenext three steps, the source text files are config-ured and compiled, and the finished program filesare installed in the appropriate location:

LinuxMagazine/kruiser/kruiser-0.4.tar.gz

SOFTWARE KRUISER

80 LINUX MAGAZINE 10 · 2000

Windows users trying out Linux for the first time

will immediately notice the absence of familiar

tools they have come to take for granted. One of

the most obvious ones they will miss is the Windows

Explorer. If they choose GNOME for their desktop

they will of course have Midnight Commander. But

KDE’s file manager KFM (at least in KDE 1.x) is by

comparison a bit basic. A solution is available,

though, in the form of kruiser.

A powerful file manager for KDE

MORE LIKEWINDOWS

EXPLORERHANS-GEORG ESSER

[root<\@>dual src]# cd kruiser-0.4[root<\@>dual kruiser-0.4]# ./configure...[root<\@>dual kruiser-0.4]# make...[root<\@>dual kruiser-0.4]# make install

Starting the program

After restarting the KDE panel (right-click it, selectRestart), you can now start kruiser from the Kmenu. You will find kruiser under the entry Utilities/KDE Explorer (Fig. 1 – right).

Double-click again at last!

If you’re a Windows user then the Windows dou-ble-click will be second nature. And if you’vealready dabbled in KDE you’ll have found that dou-ble-clicking opens two editors, starts Netscapetwice or opens two instances of a picture you havefound in the kfm file manager. A single click will nodoubt seem unnatural, although with kruiser this isno longer a problem.

Navigation through the directories performedthe same way as using Windows Explorer. To the leftof the screen there is a familiar tree view (Figs. 2and 3 – over page), where sub-directories can beopened or closed with a mouse-click on the plus orminus sign. You can also double-click a directoryname in the right-hand half of the window toswitch to the required sub-directory. You can moveup one level in both Explorer and kruiser by pressingthe Backspace key or by manually selecting thedirectory above in the tree view.

Of course, double-clicking is not only used toswitch directories: the main use is opening a docu-ment using its associated program. kruiser has a stan-dard application registered for most types of docu-ment. If it doesn’t recognise a file type, a dialog look-ing surprisingly similar to that of Windows Exploreropens, in which you can select a program to use toopen the document (Figs. 4 and 5 – over page).

Try your luck with an unknown file (in our tests,kruiser did not recognise .pcx files, for example). Ifyou cannot find a matching program in the list butknow the command name, you can enter it in theempty field above. (You should be able to perma-nently associate a program with a particular file typeusing kruiser’s Options dialog box; to open it useEdit, Preferences and select Extensions. However,this feature doesn’t work in the version we tried.

You can also use a slow double-click with kruiser.If you click twice on a file or directory name with asufficient gap between the clicks, the name can beedited – just like Windows. You can go to any posi-tion in the name with the cursor keys and modify it.

If you’ve been using Linux for a while and areused to the single click of KDE (it’s easier, when youget used to it) you can tell kruiser to fall into line. To

Configuration: The installation of a program supplied in source code formatalways follows the same pattern. After unpacking the archive you will have creat-ed a new directory full of files and, often, further sub-directories. You shouldfirstly run the script file from this directory by typing ./configure (the ./ before thecommand is necessary because the current directory is not set in the path). Theconfigure script analyses the system environment, searches for existing or missinghelp programs and libraries, checks their versions and generates the Makefilewhich is necessary for the next step. The make command basically means “createhere”. There will be instructions in the Makefile describing how to create finishedexecutable programs from the source files. Thus typing make install copies thenew program files to appropriate locations in the system, for example: help filesto /usr/man, a configuration file to /etc and the program itself to /usr/bin. Out ofinterest, the path is stored in the environment variable $PATH and tells the shellwhich directories to look in for a program if it is called without specifying its fullpath. For instance, if $PATH=/bin:/usr/bin:/usr/local/bin and you enter the com-mand myprog, then the shell will search (in this sequence) for /bin/myprog,/usr/bin/myprog and /usr/local/bin/myprog.

Tree view: A tree view is used to illustrate directory structure. Directory hierar-chies are shown by means of indents and lines between different hierarchy levels.The great thing about a tree view is that you have the option of simply hidingparts of the hierarchy that aren’t currently of interest.

SOFTWAREKRUISER

10 · 2000 LINUX MAGAZINE 81

Fig. 1: Starting kruiser via KDE’s K menu

do this, call up kruiser’s Options dialog with Edit, Pref-erences, switch to the page called Misc and check thebox Open on single click (KFM style) (Fig. 6 – below).

Drag & Drop weaknesses

Kruiser supports drag and drop but with certain lim-itations. Files can be copied and moved within akruiser window – you can drag a file from the direc-

tory currently displayed into one of the directories inthe tree view on the left-hand side, for example.And if you have a number of kruiser windows openyou can also drag files from one window to another.When you release the object, a menu appears inwhich you can select between Move, Copy andLink. Link creates a symbolic link.

Other drag and drop actions, such as betweenkruiser and the desktop or the standard file manag-er kfm, are not possible at the moment. If you try todrag an object out of kruiser, a “no entry” icon isdisplayed. The same thing happens if you try todrag a file into kruiser.

Kruiser tools

Of course, kruiser isn’t merely an Explorer clone. Ithas a few useful features above and beyond theprogram it was modelled on. One of these is thethumbnail picture preview which can be activatedusing the menu View, View, Image preview(Fig. 6).When a picture file is selected, a thumbnail imageof it is shown at the bottom of the window. Thisfeature is also useful for ordinary files, for whichinformation such as the file size, owner and group isshown along with access rights in the normal rwxrwxrwx notation. ■

Symbolic link: A symbolic linkis a directory entry which con-

tains just a reference to anotherfile. Think of the link as a small

text file in which the name ofthe other file is stored. If such a

link is accessed, Linux then looksto see what name is hidden

behind the link and passes allqueries on to it. It’s a little like a

Windows shortcut.rwxrwxrwx: This is the nota-tion normally used in Unix for

access rights: r, w and x stand forread, write and eXecute rights.

The three groups of three standfor the rights of the file holder,

group or other users in thatorder. If there is a dash instead

of one of these letters thismeans that the corresponding

right has not been assigned.

SOFTWARE KRUISER

82 LINUX MAGAZINE 10 · 2000

Fig. 2: Tree views in Windows Explorer are just the same ... Fig. 3: ... as their counterparts in kruiser

Fig. 6: Explorer cannot do this: Picture preview in kruiser Fig. 6: Changing some of kruiser’s configuration options

Fig. 4: Original (Windows) version ... Fig. 5: ... and kruiser counterpart: Open with which program?

BEGINNERSFAQ

10 · 2000 LINUX MAGAZINE 83

When the graphical

interface KDE is first

installed it doesn’t know

which programs should

be used to open certain

types of file. This means

that you have to type the name of the program you want to use whenever you want to open cer-

tain files. If you have a program installed on your system that can open this type of file, you can

make KDE use this program whenever you click on the file’s icon. Here’s how to do it.

1. If KDE doesn’t know what program to use toopen a file when you click on its icon it will displaythis ”Open With:” dialog box. You’ll have to typethe name of the program or click the Browser but-ton and select a program from the list. It would bemuch better to have KDE open the file in this pro-gram automatically.

2. To make the change you’ll need root privileges.Log in as root, then launch KFM by clicking on the”home” icon in the panel. Click on Edit, then GlobalApplications.

3. Locate the program you want to use to open thistype of file. The folders under ”Global Applications”represent submenus on KDE’s K menu. The programicons usually have the name of the program ratherthan the name that appears on the menu. TIP: Thedescriptive name of the icon beneath the cursorappears on the status bar of the KFM window.

4. In this example we are going to associate a pro-gram with the ”Portable Network Graphics” (PNG)file type. The program we will use is the KDE ImageViewer, kview. So we right-click the kview icon andselect Properties from the pop-up menu.

5. Select the Application tab of the dialog box. Atthe bottom, you’ll see two lists of items. Theseitems are called MIME types. They are standardnames for describing different types of file that areused on the Internet, and also by KDE. On the leftare the MIME types of the files that KDE alreadyknows the program kview can open. On the rightare all the other MIME types known to the system.

6. Select the MIME type you want from the right-hand list. For a PNG file it is ”image/png”. Click thearrow button to move the MIME type to the left-hand list. Then click OK to close the dialog box. Logout of root and log in as a normal user. When youclick on a PNG file you should now find that kview isautomatically launched to open it.

OPENSESAME!

Step-by-step instructions for specifying a program to open a file type

BEGINNERS TAKE COMMAND

In the world of Linux, the extensions .gz, .tar.gz or.bz2 are perhaps the commonest of all – and not justwhen downloading files or accessing HOWTOS. Wediscuss below these cryptic file extensions and tellyou how to pack and unpack files and directories.

Gripping

Put simply, the gzip file(s) command shrinks files. Theresulting compressed file is called file .gt and retainsthe same access and ownership rights, along withaccess and modification time attributes. If the filename is too long for the file system, gzip truncates it– lengthy parts of the file name are shortened.

If you want to restore a compressed file you canuse gunzip or gzip -d (short for gzip --decompress),which is actually the same program. If, on the otherhand, you just want to view the packed file, you cantype zcat file.gz (if necessary adding | less to theend, or you could use zless file.gz directly), which isthe same as gzip -c -d. The option -c, incidentally,has the effect of decompressing the file to stdout.

The degree of compression depends on the sizeof the input file and the quantity of repeated char-acter strings. That is to say, files best suited to com-pression are those in which similar data patterns arerepeated often. For example, a 1.4 MB bitmap filemight be reduced to just 709 KB after gzip has beenapplied. If you use the parameter gzip -9, the result-ing file size is just 708 KB. By appending a digit inthe range 1-9, you can decide whether you prefercompression to be faster (gzip -1) but not as com-pact, or slower but with a better degree of com-pression (gzip -9).

gzip also has some further options that are ofinterest. If, for example, a file bearing the samename already exists in the current directory, gzippolitely asks:

user@host ~ > gunzip file.bmp.gzgunzip: file.bmp already exists; do you wish Uto overwrite (y or n)?

If you want to avoid the query, use the gzip -foption (for --force). This parameter steamsthrough packing and unpacking even if files of thesame name already exist. Of interest here is thebehaviour of Symbolic links (Symlinks). Normal-ly, gzip will decline a request to compress Symlinksby saying gzip: link.bmp is not a directory or a reg-ular file - ignored. If you use the -f option, the fileto which the link is pointing is compressed, but isgiven the name of the link, i.e. link.bmp.gz.

The gzip command has many more features – aquick glance at the man page will provide a goodoverview. If you want to have your own special gzipequipped with a few options as standard, you canenter this in the environment variable GZIP. Forthe bash shell you can define your own preferredparameters as follows, for example:

84 LINUX MAGAZINE 10 · 2000

Although graphical interfaces such as

KDE or GNOME are a big help, those

who want to fully exploit Linux can’t

avoid the command line. Besides,

there are many situations where it is beneficial to have a

firm grip of the jungle-like syntax of the $ prompt.

Compression tools

TAR ANDGZIP

BY HEIKE JURZIK

BEGINNERSTAKE COMMAND

user@host ~ > export GZIP=”-9”user@host ~ > echo $GZIP-9

Shrinking things further?

Greater compression is possible courtesy of bzip2.This not only compresses better than gzip but is sig-nificantly faster as well. On top of this, it has arecover mode which means it attempts to repairpossible damage to compressed files, or to unpackjust the undamaged parts. Before we start to dis-cuss this, check to see if you have bzip2 on your sys-tem. If not you can find not only the source but alsoextensive information about the program athttp://sourceware.cygnus.com/bzip2/index.html .

Most of the parameters work in exactly the sameway as gzip but some differ. The extension for com-pressed files here is called .bz2. Access rights andtimestamps are likewise maintained, and here, too,you’re not allowed to overwrite files. If, on unpack-ing, an attempt is made to overwrite an existing file,no query is issued as with gzip. Instead you get themessage: bunzip2: Output file datei.bmp alreadyexists, skipping. If you want to circumvent this, then,as with gzip, use the option -f (for --force).

The actual differences with bzip2 are subtle. Forexample, the file to be compressed need not beautomatically deleted, you can keep a copy by typ-ing bzip2 -k (for --keep). The feature bzip2recoverhas already been mentioned but what takes placewhen it runs is quite interesting. During compres-sion bzip2 decompresses files into separate blocks.Thus should a file be damaged for any reason, thedata contained in the blocks that remain intact canbe rescued if necessary (for more precise details ofthis you should refer to the man page).

tar for the archive, mate!

One of the things you can do with tar combine sev-eral files into an archive - handy if you want totransfer many associated items from one computerto another. This remaining, single archive file canthen be compressed more easily as a single entity. Tocreate such an archive, enter the following:

user@host ~ > tar cvf archiv.tar direcUtorydirectory/directory/file.htmldirectory/test/directory /test/file2directory/text

If we break it down into the separate parame-ters we see the following: the option c stands for --create – that is, create a new archive. If onedecides to get by without the v for --verbose, no filenames are specified during the archiving process.The three letters tar incidentally stand for “TapeARchiver”: originally the program was intended forbacking up to tape drives. That is why f archive-

name is used here, to indicate that tar shall notwrite such a device but to a file on the hard disk.Following this, of course, a name has to be specified– archive.tar. All the directories, files and subdirec-tories are written to the archive file.

If you want to append further files to the exist-ing archive you can invoke tar rvf archiv.tar further-file – where r stands for --append. To be certain thatthis file doesn’t already exist, you can of course viewthe archive beforehand: tar tvf archive.tar, where tcan also be replaced by the long form --list. If accessrights and ownership are to be maintained youshould use tar pcvf archive.tar /home (p stands for--preserve-permissions) – if the directories areunpacked again the files will be restored in theiroriginal state.

To unpack an archive once again you can use tarxvf archive.tar, where x stands for --extract. If indi-vidual files are to be extracted from the archive youcan append their names when making this call.Finally, bear in mind that tar does not compressautomatically. Naturally, an archive of this type canstill be packed using gzip or bzip2, but you canavoid this second step and deal with everything inone go: tar czvf archive.tar.gz directory also zips thearchive at the same time (in reality the external pro-gram gzip is invoked). In the same way, z is to beused to unpack a compressed package of this type –the command is tar xzvf archive.tar.gz. If you preferto use bzip2 instead of gzip you should checkbeforehand whether your own particular distribu-tion provides for this (read the man page!). Invokingtar cIvf test.tar.bz2 directory (with a capital ‘i’)worked on the test computer under Debian 2.1,although a second computer declined the instruc-tion: tar: invalid option – Try ̀ tar --help’ for moreinformation. (hge) ■

10 · 2000 LINUX MAGAZINE 85

HOWTOS: In contrast to man pages, which are created mainly for reference,HOWTOS provide instructions on how to overcome specific problem areas andare thus much more geared towards the beginner. In current distributions theyare to be found under /usr/doc/HOWTO. You can find, for example, the fileFirewall-HOWTO.gz, which you can unpack and then read, or else view directlywith zless or zmore.

stdout: There are three standard channels for input and output: stdin (standardinput), stdout (standard output) and stderr (standard error output). A user, forexample, has the keyboard as standard input and the screen as standard output.If you decompress a file using zcat (gzip -d -c), then, providing it has not beenredirected, it will be output to the screen.

Symbolic link: A reference to another file which is handled by a certain applica-tion. If a file that a Symlink points to is deleted, the link is left with an emptypointer. Symlinks are created using the ln -s command.

Environment variable: The shell provides the user with storage space for savingcertain information which can then be accessed by programs. These environmentvariables each comprise the name of the variable and the value assigned to it.

When you install an application on your Linux sys-tem, it may not automatically appear in KDE’s Kmenu. There are several reasons for this. Not least isthe fact that the compiler of the package does notknow what graphical environment (if any) theinstaller of the software wishes to use. But it isn’t abig problem. KDE provides a menu editor to enableyou to customise the menu and add new applica-tions to it in exactly the place you want.Note: in some distributions applications are addedto the menu if you install them from a packageusing the distribution’s own package manager. Butto retain control over how your menus are config-ured it is better to add applications yourself.

BEGINNERS FAQ

86 LINUX MAGAZINE 10 · 2000

Step-by-step tips for adding an applicationto the KDE menu

IT’S ON THE

Step 1 To start the menu editor,right-click the K button on the paneland click Properties from the pop-upmenu. The menu editor will appear,displaying two menus. On the left is

the local menu. Changes made tothis will affect only the user you are

currently logged in as. On the right isthe default menu which all users can

see. You must be root to makechanges to this menu.

Step 2 To add an item to an existingmenu, select the menu item in the

menu editor, right-click it and click onAdd. An empty menu entry will

appear. The Type: fields should showApplication. Type a name for the

menu item in the Name: field, whereit says EMPTY, and type a more

descriptive comment in the Com-ment: field - this will be used in a

tooltip.

Step 3 Click the large icon button and select a suit-able icon from the gallery that is displayed. Clickthe mini icon button and select a different small

icon, too, if you wish. In the Execute: field type thepath to the executable program. If you don’t know

where it has been installed, open the package orarchive you installed the application from and look

at the list of files.

Step 4 If the application can be used to open files of aparticular type, click the Application tab. On the right

you will see a list of MIME types for different sorts of file.Select the MIME types for the files that this application

can open and use the arrow button to move them to theright. This will tell KDE which types of file this applica-

tion can be used to open. Click OK when you arefinished, to create the menu entry.

1 2

3 4

MENU

SOFTWAREGNOME

10 · 2000 LINUX MAGAZINE 87

Ignored by many

users and prematurely

written-off by

some distributions

the GNOME desktop

environment fights back with

a new version. Here, we take a

look at the most important

components of Helix GNOME

1.2 to help you decide if an

upgrade or new installation is

worthwhile.

About four years ago a group of Linux enthusiastson the Internet got together with the aim of devel-oping a graphical user interface for Linux that wouldstand comparison with Windows and Mac OS.

It’s true that at that time there were already sev-eral window managers – for example, fvwm2 andAfterstep – for the X interface; with CDE a desktopenvironment was even available. However, thesesolutions all had disadvantages – the window man-agers had so session management nor support fordrag and drop; CDE was commercial and obsolete –so there was a real need for a new graphical inter-face to be developed.

There were soon differences in opinion abouthow (and more precisely, using which GUI toolkit)this interface should be developed. First up for dis-cussion was the Qt library from the Norwegian firmTrolltech. The most diehard open source supportershowever complained that Qt (at that time) was sub-ject to a commercial, non-free licence. They pointedout that a free library was available in the form ofthe Gimp Toolkit (gtk/gtk+) which allowed graphical

elements to be produced in a similar easy manner.The differences were not resolved, so in the endsome of the developers decided to support the Qt-based KDE project whilst the others started to cre-ate the gtk-based GNOME project.

Co-operation

Over time, not least because of the subsequentopen source licensing of Qt, the former rivalrybetween the two projects gave way to a spirit of co-operation. The developers of both teams are nowanxious to integrate application programs whichhave been written for the other desktop environ-ment into their own interface. However, KDE has sofar enjoyed greater success than GNOME, especiallyin Europe. The fact that some Linux distributionsnow rely entirely on KDE (examples include, CalderaeDesktop 2.4, Corel Linux OS 1.0 and easyLinux 2.0)has particularly hindered the advancement ofGNOME, as has the practice of making KDE thedefault choice of the installation routine so that

GNOME 1.2 Desktop

COMEBACK

Helixcode

The American firm Helixcode,Inc. (http://www.helixcode.com)cofounded by GNOME evange-list and author of MidnightCommander Miguel de Icaza,has made it its goal to helpGNOME break through as anInternet desktop. In additionto support of the GNOME pro-ject by making the GNOMEextension “Helix GNOME”available at no cost and bydeveloping further opensource solutions in the officeand groupware area, the com-pany makes its money fromsupport and network services.

OF THEGNOME

ANDREAS HUCHLER

GNOME is only available after further configurationsteps. Red Hat is at the moment the only major dis-tribution that uses GNOME as its standard desktop.

But reports of GNOME’s death are exaggerated.With the jump from version 1.0 to version 1.2GNOME, now supported by firms like HelixcodeInc., could possibly even succeed in making a come-back. We shall show you what features are includedin the new version of GNOME and how you canintegrate the Helixcode GNOME Binary Release 1.2into your existing Linux system.

Window manager

GNOME in the narrowest sense consists mainly ofthe GNOME Panel, the GNOME Control Centre,drag and drop functionality and a session manage-ment system. Whilst KDE with its kwm already hasits own window manager, GNOME leaves it up tothe user as to which window manager is used. Real-istically, however, it must be accepted that so far

only a handful of window managers are capable ofworking well with GNOME. In the current version1.2 HelixCode only supplies Sawmill as a windowmanager. If you prefer another GNOME-capablewindow manager, you can activate this after anynecessary re-installation in the GNOME ControlCentre under Desktop, Window Manager.

Flexible Panel

The GNOME Panel is the focal point of everydaywork on the GNOME desktop and can be freelyadapted to your own requirements. You can also setup several panels at the same time. Apart from themain menu (accessed using the foot icon) you canadd and remove your own user menus, applicationlaunchers and applets. GNOME applets correspondto KDE’s docking widgets: they are usually utilitiesthat can be integrated in an active form into thepanel in order to have important information orfunctionality immediately to hand. In the mainmenu under Panel you will find the submenu Addto Panel which contains all kinds of applets and util-ities. In addition you can add an ordinary applicationto the panel using drag and drop from the Programsmenu. This is a handy feature for those applicationsthat you launch particularly often.

Control Centre

Just like KDE, GNOME also has a control centre. Itcan be reached from the menu (Programs, Configu-ration, Control Centre) or by clicking the toolboxicon on the panel. The Control Centre can be usedto customise the behaviour of the desktop. Current-ly the following options exist:• Desktop (screensaver, window manager, back-

ground, panel, theme)• User interface (applications, dialog boxes, multi-

document interface)• Window manager settings (dependent on the

window manager selected)• Multimedia (mainly noises, sounds, …)• Peripherals (mouse, keyboard, possibly Palm Pilot…)

[left]GNOME uses the new

window manager Sawmill

[right]From the GNOME Control

Centre you can select a newwindow manager.

SOFTWARE GNOME

88 LINUX MAGAZINE 10 · 2000

Installation of Helixcode GNOME 1.2If you have already installed a recent ver-sion of GNOME and it can be called upusing the KDM login screen (see theselection list Session), the installationshould be straightforward. For this youcan use the distribution-specific rpmpackages. Helix GNOME is available fordownload in binary packages for severaldistributions from:www.helixcode.com/desktop/down-load.php3. Advanced users will find thelatest GNOME sources athttp://www.gnome.org/start/source.html.On the CD, unfortunately, there wasinsufficient space for the latest GNOMEversion. However, Linux Mandrake 7.1contains GNOME rpm packages, thoughnot the most up-to-date versions.

Window Manager

When switching into graphicsmode (X Windows) it is initiallyonly possible to display a greypattern and to put characters

or images on the screen. Awindow manager brings some

colour into the grey world ofUnix and Linux and makes it

possible to open and close,maximise and minimise and

move application windows. Italso creates the window

frames.

SOFTWAREGNOME

10 · 2000 LINUX MAGAZINE 89

• Session (start sequence, tips on starting) • Handling documents (MIME types, opening URLs,

editor…)

Drag and drop

GNOME supports drag and drop. This functionalityallows you to move objects by dragging them (bykeeping the left mouse button pressed) from onepoint to another. Although the capability to supportdrag and drop is built into GNOME, many GNOMEapplications don’t yet take advantage of it. If youare used to working with Microsoft Windows youmay notice this lack of drag and drop functionality.

Cut and paste is another feature of moderndesktop environments which GNOME of coursesupports. Although classical X11 applications suchas XEmacs have long supported the marking, copy-ing, cutting and pasting of portions of text within adocument, as soon as you want to cut and pasteobjects other than text you need the support to bebuilt into the desktop environment itself.

Session Management

Another key area of functionality for a moderndesktop is session management. This means theability for each user of the system to have their ownpersonalised desktop. The first time a user logs inusing GNOME, it creates a special folder in which allthe desktop settings for that user will be stored. Ifyou make changes to the desktop or leave applica-tions open when you close the GNOME session,GNOME records the final state of the desktop andtries to restore that state, as far as possible, the nexttime you log in.

Midnight Commander

To conclude our brief tour of GNOME 1.2 we willmention the graphical file manager GNOME Mid-night Commander. This is GNOME’s answer to theKDE file manager KFM. If you have used MS-DOSyou may have used the utility Norton Commander,which was the inspiration for the console-basedMidnight Commander for Linux. GNOME MidnightCommander is a graphical version of this powerfulfile manager which can be accessed from the menuunder Programs, File Manager or from the docu-ment icon on the panel. You can use this utility tocarry out all kinds of file management tasks usingthe mouse, and even to connect to other computersusing the FTP protocol.

Upgrade or not?

GNOME has grown up a good bit since the previousversion. However, it cannot be denied that problemsand program crashes still occur. In most cases thesecan be traced back to the window manager beingused. If you already have an older version of

GNOME installed on your system you shouldacquire and install the latest version of GNOMEright away (see box “Installing Helixcode GNOME1.2”). Even if you don’t change over immediatelyyou will still benefit from an update of the basiclibraries which will be used by the gtk-based appli-cations running under KDE.

But if you don’t yet know GNOME, perhapsbecause your distribution only contains KDE, thereis a lot to be said for trying it out. After all, what isthe value in having a choice if you don’t use it? Oneof the many good things about Linux is that it does-n’t force you to use a particular desktop. You can’tsay that about a certain other well-known operatingsystem, can you? ■

[top]Everything to hand —the GNOME Panel

[middle]Everything is config-urable from the ControlCentre

[below]GNOME’s MidnightCommander in action

You can of course run Gnome orgtk+ based programs under KDEafter installing the basic Gnome

packages. A popular example, whichwe’ll come back to later, is the image

processing package Gimp. There are two reasons to use gtk+ based

applications exclusively under Gnome: the look &feel is more in harmony with the Gnome desktop,and several desktop functions are better supported.Of course, in the end it’s a matter of taste. But manyusers believe that the widgets, buttons and icons ofgtk+ based applications have their own charm and,aesthetically at least, can compete with the Qt-based graphics components used by KDE and itsnative applications.

A standardised look and feel can be achievedusing Gnome. This only suffers if, due to the lack ofa gtk alternative, an X11 application has to be reliedupon, which, in turn, relies on a foreign graphicallibrary. However, an important aspect of functionali-ty provides another reason to use Gnome: importantfeatures of modern desktops such as drag and dropor cut and paste usually only function betweenapplications created using the same libraries. Forexample, a normal text file in Gnome can be easilydragged and dropped from the Gnome file manager

(Midnight Commander gmc) to the word processingprogram Abiword, also gtk+ based, so that it can beopened there. However, attempts to drop the samefile in the Qt based text editor KWrite will fail.

Another office package

The Open Source project Abisuite is to Gnome whatthe mammoth free project KOffice is to KDE. Man-aged by SourceGear Corporation, the intention is tocreate a gtk+ based cross-platform Open SourceOffice Suite in co-operation with the free softwaredevelopers involved in the project. AbiWord, the wordprocessing module, is now complete enough to beused to produce simple documents. It was thereforeincluded in the current Gnome release of Helixcode.

In addition to the usual text editing and format-ting functions Abiword even has a spellchecker. Theproprietary file format is .abw (and .zabw whenzipped.) rtf and Word 97 files can be opened too.The import filter has not yet been optimised, as isoften the case with other word processing pack-ages, and the usual conversion errors can some-times occur when Word files are imported. If youare mainly concerned with importing smaller docu-ments with fairly simple formatting into Abiwordthe import filter should meet most of your needs.

gtk+: In order that every pro-grammer doesn’t have to rein-

vent the wheel, a variety ofprogramming libraries have

grown up over time contain-ing code that can be used

again and again. gtk+ is anextension of the gtk library

used to create the image pro-cessing program Gimp (hencethe name gtk: Gimp Toolkit).

Libraries that produce graphi-cal elements are often labelledToolkit (e.g. gtk, FLTK, Tcl/TK).

SOFTWARE GNOME APPLICATIONS

90 LINUX MAGAZINE 10 · 2000

As well as being a powerful

desktop function, Gnome boasts

an increasing number of high

quality gtk+-based applications

providing a good reason to use it as

your graphical desktop environment.

Andreas Huchler takes a tour through some

of the most important applications included in

the current Helixcode Gnome 2.

A tour of some new Gnome applications

FEEDINGTHE GNOME

ANDREAS HUCHLER

The documents produced by Abiword can cur-rently be saved in its own file format or as .txt-, .rtf-,.html- or LaTeX files. The current version of AbiWord(0.7.9) is useful for viewing a wide range of text filesand creating simple text documents. Although itoffers the basic functions of a modern word pro-cessing system it cannot yet compete with profes-sional rivals such as StarOffice or WordPerfect.

Gnumeric kills Excel

In the past, anyone who needed a decent replace-ment for Excel under Linux had, almost inevitably,to rely on the spreadsheets integrated into theoffice packages of commercial software manufac-turers (such as StarCalc in StarOffice). But forsome time now, Gnumeric has provided a GPLspreadsheet package that aims to beat Excel. Italready offers almost everything you could wantfrom an up-to-date spreadsheet package, such assimple mathematical functions and statisticalanalysis processes (ANOVA, regression analysisetc. ) There are also practical filter and sortingalgorithms.

One of the few weak points at the moment isthe lack of a charting wizard. In addition to the pro-prietary Gnumeric XML file format there is a widevariety of import and export filters for common andexotic file formats (diff, comma separated, HTML,Excel 95/97 and so on.) An easily extendable plug-inensures that future formats, including those fromcommercial manufacturers, can be integrated easily.The development group under Gnome co-founderMiguel de Icaza is both dedicated and competentmaking many people keen to see what they come-up with next.

Dia: diagram editor

Dia is an ideal tool for software engineers. If you arefamiliar with Visio for Windows you probablyalready know there is no Linux alternative. Howev-er, you should take a closer look at the diagram-ming program Dia. The current version (0.85) pro-vides several interesting features which allow you to

produce diagrams for various contexts quite easily.Special objects for the following types of applicationhave been implemented to date:• Circuit• Ladder • ER (Entity-Relationship)• Electric• Flowchart• GRAFCET• Pneumatic/Hydraulic• UML (Unified Modelling Language)• Chronogram• Civil• Network• Sybase

The program has so far been aimed mainly atengineers and IT professionals. However, because italso provides several elementary diagram symbols(circle, polygon, curve, straight line, …), it can alsobe useful in other fields.

SOFTWAREGNOME APPLICATIONS

10 · 2000 LINUX MAGAZINE 91

[left]Gnumeric has all the frills you’d expect of a good spreadsheet

[right]UML diagrams made easy

Work in Progress: AbiWord Personal stilllacks many important features

Application development made easy

Have you written a console-based program andwould like to add graphics in Gnome’s look and feelwithout having to learn the details of gtk? No prob-lem! Just use GLADE, a RAD (Rapid ApplicationDevelopment) tool for gtk-based applications.GLADE allows you to put together an attractive GUIwith just a few clicks of the mouse. The finishedproduct can then be stored as an XML file. From this,GLADE can produce source code for either the C,C++, Ada 95, Perl or Eiffel programming languages.

The classics of image processing

The GIMP (GNU Image Manipulation Program) isone of the Open Source community’s projects thatprovides a model for others. It is a universal imageprocessing program that, like Photoshop, is particu-larly suitable for retouching photos or creating andmanaging image files. GIMP’s 1.2 pre-release 1.1.22has much to be proud of – it is also proof that itsdevelopers are attaching more importance to usabil-ity than they have in the past.

As soon as the installation program has started,users will be pleasantly surprised that developershave implemented attractive user dialogs. GIMP isalso substantially easier to use. Although many newfeatures have been added since the earlier versions,you can still usually find the function you wantstraight away. Detailed and context-sensitive help isprovided, helping users to understand the package.

All of this makes GIMP a more than adequate alter-native to commercial image processing programsrunning under Windows.

Graphics assistant for Gnome

In addition to the new version of the classic GIMP,Gnome 1.2 provides two other graphics tools that weredesigned for use under Gnome. Eye of Gnome is a sim-ple image viewing and cataloguing program. However,its functions have so far (Version 0.3.0) been limited todisplaying images with various zoom settings.

As the name suggests, Icon Edit allows users tocreate and edit icons for Gnome. Unfortunately, inversion 1.0.6 there are still some problems with thewindow size settings which occur regardless of thewindow manager used.

Photo digital camera software

Are you the proud owner of a new digital camera or areyou going to buy one soon? Well, beware – you’vemore chance of finding Lord Lucan in the box than aLinux software disk. If you would like a camera-PC con-nection under Linux, however, take a look at the latestversion of gPhoto – preferably before you buy the cam-era! The program supports more than a hundred differ-ent digital cameras and provides an interface for man-aging the downloaded pictures on your PC.

Gnome sound studio

The Gnome-media package contains a variety ofsound tools for Gnome. gtcd is a simple CD playerwith CDDB support. grecord allows you to recordand play back your own sounds. gmix incorporatesa user-friendly sound mixer with which you can con-trol the features on your sound card.

Grip ripper and MP3 encoder

grip is a graphical front-end for various CD rippers andMP3 encoders. The program also contains the fairlyadequate CD player gcd, which you can also choose toinstall separately without ripper/encoding functions.Grip is actually a front-end for the cdparanoia andcdda2ways console rippers. However, there is theoption to integrate other rippers. You have a choicebetween the six MP3 encoders included or others.

If you have Internet access, Grip can automati-cally find out the ID3 tag of your newly created MP3files from a CDDB server. With the help of this infor-mation, the program can determine the song andalbum titles of the new MP3s and thus set up anappropriate directory structure for your MP3 store.

XMMS MP3 player

xmms is a fairly good Winamp clone under Linux.Like its Windows counterpart, it offers an equalizer,a playlist editor and support for skins and plugins as

[above]GIMP has improvedquite considerably

in terms of ease of useand user-friendliness

SOFTWARE GNOME APPLICATIONS

92 LINUX MAGAZINE 10 · 2000

[right]GPhoto already

supports more than a hundred digital

cameras

Making MP3s at home with Grip

Ripper: A ripper reads digitalmusic information from audio

CDs and uses it to create wavfiles. MP3 encoder: An MP3encoder converts sound files

into the highly compressedMP3 format. MP3 files are usu-

ally only about 10% of theuncompressed size but with

virtually no loss in quality. MP3encoders vary quite consider-

ably in terms of encodingquality and speed.

well as the ability to play MP3s. You can visithttp://www.xmms.org for a variety of skins thatallow you to change the appearance of your MP3player (you can also use the original Winamp skinsas the format is identical). Plugins from XMMS’s sitecan be downloaded, allowing you to greatly extendthe functions of the player. For example, you cancontrol the behaviour of your MP3 players using aninfrared remote control or IBM’s ViaVoice. Finally,there is a range of popular plugins that allow MP3sto be visualised as graphics.

Multi-purpose Internet clients

Are you wondering where friends have suddenlygot all their great sounds from? The answer is prob-ably via a Napster client, which lets you retrieve newMP3s from the world-wide Napster network.Although this practice is on shaky legal ground,there is nevertheless a user-friendly Napster clientfor Gnome. It’s called gnapster and offers a hugevariety of functions to satisfy most needs. In addi-tion to the standard MP3 search over the officialNapster server, users can establish a connection tothe OPENNAP servers where audio, video, imageand other files can be found.

In contrast to its Windows counterpart, gnapstershows the files available not in a long list but in aclear tree structure. gnapster also allocates anyincomplete download files to their own directory sothat you can see at a glance whether the downloadwas successful. A resume function is included ofcourse! However, be careful when using gnapster.There are now programs such as Media Enforcer thatregister illegal Napster activities. There have also beenreports of gaps in Napster clients’ security whichmake it easy for attackers to spy on your system.

ICQ or AIM

The Internet services ICQ (pronounced: I Seek You)from Mirabilis along with AIM (AOL Instant Messen-ger) from AOL are just as insecure as the Napsterservice – but are also as useful. The name ICQ actu-ally describes the program well. Users who register

with the ICQ server using a unique ID can be soughtand found by other users, who can then ask for alive chat. If you are online and have started your ICQclient you can see whether friends – whose ICQclient must be active too of course – are also on theInternet. You can then chat or swap files and inter-esting URLs over GnomeICU.

In principle, the AIM service from AOL works inthe same way as ICQ but offers several other fea-tures. As AOL itself doesn’t yet provide an AIMclient for Linux that can be downloaded, severaldevelopers have had to help themselves and writetheir own client. The result of their efforts is gaim,which now enables you to contact other AIM mem-bers under Linux.

These are two great programs if you know peo-ple who are often online. But be aware of theincreased security risk of running them.

IRC with X-Chat

If an occasional chat with friends over ICQ or AIM isn.tenough for you, and you would like to make newfriends on the Internet, try X-Chat. X-Chat is an IRC

[left]A must for all MP3 fansand Winamp admirers

[right]File sharing on the Internet with thegnapster client

SOFTWAREGNOME APPLICATIONS

10 · 2000 LINUX MAGAZINE 93

Find friends on theInternet withGnomeICU or Gaim.

Web sites containing gtk+ programs:

http://www.Gnome.org/applist/http://www.gtk.org/apps/http://sunsite.unc.edu/gtk/

client (IRC stands for Internet Relay Chat), which allowsyou to enter the wide world of IRC junkies by joiningan IRC server. The program actually offers everythingthat programs like mirc provide for Windows users. Ofcourse, you can add various plugins and perl scripts tomake your IRC session even more fun.

Pan newsreader

Another way to chat on the Internet is throughUsenet. Usenet provides newsgroups which are thenotice boards of the Internet. There’s a newsgroupfor almost every subject imaginable and pan letsyou get at them under Gnome. After logging on toa news server you can request a list of newsgroupsfrom it. Once you have chosen a group you canthen subscribe to it and read the individual postings.After this, pan takes care of almost all the adminis-tration relating to group subscription and articleselection. For example, you can instruct pan tomonitor particular groups for new postings and dis-play anything it finds.

gtop and logview system monitors

Every now and then you might need detailed infor-mation on the status of your system. In days goneby, you needed to be familiar with console com-mands to obtain this kind of information under Lin-ux. Graphical desktops mean this is no longerabsolutely necessary.

For example, you could use gtop and logviewsystem monitors which are typical examples of sys-tem tools under Gnome. gtop is the graphical gtkfront-end for the top console tool. It presents up-to-date information about running processes, memorycapacity and the space currently available on your

computer’s file systems. The data can, of course, beupdated almost in real time if required.

Unlike gtop, you are required to have adminis-trator rights when you use the system log monitorlogview. You can use it not only to view your sys-tem’s various log files but also to monitor them forirregularities. If you would like to ensure that unusu-al activities at certain ports do not go undiscoveredyou can instruct logview to monitor particular logfiles for certain patterns, with the help of regularexpressions, and, where necessary, to start particu-lar actions (such as sending a warning message tothe user of your system).

Applets for the panel

The programs we have seen so far are launchedeither via the Gnome main menu (the paw print) ordirectly from an X-Terminal. However, Gnome alsooffers what are known as applets. These are smallerutility programs that are integrated into the panelwhen activated so that they are always available. Typ-ical applets include clocks, status indicators and mon-itor lights. Here’s a brief introduction to three particu-larly useful examples from the collection of applets.

The clock and mail monitor or mail monitorapplets monitor your mailbox for new mails.Although clock and mail monitor incorporates twofunctions, the current version can only registerincoming mail on the local computer. If you wouldlike to monitor a mailbox on a remote POP3 or IMAPmail server, you should use the mail monitor applet.

The modem light applet connects you to theInternet at the touch of a button and closes yoursession again just as quickly. During your timeonline, you can obtain information on connectiontime and throughput. In theory, ISDN users can alsouse this applet to monitor their ISDN card.

If you are the owner of a laptop, you may beinterested in the battery status display applet. Provid-ed that your current battery and laptop supportsAdvanced Power Management (APM), this applet willalways show you your laptop’s current battery statusand warn you if it falls below a minimum level.

A rich assortment

We’ve looked at just a small selection of Gnomeapplications. Of course, there are hundreds of oth-ers, all of which can be used as an alternative toKDE. These programs are all contained in the cur-rent Helixcode Gnome version 1.2. On the web siteslisted in the panel you will find many more gtk+based programs. Even if there isn’t always a gtk-based software solution – as is the case withmodem and ISDN tools like kppp or kISDN – theselection introduced here shows that Gnome nowboasts a sufficient number of “native” applicationprograms to establish itself as a KDE alternative tobe taken seriously. Projects such as Helixcode may,in future, help make Gnome more attractive. ■

SOFTWARE GNOME APPLICATIONS

94 LINUX MAGAZINE 10 · 2000

[above]gtop and logview provide you

with first-hand information on the status of your system.

[below]All sorts of useful things for the

Gnome panel: mail monitor, clock, battery indicator, modem

lights ...

Pan takes care of your subscriptions to newsgroups

Want to chat on the Net?X-Chat makes it easy.

Away from the mainstream of KDE and Gnome canbe found EPIwm, a project started by a Frenchgroup of programmers. The aim was to create asmall and fast window manager with a simple con-figuration and an extensive range of functions. Theproject’s success – particularly with regard to the listof features – is very impressive. Here is an extractfrom top, for example, which lists informationabout active processes (programs):

PID USER PRI NI SIZE RSS SHARE STAT LIB U%CPU %MEM TIME COMMAND730 jo 1 0 1324 1324 1028 S 0 0U.0 1.0 0:05 epiwm

The RSS column provides details of the total memoryused by a program – in our example this is 1.3MB.

You can look out for new versions and furtherinformation about EPIwm at http://epiwm.source-forge.net/ . You will also find a link to a graphicalconfiguration tool which saves you the bother ofediting configuration files. However, this tool canproduce bad configurations and so is only recom-mended for advanced users. Even without this kindof front-end, the configuration is easy.

Ready for EPIwm?

In order to install EPIwm, your hard disk should con-tain at least the xdevel (the Header files to X) andmake program packages. However, if you would

rather install a graphical program from a tar.gz-archive, you should first install the relevant develop-ment packages for imlib, libpng, libtiff, libxpm,libgif and libjpeg. Only these will enable all the fea-tures contained within EPIwm.

If the package EPIwm-0.5-5.tar.gz is in yourhome directory it can be unpacked quite easilyusing the tar tool: a new directory is then createdcontaining the program code, after which youswitch to it. An example would be:

jo@planet ~> tar xvzf EPIwm-0.5-5.tar.gz[ ... ]jo@planet ~> cd EPIwm-0.5-5jo@planet ~/EPIwm-0.5-5>

Typing make should compile the window managerfrom the program code, resulting in an executablebinary file. If make stops due to an error you’ll eitherhave to install the missing program packages oradjust the Makefile, which tells make what to do.You will find instructions to do this in the INSTALL file.

Buggy? Buggy!

But the program isn’t actually installed yet! Onlyadministrators (i.e. root) may undertake this task.Unfortunately, there’s a small bug in this procedure –CVS files cause the installation to fail. Fortunately theyare not actually needed, so the problem can be solvedquite easily by deleting the files in the following way:

Header files: When develop-ers write programs theyinclude the header files of for-eign program libraries: theseheader files contain the mostimportant information aboutthe functions already providedby the libraries. This helps thecompiler when it runs. Thelibraries referred to heredescribe the X-Header filesthat are used for program-ming X-Window programs.

SOFTWAREDESKTOPS

10 · 2000 LINUX MAGAZINE 95

Jo´s alternative desktop

SOMETHINGA LITTLE

SPECIALJO MOSKALEWSKI

You alone determine the

appearance of your

Linux desktop. Here, Jo

Moskalewski takes a look at

an alternative to the well-

known window managers and

desktop environments which

you might like to try.

jo@planet ~/EPIwm-0.5-5> rm -rf config/CVSjo@planet ~/EPIwm-0.5-5> rm -rf bin/CVSjo@planet ~/EPIwm-0.5-5> suPassword:root@planet:/home/jo/EPIwm-0.5-5> make instUall[ ... ]root@planet:/home/jo/EPIwm-0.5-5> exitjo@planet ~/EPIwm-0.5-5> cdjo@planet ~>

The directory containing the source code is nolonger required and can simply be deleted. Butbefore starting EPIwm for the first time all usersmust create a set of configuration files in their homedirectory. This can be done by retrieving epiwm.inst.A broken or faulty configuration can be reset to itsoriginal values in the same way.

Light at the end of the tunnel!

There are a number of ways to start a window man-ager and many distributions, rather unnecessarily,

invent their own. We recommend the followingmethod: deactivate graphical login (which shouldalways be done before a new window manager istested) and ensure that the user does not own anyfiles that control the start of X (in particular, ~/.xini-trc or ~/.xsession). The following commands shouldthen produce the desired effect in all distributions:

jo<\@>planet ~> export WINDOWMANAGER=epiwmjo<\@>planet ~> startx

Or:

jo<\@>planet ~> startx epiwm

Initial steps

EPIwm should now be king of your desktop. Pressthe left mouse button and a start menu shouldappear. Your desktop should now look like the onein figure 1. Here is how to use the program:• left mouse button: start menu• centre mouse button: task list (active programs)• right mouse button: window options• left window icon: minimise• 2nd window icon: maximise• 3rd window icon: maximise window height• right window icon: close windowThe mouse can be moved beyond the right-handedge of the screen so that it then appears in thesecond virtual desktop.

Made to measure

The list of features is long and the default settingsare mostly sensible and acceptable. Therefore just afew points about the configuration need to bemade: all settings can be found in the user’s ownconfiguration files under ~/.epiwm, divided intoindividual files by subject:

~/.epiwm/icons:

IconWidth 48

Often the user doesn’t see an icon (if an icon has beenallocated at all) - just text. Although this is not a disas-ter (after all, in our experience, users use the text ratherthan the graphics to guide them anyway) those whoare unhappy with it can simply try typing 200 here.

IconFont fixed

The xfontsel, gfontsel or kfontmanager tools listwhich fonts are available.

~/.epiwm/keyThe keys can be adjusted to suit the user’s ownrequirements and additional shortcuts can bedefined for programs.

~/.epiwm/menu

MenuColor H dimgrey grey

Unfortunately, the default colours make it difficultto read the menu: it uses a horizontal (H) graduatedfill from dimgray to grey. Instead you can use a ver-

Figure 1: EPIwm’s Standard look with its own tools

(including Tkgoodstuff, gkrellmand the file manager F)

SOFTWARE DESKTOPS

96 LINUX MAGAZINE 10 · 2000

Figure 2: Oclock with

border

tical graduated fill specifying the colour using thehex RGB colour coding similar to that used whendesigning web pages:

MenuColor V #B2337A #BFBFBF

A colour value rather than “H” or “V” obviouslyindicates that it is all one colour.

~/.epiwm/startThis is the Autostart folder of EPIwm. Anythingentered here automatically starts with EPIwm. Thedefault setting for the background is taken fromxsetroot.

The interesting part of the configuration is thatit is possible to allocate individual programs particu-lar window characteristics from the start. The fol-lowing keywords can be used:• NoTitle: Button title is not displayed• NoBorder: no border• Sticky: visible on all virtual desktops• StayOnTop: not covered by other program windows• WindowListSkip: not listed in the task listHere’s an example: the clock oclock is to appear onthe desktop. So we cheerfully type xterm “oclock”and a window like that in figure 2 appears. This isnot really what we want, of course, so we can leavethe following entry in the ~/.epiwm/style file:

"oclock" NoTitle NoBorder Sticky WindowListSkip

Furthermore, if the ~/.epiwm/start file contains theentry Init oclock &, our newly configured clockalways appears on the desktop (see figure 3).

~/.epiwm/windowThis defines the appearance and behaviour of thewindow itself. It’s quite difficult to stop experiment-

ing with this option. The option to swap the win-dow buttons with your own graphics is highlighted– the graphics format used must correspond to oneof the formats whose development packages wereavailable when the program was compiled (thismeans, for example, only PNG graphics if only libp-ng-devel was present during compilation).

~/.epiwm/workspace

WorkspaceChangePercent 100

As you can also place a window between two desk-tops, many find it helpful to scroll only half a screen:

WorkspaceChangePercent 50

If you now go beyond the right-hand edge of thescreen, you will go only half a screen further.

WorkspaceResistance 150

Determines the time period after which moving themouse to the right-hand edge of the screen causesit to move to the next desktop.

Conclusion

EPIwm is released under the GPL and is thereforeavailable free of charge. In fact, EPIwm exacts asmall price for it’s non commercial development. Forexample, a program with the -geometry option,which allows users to position it using the com-mand line, creates problems. On our test system, forexample, it is not possible to use ATerms (a modestreplacement for XTerm). However, this aside, EPIwmis highly recommended to anyone seeking an alter-native desktop. ■

Info

EPIwm home page:http://epiwm.sourceforge.net/

Figure 3: EPIwm in its element

SOFTWAREDESKTOPS

10 · 2000 LINUX MAGAZINE 97

Shortcut: Shortcuts are keycombinations that allow theuser to reach frequently usedmenu commands in a programmore quickly. For example,many programs use [Alt+Q] or[Ctrl+Q] to quit – not to beconfused with the shortcutAlt+F4 used by many windowmanagers to close a window.

BEGINNERS SOFTWARE INSTALLATION

98 LINUX MAGAZINE 10 · 2000

Package installation made easy

UNWRAPPINGTHE PACKAGEUnlike their Windows

counterparts, Linux

programs rarely come

complete with a setup

program that checks

your disk for free

space, creates an

installation folder and

sets up icons for you to

run the program. Under

Linux this must all be

done manually. But

don’t panic: Hans Georg

Esser show you it’s not

as hard as it sounds.

Binary: Binary files, often justcalled »binaries«, are programsthat have been comoiled into a

form that can only be under-stood by the computer. They

are kept in directories such as/bin, /usr/bin and so on.

Source: Source files are theoriginal text files containing

the program statements (in alanguage such as C or C++) that

the programmers wrote. Youcan read them, though unlessyou’re a programmer too youmight not understand them!

There are many different types of software archivein the Linux environment. Before we look at how toinstall them, let’s find out a bit more about them.

rpm packages

If you’re already running Linux you’ll no doubt havealready found many files with names ending in .rpm.this stands for Red Hat Package Manager and identi-fies archives which have been compiled according toa standard introduced by Red Hat. Nowadays this for-mat is used by almost all distributions.

But there’s an important difference betweenbinary RPMs and source RPMs. Binary RPM pack-ages contain the executable files as well as configu-ration and miscellaneous other files that go togeth-er to form the application. In addition to this, abinary RPM archive holds information on what to doimmediately before and after the installation. It alsoworks out if any other packages are required for theinstallation and if so, if any file conflicts might occur.

Source RPMs contain the program source code(the text written by the programmer, usually in C orC++), together with instructions showing how tocompile this code into something useful. From asource RPM you can produce a binary RPM pack-age. More on this later.

In most cases, RPM packages can be installedeither by typing a command into a terminal windowor by using a graphical tool under KDE or Gnome. Inorder to do this, system administrator (root) rights arerequired. So before starting you must login as userroot or use the su command. Owing to differences inindividual Linux distributions it’s often the case that aparticular RPM package can only be installed on thedistribution for which it was created. Therefore, whensearching for files on the Internet you’ll frequently finddifferent RPM packages for different distributions.

The filename lets you recognise the version ofthe program and the platform for which it was cre-ated. A typical example might be:

kpackage 1.3.10 3.i386.rpm

The version number here is 1.3.10. The number3 after this means that the package has been creat-ed three times, implying there are packages num-

bered 1.3.10-1 and 1.3.10-2 also around which per-haps were made during an earlier version of the dis-tribution. »i386« indicates that the program will runon all Intel based systems (all computers with80386, 80486, Pentium I/Pro/II/III or compatibleprocessor, including AMD and Cyrix etc.).

If you find several versions of a program you’reinterested in but each has a different ending likei386.rpm, i486.rpm or i586.rpm, select the one thatbest suits your computer. Packages which werecompiled for Pentium (586) processors are betteroptimised than 386 packages since they use addi-tional commands which the 80386 lacks.

Source RPM packages have the abbreviation»src« in the name instead of the platform designa-tion - the source package for the above RPM pack-age might therefore be called:

kpackage 1.3.10.src.rpm

Source RPM packages don’t need a platform indica-tion because under Linux the source code is – ingeneral – not specific to a hardware platform. It isthe process of compiling to a binary file, translatingthe source code into machine language, whichmakes a program platform-specific.

deb packages

In addition to RPM there is another popular packageformat: the Debian format. Debian packages end in.deb and are used by the new Corel Linux distributionas well as Debian’s own distribution. Owing to therelatively limited use of Debian – because Debian isone of the less user friendly distributions – we will dis-pense with a detailed description. It is worth notingthat Debian and RPM packages can be converted inone another with the aid of the program alien,though this has a variable success rate. If possible youshould choose a package type that suits your system.

tar.gz archives

Files that end in .tar.gz are broadly equivalent to ziparchives under Windows. But while zip archives fre-quently compress the contents of a whole folderand subfolders in one go, this is a two step proce-

BEGINNERSSOFTWARE INSTALLATION

10 · 2000

dure with Linux. First, a tar archive is created whichcontains the folder hierarchy. The files are not com-pressed until the second step is instigated, in whichthe program gzip is used to pack the tar archive.This two stage process explains the double fileextension (ie package.tar.gz.)

Program packages in tar.gz format usually con-tain the program source. For installation to takeplace they must be unpacked, configured, compiled(turned into a binary program) and finally copied tothe correct place in the Linux folder hierarchy. We’lldescribe in more detail how this happens later on.Occasionally you will find tar.gz packages which con-tain compiled program files but it’s pretty unusual.

tar.bz2 archives

These are a variant of tar.gz archives. After tar hasrun the compression program bzip2 is used whichachieves a higher compression rate than the oldergzip program. However, the archive doesn’t differ sig-nificantly from the tar.gz archive apart from the factthat a different command is necessary to unpack it.

Now that the overview is complete we can dis-cuss the installation procedures. We’ll start with thesimplest variant: the installation of RPM archives.

Installing RPMs

Once you’ve found a binary RPM package that suitsyour Linux distribution you can install it via the consoleusing the rpm command or via a graphic front-endlike kpackage under KDE or gnorpm under GNOME.Some distributions supply further tools which fulfil thesame purpose, such as SuSE’s YaST, easyLinux’s ePro-file or Mandrake’s rpmdrake. If your distribution hasits own installer it is better to use it as it may provideextra benefits like automatic menu configuration.

kpackage

In order to install packages you must have adminis-trator rights. Open a console window and type the

command su. You will be asked for the password forthe administrator root. Once this is completed youcan start the package manager by typing kpackage.Some distributions allow you to call up kpackageusing the K menu without becoming root before-hand. When the program starts a window opensinto which you must type the root password (Fig. 1).

When it starts, kpackage first reads the informa-tion in the RPM database which tells it about theprogram packages that are already installed. It thendisplays this in a tree view (Fig.2.) Each packageyou’ve installed should be present in this hierarchy –for example, you would find the editor emacs underRPM/Applications/Editors.

In order to install a new package select the menuitem File, Open. The usual Open dialog shouldappear and you will be able to select the packageyou want to install. kpackage will now display infor-mation on the package in the right half of thescreen. Under the Properties tab you will find a briefdescription which amongst other things displays thename and version (Fig 3). Clicking on the tab File Listshould give you a listing of all the files which will becreated during installation. You can find out fromthis what folders the files will be put in.

On the left you will find five check boxes: Upgrade,Replace Files, Replace Packages, Check Dependenciesand Test. These have the following meanings:• Upgrade: If you want to install a program that

already exists on your system in an older versionyou must check this box to carry out an update.The older version is automatically uninstalled. IfUpgrade is not checked and an older version ispresent, the installation will halt with an error.

• Replace Files: rpm keeps an eye open for filesthat already exist being overwritten by the instal-lation. If so it halts with an error. This can happenwhen two packages place the same configurationfile in the folder /etc, for example. If you mark thisfield, a package is installed even if it means over-writing files that already exist.

• Replace Packages: This option is similar to Upgrade:a package is installed when it is already present in

10 · 2000 LINUX MAGAZINE 99

[below left]Fig. 2: In the tree view you will find all the RPM packagesalready installed.[below]Fig. 3: Package properties using kpackage

Fig. 1: When starting kpackage as anormal user you are prompted forthe root password.

BEGINNERS SOFTWARE INSTALLATION

100 LINUX MAGAZINE 10 · 2000

another version but the old package is preserved.This might be useful if perhaps you want to installtwo versions of a particular library file.

• Check Dependences: As already mentioned,RPM packages “know” which extra packages arerequired by the one you are installing. An exam-ple of this is the KDE base package kdebasewhose programs can only run if qt and kdelibs arealso installed. If a required package is missing youwill receive an error message. If you know forsure that all necessary files are present, you canuncheck this option. You might do this if forexample you want to install a package designedfor a foreign Linux distribution and you know thatthe required package has a different name and isnot being found despite being present.

• Test: This is simple enough: it checks whether thepackage can be installed without difficulty. Plac-ing an check in this field means that despitegoing through the motions, no files will actuallybe installed.

After making any changes to these settings click onInstall to install the selected package. Cancel willreturn you to the tree view.

Instead of selecting a package using File, Openyou can also drag it from a kfm window to thekpackage window. If kpackage is not yet open youcan start kpackage from kfm by clicking on the rpmarchive. This needs you to be user root, however.There is a way to call up kpackage with the neces-sary rights from the kfm window: select the menuoption System, KFM file manager (Super UserMode). After entering the password a kfm windowis opened in which you have administrator rights:you can tell because of the red mark at the top leftof the kfm window. If you click on an rpm archive inthis window, kpackage is started without a pass-word needing to be entered.

gnorpm

Gnome has a similar program: gnorpm. This issuperior to Red Hat’s own tool glint and has thebenefit of being available in all Linux distributions.

In principle, the same thing is done here as withkpackage. Start the program as the administratorroot (type »su« and enter the administrator pass-word). You’ll also have to open a gmc (GNOMEMidnight Commander) file manager window anddrag the RPM package from it to the gnorpm win-dow. This should open a new window, Install, inwhich the package is displayed (Fig 6). By clickingon Queries you can obtain more detailed informa-tion (the current gnorpm version 0.9, however,always crashed when we tried it.) A click on Installstarts the whole thing running.

gnorpm also checks for package conflicts, and,if applicable, pops up a warning dialog box in whichyou can alter the installation settings.

Installing RPMs by hand

In addition to using a graphical front end which sim-ply calls the rpm routine, it is also possible to manu-ally use rpm within a console. If you are not afraidof a hands-on approach then you will find thismethod more efficient.

All you need before starting is the precise file-name of the RPM, including its path (if the archive isnot in the current folder.) You must then becomethe administrator root using su. Once you havedone this, enter the command:

rpm Uvh path/package 1.2.3 1.i386.rpm

It’s as simple as that! During installation a progressmeter is displayed showing how much of the workis completed. rpm can work on several packages atthe same time, using a command like:

rpm Uvh download/*.rpm

You can find out which version of a package isinstalled by typing rpm -Uvh q package name (seeFig. 7). You will find a list of the options that can beused in Table 1.

When using the options -q and -e for queryingor erasing, only the package name (without the ver-sion number) needs to be indicated, i.e. not rpm -epackage 1.2.3.rpm but simply rpm -e package.

[top left]Fig. 4: A red mark at top leftmeans that this window has

administrator rights

[top right]Fig. 5: gnorpm first displays

all installed files

Fig. 7: Package installation andquerying using a terminal window

Fig. 6: Clicking on Install starts thewhole thing going

BEGINNERSSOFTWARE INSTALLATION

10 · 2000 LINUX MAGAZINE 101

Compiling source files

Now we come to a more complicated way to install soft-ware – from the programmer’s source files. Here theprogram exists in its basic form as a source code archive.Before anything else happens it must be unpacked to asuitable place: /usr/local/src/ is usually the default. Inorder to do this you must become administrator root.You can then unpack the program archive. Archiveswhich end in .tar.gz or .tgz are unpacked using:

tar xzf path/package.tar.gz

and packages which end in .tar.bz2 are unpacked using

tar xIf path/package.tar.bz2

(Note: between »x« and »f« in the command aboveis a capital »i«.) This command creates a new subdi-rectory with the name of the source code files. Youmust now change to this directory. There then fol-lows what some call the classical installation triplestep: »configure/make/make install«:

[root@dual myprog 1.1.0]# ./configure...[root@dual myprog 1.1.0]# make...[root@dual myprog 1.1.0]# make install

All three commands will cause your screen to be filledwith many system messages. What do they all mean?

Well, the first step ./configure (which must betyped with a dot and slash before the word »config-ure«) starts a shell script in the current folder. Thisscript has been created by the programmer andlooks around your Linux system. It checks whatoperating system and what version you are using(frequently the same source text archive can be usedon other Unix variants), which compiler is installed

(under Linux it’s usually GNU C), and whether all thenecessary program libraries exist in sufficiently up-to-date versions. If everything appears satisfactorythe script produces a makefile (Fig. 8).

You need the makefile for the next two steps.When you run the program make (which must alsobe on your hard disk, of course), it processes thefreshly created makefile which itself contains arecipe-like listing of what must happen – and inwhat sequence – in order to create a finished pro-gram. ./configure and make can take quite a longtime to run depending on the size of the program.

Finally, by typing make install, all created files will becopied to the correct places on your system. Programsthemselves usually end up in /usr/bin or /usr/local/bin,help pages (man pages) in /usr/man or /usr/local/man,configuration files in /etc and so on.

Once this is all done, the installation is finished.Try running the newly-installed program. If it worksproperly you can delete the folder from which youcarried out the compilation.

If after unpacking a source code package youfind there is no configure file, examine the otherfiles in the folder. Usually, you will find a COMPILEor README file in which the procedure for installingthe program is described. ■

Table 1: rpm optionsi Install (no update)U Update v »verbose« (i.e. detailed) — displays package nameH displays progress meterq »query«; enquires whether a package is installede »erase«: deletes a packagenodeps ignore dependencies (i.e. install even if necessary packages are missing)force force installation in the case of conflicts

Fig. 8: ./configure : the first stepto a finished program

SOFTWARE INTERNET TOOLS

102 LINUX MAGAZINE 10 · 2000

[left]Caitoo with full-screendisplay and minimised

“Drop Target” icon

[right]KDE online help andCaitoo docked in the

KDE control panel

Four Download Managers

SURFINGASSISTANTS

Have you ever stayed online an extra half hour sothat you could finish downloading a huge file, onlyto end up frustrated because the connection failedat 99% complete? Or do you get annoyed by themany windows that your browser produces during downloads that stop you from seeing howmuch of the file you’ve got so far? If you would liketo make your downloads easier, better organisedand more efficient, one of the download managers discussed below may be for you. They include twoprograms – KWebGet and WebDownloader – thatare suitable for what is sometimes called “recursivedownloading” – the mirroring or duplicating of awhole or partial website on your PC.

Caitoo

Caitoo is being developed as part of the KDE project.The current version, 0.6.6, is already proving very use-ful and the most important functions that any down-load manager should provide have been implement-ed. The program can be integrated into the KDE panelas a “Docked Widget” (in the shape of an extendedhand) which lets other KDE applications or Netscapedownload files using drag and drop. Alternatively,users can download files via URLs that have beencopied to the temporary clipboard using the shortcut[Ctrl+V] – simply use the menu option File, Transferopen (retrieve URL from the temporary folder).

The Internet offers an inexhaustible pool of soft-

ware for Linux enthusiasts. Hundreds of programs

are available to be downloaded free of

charge. A download manager helps you

organise your downloads and make the

most of your online time. We look at four

download managers for Linux.

Caitoo recognises three different transfermodes: in order, according to schedule anddelayed. If in order is selected, Caitoo first checkswhether the maximum number of transfers hasbeen exceeded. The transfer begins as soon as anopportunity becomes available. The schedule optionallows the user to determine the date and time ofthe download.

There’s an option to close the connection (and,if required, Caitoo itself) once the download hasbeen completed which is also very useful. Theautomation index tab in the Settings dialog boxcontains a range of options for closing the connec-tion after particular events. In later versions, theauthors are planning, among other things, to imple-ment features that are currently lacking such as theability to search FTP sites and a bandwidth limit fordownloads.

Ignoring a few minor errors in the settings menu,Caitoo has already proved itself useful thanks mainlyto its intuitive usability and the smooth integration ofthe most important functions. But the developmentteam are still working on it – it could be worth takingan occasional look at the project’s homepage.

GTransferManager

For updates, GTransferManager banks on GNOME’sfine gtk library and attracts many with its namealone. Unfortunately – compared to the otherdownload managers here – it’s lacking much func-tionality. As the project currently stands, it lacksboth important download options such as Resume,and expected management functions such asscheduling or logging. The only interesting featureis the CORBA interface, which it may be difficult forordinary users to get much out of.

In its current stage of development GTransfer-Manager is only partly useful as a download manag-er. We’ll have to wait and see how the project devel-ops over time.

KWebGet

In KWebGet, KDE developer Frank von Daak hasessentially created a graphical front-end for thepowerful Unix command line program wget. Ratherthan being just a download manager in the strictsense of the word, KWebGet is a program withwhich users can mirror whole websites on their harddisk (a process called “recursive downloading”) sothat they can read them offline at their leisure. Inprinciple however, KWebGet can also be used todownload individual files.

The author has gone to great lengths to giveusers a clear overview of the available options. Inaddition to the ergonomic structure of the pro-gram, von Daak has written a wizard which usesdialogs to take users through the most importantsteps prior to the download. The options, filetypes and domains boxes in particular are worth

noting. These allow users to pre-select preciselywhich file types they wish to download fromwhich domains under which conditions. In addi-tion to HTTP and FTP registration forms and theusual proxy settings, a powerful scheduler hasbeen built-in so that users can set to the secondthe time when downloading is to start.

All in all KWebGet seems to be very wellthought out and implemented. It is ideal for mirror-ing local websites. However, as a conventionaldownload manager it is only partly useful.

WebDownloader for X

This project by the Russian developer Koshelev Max-im has been under way for some time. At firstglance, it doesn’t appear to be too spectacular.However, it’s when you click on the unprepossessingsettings, general menu that you realise what theprogram is about – we were amazed by the enor-mous range of functions on offer. WebDownloaderhas probably every function you can imagine in thecontext of downloading. In terms of transfer limits –maximum number of simultaneous transfers, maxi-mum bandwidth/speed, host limits – this downloadmanager offers considerably more than the otherInternet tools here. In addition, WebDownloader issimilar to KWebGet in that it caters for recursive

SOFTWAREINTERNET TOOLS

10 · 2000 LINUX MAGAZINE 103

[left]Direct URL insert in GTransferManager

[right]A lack of functions relegates GTransferManagerto the sidelines

KWebGet – A skimpy onlineguide but clear and largely self-explanatory programfunctions

KWebGet opens with a nice wiz-ard that allows you to easily fillin the settings required for thedownload.

downloads (you can set parameters for the desiredrecursion depth) and you can give it a schedule foreach individual download request.

WebDownloader combines the wealth offunctions of Caitoo and KWebGet. It’s just a pitythat it can’t be integrated as easily as Caitoo intothe KDE control panel. But fortunately you get adrag-and-drop recycle bin, to which you cantransfer URLs using drag and drop. Of course,there is also an option to transfer Download URLsto the tool using the temporary folder.

Although WebDownloader lacks extras suchas FTP search it is certainly the best under Linux interms of functions – at least as far as Open Sourcegoes. Although it is slightly inferior to the KDEproject Caitoo in terms of usability, the wide vari-

ety of functions makes up for this shortcoming.After all, don’t forget that not all users work with KDE.

Conclusion

Under Linux, WebDownloader for X and Caitoo aretwo free graphical download managers offeringalmost the same variety of functions as commercialWindows programs such as Getright or GoZilla!Therefore, there’s no reason not to hold downloadorgies under Linux in future. Indeed, in view of thefact that Linux is far more secure than Windows,not to mention the immense range of softwareavailable on the Web at any time, Linux is ideal as adownload platform. ■

SOFTWARE INTERNET TOOLS

104 LINUX MAGAZINE 10 · 2000

[left]WebDownloader offers an

overwhelming range offunctions and an attractive

appearance

[right]URL transfer to the drag-

and-drop recycle bin (blue circle, top left-handcorner) and host limits on

WebDownloader

Table: Overview Name Caitoo 0.6.6 GTransferManager 0.4.4 KWebGet 0.5 WebDownloader for X 1.16.1Author Matej Koss Bruno Pires Marinho Frank von Daak Koshelev MaximLicence GPL GPL GPL Open SourceHomepage devel-home.kde.org/~caitoo camoes.rnl.ist.utl.pt/~bapm/gtm/ www.kpage.de www.krasu.ru/soft/chucheloGeneralManual KDE manual in production Short overview FAQRequirement KDE 1.1 GNOME KDE 1.x gtk > 1.2.0

QT 1.42 gtk 1.2.x QT 1.4.xwget wget

Download behaviourDirect insert URL x x x xDock Widget x - - -Drop Target x - - xDrag and drop from KD applications x - x xDrag and drop from Netscape x x - xautomatically inserted in temporary folder x - - xTransfer optionsResume/Reget function x - - xLimit maxim. open connection x x - xLimit DL speed - - - xPartial Download - - - xTime planer x - x xAutomatically separates after download x - - -Automatically closes after download x - - xOther FeaturesRecursive Download - - x xFTP Search - - - -Proxy settings x x x xLogging x - x xSpecial features

Dock Widget in KDE CORBA support Frontend to wget Buttons for different control panel Mirrors whole sites speed limits

Domain limit Domain limitDetails of recursion depth Details of recursion depthWizard Mirrors whole sitesSelection of file types

EvaluationSuitability in practice Very good – Good Satisfactory Good – Satisfactory Very good – good

SOFTWAREXEPHEM

10 · 2000 LINUX MAGAZINE 105

XEphem is an interactive astronomical ephemeris orplanetarium that has been developed over a periodof ten years by Elwood Charles Downey. Originallywritten for Unix systems, it runs under Linux too.And it’s one of the best programs of its type you canget on any platform. If you have any interest inastronomy at all, it’s well worth trying.

The program comes in two versions. There’s afree version in source code form or a ready-to-runCD-ROM with printed manual for $69.95 (plus $12

air mail.) The CD-ROM holds 240MB of data includ-ing catalogues of deep sky objects, asteroids andthe Hubble Guide Star Catalogue of stars down tomagnitude 15. It would take a day or so to down-load all this data making the CD-ROM an attractivebuy. However, the free version is fine for casualstargazers or as a way of trying the program outbefore buying it. Pre-built binaries for Intel, SunSparc and PowerPC systems can be found on theWeb for those who aren’t happy about compilingthe program from source code.

XEphem starts up with a dialog (Fig. 1) that letsyou set the date, time and location. The start-uplocation is fixed and can’t be changed - at least, notin the free version - unless you change it in thesource code. It’s quite easy to change the settingsinteractively, though. If you aren’t sure about a set-ting you just point at it and a tool-tip pops up withsome more explanatory information. The calendarusefully displays the dates of new moon and fullmoon to help you pick the best times for observing.

Whether you’re a

casual stargazer or

a serious amateur

astronomer, you’ll

get a lot of enjoyment

from this charting

program.

Fig1: The main dialog allows you to set the date, time and location for observations.

An astronomical ephemeris for Linux

LINUXREACHES FOR

THE STARS

SOFTWARE XEPHEM

106 LINUX MAGAZINE 10 · 2000

The main feature of the program is the SkyView. When you select this from the main menu,XEphem displays a 360 degree planetarium view ofthe sky as seen from the chosen location at the timeselected if you were lying on the ground with yourfeet pointed south looking straight up (Fig. 2). Usingthe scroll bars you can change both the angle ofview and the direction. Left-clicking on the mapcauses information such as the right ascension anddeclination, altitude, azimuth and constellation con-taining the selected point to be displayed. Right-clicking on a star or other celestial object causes apop-up menu to appear showing all this informa-tion plus a description of the object, its size andmagnitude, rising and setting time and a lot more.From this pop-up menu you can centre the displayon the selected point or centre and zoom to thatlocation to see more detail.

Options on the Sky View menu let you controlthe appearance of the display. You can choosewhether constellation lines or boundaries areshown, the proportion of objects that should belabelled, the magnitude scale and much more. Youcan flip the image left to right or top to bottom sothat it matches the view seen in an astronomical

telescope. You can create a list of all the objectsshown in the current view and you can print out amap. XEphem is better than a printed star atlas.

The free version of XEphem is limited in thenumber of objects it displays by what most peoplewould consider a reasonable size of file to down-load. But the program isn’t restricted to using thestar catalogues it comes with. Perl scripts are provid-ed to convert various astronomical database filesavailable on the Internet into XEphem’s own formatand you can set paths to the directories where thesedatabases are held. XEphem can also read HubbleGuide Star Catalogue data from various sources. AC program is included that can convert GSC datafrom CD-ROM to a more compact form for perma-nent hard disk storage. XEphem is supposed to beable to read GSC CDs directly (though it didn’t likemy rather old set for some reason.) If you don’t havethe GSC CDs XEphem will pick up GSC data for thearea covered by the map from an Internet source.GSC data downloaded from the Internet is cachedso it can be reused later.

XEphem also has the ability to display DigitisedSky Survey Images. Armchair astronomers will lovethis feature! To use it you just zoom in on an inter-

[left]Fig2: The Sky View shows the night

sky for the chosen location at the selected time and date, as if in a

planetarium.

[right]Fig3: Digitised Sky Survey images for

an area of interest can be downloaded from the Internet and

displayed.

[left]Fig4: A view of the Solar System canbe animated to show the movement

of the planets.

[right]Fig5: The Moon view shows the

exact phase, with Apollo landingsites labelled.

SOFTWAREXEPHEM

10 · 2000 LINUX MAGAZINE 107

esting part of the sky and select Image from theControl menu. This will bring up the Sky FITS dialog.Digitised images in FITS format are available onlinefrom both the Space Telescope Science Institute(STScI) or the European Southern Observatory(ESO). From the UK, the ESO is nearer, so you justclick the ESO button and XEphem connects to theInternet and downloads an image which is then dis-played in the Sky View window. The results can bestunning (Fig. 3). Again, the FITS files you downloadcan be saved to hard disk for viewing whenever youwant them.

If you are interested in the objects in the SolarSystem, XEphem has even more to offer. The SolarSystem view displays an orrery which you can viewfrom any angle and animate to show the relativemotion of the planets (Fig. 4). The Moon viewshows an image of the moon, shaded to show theexact phase. Points of interest such as the Apollolanding sites are marked, and you can find out thenames of lunar features by clicking on them (Fig. 5).There’s a similar option for Mars showing an imageof the red planet. The views of Jupiter, Saturn andUranus don’t attempt to show any surface detail,although a red dot on Jupiter (Fig. 6) shows where

the Red Spot should be at that particular time. Themajor planets’ moons are shown in their correctpositions and the display can be animated which isa handy tool for finding the times of transits andoccultations.

The Earth view probably won’t be of muchinterest to astronomers. It shows a map of the Earthin either a cylindrical or spherical projection. Variouslocations can be shown, and identified by right-clicking on them, and the part of the Earth that is indaylight can be highlighted. Perhaps most interest-ing is the weather map display (Fig. 7). When youselect it, an Internet connection is started and theprogram downloads up-to-date cloud cover, seasurface temperature and synoptic weather data anddisplays it on a map of the world.

XEphem can be used to control a telescope. Ifthis option is selected you can click on the Sky Viewwith the mouse and the program will send the co-ordinates to a remote process via a fifo. This shouldmake it relatively easy to interface the program toany telescope control system.

Whether you are a dedicated amateur observer, acasual stargazer or an armchair astronomer, you willfind XEphem to be a program with much to offer. ■

[left]Fig6: A view of Jupiter showingthe Red Spot, with two moons in transit.

[right]Fig7: Cloud cover, sea temperature and synoptic data are plotted on a map of the world.

[left]The M101 Spiral Galaxy, from the Digitised Sky Survey

[right]The Mars view displays a digitised image of the red planet.

Links

Clear Sky Institute:http://www.clearskyinstitute.com/xephem/ Craig Kulesa’sweb page: http://loke.as.ari-zona.edu/%7Eckulesa/xephemBob Brose (N0QBJ) home page:http://homepage.mac.com/rbrose/xephem.html

Gnutella was originally devel-oped by Nullsoft which has now been

part of AOL for some time, and when AOLmerged with Time Warner the development of Gnutel-la was officially stopped. Since Time Warner sells CDs,the reason behind this decision seems fairly clear. How-ever, despite this there are betas of the Windows pro-gram to be found online, not to mention many clonesof Gnutella. Some of these are for Linux.

What distinguishes Gnutella from Napster is thatthere is no central host via which everything is han-dled. Instead, programs pass search requests to eachother to find out who has the required file. Thus allGnutella programs are both server and client. Thisapproach means that the system continues to existeven if a program fails. Interesting files are quicklyacquired by many different users providing manypoints from which they can be downloaded by others.

The disadvantage of this system is that you needthe address of another Gnutella user in order totake part in the network. Such an address can beobtained from http://gnutella.nerdherd.net/cgi-bin/hosts.cgi. A further problem is that Gnutella isnot completely anonymous. It is possible with nogreat difficulty to log the IP addresses of all userswho download a file from the local Gnutella.Gnutella was originally designed by Nullsoft for useby relatively small groups; therefore it is rather slowin the opinion of the many users.

A good Gnutella implementation for Linux (andWin32 too) is Gnut. Gnut is relatively mature but todate still has no stable graphical interface. The“help” command displays a list of available com-mands. Gnut is configured using the file ~/.gnutrc.In the file ~/.gnut_hosts the addresses of all knownhosts are stored. Gnut can display all searchinquiries received using the command “monitor”.When searching with Gnut and all other Gnutellaprograms you must avoid using wildcards (*, ?) asthey are not recognised by all implementations. It’sbest to search only for keywords. Gnut can bedownloaded from http://www.umr.edu/~jjp.

A nicer program to use is Gtk-gnutella. It emu-lates the look and feel of the original Gnutella andruns with no problems. The interface is fairly intu-itive: IP addresses are entered in the format“Address:Port” in the “Add” field. Both binariesand source code for Gtk-gnutella can be obtainedfrom http://gtk-gnutella.sourceforge.net. As thename suggests, you need GTK+ for Gtk-gnutellato run.

Another Gnutella implementation having agraphical interface is Gnubile. With Gnubile youmust enter all IP addresses using the menu File, Pref-erences in the format “Address Port”. Apart fromthis the program is also self-explanatory. A require-ment for using Gnubile is GNOME. The programcan be obtained from http://gnutella.wego.com.

SOFTWARE GNUTELLA & CO.

108 LINUX MAGAZINE 10 · 2000

LinuxMagazin/gnutella

Distributed file sharing

SUCCESSORTO NAPSTER

BJÖRN GANSLANDT

Recently there has been a lot of uproar about

Napster, a program that allows users to exchange

MP3 files and, with the aid of Wrapster, other types of

file as well. At the end of July a US judge ruled that

Napster should be shut down, a decision that was over-

turned on appeal a few days later. No doubt there will

have been be further twists in the story by the time you read

this. But whatever the final outcome, the fact remains that

Napster isn’t the only program or service of its kind. There

are some interesting successors. Bjôrn Ganslandt tunes in.

If you would only like to sniff around in Gnutellathere are some Gnutella search engines on the web.For a start, try the addresses http://www.surfy.com/page/nut.php3 and www.dailyphat.com. It’s alsoworth visiting http://gnutella.wego.com if you’relooking for more clients or for information onGnutella.

Jungle Monkey

Jungle Monkey is relatively new: consequently,hardly any files can found with it. Despite this, thesystem is interesting. Jungle Monkey provides sever-al channels in which files can be offered. Each usercan open these channels, exchange files and chatwith other users.

Jungle Monkey differs from other programs likeGnutella in that it uses multicasting (end-to-endmulticasting to be precise).

First, Jungle Monkey opens a “root channel”which carries information about all the other channels.As you cannot get information about the other chan-nels without this root channel, Jungle Monkey has thesame weakness as a centralized system like Napster. Itis possible to open channels without having the rootchannel, but only if you have a a note of the addresses.

In the channels themselves you can then down-load files. However, it can be a while before all filesare displayed. Information about which files areavailable in the channel is only sent about once everyten seconds. If no other root channel is selected Jun-gle Monkey opens the standard channel on start-up.

Jungle Monkey exists in both a GTK and in aGNOME version, the GNOME version being recom-mended. In addition, there is a command line ver-sion called jmlite and a command line search servernamed jmsearchserver. Information about JungleMonkey as well as source code and binaries can befound at http://www.junglemonkey.net. (If thispage cannot be found, try http://141.213.11.223.)

Freenet

Freenet is an attempt to create a network in whichinformation can be anonymously procured and madeavailable. Just like Gnutella, Freenet is a distributedand decentralized system. The system consists of anetwork of nodes. From these nodes you can down-load files by sending a key to a node. Keys have a for-mat such as “text/philosophy/sun_tzu/art_of_war”.

In this system it does not matter where a file isphysically stored. If the first node does not have thefile, it simply asks the next one. The whole thingfunctions in a similar way to Gnutella, except thatFreenet has been designed for larger networks andthe protocol is therefore rather more complicated.

The current version of Freenet still doesn’t pro-vide any anonymity or encryption but the next ver-sion should be relatively secure. At the momentthere are still some problems with the architectureof Freenet. Thus, for example, it is still not possible

to update or efficiently search through documents.However, these problems should be eliminated infuture versions. You can obtain more informationon the protocol and the philosophy behind Freenet,as well as the program itself, from the Freenet homepage http://freenet.sourceforge.net.

Freenet is written in Java, and is therefore readi-ly portable to other platforms. However, there arealso clients in Perl and C. The Perl client called “Lib-erator” is part of the Freenet software; FreeClient,the C Client, can be found at http://lar2.dyndns.org(this page is not constantly online.) You can also getlimited access to Freenet via the Web(http://uts.cc.utexas.edu/~blanu/keyindex.html)although of course the access is then not anony-mous. For the Java version of Freenet you will needa Java implementation installed on your system.

The future

There are some good implementations of Gnutellawith which you can find a vast range of differentfiles. However, for the future Freenet opens upsome interesting possibilities. Take a look at it! ■

[above]Figure 1: Gtk-Gnutella

[left]Figure 2: Jungle Monkey

Multicasting: Using multicas-ting you can send a package of data from one source tomany targets at the same time.This saves bandwidth com-pared to the more commonlyused unicasting.

SOFTWAREGNUTELLA & CO.

10 · 2000 LINUX MAGAZINE 109

This version of Mandrake is fully functional. It sup-ports virtually all current hardware and includes thekernel 2.2.15 which has been optimised for Pen-tium systems. As an extra treat it offers the optionof using the Reiser file system for all partitions.

In addition, Mandrake 7.1 supports UniversalSerial Bus (USB) devices and mice with a centrewheel can now be used in most applications.XFree86 version 4.0 is included which should enablemany 3D graphics cards to run. However, you mayfind a few problems (such as with the NVidia RivaTNT 2.) If this is the case you will probably need tolook for updates on the Internet.

Preparing for installation

If your computer is currently running Windows youwill probably have to start by making space on thehard disk for Linux. The program fips.exe was astandard part of many distributions provided toshrink DOS. Instead, Mandrake provides DiskDrake,its own alternative.

It’s always a good thing to back up importantfiles before using any utility like this, so do so beforeeven reaching for the Linux disc. In order to run Lin-ux properly you should make at least 500MB avail-able for the installation – but more would of coursebe better still.

It doesn’t matter whether you want to start theLinux installation from the CD or using a diskette, as

COVER CD MANDRAKE 7.1

110 LINUX MAGAZINE 10 · 2000

Installing Mandrake 7.1

LINUX MANDRAKE

7.1Mandrake 7.1 is the latest release of

what is becoming one of the most popular

Linux distributions. Reviewed elsewhere in

this issue, the GPL version is on

your cover CD so you have no excuse for not

trying it for yourself.

Reiser file system: The Reiser file system was developed by the file system spe-cialist Hans Reiser and enables rapid recovery after a system crash by means of

accurate logging of open files. The data is also packed more efficiently onto thehard disk so that small file fragments no longer waste as much space. Previously,it was possible to store everything except the boot directory in the Reiser file sys-

tem because previous boot managers could not read the kernel from a Reiser par-tition. Mandrake provides a boot manager that can handle this.

BIOS (Basic Input Output System): The BIOS enables the computer tocommunicate with its peripherals. After the BIOS has started, it loads the

operating system from the storage medium. Under normal circumstances, this isthe hard disk, but it is also possible to boot from floppy disk and, in the case of

most modern computers, from CD-ROM. From the BIOS setup screen you canspecify whether the diskette, the hard disk or CD-ROM drive is to be searched

first for a bootable system.

Packages on the CD (Technical Support see page 113)

If you are already using another distribution and are happy with it you maynot want to install Mandrake 7.1. In that case you may still find many use-ful packages on the CD. The packages that make up the Mandrake distribu-tion are in binary RPM format and should run with most other distributionsbased on recent versions of Red Hat and other derivatives.

long as the boot sequence of your computer is setup correctly. To check this and if necessary tochange it you must take a quick look at the BIOSsetup program.

To do this, immediately after starting the com-puter press the [Delete] or [F2] key; this should takeyou to the BIOS settings. Virtually every BIOS menulooks different so it is impossible at this stage todefine a general procedure. However, only ever altersomething if you know what it does! The potentialfor damage is high if you play with BIOS settingsyou don’t understand.

As an alternative you can start the installation ofLinux from another operating system. Later on wewill describe the method used to start installationfrom Windows and or DOS.

Installation direct from CD

If your computer is set up properly you just have toput the CD in the drive. On starting up you will seethe Mandrake welcome screen. You can obtain fur-ther information about the installation by pressingthe [F1] key or just carry straight on with installationby pressing the [Enter] key.

Starting with a boot diskette

If you computer is unable to boot from a CD-ROMyou must create a boot diskette under Windows.This is done as follows. Switch to the \dosutils direc-tory on the CD and start rawwritewin.exe. Put ablank disk into the drive. Click on the Image filebutton in the lower section of the Rawwrite dialogand navigate to the \images directory on the CD.There you will find five files with the extension .img.All image files can be written byte-by-byte to a datamedium such as a floppy disk using the commandWrite. The image we’re interested in is cdrom.imgwhich will let us install from the cover CD. If yourequire PCMCIA support for the installation (ifyou’re using a laptop), you should choosepcmcia.img instead. You should only select the filehd.img if you have copied the data from the CD-ROM to a local hard disk before starting. The filerescue.img is of no use during the installation.

Next click on the correct drive letter in the Flop-py Drive field (in most cases this is A:.) Then startthe procedure by clicking Write. Once the programhas finished, start the Linux installation by leavingboth the CD and the diskette in their respective dri-ves and restarting your computer.

Starting installation from Win-dows or DOSUnder Windows 95/98 look on the CD for the direc-tory called dosutils and then start the fileautorun.exe. If you are using DOS as your operatingsystem look for the file autoboot.bat on the CD inthe \dosutils\autoboot\ directory.

If you’re using DOS, the installation procedureshould start straight away. In the case of Windows astarting screen is displayed. Select Complete instal-lation if you’ve already provided a separate partitionfor Linux. Otherwise you can install Linux in two filesunder Windows by selecting the Linux for WindowsInstallation option. We will look at this option ingreater detail later.

Everything in one go

After the first welcome screen you will be asked tospecify the language. After this, you can choosebetween three installation classes: automatic, user-defined or expert mode.

The automatic installation automatically shrinksyour Windows partition (if one is present), creates newLinux partitions and installs a selection of the most use-ful packages. Until the program gets to network instal-lation and printer configuration your intervention isnot needed so you can go off and have a cup of tea.

Questions about the network and printer, whenyou come to them, are explained in detail so youshouldn’t have any trouble here. You will be

COVER CDMANDRAKE 7.1

10 · 2000 LINUX MAGAZINE 111

Fig. 1: Installationunder Windows 98

Fig. 2: Choosing the installation class

DiskDrake offers you the possi-bility of automatically creatingpartitions for Linux. However,if you have only a limitedamount of space for yourwhole Linux system thedefault setting is not ideal(you get a very small /root par-tition along with equally sized/usr and /home partitions.)

requested to enter a password for the root user andare then given the option of creating further users.You should create at least one ordinary user foryourself. After that you will have to set up thegraphics card, monitor and display resolution, afterwhich you have finished.

Linux and Windows co-existing

After rebooting, the Boot manager grubshould start and offer you a choice between Linux,Windows, a safe start with a minimum configura-tion of Linux, or starting from a diskette.

An alternative and more traditional boot man-ager is lilo.. This does the job just as well but doesnot offer you a graphical menu for the various bootoptions. Instead the boot: prompt appears and youmust type in the name of the operating system youwant to boot (i.e. “linux” or “windows”.)

After boot-up has been completed the operat-ing system switches into graphical mode and dis-plays a log-in dialog with a selection of penguinicons for the user. To log in, click on one of theseicons and enter the appropriate password.

Three star menu

The user-defined installation and expert modes giveyou more options for configuring your system duringsetup. Be careful about choosing these because youhave to know exactly what you are doing. The menu-driven installation procedure is an improvement overmany earlier Linux distributions. On the left-hand sideyou will see the individual options for installation(don’t be frightened by the quantity – they’re carriedout very quickly.) Beside each option is a star. Thisshows you the current status. A red star means thatthe option is still waiting to be completed. A yellowstar indicates the option is being carried out. Com-pleted options are given a green star. Should youwish to go back to any point in the installation, per-haps because you want to change something, all youhave to do is click on the relevant item in the list.

Development or server

At the start of the user-controlled installation youwill be asked what your computer’s purpose in lifewill be. At this point, you should clickDevelopment, even if you have never written a pro-gram in your life and have no intention of everdoing so. This will save you having to install pack-ages needed to compile programs that are distrib-uted in source code form later on. The Server optionmakes available a large number of services whichthe ordinary user will not need.

File system

Again, in the case of a user-defined installationMandrake asks you to specify the size of the Swappartition. Linux uses the Ext2 file system as stan-dard for the other partitions. As mentioned above,when choosing a file system you also have theoption of switching to the Reiser file system.

Mandrake includes the DiskDrake tool. You canuse it to delete, create and modify partitions. Theuser interface of the program is simple. Disk space isshown in the form of a bar, broken up into differentcoloured boxes representing the partitions.

If you click on the empty area, a button appearswith the name Create. If you click it you can thenselect not just the size but also the type of file sys-tem. One of the options you are offered should beReiserFS.

Spoilt for choice

After partitioning the hard disk you can install aninitial selection of packages. A menu offers you vari-ous choices such as KDE, Gnome or CommunicationFacilities. By clicking on them you can bring-up indi-vidual selections. You then select or deselect eachindividual package directly.

The setup program takes package dependenciesinto considerationbut this can result in somestrange decisions. For instance, when we selected

COVER CD MANDRAKE 7.1

112 LINUX MAGAZINE 10 · 2000

Root user: The root user is theuser you log in as to perform

system administration. Theroot user is all-powerful and

can read and write to any fileon the system. Because of this,

it is dangerous to run as rootunless you need to. When

using your Linux system nor-mally you should log in as an

ordinary user.

Boot manager: A boot man-ager is a small program whichloads the actual operating sys-

tem. It is usually located ineither the Master Boot Record

(MBR) on the hard disk – inother words the main boot sec-tor (which is called by the BIOSduring startup) – or in the boot

sector of the Linux partition.

Swap partition: The Swappartition is where the operat-

ing system stores data frommain memory that is not

urgently required – this hap-pens if the main memory is

almost full. It’s similar to theswap file in Windows but it is

more efficient by virtue ofusing a dedicated partition.

Fig. 3: Partitioning with DiskDrake Fig. 4: Initial package selection

and then unselected lynx, it also wanted to removethe HTML help pages, even though another brows-er had been selected. However, on the whole theindividual packages are well organised and the treestructure makes navigation easy.

You may find it confusing that when specifyingthe sizes of individual programs, kilobyte andmegabyte are mixed up in the lists. Sizes of11534Mb are, of course, unrealistic, and anyonewould realise this but not everyone would recognisethat a size of 53Mb for a package was wrong.

KDE and GNOME

As standard, Mandrake sets up the KDE desktop asthe graphical user interface. Right from the start thedesktop shows its best side: icons are created togive quick access to your floppy and CD-ROM dri-ves, and even Windows partitions if you have them.

Among the other icons on the desktop, Drak-Conf is worthy of note. It conceals a configurationtool which can be used to manage the X (display)settings, mouse, printer and network. It also pro-vides a graphical interface for installing further pro-gram packages (rpmdrake). The kpackage packagemanager is also present (if you chose to install it)and does much the same job, although rpmdrakealready knows what packages are on the MandrakeCD making it more convenient for browsing.

Another useful tool is DrakFont. You use it tocontrol the fonts on your computer. If you have aWindows partition on your hard disk then DrakFontoffers you the option of installing the WindowsTrueType fonts from it.

Setting up ISDN

Mandrake 7.1 conveniently takes care of setting upa modem for dial-up Internet access but it is a bitlacking in support for setting up ISDN. The distribu-tion includes the ISDN4Kernel utilities which permitmanual configuration, at least in principle – therequired kernel modules are present and capable offunctioning. The convenient front-end kISDN is notthere, however. In the isdn4net package you willfind a script /usr/local/bin/isdn which guides youthrough the ISDN configuration process in textmode, however, this process is laborious andrequires spot-on answers to many questions. If theconfiguration is successful, the same script enablesyou to set up and terminate an ISDN connection. Tomake life easier for the ISDN user we have includedthe latest free version of kISDN on the CD.

“Are you ready to boot Linux?”

Linux Mandrake 7.1 offers you the option of run-ning Linux without actually creating Linux parti-tions. During installation you’ll see a Linux for Win-dows installation option. The program creates twofiles in your Windows partition, to which the Linux

installation will be written. One of these files isused for the root file system and the other for theSwap partition.

The actual installation takes place just like aninstallation in a separate partition, just more slowly.There is no difference as far as the functionality ofthe resulting Linux system is concerned. Should theWindows partition prove too small to accommodatethe Linux installation DiskDrake is called automati-cally to create more disk space.

After the installation you will find two extradirectories on your hard disk: one is called lnx4winand the other Mandrake. Saved in the first one isthe installation information for both of the files thatcontain the Linux installation. You will also find in ita script called Uninstall which deletes the Linux forWindows installation without any problems. Butwho would want to? ■

COVER CDMANDRAKE 7.1

10 · 2000 LINUX MAGAZINE 113

Technical Support

Neither the publishers nor the editorial staff of Linux Magazine can providetechnical support for any of the software on the cover CD, nor do theyaccept responsibility for any loss or damage to your computer or data filesthat might occur as a result of using it. Your entitlement to support is exact-ly the same as if you downloaded the software from the developer’s website. Most of the software on this CD is released under the GNU General Pub-lic License which sets out in full your rights and warranty entitlement.

There are, however, many resources available on the Internet which youcan use to get help with any problems. For more information read the arti-cle “How to get help with Linux” in this issue. Other help resources specificto Linux Mandrake which are not mentioned in the article include the Man-drakeSoft Support Forum on MandrakeSoft’s homepage, the mailing lists(http://www.linux-mandrake.com/de/flists.php3) and the FAQs(http://www.linux-mandrake.com/de/ffaq.php3).

Fig. 5: Mandrake’s standard KDE desktop

Dedicating a PC to providing Internet access for acouple of computers may seem an expensive solu-tion. But the computer you can use for this doesn’thave to be very powerful. Any old 386 that’s sittinggathering dust in a corner will do.

FREESCO will let you turn a redundant PC intosomething genuinely useful. About the only thingyou’ll have to buy – if you don’t have a spare onehandy – is a cheap network card.

Windows users might be interested to know thatyou can use this Linux-based gateway to let Windowscomputers access the Internet. FREESCO is a lot moreversatile and robust than Windows’ “modem shar-ing.” Nor does it require you to reconfigure yourInternet software to use proxy addresses or a SOCKSinterface like many Windows-based solutions.FREESCO will keep your computers safe from attackscoming from the Internet since it functions as a fire-wall too. The router is configured using a text-based

menu interface and managed using either a terminalor a web-based interface so you don’t actually needany knowledge of Linux or Unix to use it.

As well as a gateway FREESCO provides a timeserver for computers on your network to set theirclocks with, plus a print server, a DNS server, a DHCPserver, a remote access server (allowing remoteusers to dial in to your network) and a web server.However, the web server is really an extra use of theserver that is there to provide FREESCO’s web inter-face. There’s no FTP server for uploading files so ifyou want to use FREESCO as a web server you mustmanually transfer your web pages to the appropri-ate directory while the router is down.

FREESCO supports up to three network cardsand two modems. Its main limitation is that it onlyacts as a static router. You can set it up to use achoice of ISPs but it won’t automatically try alterna-tives if it has trouble getting a connection. If you

PROJECT SETTING UP FREESCO

114 LINUX MAGAZINE 10 · 2000

Turn an old computer into an Internet gateway using Linux

GATEWAYTO THE

INTERNETLots of people, even home users, now have more than

one computer. And most people who have more than

one computer would like to be able to connect to the

Internet from any of them. There are many ways to

achieve this, but a good method – if you can afford it –

is to use a dedicated gateway/firewall. In fact, this

solution isn’t as expensive as it sounds.

If you have an old, redundant computer you can set this

up easily and cheaply using a Linux-based free software

package called FREESCO. Julian Moss investigates

want to try FREESCO the first thing you should do ischeck that you have all the necessary hardware. Themain item you will need is an old computer that isn’tbeing used for anything else. It should be a 386 orbetter with at least 6MB of RAM. It doesn’t require ahard disk as FREESCO can boot and run from a flop-py. Nor will it need a keyboard or monitor: once setup FREESCO can run without either. If you reallycan’t spare a keyboard, though, make sure you candisable the keyboard test in the BIOS boot-up checksor you may find that the boot process halts with a“keyboard not found” error.

You’ll need a network card to connect yourrouter PC to your other computers. FREESCO sup-ports several inexpensive, popular cards includingthe NE1000, NE2000, 3C509 and 3C59x series. Ifyou’re buying a network card specially for this pro-ject make sure that its IRQs and I/O addresses can bemanually configured. FREESCO doesn’t supportPlug and Play. “Jumperless” cards are OK, althoughyou’ll have to set them up first using the DOS orWindows based setup software. Use the default set-tings if possible, to make it easy for FREESCO todetect the card.

Finally, you’ll need a modem. If you plan to usean internal modem, make sure it isn’t a Winmodem.This type of modem is often supplied with a newPC, but it needs special Windows drivers in order towork. It won’t, therefore, run under Linux.

Buffered ports

If the modem is an ISA bus card and not PCI, it’salmost certainly OK. If it’s an external modem youshouldn’t have a problem, but if the computer isvery old make sure the serial port has a bufferedUART compatible with the INS 16550A. Most 386sand many 486s have un-buffered ports that dropcharacters when run at the speeds needed to use aV90 modem or ISDN TA. Note that FREESCO onlysupports external TAs that are connected via theserial port and can be controlled in the same man-ner as modems using the AT command set.

If your old computer lacks a buffered serial portyou may be forced to buy an internal modem espe-cially for FREESCO. A few years ago replacementserial cards were easy and cheap to obtain; now,even ISA internal modems are getting a bit hard tofind. An inexpensive choice would be the Dynanet56K Internal ISA from Simply Computers. It worksvery well with FREESCO.

Having got all the bits together, your next stepwill be to download the FREESCO software. You canget this from the FREESCO home page athttp://www. freesco.org. If you can’t get to this sitetry www. freesco.net or www.freesco.com instead:these URLs point to a mirror page. You shoulddownload two files: the software – currently version0.26 – and the documentation, which at the time ofwriting was only up to version 2.0. Both are Zip for-mat archives. Unzip them to a convenient tempo-

rary location. The documentation is a set of HTMLfiles so you’ll want to put it somewhere where youcan view it in a browser while you’re setting up thesoftware. An annoying feature of the documenta-tion is that it contains a banner ad on each page:this may make your computer try to connect to theInternet whenever you open it.

Boot floppy

Now you need to create the FREESCO boot floppy.The software archive that you downloaded containsa disk image which you simply transfer to a sparefloppy disk. Open a console window, change to thedirectory containing the archive contents and exe-cute the command:

dd if=freesco.026 of=/dev/fd0

If you’re using Windows or DOS you canachieve the same result using the command:

rawrite.exe freesco.026

For convenience, the DOS rawrite program isincluded in the package.

Now the fun starts. Install the network card andmodem in your router computer, connect it to yournetwork and attach a monitor and keyboard. Bootthe computer from the floppy disk you just pre-pared, and when the command prompt comes uplog in as root, password root. (You’ll probably wantto change this later on: the process as described inthe documentation.)

If the computer’s hard disk was previously for-matted for DOS you now have the choice ofinstalling FREESCO to the hard disk. There are sever-al benefits of doing this. Hard disks are less error-prone than floppies so you’ll avoid read errors.FREESCO will load quicker. A hard disk installationwill also give you needed extra space if you want touse the built-in web server. To install FREESCO tothe hard disk type the command:

move2hdd

PROJECTSETTING UP FREESCO

10 · 2000 LINUX MAGAZINE 115

INFO

The FREESCO home page:http://www.freesco.org/ dialdinformation:http://diald.unix.ch/

Fig. 1: Choosing yoursetup option

Then remove the floppy disk and reboot. Tostart FREESCO from DOS you must use therouter.bat file provided. This can easily be made torun at start-up so the computer boots up FREESCOautomatically when it is turned on.

Setting up

Now you must perform the initial configuration.You should be logged in as root and looking at acommand prompt. Type the command: setup

The router setup program is easy to use. Youjust answer a series of questions. Many options areselected by typing a number, and most can be leftto the default settings. However, you can’t go backand change an option if you made a typing error so

it will pay to check each entry carefully before press-ing Enter. Nothing is written to disk until the end, soif you make a mistake you can simply reboot andstart again.

Setup gives you a choice of three types of routerconfiguration. The first, which is the one we willdescribe here, is the LAN-to-Internet dial-on-demandgateway. You select this by typing “d” at the menu(Fig. 1). A very similar option to set up is the LAN-to-Internet gateway using a leased line. The third optiondoesn’t provide a gateway function at all: it simplyacts as a bridge connecting two or three small Ether-nets, reducing network traffic by restricting local datapackets to their own segment of the network.

To complete the setup you’ll need to know theI/O address and IRQ number of your network cardand all the details – phone number, login name andpassword, authentication method and domainname server (DNS) address – for connecting to yourISP. You’ll also need to know the IP address rangeand network mask for the PCs in your network. Ifyou already have a working network and can con-nect to your ISP from one PC you should alreadyhave all this information.

While working through the setup steps look atsection 4 of the documentation. It gives a list ofmost of the steps but not all of them as it hasn’tbeen updated since version 0.20. However, you’llfind that helpful notes are displayed by the setupprogram itself before each choice (fig. 2).Thedefault value for most of the choices will prove tobe sensible for most users.

Enabling

If the computers on your network have each beenallocated their own IP address already (the typicalhome or small business network case) you cananswer No to the option for enabling the DHCPservice. You’ll also probably answer No to theWINS address question. You won’t want to enablethe public HTTP server (web server) unless youneed a local web server on your network for somereason. If you do, bear in mind the difficultyinvolved in updating the web pages, as previouslymentioned.

If you pay by the minute for Internet calls youshould choose the value for “Keep up ppp link”with care. (Note: it’s in seconds.) If it’s too high,you’ll waste money keeping the link up while it’sidle: if it’s too low and you use a modem you’llwaste time redialling whenever the link drops. Youcan use FREESCO’s web interface to bring the linkup and down manually, but you may find thismethod a bit cumbersome.

If you choose the value 0 for this setting the linkwill be controlled by the rules in the file /etc/filter.cfg.It’s worth trying the supplied rules to see if they workwell for you. You can customise these rules to suityour requirements, but the way the rules areexpressed makes this far from easy. The filter rules

PROJECT SETTING UP FREESCO

116 LINUX MAGAZINE 10 · 2000

Fig. 3: FREESCO’s web interface

Fig. 2: Explanatory help text isdisplayed by the program

PROJECTSETTING UP FREESCO

10 · 2000 LINUX MAGAZINE 117

Fig. 6: Configuring DNSon a Windows PC

Fig. 7: Setting the defaultgateway under Windows

[left]Fig. 4: Setting up the DNSusing linuxconf

[right]Fig. 5: Setting the defaultgateway using linuxconf

use the same format as the file diald.conf so formore information on how to customise them see thediald documentation which you can find online.

If you plan to use more than one ISP bear in mindthat the default ISP – the one that FREESCO will beginusing immediately after boot-up – will be the first onein the alphanumerically-sorted list. ISP names are limit-ed to 8 characters in length. Therefore you may find ituseful to use names like 1-FSNET, 2-CIX to ensure thatthey are listed and used in the order you want.

Remember to start the ISP phone number with aT (for tone dialling) and don’t put spaces in thenumber. You can enter more than one number foran ISP, with spaces between each one, so a spacewithin a number will cause it to be treated as twoseparate numbers.

Once you have completed the initial configura-tion you can reboot the router and it will be readyfor use. With the network interface active andassigned the correct IP address you can now Telnetto the router (assuming that you enabled the Telnetinterface during setup.) Once connected you can login, edit the configuration, add new ISPs and so on.

For day-to-day use you can use the web inter-face to check the router’s status, change its settings,switch ISPs and even reboot the router (Fig. 3). Thismeans that you can, if you want, remove the key-board and monitor from the router PC and move itout of the way somewhere.

Workstation configuration

Before you can start accessing the Internet throughyour router you must set up the PCs on your net-work so that they know that your FREESCO PC isthe default gateway to the Internet. Your PCs – andany software running on them that performsdomain name look-ups – should also be configuredto use the router PC as their primary DNS.

With most Linux distributions you can do thisusing a system configuration utility such as linux-conf. Choose the Networking option, then choose“Name server specification (DNS)” and enter theFREESCO PC’s IP address (fig. 4). Save this, return tothe menu and select “Routing and gateways.”Again, enter the router’s IP address here (fig. 5) andensure that routing is enabled.

Another method would be to update each PC’skernel routing table using the route command. Ifyour router has the IP address 192.168.0.1 then thecommand would be:

route add default gw 192.168.0.1

You’ll probably want this command to be exe-cuted every time the PC starts up. One way to dothis is to append this command to the file/etc/rc.d/rc.local .

To tell a Windows PC to start using yourFREESCO router to access the Internet you shouldopen the Control Panel and double-click Network.Go to the Configuration tab and select from the listthe item “TCP/IP -> network card”. Then click onProperties. Go to the DNS Configuration tab, enableDNS and ensure that the router’s IP address is theonly one listed (Fig. 6). If you’re enabling DNS forthe first time you must also enter a domain. Thengo to the Gateway tab and add the same IP addressas the first and only gateway (Fig. 7). You’ll probablyalso need to open the Internet control panel andchange the setting from “Dial using this connec-tion” to “Use Network.”

Once the workstations are set up all a user needsto do to connect to the Internet is launch their webbrowser, mail client or whatever. If the router isn’tconnected at the time there will be a short delay whileit dials your ISP and establishes a connection. The con-nection will remain up until no data has passed overthe link for the period you set in “Keep up PPP link” oraccording to the rules in the filter.cfg file. If you haveISDN then connections are almost instantaneous andit feels almost as if you have a leased line.

Conclusion

By using the FREESCO router you can provide Inter-net access to all the PCs on your network using a sin-gle ISP connection, dialling on demand. There is noneed to reconfigure any of your Internet software touse special proxy addresses or a SOCKS interface.

FREESCO also protects your network behind afirewall to prevent unauthorised access from theInternet. It is a very good, very simple and very inex-pensive way to access the Internet that can be usedby any small home or business network. ■

Eventually, the time comes when you can startdevelopment on the game you’ve been dreamingup. But what happens? You end up doing a lot ofwork trying to get graphics, sound, and networkingrunning when you would very much prefer to workon the game itself.

Programming a graphics engine is a difficulttask, which is why it often takes a whole team ofprogrammers to create a good game. If you have todo it all on your own you will need a lot of time.

So why not use a package for this? In this shortarticle we examine the use of Crystal Space as apossible solution for this problem. Crystal Space is aset of libraries and modules that are mainly usefulfor programming 3D games. If you’re about to cre-ate a 2D-only game then Crystal Space is not foryou. (If that is the case you should perhaps look atother good libraries like SDL or ClanLib).

Crystal Space is Open Source. This means youcan download it for free and use it in your own pro-

grams. Because Crystal Space uses the LGPL (GNULibrary General Public License) you can even use itfor making commercial games. You can downloadCrystal Space from http://crystal.linuxgames.com.

Crystal Space is also portable. It currently runson Linux (all flavours), Windows (Win95, Win98,WinNT, Win2000), Macintosh, OS/2, BeOS, DOS,FreeBSD, SGI, Solaris, NextStep, OpenStep,MacOS/X, … To do 3D rendering it can useOpenGL, Glide, Direct3D, or software rendering.This portability gives game developers a lot ofchoice in their potential game platform targets.

One bit of warning. Crystal Space is still in devel-opment. Various parts of Crystal Space work reason-ably well already (for example, the 3D GraphicsEngine) but some other parts need to be improved alot before being usable (such as the 3D SoundEngine).

What does Crystal Space offer you? The threemain parts of Crystal Space are a 3D Graphics

“Blocks” is a 3D tetrisclone and is one ofmany games based

on Crystal Space.

PROGRAMMING 3D GAMES PROGRAMMING

118 LINUX MAGAZINE 10 · 2000

People sometimes have

very good ideas for a

game. So what do you do

if you have such an idea?

Well, first you design

your game. You docu-

ment what you want to

happen in your game.

You describe the mecha-

nisms, the target, the

goals, … Depending on

the type of game this

can be a big task in

itself. Jorrit Tyberghien

seeks help.

Open Source 3D Package for Game Creation

CRYSTALSPACE

Engine, a 3D Sound Engine and networking support.These three major components are briefly explainedin the following sections. Note that all these compo-nents are optional. You don’t have to use 3D soundif you don’t want to. You could choose to producesound using another package for example.

The 3D Graphics Engine

The 3D Graphics Engine is by far the most importantpart of Crystal Space and is actually the main reasonthat Crystal Space exists at all. This piece of softwareis responsible for managing a “world” in 3D and dis-playing it on screen. It contains features such as:• visibility checking (so that the hardware doesn’t

have to work too hard);• particle systems (to simulate things like rain, snow,

and fountains);• collision detection;• physics simulationand so on. Basically, it relieves the game program-mer from the hard job of having to worry about the3D management and rendering part of the project.

The 3D Sound Engine

The sound engine is currently in heavy develop-ment. When it is finished it will be possible to

have real 3D sound (and normal sound as well)that is integrated with the 3D engine. For exam-ple, if there is a wall between the sound sourceand the camera the sound will become fainter.The sound will also appear to come from the rightdirection as well.

Add-ons

Crystal Space contains a lot more than the threemain parts we have mentioned. For example, thereis also the Crystal Clear package which sits on topof the rest of Crystal Space and is responsible forcontrolling and interacting with game entities. Alsoplanned is a facility to add scripting using variouslanguages. Currently we are working on support forPython scripting but other options will be availablein due course.

Summary

So here it is. If you want to write a 3D game youshould at least consider Crystal Space as an option.It could potentially save you a lot of work. If youhave any questions about using Crystal Space justmail me at the address below. ■

The AuthorJorrit Tyberghein is one of the two Maintainers ofCrystal Space. You can reach him [email protected].

PROGRAMMING3D GAMES PROGRAMMING

10 · 2000 LINUX MAGAZINE 119

INFO

Crystal Space Homepage:http://crystal.linuxgames.com/Online-Manual:http://crystal.sourceforge.net/docs/online/manual/Game projects using CrastalSpace:http://crystal.linuxgames.com/projects.html

■NetworkingNot all games need networking support. However, if you are writing a role playinggame or a Multi-User Dungeon (MUD)you can use Crystal Space for this. CrystalSpace contains some basic low-level net-working support as well as support forclient-server networking operations.

Welcome to Georg’s Brave GNUWorld. I hope to have found an

interesting mix of topics this month.Starting in the heart of technology

with two very interesting programminglanguages.

Sather

GNU Sather [5] is an object oriented programminglanguage that was originally branched off from Eiffel,but it has been changed in so many ways since that itmust be regarded as an independent language.

The beginning of GNU Sather was as a scientificproject at the ICSI, Berkeley, where it was distrib-uted under a license that did not quite qualify as aFree Software license. But after development wasstopped for financial reasons in 1998 a bunch ofpeople were able to convince the officials at the ICSIto release the last version under the GPL/LGPL. Thismade it possible for GNU Sather to become an offi-

cial GNU Project. Among the remarkable thingsabout GNU Sather is its revolutionary interface con-cept where class interfaces are completely separat-ed from their implementations; this makes multipleinheritance very easy. It is also possible to changethe underlying code completely without touchingthe interface, should it become necessary.

The current maintainer of GNU Sather, NorbertNemec, highlights the iterator concept, whichallows all kind of loop concepts that other lan-guages use to be implemented with a single break-statement. His view is also that GNU Sather is notjust “another design study” - it is a language thathas been designed for speed and comfort for thedeveloper right from the start.

The current status of GNU Sather should proba-bly be best described as “almost ready for day-to-day use.” The interface to C and Fortran is easy andwell-documented, so practically everything shouldbe possible. The biggest weakness right now is thecompiler which doesn’t use the possible optimisa-tions and has to be called “buggy.” Obviously writ-ing a new compiler is on top of the task list - butthis will take some more time. The library also needssome more work, which is currently being done bythe University of Waikato.

Despite these rough edges, developers interest-ed in object oriented programming should checkout GNU Sather. If nothing else it’ll be an interesting

COMMUNITY BRAVE GNU WORLD

124 LINUX MAGAZINE 10 · 2000

The monthly GNU-column

BRAVEGNU

WORLDGeorg C. F. Grave reports on the current

developments and progress within the

GNU-Project and tries to explain its

philosephy. In this issue, you can read

about GNU Sather, Ruby, a386, Guppi.

experience. Especially the integrated support forparallel computing (multi-threading up to TCP/IPclusters) and the library that was based on interna-tionalisation since it’s inception should make this anexcellent tool once the latest problems have beensolved.

Ruby

Ruby [6] by Yukihiro Matsumoto is another object-oriented programming language; it started in 1993when the author wasn’t able to find an object ori-ented scripting language and made the decision towrite one himself.

The name Ruby was chosen because the authorwas looking for another “jewel name” to symbolizethe closeness to Perl. His declared goal is to makeRuby the successor to and replace Perl. To achievethis he took the strengths of languages like Perl,Python, Lisp and Smalltalk and tried to incorporatethese into Ruby.

Just like Perl, Ruby is very good at text process-ing and additionally gains from it’s very broad objectorientation. All data in Ruby is an object - there areno exceptions. The number “1,” for instance, is aninstance of the “Fixnum” class. It is possible to addmethods to a class at runtime - even to an instanceif need be. These possibilities make Ruby very flexi-ble and extensiive. Additionally, it supports iterators,exceptions, operator overloading, garbage collec-tion and much more that one likes to see in a lan-guage. In order to be able to replace Perl, it is alsovery portable and runs under GNU/Linux (and otherUnices) as well as DOS, MS Windows and Mac.

Ruby has CGI-classes that allow easy CGI pro-gramming, and modules for the Apache also exist:eRuby (embedded Ruby) and mod_ruby. It containsa well thought-out network socket class, andthanks to Ruby/Tk and Ruby/Gtk it is possible toimplement GUIs easily. There are also special fea-tures for the treatment of XML and an interface tothe expat XML parser library.

Finally Ruby supports multithreading indepen-dently of the operating system - even under MS-DOS.Despite this complexity the syntax has been kept assimple as possible (inspired by Eiffel and Ada).

Ruby can be distributed under the GNU GeneralPublic License or a special license that gives usersstronger “proprietarisation rights,” but it mightqualify as a Free Software license - although thisremains to be thoroughly checked.

Although its features have probably mostlytechnical value, I do think that even non-program-mers could be interested in developments in thisarea.

a386

a386 [7] is a library by Lars Brinkhoff that has a vir-tual Intel 386 CPU running in protected mode as a“Virtual Machine” (VM). This should be of most use

to kernel hackers and scientists, but might alsoprove interesting for people just wanting to checkout another operating system within their existingsystem.

Compared to similar projects like the BrownSimulator or plex86, a386 has the advantage ofrunning privileged operations faster because theyare implemented as function calls or inlined code.Additionally it aims for portability - working otherCPU architectures as well as other operating sys-tems.

Currently the task at hand is to enhance the Lin-ux port, but in the medium term he seeks to createa NetBSD &amp; HURD port as well as making a386run on these operating systems. The long term goalis to take the experience gained with a386 to createa new machine model which will be an abstractionof the wide-spread workstation/server CPUs and toimplement this as a C library and a “Nano-Kernel”running directly on the hardware.

Of course everything is distributed under theGNU General Public License and if you’re interestedin these things, a look on the project’s homepagemight be a good idea [7].

But now I’d like to talk about things of moredirect importance to the end-user.

Guppi

Strictly speaking, Guppi [8] is three things in one.First of all it is an application for data analysis andthe creation of graphs and charts. Then it is aBonobo component which allows embedding thisfunctionality in other applications, and finally it’s aset of libraries that allows any GNOME applicationto use it.

The application itself is definitely important foreveryone relying on visualisation and analysis ofempirical data - especially scientific users. In factGuppi is the only program of its kind based on fullGNOME integration from the start, and so it seemsthat it is slowly becoming the GNOME standard forvisualisation. Thus, it is not surprising that theGNOME spreadsheet Gnumeric and the financemanager GnuCash rely on Guppi.

COMMUNITYBRAVE GNU WORLD

10 · 2000 LINUX MAGAZINE 125

Info

[1] Send ideas, comments and questions to [email protected][2] Homepage of the GNU Project http://www.gnu.org/[3] Homepage of Georg’s Brave GNU World http://www.gnu.org/brave-gnu-

world/[4] “We run GNU” initiative http://www.gnu.org/brave-gnu-

world/rungnu/rungnu.en.html[5] GNU Sather home page http://www.gnu.org/software/sather[6] Ruby home page http://www.ruby-lang.org/[7] a386 home page http://a386.nocrew.org/[8] Guppi home page http://www.gnome.org/guppi[9] Jon Trowbridge [email protected]

According to Jon Trowbridge, current maintain-er of Guppi, the big advantages can be summed upin four points. First of all Guppi is scriptable, theinternal API is available via Guile and Python - so it ispossible to solve rather complex problems withouthaving to program in C. Second Guppi has a veryflexible data import filter with good guessing capa-bilities as to how a file should be read without inter-vention by the user. Third a lot of the functionality isbroken down into plugins which makes it easy toextend, and finally Guppi has a WYSIWYG interfacethat should not give anyone trouble.

But the end-user should still be a little careful -right now Guppi is still in very active developmentand the user interface especially is not yet complete.There are also some functions lacking and the docu-mentation is somewhere between sparse and non-existent, so only expert users should consider it fordaily use.

Other members of the Guppi team are JodyGoldberg and Michael Meeks who work on theGNOME integration, Andrew Chatham, who takescare of the Python-binding, and I should also men-tion Havoc Pennington who doesn’t work actively onGuppi anymore but did a majority of the work in theearly phase. Anyone interested in development isvery heartily invited to get in touch with Jon [9] - healso informed me that his current location is close tothe University of Chicago (USA) and that he’d beinterested in meeting more GNOMEs in this area.

...the end

Okay. That should be enough for this month… asusual I’m encouraging you to send your ideas, comments, questions and topic suggestions viaemail [1]. ■Gupy in action …

COMMUNITY BRAVE GNU WORLD

126 LINUX MAGAZINE 10 · 2000

PROGRAMMING GNOME DRUIDS

120 LINUX MAGAZINE 10 · 2000

Figure 1: The setup Druid of

the mail client Balsa.

GNOMEs are normally thought of as mystical beings. Related

to the leprechaun, they’re small hunchbacked creatures who

live underground and guard their hoards of precious stones!

In the world of Linux there are also small hunchbacked people

around (many of them are programmers!) But GNOME itself

refers to something entirely different: Thorsten Fischer meets

a GUI for X-Windows.

Programming Wizards for GNOME

DRUIDS,WIZARDS

AND GURUS

Just as Captain Picard might shout for Number One,his assistant in Star Trek: The Next Generation, sothe computer user also expects to have assistantsusually called wizards. Under Windows, they’reintended to speed up and simplify tasks such asaltering settings and configurations.

On the first page of the Wizards used underWindows to install programs, there’s also the big,bad licence agreement which takes from users allthe freedom that they ought to be able to enjoywith the software!

Under GNOME, Wizards are called Druids. Onewell known program that uses Druids is Balsa,whose setup dialog box has probably already beenseen by everybody involved in Linux – if not, thensee Fig. 1. The precursor to Druid was GNOMEGu-ru. The development of Guru has, however, beensuspended in favour of the Druid, owing to thegreater flexibility it allows.

On the following pages we to show how withthe aid of the Druid, assistants can be created forsimple tasks without having to write a full-blown

program. In order to be brief, we will dispense withan autoconf-compatible source text tree, and alsotackle the problem not in C but in the wonderfulscript language Python. This means we can also dis-cuss the GNOME API of Python at the same time.The installation of the necessary package GNOME-Python is covered in a separate box.

Installation of GNOME-Python

The current version of GNOME-Python is 1.0.53 –the version jump to GNOME 1.2 has not yet beenmade, apparently. The sources can be obtainedfrom a GNOME mirror, for example fromftp://sunsite.icm.edu.pl/pub/Linux/GNOME/. Asyou might expect, the installation runs like thisafter unpacking:

frog@verlaine:~/gnome-python-1.0.53 # ./confUigure –prefix=/opt/gnomefrog@verlaine:~/gnome-python-1.0.53 # makefrog@verlaine:~/gnome-python-1.0.53 # make iUnstall

Of course, Python itself must already beinstalled. However, in a well-configured Linux sys-tem this should already be the case – Python is con-tained in nearly every distribution. The same appliesto an already compiled gnome-python.

A letter druid

An friend of mine once said that when writing let-ters using LaTeX the same letter could be used overand over again. He simply created and copied filesas required and then inserted different addresses orother things with a text editor.

This is a prime target for automation. A smallprogram with a graphical interface which helps indrawing up letters would save time. It would haveto have all the components needed to do the job,however, and bring them together quickly. This isthe kind of task GNOME and Python were built for.

The Code

In Listing 1 the code for the executable file gp-lettercan be seen. The access rights for this – and onlythis – must be set to execute. That is done, forexample, by:

chmod 744 ./gp-letter

In the first line the code is transferred to thePython interpreter. In the third, the module gui isimported, and this will allow us to create our graphi-cal interface. The entry point into the program is line9 where the function Main is called which creates anew instance of the class and starts its gtk main loop.

So far, so good. This is the nice thing aboutobject-based programming: if an empty definitionof the class GUI already exists then the program iscapable of running. Not that it would actually do

anything useful! Next we have to think about a con-structor for the GUI class of the program. This canbe seen in Listing 2.

The desired classes are imported at the begin-ning. There are two ways of importing a module inPython. One is to import the module with its com-plete name space, as happens here with GdkImlib.Thus, the whole content of the module is accessiblebut with the restriction that every call of a functionor class method from the module must be prefixedby GdkImlib. In Listing 2 this is seen in lines 15 and16, in which the two graphs for the logo and thewatermark are loaded.

The other possibility is to import using the fromcall, which only imports the names of the classesand functions. Here, trouble can occur if a moduledefines a name that already exists. However, thewidget names from the modules gnome.ui and gtkare used very frequently.

PROGRAMMINGGNOME DRUIDS

10 · 2000 LINUX MAGAZINE 121

Listing 2: Constructor of the GUI class001: from gtk import *002: from gnome.ui import *003: import GdkImlib004:005: class GUI:006:007: def __init__ (self):008: self.lettertype = "dinletter"009: self.filename = "./letter.tex"010:011: self.app = GNOMEApp ("gp-letter", "gp-letter")012: self.app.connect ("destroy", self.quit)013: self.app.connect ("delete_event", self.quit)014:015: self.logo = GdkImlib.Image ("logo.jpg")016: self.wmark = GdkImlib.Image ("wmark.jpg")017:018: self.druid = GNOMEDruid ()019: self.druid.connect ("cancel", self.quit)020:021: self.dp_start = self.start_page ()022: self.dp_letter type = self.letter type_page ()023: self.dp_sender = self.sender_page ()024: self.dp_content = self.content_page ()025: self.dp_finish = self.end_page ()026:027: self.druid.add (self.dp_start)028: self.druid.add (self.dp_letter type)029: self.druid.add (self.dp_sender)030: self.druid.add (self.dp_content)031: self.druid.add (self.dp_finish)032:033: self.app.set_contents (self.druid)034:035: self.app.show_all ()

Listing 1: gp-letter001: #!/usr/bin/env python002:003: import gui004:005: def main ():006: gp = gui.GUI ()007: gp.mainloop ()008:009: if __name__ == ‘__main__’:010: main ()

LinuxMagazine/gnomedruid

Mind the Tab!

The indentation of code blocks in Python must becarefully noted – the structure of the program isdefined by them. There are no curly brackets orother symbols to mark the start and end ofblocks. Instead, a block is usually marked by acolon on the previous line, say in the case of forloops, or in Listing 2 line 5 in the class definition,or in line 7 at the beginning of the constructorfunction.

The lines 11 to 13 show the typical handling ofgtk widgets in Python. Gtk is indeed written in C;but owing to its object-oriented approach wrappersfor object orientated (OO) languages can be createdquite simply and above all, as we see, easily used.

The design of the Druid begins at line 18. Herewe define that clicking on the cancel button is to befollowed by the program aborting. For each individ-ual page of the Druid your own text can be entered,which will then form the basis for the Druid.

As a Druid alone is not allowed, it must be con-tained in a gtk window which in this case is provided

by a GNOMEApp. This happens in line 33. The lattermust then also be displayed, which occurs in line 35.

The pages

So far, gp-letter has five pages in its basic form. What-ever the case, an initial page for the greeting and afinish page with the close button should be present inevery GNOME Druid program. Both page types areimplemented using their own widgets GNOMEDruid-PageStart and GNOMEDruidPageFinish. The pages inbetween are of the type GNOMEDruidPageStandard.All three types are derived from the superclassGNOMEDruidPage, but only the last one of these pos-sesses a box of the type GtkVBox which can be usedas a container for user-defined contents.

To avoid tedium we won’t go through thedetailed design of each individual page widget. Themethod for creating the start and finish pages areclearly demonstrated in Listing 3 along with themethod for terminating the program and startingthe gtk main loop. The loop is called up in Listing 1by gp-letter. The method quit shows the basic struc-

PROGRAMMING GNOME DRUIDS

122 LINUX MAGAZINE 10 · 2000

Listing 3: Start and finish page; Program termination; main loop001: def quit (self, event = None, data = None):002: mainquit ()003:004: def mainloop (self):005: mainloop ()006:007: def start_page (self):008: page = GNOMEDruidPageStart ("gp letter", "WelUcome to gp letter.\n\nThis will help you to simply aUnd quickly create the source text \nfor a LaTeX lettUer.\n\n Simply answer the questions asked by the DruUid.", self.logo, self.wmark)009: return page010:011: def end_page (self):012: page = GNOMEDruidPageFinish ("finish gp letteUr", Thank you for using gp letter.\n Click the ‘FinisUh’ button to create your LaTeX file.", self.logo, seUlf.wmark)013: page.connect ("finish", self.create_letter)014: return page

Listing 4: A simple GNOMEDruidPageStandard001: def content_page (self):002: page = GNOMEDruidPageStandard ("The content of the letter ", self.logo)003:004: box = page.vbox005: box.set_border_width (5)006: label = GtkLabel ("Please enter into this text box the content of Uyour letter.")007:008: frame = GtkFrame ("letter text")009: framebox = GtkHBox ()010:011: self.contentfeld = GtkText ()012: self.contentfeld.set_editable (TRUE)013:014: frame.add (framebox)015: framebox.pack_start (self.contentfeld)016: box.pack_start (label, FALSE, FALSE, 5)017: box.pack_start (frame, TRUE, TRUE, 5)018:019: page.connect ("next", self.get_content)020: return page

ture for a gtk callback function in Python. Note theimportance of the two additional parameterswhich, as in C, describe the event structure bywhich the callback was called, as well as any trans-ferred data.

A start and a finish page are built up accordingto the same pattern and require a description aswell as a logo – to be seen at the top right on apage – and a “watermark” which is placed on theleft edge of the page. For this example we have tak-en the symbols from Balsa as they are quite suitable.On the finish page the finish button is linked to thefunction which undertakes the creation of the lettercontent.

The fourth page is the one in which the userinputs the text of the letter and should be blank.This page is simply constructed. Box is used as a ref-erence for the GtkVBox of the page. The structure –the creation of the widgets and packing them incontainers – is similar to the structure of a widgetcollection in C, except that the widgets are to beaccessed again later. They are – like the text box inline 11 – labelled with the prefix Self. Because ofthis they become properties of the class in whichthey are used and can be re-used later.

The final function, with which line 19 is linked,fetches the content of the text field and copies it intoa variable which is also a property of the class so thatduring letter creation it can be accessed later.

The start

Now all you need to do is run the program. Thatoccurs quite simply with:

./gp-letter &

The Druid should now run and appear as in Figure 2.Happy writing!

Non-linear Druids

Druids can be created in the manner described inwhich the pages follow each other in sequence. Butsometimes the structure may need to branch. In a

program like gp-letter, for example, it would be niceif, after the dialog which offers the choice of letterclass, pages are presented which offer alternativedesigns although they are still in the same class.

The new pages will still be inserted in the Druidusing the add method (in Listing 2 in the lines 27 to31). To make this possible GNOMEDruid defines thefollowing signals:• next• back• cancel• finish

The first two of these signals can be used for non-linear control flow in conjunction with the set_pagemethod of GNOMEDruid. The signal is received and inthe respective callback function we simply insert thecurrent page. In this way we can skip to and fro in thelinear list of pages in the Druid and the user receivesthe impression of a flexible program.

This procedure would produce a program withconsiderably more scope. But whatever the case,the program has several weaknesses: only a few let-ter classes are supported and, perhaps more impor-tantly, the design of the finished letter is not verypretty. And of course the non-linear control flow ismissing because each letter class – and there are afew of these – really needs its own options whichwould more than justify its own page.

However, these things are enhancements forthe future – for after users have got a feel for theprogram. We used the program and it turned out tobe considerably more useful than anticipated. Any-one who is interested in doing so is welcome tomake improvements. However, our requirements atthe start were for a small and quickly created pro-gram. And we’ve succeeded.

Source code

Of course, no one wants to copy the whole sourcecode. Therefore, it is present on my homepage readyfor downloading. Suggestions for improvements andpatches for this program which is released under theGPL are of course very welcome! ■

Figure 2: The individualpages of our letter wizardusing druid.

PROGRAMMINGGNOME DRUIDS

10 · 2000 LINUX MAGAZINE 123

Info

The GNOME.Project:www.gnome.org/

Python: www.python.org/

gnome-python sources,mirror in Poland:sunsite.icm.edu.pl/pub/Linux/GNOME/

GNOMEUI API Reference:developer.gnome.org/doc/API/libgnomeui/book1.html

The source code for theexample program www.der-frosch.de/sw/