You are on page 1of 89

NEWS

Newsdesk
■ Patents victory in Europe ■ Apple abandons PowerPC ■ Mandriva buys Lycoris ■ Gentoo founder
moves to Microsoft ■ Knoppix 4 announced ■ New UK body for FOSS testing ■ PS3 to run Linux ■

Europe says ‘NO’ to WHAT DOES


IT MEAN?

software patents
● No ‘common
position’ or
europewide unific
ation
of patents
● EU Commission
undertake not
to re-introduce sim
ilar directive
Landmark decision removes immediate threat of US-style software patents ● European Pa
tents Office to
continue as norm
al
On Wednesday July 6, The
European Parliament
rejected the idea of
patenting software. The Computer
Implemented Inventions (CII) directive
was rejected by an overwhelming
majority: 648 MEPS voted for
rejection, with just 14 votes in favour of
recommending the directive and 18
abstentions. Strasbourg became the
epicentre of a major open source
celebration as demonstrators who had
come from across the continent to
campaign against the (CII) directive
were left stunned, then jubilant when
they discovered the decision had gone
in their favour.
The ruling means an end (for now)
to the threat of US-style software
patents, which many people in the
free software world believe would have Feelings were running high in the
stifled innovation and led to greater lead up to the vote.
problems for developers.
The overwhelming rejection belies
the real machinations in the EU
Parliament though. Previously the
“I HOPE THIS GIVES PEOPLE FAITH IN THE
Parliament had recommended
amendments to the CII which
EUROPEAN DECISION MAKING PROCESS”
effectively ruled out patents for simple The decision effectively removes the
JUST A CLICK AWAY software features. The amendment short-term danger of Europe-wide
U.S. Patent 5960411 process would have meant more software patents, as the European
voting, with an unpredictable result for Commission had already said that
Software patents have been granted in information and uses this to enable an
the final legislation. Rather than there would be no plans to re-
the US already, and much has been instant buying function. Many people are
support a directive that could, by later introduce the directive if this attempt
made of how simplistic some of them incredulous that such a simple idea was
are. One of the best examples of this is granted a patent, but Amazon
amendment, rule out patents for was unsuccessful.
Amazon’s ‘One-click’ ordering system, has already used it in the courts against software across Europe, pro-patent The result was welcomed by all the
where the website stores customer rivals such as Barnes&Noble. parties also voted to reject the anti-patent campaigners, who ranged
directive, creating a huge majority. from concerned individuals to

6 LXF70 SEPTEMBER 2005 www.linuxformat.co.uk

LXF70.news 6 11/7/05 3:46:33 pm


NEWS

UK government launches
multinationals such as Red Hat and
Sun Microsystems. Miguel
Mark Webbink, Red Hat’s Deputy de Icaza
General Counsel, was pleased that the
decision provided “a stable state for
open source testing lab Ximian’s co-founder
is hard at work on the
.NET migration project
Mono at Novell.
Europe, and one that provides us with A chance to prove Linux to the public sector
the opportunity to now legally COMMENT
challenge the practice of issuing The UK government has opened a solutions due to technical and
software patents by the European
Patent Office”.
Effective grassroots opposition to
testing centre where local authorities
and other public service bodies can
try out open source and proprietary
compatibility considerations,” said
project manager Ed Downs. “The
Open Source Laboratory allows
Desktop
the CII directive was largely co-
ordinated by groups such as the
Foundation for a Free Information
Infrastructure (www.ffii.org), whose
solutions without the expense of a
full-scale trial.
The test laboratory is part of the
Open Source Academy, which is based
potential users to test configurations,
evaluate the benefits and build
confidence in OS technologies,
without risk.”
dreams
campaign included advocacy, physical at the National Computing Centre in First to make use of the centre is Obviously, I often get
demonstrations and plenty of Manchester and was launched in the Cheshire County Council, which is asked about the Mono
information for those who wanted to spring. “Many organisations have heard evaluating a Linux/Citrix solution for project. I’m hoping this column
contact their MEPs. Jonas Maebe of about the benefits of open source but possible roll-out across the authority’s will give me a chance to give
the FFII said after the landmark ruling: are wary about implementing OS desktops next year. everybody an update on the
“I hope this turn of events can give project’s progress, and reflect on
people new faith in the European the challenges that lie ahead, as
decision-making process. I also hope well as explain some of the
that it will encourage the Council and decisions we have made.
Commission to model after the We started the Mono project
European Parliament in terms of for two reasons: to have better
transparency and the ability of development tools for desktop
stakeholders to participate in the applications, and to assist
decision-making process irrespective developers targeting applications
of their size.” for the Windows platform to
Amid the celebrations, there was move their apps easily to Linux.
still cause for concern. The rejection of On the desktop, our hope
this directive leaves the status quo, that Mono would spur innovation
where the EPO and individual member has been realised. Novell is using
The Open Source Laboratory is housed at the National Computing Centre
states make interpretations of existing it for its own products like
in Manchester, though remote access is also possible.
patent laws. And while the immediate iFolder3, and we have seen a
threat is gone, it seems unlikely that spurt of new activity among

Mandriva + Lycoris = ??
well-funded organisations Linux desktop developers. Since
campaigning in favour of software our release last year we’ve
patents will simply let the matter rest. increased the number of
Webbink is upbeat about the future Lycoris founder to help development of new desktop product architectures supported by Mono,
though: “the issues have now been and upgraded our C# compiler.
better laid on the table. I think it’s time Open source development
for a broader debate, one that involves Mandriva’s shopping spree peaks during the summer as
industry, individual developers and the continues with the purchase of US contributors spend some of their
public interest... it ought to be a global Linux vendor Lycoris. This should boost free time working on new ideas.
debate to discuss how this subject Mandriva’s desktop offerings, as This summer will be particularly
matter is best protected to reward technology from Lycoris’s Desktop/LX exciting as various students are
invention and encourage development.” distro will be rolled into Mandriva’s being funded by Google to work
home and home office product lines. on Mono projects. In the autumn,
Lycoris was founded in 2000 by Novell will release a new version
PATENTS AND Joseph Cheek, a former Microsoft of Mono that incorporates many
COPYRIGHT staffer, as Redmond Linux. The name Linux desktop product. Cheek has new libraries and will also see
change occurred in 2002 when the moved to Mandriva and will oversee the debut of the Mono Debugger.
Traditionally there have been two
company launched its updated the integration of some core Lycoris Developers who may never
methods of giving legal protection to
intellectual property - patents and
Desktop/LX product. Lycoris made an technologies into Discovery as well as have thought it possible are
copyright. Copyright is immediate and attempt to put the familiar desktop the documentation effort. As yet, it’s porting their software with little
inalienable from any created work, as product on to PDAs and tablet PCs not clear whether this will include the or no effort. For me, this is a
the expression of an idea. (which may be part of Mandriva’s AI2 package management and win-win situation: independent
Patents seek to provide protection thinking), but these two products were Bitstream-licensed font management software vendors can use a
for the idea itself, and must be granted discontinued in a shakeup last year. system that were such a large part of single code base, and our
by a relevant patent office. The area of Financial details are thin on the Desktop/LX’s appeal. beloved free software platform
software is, in some places, covered ground, but Mandriva’s intention is Lycoris’s 20,000 paying users will gets a lot of software that would
both by copyright and patents,
clear: to pull together the entry-level be offered access to parts of the not have been made available
something that was never envisaged
Mandriva Discovery distribution and MandrivaClub’s forums and continued otherwise.
when patents were first granted.
Desktop/LX to create a class-leading use of the Iris Software Gallery.

www.linuxformat.co.uk LXF70 SEPTEMBER 2005 7

LXF70.news 7 11/7/05 3:46:36 pm


NEWS

Can Apple and Intel kill


Linux on the desktop?
Apple’s migration to Intel signals a change in the industry status quo...

PHOTO NEWSTEAM.CO.UK
Steve Jobs’s recent decision underdog position to outsider status.
to standardise the next Jobs described the decision to
generation of Apple supplant IBM’s PowerPC processors
computers on Intel chips – creating so- with Intel as Apple’s third “transition”,
called ‘Mactel’ machines – is causing after 68K to PowerPC and OS 9 to
consternation among industry OS X. The change may cause obvious
commentators, PPC vendors and problems for Terra Soft and its Yellow
others in the Linux community. The Dog Linux distribution, which is one of
effect of this move on the nascent the better-known and well-respected
Linux desktop is of particular concern; distributions to run on PowerPC
though the extent of the danger is architecture. However, chief executive
somewhat contested. Kai Staats is putting a brave face on
Apple’s CEO made the things, saying the move offers
announcement at the annual Apple “intriguing” opportunities for the future.
Worldwide Developers Conference in In a post on the Terra Soft website, he
June, suggesting that Apple computers, wrote: “I want to make clear that
probably starting with the Mac Mini, PowerPC is NOT dead. Apple is one of
will be migrated to Intel CPUs within many PowerPC manufacturers ... Terra
the next 12 months. These will be Soft has been working for several
standard x86/X64 processors and will years to broaden the opportunity for
most likely use commodity chipsets as Power Linux solutions. With Apple’s
far as possible to reduce costs. It is announcement, those plans have been
expected that Apple will try to come accelerated ... Terra Soft and others
up with some method to make it are rallying to fill the void created by
difficult to run OS X on anything but Apple’s departure and expand the
the hardware it sells – in the past the Power Architecture marketplace.”
high premiums paid for Apple’s Terra Soft is to continue for the
hardware have contributed significantly foreseeable future as an Apple reseller,
to the company’s bottom line. Linux but Staats could not confirm whether
and Windows, though, will be the company would offer branded
installable on Apple’s x86 hardware, Intel boxes with Linux pre-installed.
making a triple-boot system a distinct Staats did, however, suggest that with
future prospect.. Apple concentrating on x86, there was
an opportunity for Y-HPC, the version
Squeezed out? of Yellow Dog for high-performance
The fear is that with an alternative to computing, to become the logical
Microsoft on Intel chips, a great Apple’s apparent change in strategy will upgrade for current Apple X-Serve
swathe of potential Linux users will have huge implications for Linux. customers who may no longer have
switch their allegiance to the Mac. the option of OS X PPC.
Journalist Eugenia Loli-Queru said on
OSnews.com that when buyers alternative to Windows. And as the
realised they could try out OS X computer industry tends to work on
without necessarily losing access to the principle of dominant player and
their favourite Windows applications, underdog, Linux, Loli-Queru suggested,
they would see this as the natural would be relegated from its current
PHOTO COURTESY APPLE

“LINUX AND WINDOWS


WILL BE INSTALLABLE ON
APPLE’S X86 HARDWARE.”
8 LXF70 SEPTEMBER 2005 www.linuxformat.co.uk

LXF70.news 8 11/7/05 3:46:38 pm


NEWS

Gentoo founder finds gainful


employment at Microsoft
Did lack of funding push Robbins to Redmond?
Daniel Robbins has had Gentoo approach was technically superior to
fans sharpening their Star Wars the other distros in its fundamental
metaphors by going over to the dark approach, and funding could have
side and taking a job at Microsoft. cured any detail problems. It was the
Robbins, MS executives claim, will right approach. He went broke, and we
allow the company to “understand the should all be sad at this.”
open source community” and its Robbins built Gentoo – the
development model. distribution and company – in 1998
Robbins faced a barrage of around his innovative Portage software
invective on many community websites management system, which uses
RealBASIC 2005 offers Visual Basic-like
for helping Microsoft in what many source code to build optimised tools for cross-platform development.
claim is its continuing attempt to binaries for individual systems. He

RealBASIC for Linux is here


“embrace, extend and extinguish” Linux. resigned his position as chief architect
But others were more sympathetic, of the project in April last year, but
one user writing that “even open stayed on at the company to ensure
source developers have to put food on its transition to a non-profit making Cross-platform RAD tool arriving soon on a desktop near you
the table.” organisation went smoothly.
Hans Reiser, author of the Reiser Once Robbins had transferred all Real Software has begun the run for five minutes on a non-native
filesystem, explained Robbins’s Gentoo-related ‘intellectual property’ testing cycle for the long-awaited system, though users who upgrade to
predicament: “I think everyone should to the Gentoo Foundation, he quit release of RealBASIC 2005 for Linux, a the Professional package will be able
understand that he had large credit- for good, and moved over to Microsoft cross-platform Visual Basic-like rapid to edit and compile applications
card debts, that he tried everything he in May. application development tool. Once created on the Standard edition.
could to make it work fiscally, and that Reports that the move would bring the beta period has ended, the A spokeswoman for Real Software
the community failed to provide the balance to the source code were company will continue to make the full (not to be confused with
finances that would make it work. His unconfirmed at time of writing.. standard edition of the software for RealNetworks) said that the company
Linux available as a free download had registered a lot of interest in the
when it’s released in August. Linux version. “When we announced
RealBASIC’s chief executive Geoff our Linux strategy in July 2003, it was
Perlman believes the application the biggest announcement the
addresses two important issues within company had ever had, in terms of
the Linux market. “First is the lack of a press coverage and in terms of
good Visual Basic-like development sustainable product download rates,”
environment and the second is the she said.
lack of desktop software for Linux.” The spokeswoman added that there
In addition to the free (as in beer) were no plans to charge for the
standard version, a Professional edition Standard edition in the near future
will allow developers to write and and that there were no licence
compile cross-platform applications restrictions to prevent software written
suitable for Linux, Windows and OS X. with the application being released
The standard version will cross- under the GPL.
Is this the face of GNU/Longhorn? No, it’s a Gentoo screenshot! compile, but the application will only www.realsoftware.com

US Navy may go open source ★ FAVE Open Source Creativity,


August 20, Trinity Community and Arts
★ UKUUG Linux Technical Conference,
August 4–7, Swansea University, Wales
Report highlights a confusion of operating systems Centre, Bristol, England The 2005 presentation line-up for this
Creative types are being invited to annual event has finally been
After a long, arduous trawl process will reveal a similar figure, scratch their open source itch at this confirmed. Speakers including Mark
through its network, the US Navy has making a total of 500,000 systems. event in the centre of Bristol. The Taylor from the Open Source
discovered that it’s running just about One of the surprises is that there one-day program includes Consortium and Bdale Garbee from
every OS ever invented and has are a large number of Linux systems performances, installations and Debian/HP and will cover a lot of
decided, for the sake of efficiency, to patched into the network, but these workshops covering music production, ground, from music recording,
standardise its IT infrastructure. rely on a disparate collection of distros. video art and 3D graphics. Cory production and distribution to Mono and
The Navy began a six-month ‘asset A spokesman said that it would be Doctorow, author of Down And Out In ASP.NET – with, obviously, a bias toward
The Magic Kingdom, will also be talking the technical aspects of Linux and open
discovery program’ in January to wise to standardise on a particular
about the Creative Commons and the source software. Michael Meeks from
identify the 250,000 computer distribution to lower costs and make it
potential issues surrounding the Novell may also offer a glimpse of the
systems it has installed throughout the more efficient – a prospect that will “European Broadcast Flag”. company’s desktop plans.
US mainland. It is expected that the have the likes of Red Hat and Novell www.fave.org.uk www.ukuug.org/events/linux2005
second, overseas section of this itching to pitch for the business.

www.linuxformat.co.uk LXF70 SEPTEMBER 2005 9

LXF70.news 9 11/7/05 3:46:42 pm


NEWS

Knoppix 4 makes its David


Cartwright

debut in Karlsruhe
David Cartwright is an IT
consultant who specialises
in providing Linux Systems
and solutions.

It’s all work, work, work for Klaus Knopper’s team


COMMENT
Barely taking a breath after the Options in this latest version include
release of Knoppix 3.9 in early June,
developers of the Live CD rushed out
the release of version 4 in time for the
an installation script to put a full
Debian system on a computer’s hard
disk, and support for the UnionFS,
A disc or 14
■ Fast Rabbit Software has ported
two of its desktop applications to
Linux. Dolce Music Flash Cards helps
users learn to read music notation,
LinuxTag 2005 event in Germany
three weeks later.
Knoppix 4 is built on the
foundations of Debian Sarge but
which places a persistent RAM disk on
the system, allowing any element of
the distribution to be altered.
too far…
while Mathwords is a system aimed
at improving the mathematical word updates a number of its applications, I just went to download
skills of younger children. We'll be
reviewing both in LXF71. including OpenOffice.org to 2.0. At the the latest release of
time of writing the developers were Debian Linux. Oh dear, oh dear.
■ Open Country, which provides planning the usual CD release and a Back in the old days, I was a
systems management solutions to
the likes of Cisco and Intel, has new DVD version with over 5,000 Red Hat user – in fact I’ve used
become the latest member of the applications. The DVD also contains everything from 6.2 right up
Open Source Development Labs
the text of two books: Knoppix until they killed it off at release
(OSDL). Co-founder Laurent Gharda
said the group hoped to tackle the Kompakt by Rainer Hattenhauer and 9. In those days you just
“misperception” that Linux has a Knowing Knoppix by Phil Jones. downloaded two or three CD
higher total cost of ownership than
other OSs. images and you were sorted.
Since then, I’ve developed a
Ahh… weaponry, death and fondness for Debian – until I
went to get the new version,

a little light destruction that is.


OK, it’s packed with useful
stuff. But quite frankly, 14 CDs is
Top-notch deathmatch game arrives on the net
ever so slightly bonkers. Yes, 14.
After a wait in development hell game ships with 17 maps and quite a I could, of course, download the
■ Electronic Arts has officially that surpasses even that of Debian number of servers are already hosting DVD images (there are only two
released the Linux server software Sarge, the network-enabled first some punishing action. files, thanks to the extra capacity
for its Battlefield 2 software. The
game itself – an enormous tactical person shoot-’em-up (FPS) Nexuiz Both the content and source of the of DVDs) but as it happens the
military affair – is currently only has been released. It took three and a game have been released under the server I use for my Linux
available in demo form. half years, but the development team, GPL, which makes it possible for other installations doesn’t have a DVD
■ The Fedora project, sweaty from led by Lee Vermeulen, have finally designers to take the basics, which are drive (one of the great things
the effort of getting Fedora Core 4 made binaries for Linux, Windows and built on the Darkplaces engine, and about Linux is that it works just
out of the door, has published a road
Mac available at www.nexuiz.com. create a wide range of other games, great on my slightly geriatric
map of ideas to be implemented in
Fedora Core 5. Top of the list is Vermeulen says the inspiration mods or just new maps for 1GHz PIII server).
reducing the bulk and providing a behind the game was a desire to take deathmatch games. The game has I don’t care about
distribution that comes on two discs;
options include having the core on a things back to basics with a simple 3D also been designed to run respectably bandwidth, I just can’t be
single disc and then adding one for deathmatch played with “perfect on low-end hardware, while retaining bothered to sit and burn 14 CDs.
KDE and one for Gnome, or splitting weapon balancing and fast-paced features such as real-time lighting and Perhaps I’ll get the DVD version
the distribution into core and extras
and ensuring everything for general action, keeping itself away from the bump-mapping for those with the and the network-install boot CD
use fits on a pair of CDs. Paul current trend of realistic shooters.” The grunt to use it. image and make the DVDs
Nasrat and Jeremy Katz have taken
available via a share from my
on the task of overhauling Fedora’s
package management and creating (gasp) Windows server.
something to replace the system- Please Linux distributors,
config-packages tool with recycled
bits of the Anaconda installer and let’s make this vast wad of CD
the Pup updater. images an exception, not the
norm. I realise that you want to
■ A period of consultation is set
to begin on the next version of cram as much useful stuff in
the General Public License there as possible, so that people
(GPL), the licence under which like me can be confident of
Linux and lots of Linux software is
released. In a speech to attendees having everything we could
at the LinuxWorld Conference in possibly want, but bear in mind
New York in June, Eben Moglen,
the Free Software Foundation’s legal
that Microsoft and Apple
adviser, said that the first public draft manage a single-CD installation
of the new licence was imminent. A and even Solaris has a modest
major addition, Moglen said, were
specific clauses designed to deal
Run, hide, hide, fire media kit. Red Hat Enterprise 4
with “patent defence”. blindly, run, jump, and Fedora manage four CDs –
die. What a
and as far as I’m
wholesome workout.
concerned, that’s plenty.

www.linuxformat.co.uk LXF70 SEPTEMBER 2005 11

LXF70.news Sec2:11 11/7/05 3:46:45 pm


NEWS

Richard
Cobbett
Florentine telescope
builder, physics pioneer
■ The new ‘open’ Office formats
and church worrier. Or
from Microsoft have fallen foul was that Galileo?
of the GNU project, which claims
the royalty-free licence under
which the formats are distributed COMMENT
is incompatible with the GPL. This

Catching
may lead to problems implementing
document conversion in open source
applications. However, Dan Ravicher
of the Public Patent Foundation

the web
suggested that, at present, there
is no reason for any developer to
fear the MS licence until the verity
of their patent claims has been

PS3 hard disk demonstrated.

It’s great to see web

add-on to run Linux


services finally taking off.
It’s a good thing for all of us.
Most feature a Linux base under
all the glitz, using that old
A supercomputer wouldn’t be a supercomputer if it didn’t
‘services and support’ model of
Rumours abound that Sony’s be capable of running Windows, OS X making money, and require no
next-generation Playstation 3 will be or Linux and made favourable noises ■ Microsoft’s new Spaces blogging experience or expertise from the
service has also come under
equipped with a hard disk option to about Linspire’s Linux offering, intense scrutiny after it was revealed user. Just a few years after
turn the games console (or media hub, suggesting this – or something like it – that filters built in to the software everyone started talking about
prevent users in China from typing
in media parlance) into a fully- will form part of the final package. certain words. High on the list of
how great such things would be,
functional Linux computer. He said: “We’re positioning the PS3 proscribed content are ‘freedom’, we finally have them on our
Ken Kutaragi, president of Sony as a supercomputer, but people won’t ‘democracy’, ‘human rights’, ‘Tibet’ screens. In a few years, we may
and ‘Tiananmen’. Users attempting to
Computer Entertainment, has given a recognise it as a computer unless we enter these words in a blog subject even have more than a handful
number of interviews in the aftermath call it a computer, so we’re going to line shown a warning that says, “This that are worth using.
of May’s E3 show berating his rivals at run an OS on it. In fact, the Cell can topic contains forbidden words. The two big problems are cost
Please delete them”. Where do you
Microsoft and Nintendo for pushing run multiple operating systems. In want to go today? and interoperability, even on
consoles as “toys”. In contrast, he claims, order to run the OSs, we need a hard most of the better services. Take
■ HP is blowing its own trumpet
the PS3 will not only be capable of disk. So in order to declare that the a group-calendaring program
after setting the “industry milestone”
running a variety of operating systems PS3 is a computer, I think we’ll have of selling its one millionth Linux like Trumba (www.trumba.com),
but the recently announced PS3 hard the hard disk preinstalled with Linux.” server since getting into the business which costs $40 a year. That’s
in 1998. The company claims to have
drive attachment will turn the console On the launch of the Playstation 2, shipped 45 per cent more systems great, until you realise every
into a “Linux supercomputer”. Sony attempted to get the device than its nearest rival and also chalked member of your group has to
In an interview with Japan’s PC classified as a computer rather than a up its 29th consecutive quarter at cough up the same to get any
the top of the Linux server pile. In
Impress Watch, Kutaragi suggested games console to lower the import the first quarter of 2005, shipments real benefit out of it – and that
that the PS3’s Cell processor would duty entering the European Union. grew at 2.5 per cent more than the with limited support for iCal and
industry average.
other standards, half of them
■ Meanwhile, HP’s Linux VP, Martin will still wind up doubling their
Fink, has been fuelling rumours that workload in the struggle to stay
EMBEDDED LINUX NEWS Linux will be ported to its NonStop
server platform. At a recent Red Hat
event, Fink said: “Maybe one day
organised. And this is considered
a really good application.
you’ll actually see Red Hat Linux Support for RSS feeds, XML,
● Concept Distribution has begun shipping processor and features a couple of running native on NonStop,” and then
he stopped. iCal and the rest is important in
one of the smallest general purpose PCs in innovative features including integrated
desktop applications, but
the world. The MiniPC is based on an AMD VoIP support via 802.11b and a ■ Applicants to Google’s Summer essential on the net if users are
Geode processor running at 400MHz, short-range FM transmitter capable of of Code project should know by
features 256MB RAM and either a 40GB sending stored music to any nearby radio. now whether the search giant has to get the best applications
or 80GB disk. There are also four USB www.uni.com.tw/magpie_pda.html approved their $4,500 grant to work around, rather than rely on all-in-
on one of a series of open source
ports, front-mounted stereo connections, one jobs that may not offer the
projects. Participants will be working
100MB/s Ethernet and a display port ● Matchbox Window Manager, a smart, on projects such as Mono, Apache, exact service they need.
capable of driving a 1600x1200 monitor small-form window manager designed for Blender, Fedora and many others. The PIM tool Backpack
at 85kHz. The basic model costs €347, embedded applications, has been updated. Two hundred lucky individuals will
be supported in their endeavours (www.backpackit.com) has got
while a ‘thin client’ model starts at €265. The latest release includes support for an throughout the summer. the model right. Because it
www.concept-distribution.com onscreen keyboard, better Gnome
mixes its email reminders and
integration and more remote options. The ■ Linux goes corporate! The BBC
has switched its weather-forecasting iCal feeds, the absence of a
● A curious device called the Unication project has been under the radar, but is
presentation tools on to a Linux box. dedicated calendar isn’t a
Magpie Linux PDA fetched up at this year’s due to go mainstream as it has been Its new, controversial 3D map of
Computex show in Taipei. The device adopted as the platform of choice for problem – although at $60 a
the UK, and the job of collating all
features a physical and an onscreen Nokia’s upcoming N770 Internet Tablet. that data from satellites and wet year for just 20 pages worth of
keyboard (for tablet-style access) and the Nokia has been funding development of bits of seaweed are handled by a data, it’s clear that even the best
bog-standard(ish) PC running Linux
usual array of Wi-Fi and media player the window manager for the last few years. with MySQL.
services still have some way to
facilities. It’s built on a Samsung RISC http://projects.o-hand.com/matchbox go. Give it time. They say
it heals most things.

12 LXF70 SEPTEMBER 2005 www.linuxformat.co.uk

LXF70.news Sec1:12 11/7/05 3:46:49 pm


REVIEWS OpenLaszlo 3.0

WEB INTERFACE TOOLKIT

OpenLaszlo 3.0
Flash is everyone’s favourite proprietary format – now it’s everyone’s
favourite open format. Paul Hudson investigates…

KEY STUFF
Welcome Flash GUI-building
environment. See also: Ming.
■ SUPPLIER Laszlo Systems
■ WEB www.openlaszlo.org
■ PRICE Free under IBM CPL

Macromedia’s Flash format is


officially cool: it lets you
control exactly where things
go on a web page and works on every
platform under the sun. What’s more,
its use of vector graphics means that
its animation look pretty without
chewing up bandwidth.
Various projects have tried to
reverse-engineer Flash, but until now
open source has had no powerful
working environment equal to the
Flash MX 2004 Studio on Windows
and Mac OS X.
Before you get your hopes up,
OpenLaszlo is not a Flash editing
studio. But it is the next best thing: a
library of reusable page components
that helps you build Flash-based user
interfaces, without needing to sign any
odious licence agreements. Beautiful interfaces galore await those who dare combine XML with Flash and JavaScript.
Placing it even higher on the
buzzwordtasticometer scale is the fact that come loaded with functionality. To can be moved. You can also customise optimised static files that Tomcat will
that you design your interfaces using create a text box component, use the a component’s attributes: width and serve up just as they are rather than
XML, which OpenLaszlo uses to <text> XML element; to create a height, colours, position and even its re-parse your XML, which makes it
generate the finished Flash movies. movable dialog, use <window>; to actions. These actions are written in just as fast as moving files elsewhere,
create a button, use <button>; and so JavaScript, using events that will be but without the inconvenience.
Pre-fab web pages on – you could almost guess your way familiar to any HTML programmer: If you’re not impressed yet,
Every web developer knows that Flash into OpenLaszlo programming. onClick(), onFocus() and OpenLaszlo is also capable of
is easy to use when you want to Each component comes with a onMouseOver(). You can also use XML-RPC and SOAP. The first lets you
animate little shapes or make simple certain amount of built-in basic variables inside your XML code – run remote procedure calls (there’s
movies, but creating advanced user configurability. So, buttons can be something as simple as your RPC) on other machines over
interfaces sounds like a nightmare. clicked on, text boxes can be typed width=”${immediateparent. HTTP. It sounds complicated, but is
However, OpenLaszlo provides a into, password fields type asterisks width}” gets properly translated into really just a way to call functions with
comprehensive set of GUI components rather than characters, and windows the Flash movie. parameters and receive return values.
SOAP – the Simple Object Access
From XML to Flash Protocol – transfers complex data
All this magic works through Java. As types to and from other servers, again
your page is requested, the XML gets enabling you to link your Flash movie
parsed and compiled by the to the wider world.
The OpenLaszlo OpenLaszlo engine, which turns it into This support for XML goes even
documentation a Flash movie. The reference deeper: OpenLaszlo can download and
is packed with
examples, implementation for this is the servlet parse an XML file from a local or
source code, container Apache Tomcat, but you remote source, then allow you to run
walkthroughs could feasibly use OpenLaszlo to XPath queries on it to present the
and other help generate your Flash movies, then data. This kind of thing can be done
– this is as good
move them to a static Apache server. with normal Flash movies, but you
as it gets in the
open-source There’s little point though: the Java won’t see it often because it’s pretty
world. compiler can be used to create fiddly – unless you use OpenLaszlo.

20 LXF70 SEPTEMBER 2005 www.linuxformat.co.uk

LXF70.rev_laszlo 20 7/7/05 5:20:21 pm


REVIEWS OpenLaszlo 3.0

The selection of components on


offer is extremely generous. Along with YOUR COMPONENTS TOOLKIT
mundane things such as text boxes, We’re like children set loose in an eye candy store…
buttons, check boxes and lists, you
also get composite objects such as
date pickers, trees, tab groups, menus,
and data grids. Each of these can send
and receive data with the rest of the
Flash movie, but they can also be
used to send data over HTTP to a
form processor, like a HTML form. If a value can be only
Flash is known for its multimedia true or false, checkboxes
are ideal. Users can add new Don’t write your own
capabilities, and OpenLaszlo doesn’t Set the text, colour, and entries to combo boxes, calculations: the date
fall short: you can place pictures, icon for each of them. or just use a fixed list. picker does it for you.
movies, MP3s and even other Flash
movies in your XML, and control them
through JavaScript.
Sliders help your users
Double-take tasks visualise numeric
It is also possible create your own quantities easily.
Use menus to give basic
code classes that add new program options, or add
functionality or customisation – Multi-line or single line? submenus for more
OpenLaszlo lets you define a new Password or normal You can make your complicated work.
component as a class, then use that text? Text edits let you list single-select or
choose. multi-select.
class as a template that you can
stamp multiple times over a page. You
can then inherit from that class (and
inherit from the inherited class, and so
on), building up your own libraries of
complex objects. This seems hard to
believe at first – XML doesn’t have the
shiniest of reputations for taking on
tasks like this among veteran Tab sliders help you
programmers. But OpenLaszlo pulls it store groups of Trees hold nested Windows are
Groupable items are information in limited information - they can independent dialogs:
off – and we’re impressed.
perfect for radio group screen acreage. even hold GUI elements! move them, close them,
Of course, all this power makes it resize them and more.
components.
a Herculean task to become fluent in
OpenLaszlo’s syntax, but to help you
along there’s a giant collection of reference guide, an administration All this complexity might This product beats Java at its own
documentation covering every possible guide and more. This is surprising until overwhelm; were it not for the fact game (at least in the web browser
aspect of system configuration and you realise that OpenLaszlo was open that IBM has created a plugin for space). It’s also completely free to use
development. Yes, you read that sourced only recently – its company Eclipse that eases the task of under IBM’s Common Public License
correctly: this is a properly continues to develop the software, but developing with OpenLaszlo. Not only (CPL: think GPL plus patent granting).
documented open-source project that sells support and services as well. This is it designed to help you write valid OpenLaszlo is a huge boon to the
guides you through installation, was a brave move, and we’re lucky to and well-formed XML, it also has an open-source community. When you
learning to program, samples, a have them aboard. integrated GUI designer that lets you combine OpenLaszlo with Apache
drag and drop components rather Tomcat and Eclipse you get an open-
than hand-code the XML. If you’re source trio that packs a knockout
new to Eclipse, it might take a bit of punch. If you’re experimenting with
time to get accustomed to it, but web-based GUIs (perhaps you’ve read
anyone who uses Eclipse already will our feature on page 66), we urge you
be right at home. to try OpenLaszlo first – we promise
you won’t be disappointed. LXF
Welcome to Mongo
Once you’ve tried OpenLaszlo, it’s hard
to go back. You can spend weeks
LINUX FORMAT VERDICT
hand-crafting complex website GUIs in FEATURES 8/10
Java, but why bother? OpenLaszlo has PERFORMANCE 9/10
all the tools you need to create EASE OF USE 9/10
powerful and cross-platform user DOCUMENTATION 10/10
interfaces that look immaculate. It
takes a lot of effort to make Java look Looks hard at first, but worth any effort it
takes to learn. The future of web GUIs.
this good, and it certainly takes much
more skill to get the same power. And RATING 9/10
The Eclipse OpenLaszlo plugin prompts you to fill in properties, complete the docs provided here are unequalled
your XML statements and validate your code. as far as we’re concerned.

www.linuxformat.co.uk LXF70 SEPTEMBER 2005 21

LXF70.rev_laszlo 21 7/7/05 5:20:23 pm


REVIEWS Xandros Business Desktop

LINUX DISTRIBUTION

Xandros Business
Desktop OS 3.0
It’s migration-friendly but it might be best to hold on to MS Office for a while, finds Andy Channelle.

KEY STUFF Xandros BD’s combination of


user-friendly, cross-platform
Enterprise desktop distribution based
applications such as Firefox, OOo and
on Debian. See also: Novell Desktop,
SUSE Professional and Sun JDS. the Outlook-alike Evolution and the
adherence to many Windows
■ DEVELOPER Xandros
conventions means it could probably
■ WEB www.xandros.com
drop into the average user’s working
■ PRICE £75 (five-user pack £275)
day with little disruption.
A Linux distro aimed at office The ability to run legacy
workers should include an applications on it if necessary (and
office suite, right? Wrong, at CrossOver runs the likes of Word, Excel,
least according to the people Photoshop exceptionally well) means
responsible for Xandros Business that the process of migration can be
Desktop OS 3.0. They have decided undertaken at quite a leisurely pace.
not to install either of the included The high-quality networking tools
productivity packages by default so, if mean Xandros BD will be able to fit
you want OpenOffice.org or StarOffice 7, right in to a heterogeneous
it has to be manually added through environment, providing seamless
the (admittedly excellent) package Xandros BD includes support for Exchange and Groupwise via Evolution. access to servers across architectures.
manager Xandros Networks. In a The case of the missing office suite
distribution aimed at normal office on the to-do list that could have been settings for different situations so that is annoying, but it’s not drastic enough
users, this seems strange. avoided. Rant over, we can turn to the encryption, DNS and other to prevent us recommending you
There are a few reasons why this rest of this fine distribution. information could be associated with consider this alongside the more
could be: a) space is at a premium on The installation routine for Xandros particular locations. established business desktops. The
modern distributions; b) sysadmins BD is slick, involving little more than a inclusion of CrossOver Office in
may simply want to install MS Office few clicks and a couple of questions. Desktop tools particular will be a potential deal-
using the included CrossOver The installer can use available The desktop is based on KDE 3.3, maker for many businesses that want
Professional; or c) Xandros supposes partitions or resize and create new whose software and file management to move forward but don’t want to
large-scale buyers will use its xDMS ones, and the whole process should apps are complemented by Xandros’s leave the past behind. LXF
product to set up bespoke installations be completed within half an hour (plus own proprietary tools. These are
across many desktops. ten minutes to install an office suite!). uniformly good, and the networking
These are sensible reasons, but it The First Run wizard, which helps options available through Xandros File
may have been smarter to forgo, for the user to set time zones, mouse Manager are excellent. Mounting a
example, one of the two installed PIM button behaviour and so on, has been Samba share, for example, simply “An odd choice of packages
suites (of the two we would suggest retained from the previous versions involves highlighting it in the file and sloppy Wi-Fi support
keeping Evolution for its Exchange and and still does a great job. manager (it will have joined available makes Xandros more
GroupWise functionality), the games networks automatically) and selecting trouble than it’s worth.
and the large selection of media Niggly networking the Mount option in the side panel. When you buy a distro, you
players and use this space to include Another familiar part of the installation Setting up a printer is just as easy.
expect the very best – and
OOo on the first CD. As it is, installing process is the small issue of setting up New to this version are an upgrade
this isn’t it.”
an office suite manually is an extra job a network. This process does work, but of CrossOver Office Professional to
requires further configuration once the version 4.2, an anti-virus package
desktop has been started; even more developed by Xandros, support for LINUX FORMAT VERDICT
so in the case of wireless networking. connections to MS Exchange Server FEATURES 7/10
Once configured, both wireless and and Novell GroupWise, and PERFORMANCE 6/10
wired networking work almost as improvements to the VPN and firewall
EASE OF USE 7/10
expected, but the Actiontec 54G configuration options. It also includes
wireless card on our test machine the latest version of Skype’s VoIP VALUE FOR MONEY 7/10
(recognised and usable by SUSE and software and a free upgrade to This distribution could form the backbone
Ubuntu among others) didn’t work: we StarOffice 8 when it’s finally available. to either large or small-scale office
migration plans.
had to dust down an older Wi-Fi card. The virus package is an interesting
Moving from office to home to public proposition and will be handy if the RATING 7/10
iTunes support is improved thanks access point is easy, but it would be doom-mongers are right about a
to CrossOver 4.2. good to see the option of saving future packed with Linux viruses.

22 LXF70 SEPTEMBER 2005 www.linuxformat.co.uk

LXF70.rev_xandros 22 11/7/05 12:01:04 pm


REVIEWS Studio to Go!

LIVE DISTRIBUTION FOR AUDIO

Studio to Go!
Graham Morrison looks at a Live distribution that aims to turn your beige box
into Abbey Road Studios. But is it more Beatles For Sale than Sergeant Pepper?

KEY STUFF
Suitable even for beginners and
flushed with an embarrassment of
Linux applications that aren’t all just
about audio. Alternatives include two
completely free Linux distributions
tailored to audio production: Apodio
and AGNULA.
■ DEVELOPER Fervent Software
■ WEB www.ferventsoftware.com
■ PRICE £49.99

If you followed any of our


recent audio tutorials, you’ll
no doubt be aware that
producing music using your Linux box
is becoming increasingly feasible.
There’s a wealth of audio applications,
from sequencers to multi-track
recorders, all tied together using one
of the most effective audio transport
layers available.
The downside to all this versatility, It really is a whole studio! Recording, composing, editing, synthesis and effects all off a Live CD.
as is often the case with Linux, is
complexity. And as we noodlers know developers of the Rosegarden audio prominent links to the Rosegarden In common with other Live
too well, complexity is the perfect editor. Credentials like that are audio sequencer, and the toolbar at distributions, your home directory
excuse for not getting around to important, and Fervent actively the bottom is populated with large occupies volatile memory rather than
actually creating anything. promotes open software and Linux, CPU and memory meters, along with the security offered by a hard disk.
Fervent Software has a solution. It’s especially for use within education. In a comprehensive audio mixer. This is the whole point of a Live
called Studio.. to go! (hereafter called fact, one of the main motivations for First impressions are impressive, distribution, but it needs special
STG to avoid that terrible punctuation), creating STG was the difficulty some mainly thanks to the fully functional attention when you’re creating and
and is a Live Linux CD stuffed full of people had in getting Rosegarden to audio system that has auto-configured working. Any problems with your
audio-centric software without any of work satisfactorily. This isn’t the fault of itself during the system boot. It’s low system, such as a power failure, and
the associated hassle needed to set it Rosegarden, but the result of using an latency, and this quick response time your work will be lost.
all up. For the uninitiated, this means operating system tailored to the between key press and sound is pretty Being based on Knoppix means
you don’t need to configure your own desktop rather than audio production. much vital for professional studios STG will install on to your hard drive
kernel, set up audio drivers for your today. Jack, the audio connectivity layer, pretty painlessly, but Fervent Software
hardware, divine the cryptic Jack Su.. su.. studio is already running, and everything suggests using external storage, such
protocol or make animal sacrifices to STG is based on the Knoppix live defaults to using it, even the venerable as a USB hard drive, for permanent
get virtual instruments to make a distribution, but it’s been heavily XMMS player. storage. USB devices appear on the
sound. The idea with STG is that it will customised. You insert the CD into STG supports the same audio desktop automatically.
just… go. your drive; reboot your PC and, hardware as a typical Linux distribution.
Based in England, Fervent pending correct BIOS configuration, a That means lots of Creative hardware, Run VST
Software was co-founded by Chris few short minutes later you’re most USB audio devices, and some Configuration is STG’s strongest card,
Cannam, one of the principle presented with a KDE 3.3.1 desktop. If semi-professional products from the and most importantly after Jack, the
someone were to look over your likes of M-Audio and Hammerfall. It system comes complete with a
shoulder, they’d think you were a Linux also works very well with the onboard working VST system. This is for using
FEATURES audio expert. There are a couple of laptop soundcard we used for testing. the vast library of high-quality effects
AT A GLANCE
VST synthesizers and effects There are some LilyPond is
work out of the box. excellent tutorials included for
for getting the excellent notation
most out of rendering.
the system.

24 LXF70 SEPTEBER 2005 www.linuxformat.co.uk

LXF70.rev_studio 24 11/7/05 11:35:01 am


REVIEWS Studio to Go!

you may have installed on a local copy


STUDIO TO GO’S
AUDIO SOFTWARE
of Windows. By default these are read
only, but it only takes a right-click on “THE BEST NATIVE LINUX
Editing: Rosegarden
Audacity
the mounted folder to enable writing,
depending of course on the usual SYNTHESIZERS AND
ReZound
Sweep
Linux compatibility issues with
Microsoft’s filesystems. The other way
EFFECTS ARE INSTALLED.”
Ardour of getting to VST plugins is through
Effects: Creox Rosegarden itself. editing process. Audacity is the all- Studio ..to go! works best, though,
Jamin powerful behemoth, ReZound is great as a distribution for a solid state
Time Machine Tuned desktop for monitoring and Sweep is quick and recording box. It is an effective way of
Jack-Rack Both the desktop and the K menu are effective. Each has been built to use experimenting with Linux audio, and
FreqTweak
tailored for running audio applications. Jack for its sound input and output, effects and synths work seamlessly out
QMidiArp
Other than the folders linked to your which means you don’t need to worry of the box, a refreshing change from
DestroyFX (VST)
own partitions and VST plugins, the about conflicts in your audio hardware. dealing with dependencies.
Synths: FluidSynth
QSynth desktop features a folder full of This works especially well for Audacity, As to the question of whether it’s
Timidity tutorials, and another that contains which has always caused problems worth paying for something you can
Hydrogen example projects. In the tutorials folder sharing audio channels with get mostly for free, then the answer
Hexter you’ll find a six stage, step-by-step Rosegarden. Ardour is also included has to be ‘yes’. Fervent has
Aeolus guide to working with STG. There are for the more serious multi-track unquestionably invested some serious
AMS also more specific guides to using recording tasks. time into developing this package, and
ZynAddSubFX Rosegarden and the music typesetter The best native Linux effects and it wasn’t too long ago that £50 would
Cosmogirl2k (VST)
LilyPond, which are the two synthesizers are pre-installed. buy you nothing but the most primitive
FearKiller (VST)
applications that take centre stage Highlights of the effects rack are Creox audio software. With STG, you can use
within the STG package. and FreqTweak. Creox is a bank of the time that you’d normally spend
and synthesizers available on Windows Rosegarden, reviewed in LXF65, is distortion, phase, flange, tremelo and configuring your system on composing
and is no small feat. VST is by far the commonly regarded as the best audio delay effects, connected in series for music, and for that alone, we think it’s
most common format for effects and sequencer for Linux users. It’s a some excellent electric guitar worth it. LXF
synthesizers, so for STG to provide a mature tool used for MIDI composition processing. FreqTweak, on the other
working framework straight out of the and multi-track audio recording, hand, is a crazy spectral delay where
box is excellent. Configuring this featuring matrix and score editors, you can change the phase and delay
manually would involve delicately using a synth and effects plugin of any specific audio frequency band.
balancing Windows emulation with architecture. If you’ve used Cubase on Results vary from muddy caverns to
Linux low-level audio design. another platform, you’ll feel right at something that sounds like converted
VST instruments and effects can home in the Rosegarden. helium nuclei escaping from the core
be used in two ways. Firstly, there is a LilyPond is a brilliant tool for of the sun.
folder on the desktop called VST rendering notation, and Rosegarden Among the synths, the standout is
Plugins. Opening this reveals a can export compatible files natively. As an incredible synthesized pipe organ
selection of Windows VST instruments LilyPond is a command-line utility, it’s called Aeolus. It’s not much to look at,
in their raw library format. The surprise a little disappointing that there’s no just a window with some buttons, but
is that when you click on one, it loads provision for simplifying its use, it sounds sublime. Each button actually
the plugin and makes the connection especially when you consider Fervent represents various organ stops, for
to the audio system automatically. That is aiming STG at the Linux novice. changing the timbre of the sound, and
is impressive. When you need to edit audio files it feels incredibly realistic, especially
STG also provides links to any directly, STG provides three of the most with the built-in reverb. Other synths
Windows partitions on your local common packages available for Linux: worthy of a mention are the mighty
system, which means you can navigate Audacity, ReZound and Sweep. They Alsa Modular Synth, Hexter for DX7
to the location of any VST instruments each cater for a different aspect of the sounds, and FearKiller, a really rich-
sounding VST instrument.

Well-rounded package
Monitoring is provided for by
meterbridge. Usually this is a rather
unfriendly application started from the LINUX FORMAT VERDICT
shell, but in STG you just need to FEATURES 8/10
select the meter you want from the K
PERFORMANCE 7/10
menu, and it connects itself
automatically to Rosegarden’s outputs. EASE OF USE 8/10
Audio applications are rounded off VALUE FOR MONEY 7/10
with K3b for burning a copy of your
While you may argue that all this software
masterpiece to disc. In fact, STG has is available for free, it’s going to take you
plenty of other Linux applications many hours to configure a system that’s as
refined as Studio.. to go!.
unrelated to music-making, and
wouldn’t work too badly as a normal RATING 8/10
Linux distribution. It’s only missing an
Aeolus sounds like the kind of organ Captain Nemo would play. office suite.

www.linuxformat.co.uk LXF70 SEPTEMBER 2005 25

LXF70.rev_studio 25 11/7/05 11:35:15 am


REVIEWS Soul Ride

SPORTS GAME

Soul Ride
Graham Morrison straps a virtual board to his feet, puts on his goggles and
makes his cool face – but still can’t quite get into this disappointing effort.

KEY STUFF

Snowboarding game that emphasises


realistic slopes over impressive stunts.
Also try: Tux Racer.
■ PUBLISHER Linux Game
Publishing
■ DEVELOPER Slingshot
■ WEB www.linuxgamepublishing.com
■ PRICE £14.00

Snowboarding. It’s a strange


thing, but the feeling of
having both your feet
strapped to a plane of wood, sliding at
speed down a precipitous and snowy
slope is one of the best in the world.
It’s this peculiar mix of mountains,
snow and the force of gravity that
spurs thousands of people on to the
slopes each winter to experience the
exhilaration for themselves.
There have been plenty of
attempts to replicate this magic on the
PC, and console games like EA’s SSX 3
or even Microsoft’s Amped 2 have Bombing down the course in replay mode, the only way
genuinely captured some of the we’ve found to get a third person view from the front.
excitement, but until now the only
option for Linux users has been Tux
Racer, and having wear a penguin idea was that you’d play the game, get with another two called Mammoth not penalised for going too slowly, or
outfit on the slopes does reduce the a feel for the terrain and splash out on and Tuckerman Ravine. It comes on a taking an unorthodox route.
realism somewhat. a holiday. single CD, works with kernel version This seems to be important to the
Things got interesting back in 2.2.x or later and requires at least a Soul Ride philosophy, where the game
Wish you were here? January of 2003, when the game 500MHz CPU and an OpenGL engine focuses on the physical
Let’s give a gnarly hand, then, to Soul engine was released under the GPL. graphics card. Basically, any machine interaction between rider, board and
Ride, which was released several years The project can still be found from the last few years should do. snow rather than providing fireworks
ago on Windows. The game’s engine languishing on sourceforge.net, but it and exaggerated terrain.
was then used to promote several real- did result in a Linux version of the Pure and simple The graphics looked tired even
world ski and snowboard resorts: client (as well as one for OS X). Soul Ride doesn’t feature quite the when the game was first released, and
Stratton, Jay Peak and Breckenridge. Linux Game Publishing (thanks for same task-based events that you find four years on they look worse. Even in
Each resort offered a free download, Hyperspace Delivery Boy and Majesty with other snowboarding titles. The the sparsely populated landscape of
which contained the game engine and Gold, chaps) has since resurrected aim is still to get down the mountain in Linux entertainment software, Soul
a geographically correct, three- Soul Ride into a bona-fide Linux game, the quickest time possible, performing Ride’s graphics are poor.
dimensional model of the resort. The including the three real resorts along as many tricks as you can, but you’re The rider is particularly bad,
suffering from a severe lack of
polygons and a stylist that clearly has
YOU CAN GO YOUR OWN WAY no idea what the kidz are wearing at
Whistlers this season. There’s been no
effort made to illustrate the bindings
(the things that hold the border to the
board); instead it looks like he’s
wearing an oversize pair of Doc
e Martens that pivot like an angler,
Hang on as th
ard pi cks up speed. hauling in the catch of a lifetime.
bo
arder right There is a first-person mode, but this
Slow your bo .
d the best path
down to fin makes it extremely difficult to adjust
ur route and
Commit to yo downhill. the angle of your boarder.
t the board
poin

26 LXF70 SEPTEMBER 2005 www.linuxformat.co.uk

LXF70.rev_soul 26 8/7/05 3:03:21 pm


REVIEWS Soul Ride

The degree of
curve into the slope and slow freedom Soul
amazing: you Ride gives you
can go down is
yourself down. any one of th
ese slopes.
The game physics handle all of this
“Think Tux Racer without with ease. The player’s centre of
the herring. Graphical gravity over the board has a profound
glitches aside, this is a affect on how the board handles, and
cool game.” you find yourself angling it to
accommodate the undulations in the
snow before the board touches down.

Control yourself!
Controlling the board takes a little
ATHER
CHANGING WE
getting used to. You can use a joystick,
mouse or keyboard, but with the
keyboard you lose a lot of the subtle
degrees of control. For basic control,
you move either to the left or right to
change the angle of the board on
the slope – the equivalent of the
ea boarder shifting their weight from front
It may seem lik
nice sunset… to back. You have to do this quite
gently, as sudden movements can end and they do look realistic. The textures nature of the snow at your
in disaster. The left mouse button is are of a low resolution, as is the terrain designated start point, it can be
used to ollie (or ‘jump’ in standard detail, but they provide enough visual difficult to get going, but a mode like
English). The boarder crouches while cues to be effective. The graphics are this strengthens Soul Ride’s credentials
the button is depressed, and springs fast, but we experienced some serious in providing more of the feeling and
up when it’s released. issues where the game would freeze less of a game.
change the
…but you can You need to time your jumps for at regular intervals. People As you might expect, there’s an
weather… when the boarder reaches the crest of complained about this when the Linux excellent video-recorder mode where
a hill or top of a ramp, hopefully with client was first developed, and it’s a you can save and replay your best
the result that he flies through the air. pity it’s still present. descents. You can pause and rewind
You’re supposed to be able to perform For sound design, the developers as well as slow the action down, and
tricks at this point, but for this to be seem to have been inspired by a kettle. the camera usually chooses a well-
effective you need to move your The sound of the board bouncing placed third-person viewpoint for any
controller in only one axis. For through the powder is like the noise particularly neat tricks or jumps you
a realistic
…to produce example, to rotate left while in the air, produced as the water reaches boiling manage to pull off.
white-out! you would quickly move left as you It’s a little difficult to be objective
jump. The trouble is that isolating a when it comes to judging this release.
Happily, the game’s real-world single axis with the mouse is If you’re not a snowboarder, you’re
physics make up for any shortcomings extremely difficult – with the result most likely to see it as another old
in the rendering of the rider – it really that your rider is catapulted into game that almost predates the
does feel like real snowboarding. the air, limbs flailing in all Playstation 2, with below-average
As on a real piste, pointing the directions until being abruptly graphics, serious rendering issues
board directly down the slope into the dumped into a pile of snow. and a tendency to freeze.
fall-line results in sharp acceleration. In order to progress though But if you do love
Control the speed of the board by each of the predefined routes snowboarding, you’ll like this
limiting the time you spend in the fall- down a mountain, you must game. It really does evoke some
line, traversing the slope from one side reach the bottom in one piece. of the adrenaline-fuelled craziness
to another, letting the board slip under Speed isn’t important, but each of the real thing. It’s the kind of
your feet to change your angle of course has a par time. You don’t game you play on a hot summer’s
attack. You’re balancing on either the need to be perfect, as your soul rider lunch hour, waiting for the nights to
front or the back edge, and the hard has the equivalent of three lives – if draw in and the first sign of frost. LXF
part comes when you reach the side you wipe out prematurely, you get the
of the slope and need to turn. Let the chance to rewind your descent to a point, cooling slightly for slower
board slide into the fall line, and shift previous point, from which you can sections. This is augmented by a
LINUX FORMAT VERDICT
your weight on to the opposite edge. make another attempt. steam-like spray that ejects from the
In fact, the actions for controlling This removes some of the rear of the virtual board, presumably
FEATURES 4/10
the boarder are similar to how you frustration with the control system, to simulate the glistening cold powder PERFORMANCE 6/10
ride in real life, and Soul Ride captures and adds a new dimension to the that your board throws into the air. EASE OF USE 6/10
this feeling very well. When the slope game as you can attempt several You can also take your boarder VALUE FOR MONEY 7/10
becomes constrained, you’re forced to different lines across tricky terrain. off-piste using the Heli-Drop mode.
Fun but frustrating. This could have been
spend more time in the fall-line, and This presents you with a
so much better.
the board quickly starts to travel at an Unwanted freeze three-dimensional view of the whole
uncomfortable speed. You then need The graphics for the mountains are mountain range, and you manually RATING 6/10
to try to stay in control until you’ve got basic but passable. As we’ve select where you’d like your run to
enough space to cut a wide enough mentioned, they’re based on real data, start. Due to the slightly random

www.linuxformat.co.uk LXF70 SEPTEMBER 2005 27

LXF70.rev_soul 27 8/7/05 3:03:38 pm


REVIEWS Astaro Security Linux

FIREWALL

Astaro Security Linux


David Coulson looks at a Linux firewall you don’t have to be a command-line guru to use.

KEY STUFF client is available for use with Astaro,


allowing Windows systems to connect
■ VERSION 6.0
■ DEVELOPER Astaro AG quickly to our test firewall. Enabling
■ WEB www.astaro.com IPSec on Astaro and configuring a
■ PRICE From $290 for ten users client can be done in under half an
hour, so you don’t have to compromise
Linux makes the perfect security for ease of use.
firewall platform: it has a
small resource footprint and Reportage
a slew of features available rivalling Astaro’s reports are one of its
any high-end alternative. Unfortunately, strongest features. There are plenty of
its inability to clear the user interface graphs available via the web interface;
barrier has hampered Linux as an and it also provides an executive
enterprise network device: it seems report, which rather than being an
that many people holding the IT purse overview is simply all reports and
strings just don’t like the command graphs combined into one document.
line. Recognising this, projects such as Unfortunately, Astaro uses a basic
SmoothWall and ClarkConnect have A fairly simple web interface keeps the guts of Astaro away from the end log browser for reviewing IDS incidents
succeeded in providing firewalls with a user, but SSH is available for those who crave the command line. and packet filter violations – this really
lets the reporting side down. If only
they had applied the same standards

“INSTALLING ASTARO IS AS EASY AS of user-friendliness that they did to


the rest of the UI! All the standard
A FEW CLICKS OF A MOUSE BUTTON.” Linux logs are accessible via the web
interface, but unless you’re familiar
with Linux or are working directly with
graphical interface that even beginners filesystem. Astaro supports numerous As web interfaces go, Astaro’s is Astaro to debug something, they are
can use. Here we’re taking a look at PATA, SATA and SCSI controllers neat and reasonably user-friendly. unlikely to be much use.
another user-friendly product, Astaro which will let you use RAID in a Each section of the Astaro interface, Astaro is a great choice for a small
Security Linux, which is marketed as roundabout sort of way, but it would from packet filter and network or medium-sized business – with
the ultimate in Linux-based firewalls. be nice to use the built-in RAID interface configuration to intrusion systems capable of gigabit speeds,
Installing Astaro is as easy as a few capabilities of Linux. detection software (IDS), has a there’s an appliance available for
clicks of a mouse button – all you Installation from CD takes five consistent look and feel, making it almost any network environment
have to do is acknowledge the licence minutes, and most of this is taken up easy for anyone to find their way We’ve certainly never managed to
agreement and set an IP address. Disk by reading the data from the disc. around. At 1024x768, though, things build a system Astaro couldn’t use the
partitioning is done automatically, but Once installed, the system will reboot do get a little cramped. NICs on, even those with low-cost
there’s no option to perform an and Astaro will boot up, allowing for motherboards with strange chipsets.
installation on to a software RAID administration via a web interface. Click to configure Astaro doesn’t do anything you
Configuring Astaro is easy – once the can’t do with distros such as Debian or
interfaces are set up, everything else Fedora. However, the easy installation
just falls into place. With support for and management Astaro offers could
both bridging and VLANs, Astaro fits tempt IT departments, and a 30-day
in to almost any network environment free trial available online means there’s
and can even be dropped in no excuse for not trying it out. LXF
transparently on a network to perform
packet filtering or intrusion detection
without having to reconfigure any LINUX FORMAT VERDICT
existing infrastructure. This gives FEATURES 9/10
Astaro a huge advantage over devices PERFORMANCE 8/10
such as Cisco PIX, which is a
EASE OF USE 7/10
nightmare to get running smoothly.
Astaro supports IPSec and PPTP
VALUE FOR MONEY 8/10
virtual private networks, allowing for A capable firewall and a great choice for
site-to-site VPNs across a variety of almost any user.

platforms and remote access for users RATING 8/10


Lots of feedback is available through Astaro. This executive report is who need to use the internal network
extremely comprehensive. securely. A variant of the NCP IPSec

28 LXF70 SEPTEMBER 2005 www.linuxformat.co.uk

LXF70.rev_ast 28 8/7/05 3:02:33 pm


REVIEWS ICC 9.0

HIGH-PERFORMANCE COMPILER

Intel C/C++ Compiler 9.0


Is Intel still producing the fastest compilers for x86 Linux? Biagio Lucini is very keen to find out.
It was also a chance to test Intel’s
KEY STUFF
reputation as the best producer of
WHAT’S NEW IN 9.0?
A C/C++ compiler for x86, EM64T compilers around. Intel made an ■ Better support for 64-bit code.
and AMD64 architectures that
unexpected impact in the field a few ■ Improved diagnostics and warnings.
produces optimised code. Also
years ago, and since then ICC has ■ Re-organised optimisation options, with
consider: GCC/G++ and the Portland
Group’s C/C++ compiler. been known as the fastest compiler more of the aggressive optimisations
for Linux, but continuing development appearing at the -O2 level.
■ DEVELOPER Intel among its competitors (particularly ■ New compiler options for more finely-
■ SUPPLIER Polyhedron Software GCC) has made it a fast-evolving grained control on the compiled code.
www.polyhedron.com market and we were keen to see if this ■ Software-based speculative
■ WEB www.intel.com/software/ pre-computation, mainly useful for
new release keeps ICC ahead.
products/compilers/clin threaded code.
■ PRICE £232 ■ Introduction of the GCC_EXEC_PREFIX
or free for non-commercial use Let’s get going environment variable, for better
ICC 9.0 weighs in at around 200MB of interoperability with the host system.
As faithful readers may tarballs, which contain the various
know, we at Linux Format components of the compiler for all of
take efficiency and its supported architectures – IA32,
performance very seriously. We don’t EM64T and IA64. Installation is point-and-click user might not expect file. Once you’ve done that, it is just
care about received wisdom or performed by executing install.sh. In this command-line installation, its matter of typing ‘accept’ on each
common opinion: we like to test things previous versions, this script only simplicity rivals the best graphical licence screen, and inserting a few
for ourselves. So when we heard that worked on RPM-based systems, so it’s installers we’ve seen. paths. Installation takes about five
a new release of the Intel C/C++ a pleasant surprise to learn that this ICC is commercial software, and minutes, depending on how fast you
Compiler (ICC) had hit the shelves, we time it no longer refuses to execute if very early in the installation you’ll be read the licence agreements. What do
couldn’t resist the chance to put its run by an unprivileged user or on a prompted to enter either a serial you mean, you don’t read them?
performance to the test. non-RPM system. Although today’s number or the path to a valid licence Intel is fully committed to providing
not just a compiler but a complete
development environment. Proof of
“FOR THE FIRST TIME, INTEL HAS this is 9.0’s vastly improved integration
with the Eclipse IDE, which adds to the
ADMITTED THAT ITS COMPILERS PRODUCE already impressive number of
development tools (debugger, profiler,
GOOD CODE ON NON-INTEL SYSTEMS.” test manager and so on) distributed
with the compiler. A custom version of

SciMark2 benchmark results on the Pentium 4 system SciMark2 benchmark results on the AMD Athlon XP system
running PCLinuxOS Preview 9. running Debian Woody.

1,000 ∆ GCC 4.0.1 1,000


∆ GCC 4.0.1
∆ ICC 8.1 ∆ ICC 8.1
∆ ICC 9.0 ∆ ICC 9.0
800 800

600 600
MFLOPS

MFLOPS

400 400

200 200

0 0
Composite FFT SOR MC Sparse LU Composite FFT SOR MC Sparse LU
score matmult score matmult

COMPUTATIONAL KERNELS COMPUTATIONAL KERNELS

30 LXF70 SEPTEMBER 2005 www.linuxformat.co.uk

LXF70.rev_icc 30 11/7/05 1:43:12 pm


REVIEWS ICC 9.0

1,000
∆ GCG 4.0.1 32-bit SciMark2 benchmark results on the Opteron system
∆ GCC 4.0.1 64-bit running Red Hat Enterprise Linux AS 3.
∆ EKOPath 2.1 64-bit
∆ ICC 8.1 32-bit
∆ ICC 9.0 32-bit
∆ ICC 9.0 64-bit

800

600
MFLOPS

400

200

Composite score FFT SOR MC Sparse matmult LU

COMPUTATIONAL KERNELS

the whole Eclipse environment and a compared ICC 9.0 with its previous installation procedure regardless of
Java virtual machine guaranteed to KEY TO KERNELS incarnation (ICC 8.1) and GCC 4.0.1. your package manager preferences
work with it are optional extras. Mflops = Floating point operations per On the Opteron system we also and comes with extremely good
The documentation is the best we second, in millions performed tests for both 64- and 32- documentation. As far as speed is
have seen from a compiler. It can get FFT = Fast Fourier Transformation bit code and included the EKOPath 2.1 concerned, there hasn’t been much
SOR = Jacobi successive over-relaxation
very technical, but thanks to highly compiler in the comparison. progress made since the last release –
MC = Monte Carlo integration
visual tutorials doesn’t alienate Serious analysis of these results is which itself wasn’t much better than
Sparse matmult = Sparse matrix vector
newcomers. These tutorials cover multiplications
beyond the scope of this review. But 7.0. ICC still produces very good code,
everything from getting started with LU = LU factorisation some patterns clearly emerged: but the competition is stiff. LXF
Eclipse to the most obscure options on Details at http://math.nist.gov/scimark2 ■ On the Intel-branded processor, ICC
the command line. produces the fastest code, while on
AMD-based systems other compilers LINUX FORMAT VERDICT
Rival architectures distribution – the unstable Preview 9 take the top spot. FEATURES 9/10
For the first time, Intel has admitted version of PCLinuxOS. ■ The 64-bit version of the compiler
PERFORMANCE 7/10
what was obvious to everyone who ■ An AMD Athlon XP 2800+ with is slower than the 32-bit one.
EASE OF USE 8/10
has worked with its compilers: they 896MB RAM running Debian Woody. ■ On the Opteron, ICC 9.0 produces
produce very good code on rival ■ A two-way AMD Opteron 244 with worse code than its predecessor, while VALUE FOR MONEY 8/10
AMD-branded 32 and 64-bit 4GB RAM running Red Hat Enterprise on x86 systems it produces code that Still a good performer, but the focus has
processors too. In light of this, we Linux AS 3. is, at most, only marginally (around shifted from pure speed to providing a
complete development environment.
chose to test the compiler not just on As an indication of the speed of 2%) faster than ICC 8.1.
a Pentium but two other systems: the generated code, we took the ICC 9.0 provides a complete RATING 8/10
■ An Intel Pentium 4 with 768MB SciMark2 benchmark (http://math. development environment for Linux,
RAM running a current Linux nist.gov/scimark2/index.html) and benefits from a simplified and elegant

www.linuxformat.co.uk LXF70 SEPTEMBER 2005 31

LXF70.rev_icc 31 11/7/05 1:43:14 pm


REVIEWS Books

Classic Shell Scripting


Paul Hudson is never letting this book out of his sight. Ever.

BUYER INFO walkthrough with awk (still the bane of


many users) then on to files, processes
■ AUTHORS Arnold Robbins and
and even portability issues, but it all
Nelson H F Beebe
■ PUBLISHER O’Reilly meshes together nicely. As you learn
■ ISBN 0-596-00595-4 new topics, you are presented with
■ PRICE £24.95 practical scripts to drill home the
■ PAGES 534 learning. To top this all off, there’s a
marvellous (if small) chapter near the
The centrepiece of the LXF Towers end on how to write secure scripts,
reference library, the Magna Carta and which doles out good advice such as
Domesday Book all rolled into one on checking that the file you’re working
our shelves, is Unix Power Tools by with isn’t actually a symbolic link to
O’Reilly. Not that we’d ever lend out something unexpected.
our copy, but if we could recommend If we could change one thing, it
only one book to someone who would be to convert some of the
wanted to master Unix, it would be footnotes to general text, but only
UPT. At least that used to be so, but because we prefer books to flow from
since Classic Shell Scripting found its our old age. Instead, it’s a jazzy, whether this was the original goal of start to finish. These are nitpicks, we
way on to our desks we’re not so sure. practical and fascinating book that the authors, but we don’t care know, but this is truly a top book.
We had better commission another totally took us by surprise. Unlike most because this is a masterpiece we
alarmed glass case for the library, programming languages, shell scripts refuse to part with.
because this is officially our new make extensive use of the built-in The book is divided into sections so LINUX FORMAT VERDICT
favourite text. Unix commands – grep, tr, xargs, find, random as to make the Bible look Failing a fourth edition of Unix Power Tools,
Classic Shell Scripting sounds like sort and more must be mastered to organised, but when you read through this is as good as it gets.
one of those tomes that encourage make competent scripts. As a result, it fits together like a jigsaw. So you RATING 10/10
narcolepsy in the bookstore, but that this book is really a hands-on guide to could go from fairly simple topics like
just shows we’re getting prejudiced in becoming a Unix guru. We can’t tell pipelines or text processing to a

Python Cookbook, 2nd Edition


Nick Veitch slithers into the kitchen.

BUYER INFO confident that if you have a Python


■ AUTHORS David Ascher, Alex problem, however obscure, it will be
Martelli and Anna Ravenscroft touched on somewhere here.
■ PUBLISHER O’Reilly The only real problem with the
■ ISBN 0-596-00797-3 book is how long it can take you to
■ PRICE £35.50 find what you want. The index isn’t
■ PAGES 810 exactly expansive, and you may start
thinking about some sort of wheat.
What else would you expect on chaff.sort() to root out the more
the cover of a book about Python useful passages.
than what looks like a cross between Still, through sheer volume this
a mouse, a rabbit and a kangaroo? book should have something you will
This is the second edition of the find useful, even if some parts of it are
Python Cookbook, and now spans merely descriptions of well-
more than 800 pages of code documented module functions.
snippets. The 20 chapters cover a Oh, and it’s a springhaas on the
diverse range of topics including cover, by the way.
simple file and text handling, building everyday Python coders, so the style specific (‘Accented characters in
extensions to the language and using and approach of the advice can vary Tkinter Widgets’) and the downright
exotic third-party libraries. somewhat between authors. extreme! ( ‘Automating the py2exe LINUX FORMAT VERDICT
Each tip is composed of a problem, The recipes themselves will suit a compilation of scripts into Windows The scattergun approach to tips, but some
are sure to hit your target.
a solution and a discussion, which varied palate. They range from the executables’). It’s such a random
might include alternative suggestions simple (‘Processing every word in a collection of topics that we can’t say RATING 7/10
or common ‘gotchas’. The nuggets of file’) and the useful (‘Pretty printing for sure if you will get much mileage
wisdom are thoughtfully submitted by the contents of a database’) to the out of it; then again, you can be pretty

www.linuxformat.co.uk LXF70 SEPTEMBER 2005 33

LXF70.rev_book 33 11/7/05 1:18:30 pm


REVIEWS Books

Don’t Click on the Blue E


At last, an O’Reilly book that Paul Hudson’s dad can understand…

BUYER INFO It’s this devotion to a single


■ AUTHOR Scott Granneman solution that may actually prove the
■ PUBLISHER O’Reilly biggest negative of the book. Rather
■ ISBN 0-596-00939-9 than saying, “IE is good, Firefox is
■ PRICE £12.95 better”, the author takes great pains to
■ PAGES 267 put down Microsoft and Internet
Explorer at every available opportunity.
When it comes to matters of God, This gives the book a childish attitude
my dad is spot on – he is a church in places that isn’t doing it any favours;
minister, after all. But when it comes to it just feels like FUD in reverse. On the
the internet… well, suffice to say that surface, the other big downside is that
he’s still using AOL. That’s not to say the book demonstrates Firefox running
he’s beyond hope: he may still only on Windows, but we can forgive
consider Microsoft Internet Explorer to that. Switching away from IE is the
be “the internet”, but at least he has a there is no longer any need: this book after all, a book designed to cope with beginning of the end of Microsoft’s
Gmail account now. does that for me, and legions of other newbies taking the first steps in open monopoly for many, and anything that
So, while working to solve the ‘geeks next door’ around the world. source. Although there is some speeds that up gets our vote.
inevitable spyware issues on his Yes, this is a whole book on Firefox, discussion of alternative browsers, it’s
machine, I happened to mention to taking you from installation and hidden away towards the end of the LINUX FORMAT VERDICT
him that he would have none of these configuration to extensions and book and uses Firefox as the yardstick Information-packed and accessible enough
problems if he used Firefox. security. It might seem like a hard task against which other browsers are for your family and friends, but it may
Unsurprisingly, this was an alien term to fill 250 pages talking about a web measured. This shows readers that leave them with more questions than they
started with.
to him, Microsoft’s monopoly tactics browser but the laid back style adds to Firefox isn’t the only alternative, but
having brainwashed him several years the weight, as does the vast number don’t expect to hear any bad words RATING 6/10
ago. But while I could try to explain of screenshots designed to hand-hold about it – as far as Granneman is
why IE is bad and why Firefox is good, people through basic tasks. This is, concerned, Firefox is nigh-on perfect.

Linux Desktop Hacks


Graham Morrison attempts to make his system as unstable as possible by trying all of these 100 hacks.

BUYER INFO you pick up when you’ve got a spare


30 seconds, and we often found
■ AUTHORS Nicholas Petreley and
Jono Bacon ourselves flicking through the pages
■ PUBLISHER O’Reilly for some instant gratification.
■ ISBN 0-596-00911-9 If there’s anything to criticise, it’s
■ PRICE £17.50 that Linux Desktop Hacks feels more
■ PAGES 318 like a disparate collection of howtos
than an insightful group of cutting-
Jono Bacon certainly keeps himself edge, system-refining hacks. This
busy. Not only does he write for us means that it may disappoint those
and numerous other publications, he’s who expect new ideas, but it does
got a real job with open-source give the book broad appeal. In fact,
consultancy OpenAdvantage and is an and concise solution to a tricky others are longer, more rambling this probably works best for the
integral member of the LUG Radio problem. O’Reilly, on the other hand, affairs that often break into general intrepid desktop user who’s itching to
team. He’s also one of O’Reilly’s latest seems to believe it’s more of a step- discussions of the techniques involved. start messing around with their system,
signings, and along with Nicholas by-step overview with a little For example, hack number 12 is how but doesn’t know where to start, and
Petreley has written the latest addition background information thrown in for to take a screenshot from the this book will provide them with 100
to the Hacks series. good measure. That’s the case with command line, whereas hack 37 is a starting points.
‘Desktop’, in this sense, is used to the other books in the Hacks series, detailed look at the KDE desktop
describe the machine of a competent and Linux Desktop Hacks is no different. enhancement tool, SuperKaramba. LINUX FORMAT VERDICT
Linux user, not the warm and fuzzy What we get here are 100 tutorial- Consequently, the quality of the An enjoyable read that’s easy to pick up in
world of point-and-click everything, style vignettes on such subjects as hacks varies from the blindly obvious a spare moment. Great to leave by the
side of your PC.
which might not be what some buyers setting up an old computer to use as to the genuinely interesting, and
are after. While we’re picking nits out a firewall and adding drop shadows to there’s something for everyone with a RATING 7/10
of the title, a ‘hack’ is usually your desktop. Some entries are the little Linux experience behind them.
understood to be an unusual, clever brief, smart ideas you may expect, It’s written to be one of those books

34 LXF70 SEPTEMBER 2005 www.linuxformat.co.uk

LXF70.rev_book 34 11/7/05 1:18:34 pm


MySQL in a Nutshell
Nutshell books are terse, but always packed with
info. And that’s just the way Paul Hudson likes it…

BUYER INFO use with it, plus text describing what it


does, with sample output. These
■ AUTHOR Russell J T Dyer
■ PUBLISHER O’Reilly statements aren’t grouped linear-style
■ ISBN 0-596-00789-2 to help you learn to use SQL, as that
■ PRICE £28.50 would be un-Nutshellish. Instead, you
■ PAGES 321 get them in an alphabetical list, with a
quick reference at the front that
Once you’ve spent weeks groups them by type. Elsewhere, many
mastering a system, it’s time to put of the titles simply carry the name of
your learning guides aside and reach the function they cover, again justified
for the relevant O’Reilly Nutshell book. on the grounds of alphabetical sorting.
The series is well established, and in Given that O’Reilly books usually
fact this new edition seems eerily come with high-quality indexes to find
overdue: surely MySQL in a Nutshell such function names, it might have
was out years ago? Not so. This is the been better to throw alphabetising to
first edition of this Nutshell guide, but the wind and provide descriptive titles,
surprisingly it’s arranged sensibly and but it’s horses for courses. We
devoid of the usual typographical certainly feel that, in a reference book
errors – they managed to get this one at least, making things easy to find is
right first time, thus depriving us of pretty important.
comedy review fodder. Towards the back of the book is an
The contents are comprehensive excellent reference guide to
in their coverage of MySQL. At only programming with MySQL, covering
just over 300 pages, this depth of the Perl, PHP and C APIs. Here the
detail is possible by keeping examples code samples come thick and fast and
to the point: you don’t get waffle, you we can’t get enough of it – each
don’t get excess code blocks and you function gets an outing in the
certainly don’t get picture after appropriate language, always neatly
gratuitous picture to demonstrate a written so that you can copy and paste
single point. This is the traditional the code in to your own work without
Nutshell format and needs to come too much fuss. We’ve waited too long
with the traditional Nutshell disclaimer: for a MySQL Nutshell book, and this
if you don’t already know something book satisfies completely. LXF
of the topic the book covers, this isn’t
the place to learn unless you have a LINUX FORMAT VERDICT
lot of patience or experience in
This is an average Nutshell book, which
something similar. places it well ahead of the mass of
The largest section of the book is competitors. Not for newbies.
that discussing SQL statements. Each RATING 8/10
type of statement has a prototype
showing the various options you can

LXF70.rev_book 35 11/7/05 1:18:38 pm


ROUNDUP Text editors

Roundup
Every month we compare tons of software, so you don’t have to!

OUR SELECTION
AT A GLANCE
CoolEdit ...................................39
gedit .......................................... 40

TEXT EDITORS
GNU Emacs ...........................39
Kate ............................................37
nano ...........................................37
NEdit ..........................................38
Minimum Profit................. 40
Tom Wilkinson tests the widely-held theory on LXF Vim ..............................................38
that you can’t find a decent editor these days…
At some point in your Linux- instead focused on the manipulation course, this is only helpful if you agree will run in a text-only environment is
using life you will probably of the text displayed. Formatting and with the program on what a sensible extremely useful.
need a text editor – whether output display is of no concern, and is indentation policy is – there are Finally, we’ll look at how easy an
to write code or simply to edit an left to the web browser, LaTeX almost as many styles of indentation as editor is to learn and to use. A very
application’s config file. There are renderer or some other app that turns there are programmers. A good editor basic editor is easy to learn but hard
countless editors on the market, all the raw text into a finished document. will let you specify your own style. to use for anything but the basics; a
behaving differently and all with Many editors have features and Another important consideration is more advanced editor may make it
different strengths and weaknesses. plugins that make them especially whether the editor can run in a text easy to perform complex changes but
On test this month we have eight useful for programmers. Syntax console. In the event of serious system alienate new users with a complex or
of the most popular text editors. highlighting and automatic indentation problems a graphical environment unintuitive interface – and if you can’t
Between them, they offer both text- are among the most important tools in won’t be available – so an editor that use it, it doesn’t matter how good it is.
based and graphical interfaces (the the programmer’s editor. These allow
latter are known as graphical editors), the user to see at a glance whether
and a variety of features, some of the the code they’re entering is broadly
EDITING WITHOUT AN EDITOR
most valuable being spellchecking, valid, and that all their code blocks are There are ways to edit text files without using a text editor, of course. Any
syntax highlighting and automatic self-contained with no glaring errors. command-line tool that allows the manipulation of a file can be used as an editor,
code indentation. With syntax highlighting, each including cat, which is usually used for outputting the contents of a file into another
Text editors have a different keyword is highlighted are variable program’s expected input, and dd, which is more often used in the creation and
copying of disk images. The tools sed and grep can be used in combination with
purpose from word processors, names and data are in a different
these to perform any function you might wish for. While you’re not likely to use this
although the two often overlap in colour. There may also be distinct
approach very often, it could prove invaluable in the event of a binary-destroying
terms of tools and functionality. While colours for different variable types or disk problem.
a word processor is designed for the function calls. The automatic If you’ve really got a lot of time in your hands, you could write your own tool
input and formatting of text indentation makes it easier to see suited to the task using whatever programming language you want. It would
documents, a text editor will allow any each code block, as sub-blocks are probably be quicker to use something else, though.
form of text file to be edited, and is indented further, aiding readability. Of

36 LXF70 SEPTEMBER 2005 www.linuxformat.co.uk

LXF70.round 36 11/7/05 11:02:28 am


ROUNDUP Text editors

nano
A command-line editor included with many distros.
■ VERSION 1.2.4 ■ WEB www.nano-editor.org ■ PRICE Free under GPL

Nano, released by the Free task. The basic keystrokes required for
Software Foundation, is intended as a the most common functions are
free (as in speech) replacement for explained at the bottom of the screen,
the popular Pico editor, which was and it’s quite straightforward to edit a
developed by the University of configuration file without getting lost in
Washington. Its interface will be modes, or millions of menu options. Basic help is
familiar to anyone who has used the This program is aimed at a specific provided in
text-mode email program Pine, on market and fulfils its aims well – new the form of
which Pico is based. It was released users who aren’t yet ready to get to keystroke
hints at the
because although the source code for grips with Vi or Emacs can still edit
bottom of
Pico is freely available, it isn’t classified files on a text console. the screen.
as an open-source program – anyone Although it lacks most of the other editor, though it does limit what can
building an application on Pico must features of a text editor, nano includes be done. We suspect this won’t be a finding whatever introduced the error
first ask the University of Washington basic spellchecking functionality. problem for most people, though – as can be time-consuming. However, it is
for permission. This is of course less Unfortunately missing, though, is the users expand their abilities they will possible to remove this ‘feature’ with a
free than the GPL, and pressure from ability to add words to the dictionary. move on to something more powerful. simple command-line argument.
distributors such as Debian led to This limits the usefulness of the Only one thing struck us as
nano’s creation. spellchecker, but a limited spellchecker particularly irritating about this editor: LINUX FORMAT VERDICT
Nano is one of the most basic text is better than none at all. line breaks are inserted automatically
Easy to use, but with little advanced
editors available – it has no support Basic functions are accessed by by default. This isn’t necessarily functionality nano has limited appeal.
for features that many programmers holding down Ctrl and pressing desired functionality – imagine writing
find useful, such as bracket matching another key. This is about the most a long block of code that didn’t RATING 5/10
or syntax highlighting. As an editor for straightforward way there is of using compile because the editor had added
plain text, though, it’s well up to the the different options in a text-only a line break in the wrong place – and

Kate
Editor with project management functionality.
■ VERSION 3.3.2 ■ WEB http://kate.kde.org ■ PRICE Free under GPL/LGPL

Kate is one of two editors that are to perform tasks such as collapsing
integrated into the KDE desktop. The functions within a program so that only
other, KWrite, provides a basic text the first and last lines are visible. The
editing option. Kate is a much more code can be restored to its full size
fully featured editor, aimed more at when required. It’s an innovative and Kate provides
programmers than general users, and useful approach to coding, as it allows useful tools such
as project
supports plugins for extending its the programmer to look at an overview management and
functionality even further. of the code they’re working on and collapsible code
As it’s part of KDE, Kate is a zoom in on any particular part that blocks.
graphical-only editor. This allows Kate’s may need attention. Bookmarks can be set within the
developers to concentrate on its As well as the standard code, enabling the user to jump to a browser. This is most useful when
strengths and provide a solid editor programmer’s stuff, Kate provides given file location with a quick menu working with new APIs – highlight the
with enough functionality and some functionality for project selection. Another useful feature function you want to know more about,
extensibility to keep power users management. A project can be involves adding a terminal window into and you’ll likely have manuals,
happy, while at the same time being defined as a collection of files, and one of the editing tabs, rather than a discussions and hints at your fingertips.
approachable enough not to frighten opening the project will open each of text file. This means that it’s quicker to
new users. the files in its own tab. This allows for switch out to the shell (for example to
LINUX FORMAT VERDICT
In common with most of the the editing of multiple dependent files try to compile the program) than it
programmer’s editors available, Kate at once – for example, a header file, might be otherwise. Project management features build on
Kate’s solid base. Overall it’s a useful tool
allows the use of regular expressions C source code and the relevant One of Kate’s more innovative but won’t run in a text console.
when searching and offers the usual makefile. When you’re working with features allows you to highlight
function pair of syntax highlighting and larger projects, such as applications, anything in your text and perform a RATING 7/10
auto indentation. Unusually, Kate also this aspect of the Kate becomes Google search for it, displaying the
supports code folding. This enables it extremely useful. results in Konqueror, KDE’s web

www.linuxformat.co.uk LXF70 SEPTEMBER 2005 37

LXF70.round 37 11/7/05 11:02:35 am


ROUNDUP Text editors

NEdit
Motif-based editor with plenty going for it.
■ VERSION 5.5 ■ WEB www.nedit.org ■ PRICE Free under GPL

Begun in 1991, NEdit is one of the NEdit comes from the top drawer –
older graphical editors on test this it’s extremely easy to use even for a
month. It predates the dominance of newcomer, and has a large feature set
the KDE and Gnome desktops by for more experienced users, including
several years, so was instead built with syntax highlighting in nearly 30
the multi-platform toolkit Motif. Until languages, auto-indentation and a NEdit provides
a clean but
recently, Motif was a closed-source number of options for text wrapping.
functional
product, which could cause problems One particularly useful option shows interface, and
with obtaining and building it (an open- line numbers, which makes it much is easy to get
source clone, LessTif, was available, but easier to see where a spurious started with.
it wasn’t always sufficiently compatible). carriage return has been added to the Searching, as you’d expect from an
The release of Open Motif in 2000 has file, and aids greatly in debugging. editor aimed at a generic ‘everyuser’, to do, and does it well. Sadly, too few
meant that obtaining and building The program also makes it supports but does not require regular people will come across this excellent
NEdit is much easier. incredibly easy to run any given shell expressions – this is probably the best editor, simply because of its reliance
Although it’s been around for a command on the text without saving it compromise between new and more on a toolkit that is no longer in fashion.
while, the NEdit development team out. Some predefined menu options experienced users. We also like
continue to add innovations and keep for this include spellchecking using position marking. This allows you to LINUX FORMAT VERDICT
their editor up to date. Recent ispell, word counts using wc, and make, mark positions in the text that you can
releases have seen the introduction of which enables the program you’re jump back to with a couple of An excellent editor that fuses
sophistication with ease of use. Its limited
tabbed editing, which allows you to editing to be rebuilt and tested without keystrokes, and is invaluable if you’re availability on the desktop is a weakness.
have more than one file open at once, leaving the editor environment – a switching between functions and
and UTF support, meaning that any helpful function when building declarations earlier in the file. RATING 8/10
character in any language can be programs in compiled languages such Despite its slightly old-fashioned
entered into the text file. as C or Java. looks, NEdit does the job it’s intended

Vim
Mode-based but powerful and near ubiquitous.
■ VERSION 6.3 ■ WEB www.vim.org ■ PRICE Free under Vim License

Vim is one of the most maligned these is known as insertion mode, and
text editors available – but quite is used to enter text into the file. This
probably the most popular too. is quite straightforward, and supports
It has a reputation for being the usual features one would expect –
impossible for new users to get to auto-indentation, syntax highlighting,
grips with – and this is probably bracket matching and so on. Any or all
deserved, because unlike every other of these, plus a whole bucket-load of
editor on test here it uses what is other functions, can be enabled or
known as a modal interface, which is a disabled in the mode that doesn’t
throwback to early text editors that ran beep, the command mode.
on very basic text-only consoles that The command mode can be
Vim’s modal interface can be
lacked the ability to scroll in more bewildering for new users – it’s often hard to get to grips with at first.
than one direction. Vim’s interface is unclear what needs to be typed to
based on Vi (indeed, the name is achieve the outcome you want, despite Searching is done by means of be done in Vim, while lesser editors
short for Vi improved), which in turn the excellent vimtutor. regular expressions, which can then might have to resort to external tools
was based on an editor called ed. If Press I (capital i) to enter text and be expanded to replace text with far such as perl or sed.
you’ve tried Vim and found it Esc to return to command mode, more precision and variation than a
incomprehensible we’d urge to give ed where the really interesting stuff takes standard search and replace. An
LINUX FORMAT VERDICT
a go – it’s still installed in most major place. Commands range from the example would be replacing all
distributions and will show you what straightforward (:q to quit, for example) instances of the word ‘Linux’ that An extremely powerful but complex
application that is included in most distros.
things were like 20 years ago. to the complicated – you can tell it to precede the word ‘Format’ with the
Vim’s two modes are often jokingly emulate Vi for example, or to disable abbreviation ‘PC’. Even more powerful RATING 9/10
referred to as ‘The one that beeps, or enable automatic indentation or changes than this are possible – if a
and the one that doesn’t’. The latter of syntax highlighting. regular expression can match it, it can

38 LXF70 SEPTEMBER 2005 www.linuxformat.co.uk

LXF70.round 38 11/7/05 11:02:41 am


ROUNDUP Text editors

GNU Emacs
Allows extensions to be written in a variant of Lisp.
■ VERSION 21.2.1 ■ WEB www.gnu.org/software/emacs
■ PRICE Free under GPL

Loved and loathed in equal a problem with a modern PC, but


measure, Emacs is probably more older machines might struggle at
powerful than any other text editor on times. It’s for this reason that Emacs is Highly
extensible,
test here. Unlike its chief rival Vim, sometimes said to stand for Eighty
Emacs is less
Emacs has only one input mode. Megabytes And Continues Swapping a text editor,
Additional functionality is achieved by (actually it stands for Editor Macros). more a way
pressing key combinations. Indeed, Of course, this extensibility is the of life.
many applications strive to provide reason why the editor is so popular. the extensions that have been bolted
Emacs-compatible key bindings, so Emacs can be used as a graphical on later – is most definitely software program, though, you’ll find you’re
you’ll probably feel at home with web browser and an email program, development, and in this it excels, using these less – as everything can
this text editor even if you’ve never and there are countless games including menu options for compiling be invoked as a keystroke, there’s no
used it before. available, including Tetris, a version of as well as invoking a debugger on a need to take your hands off the
Emacs does have some Eliza (an eighties-style text adventure running program. It can interface with keyboard even for a moment.
disadvantages – chief among them is game) and many more. It’s also a CVS server for the more serious ■ See Emacs in action on page 88.
that, because of its extensibility, it possible to use it for calendaring and developers, and it can give you options
takes up a large amount of memory – managing appointments. for viewing the differences between
LINUX FORMAT VERDICT
at least in relation to other text editors. Some people use Emacs almost files and applying patches.
Extensions to the program are written exclusively as a whole operating Like Vim, Emacs can be run in An excellent and extensible programmer’s
editor, but can be problematic if memory is
in Lisp, a language usually used to environment, so they’ve invented the either graphical or text-only mode. at a premium.
write artificial intelligence routines alternative name Emacs Makes A This allows the use of a familiar editor
within larger programs, and the Lisp Computer Simple. in the event of an X failure, but of RATING 8/10
interpreter takes up much of the As a text editor, Emacs rarely falls course without the on-screen menus
space used by the program. This isn’t short. Its primary function – despite all and tool bars. After a while using the

CoolEdit
Python-extensible graphical editor with debugger.
■ VERSION 3.17 ■ WEB ftp://ftp.ibiblio.org/pub/Linux/apps/editors/X/cooledit
■ PRICE Free under GPL

CoolEdit has a very different feel as time consuming. Other scripting


from the other editors on test this languages are supported, but these
month, despite being obviously a very don’t integrate as comfortably with
similar program. This is probably the editor.
because, rather than use an existing One feature that is unique to
windowing toolkit, the authors have CoolEdit among the editors in our
chosen to implement their own. The Roundup is an in-line debugger. While
program was released in 1996, so it some of the other editors might push CoolEdit’s
predates the ubiquity of the KDE and the boat out and include an external novel looks and behaviour may
Gnome toolkits – viewed in this light, copy of GDB, CoolEdit has a complete not suit everyone, but it’s capable and innovative.
the decision to use bespoke toolkits debugger built in – press a key and
makes a little more sense. your program will be compiled and run It’s hard to see why this might have present. Happily, this was easily fixed,
CoolEdit provides all the through the debugger. This is been included, as it’s impossible to and installing from a binary package
functionality needed in a text editor – invaluable for finding code faults receive mail with the application. we’d have missed this problem entirely,
including our benchmarks of syntax quickly and easily, and gives you an Perhaps this is part of the plan for a so this is only a minor issue.
highlighting, automatic indentation and efficient way to fix a program and test future version, but we’re not why the
spellchecking. But you can expand on it again. It’s also a testament to program’s authors would try to LINUX FORMAT VERDICT
the program’s abilities through scripting. CoolEdit’s expandability – while Emacs compete with Emacs, which already
Looks ugly, but if you want a built-in
These features are more accessible has numerous plugins and feature has a large and established user base. debugger it might be just what you need.
than they are in Emacs, though – the expansions, few are as useful as this. We also had problems building
language of choice here is Python Curiously, CoolEdit features an CoolEdit – it requires the X libraries, RATING 6/10
rather than Lisp, so getting to grips option to send an email, which uses but the configuration script neglected
with writing your own extensions isn’t the current text as a message body. to throw an error if they weren’t

www.linuxformat.co.uk LXF70 SEPTEMBER 2005 39

LXF70.round 39 11/7/05 11:02:44 am


ROUNDUP Text editors

Minimum Profit gedit


Silly name but a serious, functional editor. Gnome’s text editor leaves a lot to be desired...
■ VERSION 3.3.10 ■ WEB www.triptico.com/software/mp.html ■ VERSION 2.8.3 ■ WEB www.gnome.org/projects/gedit
■ PRICE Free under GPL ■ PRICE Free under GPL

Minimum Profit is another editor the cursor over the word you need
that can be run either in an X explaining, and the program will
graphical environment or from the search the man, perldoc or ri
console, allowing users to choose (shorthand for Ruby Information)
which version they’re happier with. pages to find you an explanation.
Although parts of Minimum Profit Another feature that’s emphasised
date back to 1991 it’s unlikely that is the program’s ability to encrypt the
many users will have come across it, text file, protecting it with a password.
mostly because it’s a much smaller While it’s not a new feature (Vim has
project than most text editors, being supported it for some time), most
maintained by just one person. editors don’t make encryption this
This is reflected in its functionality, obvious or easy to use.
which is somewhat uneven in its Templates are also supported, and
implementation – while it supports these can be incredibly useful in
multiple tabs so that more than one preparing documents, web pages and
file can be edited at once, there’s no macros. If there’s a task you use often,
simple undo function. Syntax defining a macro for it will save a lot
highlighting for a large number of of time – you could run a macro to
languages is supported, but again insert header and footer information
there’s no default support for regular to a number of files, or to search all
expressions, something lots of open files for a given set of text to
programmers want to use. Regular replace it. Other editors support this,
expressions can, however, be enabled but it’s much easier to use here.
as an option. As an intermediate editor,
This variation is probably due to Minimum Profit succeeds where many Syntax highlighting appears to be the pinnacle of gedit’s abilities.
Minimum Profit being the product of a others have failed. We hope to see
single developer (Angel Ortega) – it more of it in future. Gedit is the official editor of the some of the most common (including
only provides the functionality that he Gnome environment, so it is probably shell scripting). The syntax highlight
thought to put in. Still, Minimum Profit LINUX FORMAT VERDICT already installed on any computer method also makes a distinction
is much more accessible than Emacs Fitting nicely in the gap between a basic which already uses (or has installed) between compiled and interpreted
or Vim, and more functional than notepad and an advanced developer’s the popular desktop. Unlike KDE, languages, for reasons we couldn’t
editor, Minimum Profit offers some of the
basic editors such as nano. Gnome comes with a single text editor work out – all that seems to be gained
best features of both.
One of the most interesting rather than two aimed at different is further confusion for the user.
functions is the ability to get Minimum RATING 7/10 tasks. As a result, gedit falls There’s no scope for extensibility,
Profit to explain any keyword within somewhere between a programmer’s either by allowing plugins to be written
the file you’re editing – just position editor and a basic notepad application, by or allowing the user to run shell
and it doesn’t really do either job commands against the open file.
A menu-driven particularly well. There’s a Run Shell Command option,
text-mode While gedit offers the usual but it’s not clear how to make it run
interface makes programming functionality of syntax on what’s currently being edited. The
Minimum Profit
easy to get highlighting, indentation and so on, spellchecker is also deficient
started with. none of this functionality is evident (apostrophes are important, folks!).
the first time the program is started. As a basic notepad editor without
Digging around in the options and the programming functions, gedit
settings will eventually reveal the would excel. Unfortunately, with these
program’s features, but we’d rather added so haphazardly it becomes
they were present from the first time confusing for the new user and
it’s started – an empty menu is even frustrating for the programmer, so
more confusing to a new user than there’s little to recommend it to either.
one full of unfamiliar entries.
Even when you do find them, the LINUX FORMAT VERDICT
functionality here is too basic to Gedit offers little to entice either the novice
provide a useful editing environment – or experienced users.
there’s no regular expression matching
in the search function; and the syntax RATING 3 /10
highlighting supports only a small
number of languages, missing out

40 LXF70 SEPTEMBER 2005 www.linuxformat.co.uk

LXF70.round 40 11/7/05 11:02:48 am


ROUNDUP Text editors

TEXT EDITORS OVER TO YOU

THE VERDICT We couldn’t let


to stoke up an
flame war pass
you’re unmove
your opinion of
editors on the
this opportunit
Emacs vs Vim
by. Or perhaps
d by either. Post
the Roundup
LXF
y

www.linuxform forum at
at.co.uk.
Even the most basic better text-editing environment. Each their underlying structure and
editors covered in this has its champions, and given that Vi interface, newer users are more likely
roundup are good enough to and Emacs users want different things to come across graphical editors built which is the only
make a few quick changes to a config out of their editors, the argument isn’t into their environment, such as Kate. truly poor program we
file. It’s in the provision of useful and likely to be settled any decade soon. These editors are being used by an looked at. Even this has potential,
extensible behaviours that they differ. Although GNU Emacs and Vim increasing number of new users who though – if the developers could focus
One of the big debates, which has have made the transition from text- would have used one of the older on one group of users it would help
been going on for decades, is whether only to graphical editors and retained editors in the past – at least until they gedit’s cause immeasurably.
Vi or Emacs provides the need a more powerful program. For newer users needing a
Kate came out well in our console-based editor with more power
Roundup, as well as another graphics- than nano, Minimum Profit provides an
only editor, NEdit. They both provide a easy-to-use interface and a gentle
VIM
more than adequate environment for learning curve, allowing the novice to

9/10 software development. Kate is likely to


be installed on many systems by
default and it has better project
get stuck right in. It isn’t (yet) a very
popular editor, so it isn’t installed on
many systems by default. Nano or its
support, making for easier predecessor Pico, however, are
management of large programs. available almost everywhere.
But NEdit wins through on Overall, though, the best editor we
simplicity – it’s had several years to found is Vim. While it’s hard to learn,
perfect an environment that makes it’s extremely powerful and has a light
complex and simple changes memory footprint compared with
straightforward, and when it comes to Emacs. It’s also about as widespread
editing single files, it’s harder to find a as they come – and small enough to
graphical editor that will do any better. fit on a rescue disk.
The Gnome project would do well If you’re serious about learning the
to learn from this, and if NEdit were internals of Linux, give Vim a go –
rebuilt against GTK it would lead to a you’ll soon learn enough to survive in
Vim is an incredibly powerful editing tool, but is not to everyone’s taste. far more useful editor than gedit, even the most dire situations. LXF

TABLE OF FEATURES
Name Toolkit Text mode Syntax highlighting Script language Debugger Regex support
CoolEdit Home-made ✔ Python ✔ ✔
gedit GTK ✔ N/A
GNU Emacs GTK ✔ ✔ Lisp External (GBD) ✔
Kate Qt ✔ Plugins ✔

nano None ✔ N/A


NEdit Motif ✔ Plugins External (GBD) ✔
Minimum Profit GTK ✔ ✔ N/A ✔
Vim GTK ✔ ✔ Perl/Python/Ruby ✔

www.linuxformat.co.uk LXF70 SEPTEMBER 2005 41

LXF70.round 41 11/7/05 11:02:52 am


HOTPICKS

HotPicks The best new open source software on the planet!

FIREWALL CONFIGURER Firewall Builder works primarily


Mike Saunders

Firewall Builder
with the concept of objects shared
When not hunting
HotPicks, Mike works across firewalls – networks, hosts, TCP
for Willy Wonka. ports and so forth. These are added to
your firewall via a drop-down menu. To
■ VERSION 2.07 ■ WEB www.fwbuilder.org create a new host entry, for example,
This is the place where we get
to profile some of the hottest you work through a dialog that offers
software around. to determine the interfaces
Each month we trawl automatically via SNMP or through
through the hundreds of open manual entry. Helpfully, most of the
source projects that are entries can have textual comments
released or updated, and attached, which is a particular bonus if
select the newest, most another admin needs to fathom out
inventive and best for your what you’ve been doing at some point.
perusal. Most of the HotPicks
Firewall Builder stores its projects in
are available for you to try out
on our coverdiscs, but we've XML format, and generates bash
provided web links if you want scripts for use on the target system,
to make sure you have the ready to be dropped into the system’s
very latest version. startup scripts. These bash scripts are
If you know some open furnished with appropriate variable
source software that you’d like and function names, so manual editing,
us to cover, email me at mike. if necessary, won’t be too much of a
saunders@futurenet.co.uk. chore. The compilation and script
generation process gives you adequate
feedback, and it performs fairly well,
HOTPICKS churning out highly complex projects
AT A GLANCE in a matter of seconds.
Anyterm ................................ 46 Firewall Builder’s interface is busy, but not overly cluttered.

Critical Mass ....................... 45 SSH flexibility


There are two ways to configure a Numerous binary packages are Another nifty feature is the option to
Drivel ........................................47
firewall in Linux: via the command line, available, but if you choose to compile upload your resulting script on to a
Firewall Builder ............... 42 or with a graphical setup tool. Most of from source you won’t have any different system via SSH. This means
GRAMPS ................................47 the major distros now include some problems – only Qt is required, and you can run the configuration
KsirK......................................... 45 form of firewall graphical configurator, the project’s own libfwbuilder has to be front-end on a separate machine.
KXDocker ............................. 46 but often a more advanced, dedicated compiled before starting. Special mention should also go to
Lukutoukka......................... 43 solutions such as Firewall Builder can Firewall Builder’s supremely good

QPaMaT ................................. 43
do a better job. Welcoming layout documentation: the 116-page user
The project’s website is jam- Once you’ve launched it, Firewall guide is peppered with tips and
Vazaar ..................................... 44 packed with extensive documentation Builder offers you the choice of screenshots, and is very well written.
and information, explaining the app’s opening a file or starting a new project Firewall Builder is remarkably
LOOK OUT FOR THE underlying workings in great detail. with a short wizard-like process. accomplished, boasting an excellent
HOTPICKS AWARD This level of professionalism in the So, how easy is it to use? The main interface, stacks of flexibility and
Everything covered in our HotPicks website and support is always a bonus window where configuration takes fantastic documentation. The ability to
section is unmissable, but each
month we single out one project for
– it also keeps middle-manager types place is clean and attractive. generate firewall scripts for OSs other
outstanding feeling confident. Tooltipped icons and keybinding-happy than Linux is a great bonus, and while
brilliance. Only As it’s built on Qt, Firewall Builder’s menu entries abound, and the panels it’s not as welcoming as some of the
the very best
is chosen! front-end is available for Linux, can be easily resized to make good simplistic tools that often come
FreeBSD, Mac OS X and Windows. use of the screen. A handy tree bundled with distros, the added
The current releases support a decent structure in the top-left assists in versatility makes it worth the effort. If
range of firewalling systems: iptables navigation while avoiding too much you’re looking for a firewall config tool
on Linux; ipfilter on Free/OpenBSD clutter, and in general, anyone with that’s loaded with options, it’s well
and Solaris; ipfw on FreeBSD and OS elementary experience configuring worth seeing if it matches your specific
X; and lastly pf on OpenBSD. firewalls shouldn’t be too challenged. requirements – chances are, it will.

42 LXF70 SEPTEMBER 2005 www.linuxformat.co.uk

LXF70.hot 42 11/7/05 1:17:16 pm


HOTPICKS

PASSWORD MANAGER

QPaMaT
■ VERSION 0.4.3 ■ WEB http://qpamat.berlios.de

Where’s the best place to store When first started, QPaMaT


passwords? Ideally, we’d all keep them prompts you for a global password:
in our head and never write them this is the crucial string that keeps
down, but that’s not so easy when all the individual passwords secure,
you’ve got a whole stack to remember so you have to select something
(email, websites, SSH logins…) And difficult. Indeed, the program
then there’s the bothersome problem won’t proceed unless you enter
of password length – it’s a doddle to something übercomplex with
keep track of ultra-short ones, but non-alphanumeric characters.
they are hardly the most secure. QPaMaT’s main window is
Password managers like the awkwardly easy to navigate, containing a
named QPaMaT are the answer, tree list of categories for sorting
providing a single store for all your your passwords – shopping sites, QPaMaT’s
level of configuration
passwords with added safety on top. server logins and so forth. In the right-
for password strengths
QPaMaT is the Qt Password hand pane you enter usernames, is top-notch.
Management Tool, and you’ll need Qt passwords and URLs, along with
along with OpenSSL in order to build additional information such as answers
from source. This should be no to secret questions. blob appears and you can generate QPaMaT’s simplicity, coupled with
problem on most distros, as long as Your entered data is encrypted new passwords to a specific strength. the checking and suggestion features,
you have the Qt development form and squeezed into an XML file. You can set the estimated days it will makes it a pleasure to use. If you’re
packages installed. If compiling from Brilliantly, QPaMaT colour-codes take to crack an entry, and various juggling passwords, always forgetting
source fails for some reason, you can entries according to their strength, so options for auto-filling of entries can vital logins and obscuring your monitor
try the RPM binary. if one of your passwords is weak, a red be tweaked. with Post-It notes, it’s a superb solution.

TEXT READER

Lukutoukka
■ VERSION 0.2 ■ WEB www.helsinki.fi/~pakaste/lukutoukka

From snappy news headlines to dependencies is required for such a


long emails, short blogs to PDF small app, but that’s the downside to
documents, there isn’t much text that using brand-new apps on a cutting-
can’t be displayed on our monitors, edge operating system like Linux.
but many people are still getting Lukutoukka’s main window is a
used to this new way of on-screen spartan affair, designed with
reading. Lukutoukka is an intriguing cleanliness in mind – you don’t want
little app that gives you an alternative any distractions as the text is
to going through a document one whizzing past.
line at a time – instead, it displays After you open a text file and hit
one word at a time in boxes that fly the Play button, Lukutoukka flashes
past your eyes at great pace. It can up the text one word at a time, as
be an effective (although rather quickly or slowly as you want. Smartly,
strange) way to read. it adds a slightly longer pause
Compiling Lukutoukka involves a between words for full stops and
few somersaults: you’ll need to have commas, which works very well.
Guile and Guile-Gnome installed A speed slider lets you step
beforehand, along with their backwards and forwards through a
dependencies (G-Wrap and co). document, and there’s a spinner
Annoyingly, this means that some widget for navigating to specific Wait, what was the last word? Thankfully there’s a rewind option...
components may have to be points in the text.
compiled manually as not many And that’s basically all there is to of other prefs – there’s no need for fascinating to try nonetheless. Just
distros have them all neatly it. The font can be changed to ’em. Whether or not Lukutoukka turns don’t try to read a source-code file
packaged up. And the Guile wrappers something larger (useful if you’re out to be a gimmick or a useful through it – you might go insane.
take an absolute age to compile. It’s sitting back from the monitor and alternative to normal reading is That, or become the best
a shame that such a vast tree of reading), but there’s little in the way entirely down to the user; it’s programmer in the universe.

www.linuxformat.co.uk LXF70 SEPTEMBER 2005 43

LXF70.hot 43 11/7/05 1:17:21 pm


HOTPICKS

ITEM ORGANISER The items can contain nigh-on any


type of file, and can be placed into

Vazaar multiple categories, so you could have


something related to ‘Work’ that is
also designated ‘Important’. Vazaar
■ VERSION 0.19 ■ WEB www.kaskaras.net/vazaar attempts to display relevant
information about the file in the
bottom pane, even providing a Launch
App button for many, so text files, for
instance, will fire up gEdit. The info
panel also displays some file
information such as date of creation
and last modification.

What’s up, docs?


There’s little in the way of configuration
options as yet; nor is there any
documentation at this stage, aside
from the few scraps of information on
the project’s website. It’s still early
days for the project and there is a lot
to be done.
Vazaar is a breeze to pick up and
use, but we’d like to see more desktop
integration. Drag-and-drop support for
adding items from your desktop is
planned for a future release, so open-
source fingers are crossed. Crucially,
the developer has already put care
and attention into crafting a welcoming
interface – this will pay off as the
program matures and finds use in
Trivia question: in which HotPicks was that F1GP shot last included? more ambitious collections.
By the time this issue hits the
Where would we be without packages installed. On most distros assigned descriptive text and an icon, shelves, another release of Vazaar
material possessions? Despite all the these follow the naming convention of making it easier to locate something may be doing the rounds with a few of
talk of the paperless office, most of us gtk-devel, gnome-devel and so on, but when the list of items has started to the missing features coded in and a bit
still have a heap of objects on our the configuration script should let you build up. In another neat cosmetic more refinement. But regardless, it’s
desks that get lost, broken or know what’s missing (gnet is one touch, the category and item lists have already a speedy and attractive little
borrowed indefinitely. So, unless you're dependency that a lot of systems alternating shaded backgrounds, so tool for managing files in a more
fantastically organised and have don’t have installed by default). looking through a long list of stuff elegant way. So if your hard drive is
everything neatly pigeonholed in the Once you have all the building doesn’t hurt your eyes. Categories can falling to pieces with the jumble of
appropriate places, things get a little blocks, running make and make even be nested for especially documents and images scattered
messy. install (as root) will drop the files into complicated collections. everywhere, give it a go.
This extends to computers too. place, and you can start it up by
Even if the paperless office were a running vazaar from a shell prompt.
reality, we have no reason to believe
that things would be any better Pain-free panes
electronically. On our personal systems Vazaar’s main window adopts the
we tend to have music files, emails, current Gnome icon set, fitting in
mid-development projects and a perfectly with the rest of the desktop.
bajillion other things strewn about that A list of categories sits down the left-
can only just be organised with a hand side, while on the right two
traditional directory structure. Gnome panes contain the list of items and
Vazaar strives to make cataloguing their actual contents. The toolbar is
and organising these items on your responsible for most of Vazaar’s
drive altogether more elegant, using a current functionality; some of the
single repository split into categories. menu items have yet to be coded in to
Even though it’s still in early it, but there’s not a lot in the menu
development, Vazaar is moving along anyway so it’s no great loss. It’s all
well and is already good enough for perfectly simple and easy-going.
regular use. By default, Vazaar is supplied with
To compile Vazaar from source four general-purpose categories –
(the only option at the moment, as no Favourites, Generic, Important and
binary packages are available), you’ll Wastebasket – but new ones can be
need to have the Gnome development added in a snap. Each category can be The category options box offers a plentiful range of colourful icons.

44 LXF70 SEPTEMBER 2005 www.linuxformat.co.uk

LXF70.hot 44 11/7/05 1:17:43 pm


HOTPICKS

HOT GA

ME
STRATEGY GAME

S
KsirK
■ VERSION 1.2 ■ WEB https://gna.org/projects/ksirk

A diverting battle for global all the goings-on are detailed along
domination, the board game Risk has the bottom in the status bar. Fancy
many fans – everybody wants to rule visuals aren’t of supreme importance
the world, it seems. It offers a good in a strategy romp, but if you’re
blend of strategy elements, and a running in any resolution lower than
cathartic all-out attack. Experienced 1024x768 your window manager will
players attend Risk Clubs (military have to behave well, as the play area
attire optional), and it’s no surprise takes up acres of space.
that computer-based clones have Two to six megalomaniacs can play,
been doing the rounds for years. One with the option of using computer-
such is KsirK. As the K profusion driven opponents if necessary. KsirK’s
suggests, it’s an implementation for author describes it as a “basic AI”, so it
KDE, so you’ll need the KDE may be something of a pushover for
development packages installed to more experienced Riskers and strategy
build the game from source. fans. Using the toolbars you can
KsirK is a tad rough round the organise your army, invade territories The KDE–Gnome flame war soon engulfed the planet.
edges when it comes to presentation; and control various other aspects of
the tiny controls don’t give much the play without any big hassles. World mode (which would be a major boost) current release, KsirK is an enjoyable
away (save for the tooltips) and the domination has never been simpler. and the option to select different little game. If you fancy something
in-game icons are rather minuscule. KsirK is playable as it stands right maps. It’s worth checking out the more cerebral than Critical Mass
Animated battles and rudimentary now, but in the pipeline are better CPU development versions to see these (covered below), try it out and
sound effects liven things up a little – opponents, networked multiplayer features implemented. But even at the release your military urges.

SHOOT-’EM-UP GAME

Critical Mass
■ VERSION 0.9.11 ■ WEB http://criticalmass.sourceforge.net

“Your world has been overrun by guess what? You’re just the person to Building from source should be adrenaline pumping when the fate of
an aggressive army of space critters,” do it. Having been put in control of a hassle-free – it requires only SDL and the world’s at stake. It’s the frantic
the game’s blurb notifies us. Well, it tiny spacecraft, you must eliminate the some add-on libraries, which are pace of the action that gives Critical
beats the current situation of the invading forces and pick up resource available for almost every distro. Mass a lift; there’s very little let-up in
world being overrun by lawyers and containers along the way. Yes, it’s the Critical Mass launches straight into the intensity and you’re constantly on
marketing types, but clearly usual blasting fare, but it’s all rather thumping techno music, a parallax your toes. We challenge anyone to
something has to be done. And compelling nevertheless. scrolling starfield background and a last more than one minute on the
menu for tweaking various settings Insane skill level, which is aptly
(full-screen mode, resolution, sound named – it’s quite comically difficult.
and the like) or jumping straight into Scrolling shooters have a real
the gameplay. On the whole, the retro feel today, but there’s still plenty
presentation is pretty decent. of mileage in the gameplay and
Occasionally the enemy fire gets lost they’re a good choice when you
in the background, but thankfully that fancy a quick blast of something
can be disabled. diverting. Critical Mass ticks these
What appear to be carefully drawn boxes – it’s loud, lively and
little sprites turn out to be polygon challenging, even if it’s not the most
models when you zoom in, so the imaginative game ever conceived.
game performs well even on less
sprightly boxes. The gameplay itself is
pretty generic: shift your craft around
the screen, obliterating everything in
sight and making sure you’re not
blasted to smithereens by enemy fire.
While the soundtrack begins to grate
after a while, it’s fairly appropriate for
It lacks visual finesse but Critical Mass has plenty of retro charm. the quickfire action, keeping your Firewall Builder is also an ace pilot.

www.linuxformat.co.uk LXF70 SEPTEMBER 2005 45

LXF70.hot 45 11/7/05 1:17:45 pm


HOTPICKS

DOCK FOR KDE

KXDocker
■ VERSION 0.33 ■ WEB www.xiaprojects.com/www/prodotti/kxdocker/main.php

KXDocker is a workalike of the Helpfully, binary packages are


‘dock’ panel of Mac OS X, with available for most popular distros,
snazzy extras sprinkled on top. Its but compiling KXDocker from source
default appearance consists of a shouldn’t pose any problems if you
rounded grey panel, into which a have recent versions of KDE and Qt An Anyterm session logged into a laptop far, far away...
handful of Mac-esque icons of installed. Just do ./configure, make
applications and folders have been and make install (the last step as WEB-BASED TERMINAL

Anyterm
dropped. As you run your mouse root) and then run kxdocker from
over these launcher icons they scale a Konsole. The additional resources
up smoothly, which is a joy to package bundles together a wealth
behold – even on older systems, the of themes, icons and plugins, so
■ VERSION 1.00 ■ WEB http://anyterm.org
effects don’t stutter. Each launcher that’s worth installing too.
has an alternative icon that appears Our only gripe with KXDocker is
when a program is launched, an the startup speed: it’s not alarmingly One of the worst nightmares on the web page, an XMLHTTP
event also marked by amusing slow but it’d be nice to have it that server administrators face is being channel to the web server and
bouncing animations. running a bit faster. Otherwise, it’s a unable to log on to a computer. It’s Anyterm’s Apache module, which
To alter settings, KXDocker fine desktop addition, bringing fancy doubly frustrating when it’s not the passes on requests to an emulated
includes a slightly clumsy config cosmetic touches and a cheerful server at fault, but the lack of tools – terminal. You can even run several
dialog. It has most of the options OS X feel to KDE. It’s also a great a restricted installation on a desktop terminals at once which, with the
you’d expect, but they’re not way to wow potential newcomers box, where you can’t install SSH tools addition of tabbed browsing, is very
organised elegantly and many are with a flashy desktop, instead of the such as PuTTY. In such a scenario, effective. Naturally, there are various
lacking proper descriptions – not a relatively dull normal panels. Anyterm could be a lifesaver: it security issues involved with such a
major issue for a piece of software Linux desktops receive a fair bit provides a terminal embedded in a design, but Anyterm supports Secure
that’s still only at version 0.33. You of criticism for aping other operating web page, acting like a regular shell Sockets Layer encryption to allay
can manage the launchers, alter the systems, and many people argue on the server. some of your safety fears.
theme, tweak effects and enable that we need more innovation. But Unlike other efforts, which involve It’s all delightfully compact and
additional plugins. These include a plucking ideas from established Java applets or are limited to single easy to set up.. There’s no lengthy
graphical pager, analogue clock and desktops can work well – it gives commands, Anyterm is built with just configuration (though you can alter
battery monitor – most of the add- users a familiar environment – and JavaScript and some behind-the- the terminal’s dimensions) and the
ons you’d expect to find in other we see no harm in valuable features scenes trickery. Installation is fairly end result is much lighter than a Java
desktop panels, and hopefully like this one recreated on Linux. straightforward: you’ll need to compile equivalent would be. Best of all, it’ll
there’s more to come. Well worth a look. the ROTE terminal emulation library, work just about anywhere – and the
then build Anyterm’s own Apache author plans WAP support in the
module (only Apache 2 is supported) development version!
before dropping the files into place. A
quick hack of the httpd.conf and
you’re ready to go – just point the
browser at the main HTML file.
Anyterm presents an unfurnished
page containing a terminal emulation
window, which for the most part
behaves like any standard terminal. It’s
not the fastest thing in the world, but
colours are displayed and most
ncurses-based apps run as expected
so it handles the vast majority of tasks
with ease. Indeed, the author’s own
demo site shows a playable Tetris
variant in action. In most cases it’s
likely to be used for admin chores –
nothing to fault here.
KXDocker’s icons resize very smoothly as the mouse runs over. Nice.
All this is achieved using JavaScript

46 LXF70 SEPTEMBER 2005 www.linuxformat.co.uk

LXF70.hot 46 11/7/05 1:17:48 pm


HOTPICKS

HotPicks REVISITED ALSO RELEASED


WEB LOG CLIENT opening up the entry editing box for New and updated software that
also deserves a look...

Drivel
jotting down your blog. Drivel is
geared towards regular bloggers
■ StressOut 0.1.0
and, as such, includes a few default MySQL benchmarking
■ VERSION 2.0 BETA 1 ■ WEB www.dropline.net/drivel settings for posts, and options for www.anerva.com/stressout
sitting quietly in the taskbar you can
also add coloured HTML tags . ■ Jackbeat 0.5.1 – Sequencer (see
LXF69) www.xung.org/jackbeat
By far the greatest new addition
since 1.0 is the widened support for ■ Code Browser 2.0
blogging systems and protocols. Programmer’s editor
Whereas the early release only http://code-browser.sourceforge.net
worked with LiveJournal, 2.0 brings
■ Fotoalbum 0.10 – Image
about Movable Type, Blogger, Atom,
management http://kisocd.
and Advogato support. Syntax sourceforge.net/page11021946.htm
highlighting and spellchecking are
two other notable improvements, ■ Knight’s Mail 0.1.1 – Email client in
Mozilla XUL www.knightsmail.com
while the client can now ping the
popular blogging site
www.technorati.com after you’ve
made an update. Thankfully, the
new goodies haven’t affected
stability – it’s still very solid.
Drivel’s 2.0 release offers
Interface-wise, Drivel hasn’t changed a great deal since 1.0. support for even more blog systems,
which could bring it many more
■ Outgun1.0.2 – Multiplayer action
Designed as a dedicated blogging Gnome and curl to build from source; users, and if you keep a journal with
game http://koti.mbnet.fi/outgun
app that’s separate from the typical the RPM on our coverdisc should work any of the above systems we highly
web interfaces, Drivel impressed us for several distros. recommend it. It’s clean, fast, simple ■ gslapt 0.3.1
back in LXF57 with its polished design Drivel’s initial window prompts you and fits in well with Gnome (or Slackware package management
and rock-solid stability. You’ll need GTK, for a username and password before indeed Xfce). http://software.jaos.org/#gslapt

■ CheckGmail 0.9.5
Gmail notified in your systray
GENEALOGY SOFTWARE http://checkgmail.sourceforge.net

GRAMPS ■ JOE 3.3 – Powerful text editor


http://sourceforge.net/projects/
joe-editor
■ VERSION 2.03 ■ WEB www.gramps-project.org
■ OpenRelease 0.1.2 – Software release
Back in LXF56, GRAMPS (the assistant http://open-release.sf.net
Genealogical Research and Analysis
■ Kat 0.5.2 – Desktop search (see
Management Programming System), LXF68) http://kat.sourceforge.net
snapped up our Hottest Pick award
thanks to its admirable progress and ■ MoreAmp 0.1.12
Battery-saving MP3 player
attention to detail. As one of the very
The supplied http://sf.net/projects/moreamp
few genealogy-related tools for Linux, example file
GRAMPS really stands out, and has is a good way ■ ttylinux 4.7 – Ultra-tiny distro
made superb progress since we took a to understand www.minimalinux.org/ttylinux
look at version 1.0. You’ll need Python GRAMPS’s
inner
2.3 and Gnome 2.8 installed to run workings.
GRAMPS, along with the PyGTK and
Gnome–Python bindings (supplied on A boatload of updates and new loads of glitches have been cleaned
our coverdisc). features has arrived with 2.0. These up, and it proved to be robust and
GRAMPS’s interface hasn’t changed include: import and export support speedy in our testing.
drastically since the last major release for the GeneWeb format; a snazzy GRAMPS may be more of a
– the layout has been tweaked, but export wizard for transferring data specialised app than, say, a word
otherwise it retains the attractive icons elsewhere; find-as-you-type in the processor, but it still deserves a lot
and professional look. Managing your list views; an undo facility; report more attention than it’s getting at ■ Sysprof 0.9 – System profiler
www.daimi.au.dk/~sandmann/sysprof
data on individuals and their generation via command-line options the moment. It’s a triumphant
relationships, pictures and any further (useful for scripting); a bunch of new demonstration that open-source ■ GGZ Gaming Zone 0.0.11
details is straightforward; and it’s great database back-ends including teams can produce professional and Networked board games
to be able to generate reports and Berkeley DB; and a plethora of polished apps for the long tail of the www.ggzgamingzone.org
graphs in various formats (such as tweaks and bugfixes. With three software market. Genealogists, give
■ MyServer 0.8.1 – User-friendly web
HTML or OpenOffice.org Writer files). minor revisions since the 2.0 release, it a spin! server www.myserverproject.net

www.linuxformat.co.uk LXF70 SEPTEMBER 2005 47

LXF70.hot 47 11/7/05 1:17:56 pm


WHAT ON EARTH PDTP

What on Earth is...

PDTP?
>> What does a Post-Diploma
Training Programme have to do
with free software?
Nothing – this is an all-new four-letter acronym that
>> Such as…?
Nothing annoys Paul Hudson
more than choosing a mirror;
but will PDTP manage to end
the rule of BitTorrent?

Well, let’s first start by reviewing how BT


works. A hypothetical file, fc4dvd.iso, is on a server
somewhere. This being 4GB in size and very popular,
has very little to do with diplomas. Instead, it’s the the poor server will soon find its bandwidth
Peer Distributed Transfer Protocol: an advanced file overwhelmed, and most potential downloaders will
transfer system designed to distribute bandwidth be turned away empty-handed. BT solves this
needs across many clients. problem by allowing the creation of a tracker: a
server that monitors people trying to download the
Call me stupid, but that sounds
>> like BitTorrent.
file, and gets them to share it among themselves.

So that tracker hosts the file


Indeed it does, and to be fair, PDTP is very close to
BitTorrent in its goal and design. However, there are >> instead of the server?
enough differences between the two to warrant the No – the original file stays in the same place. The
developers starting from scratch. That said, if you downloader goes to the tracker rather than directly
understand how BitTorrent works you’re already a to the file. If they are the first person to request it,
long way to understanding how PDTP works. they will start downloading it direct from the original
server. Otherwise, the tracker directs them to the
So it’s an improvement on
>> BitTorrent?
original server and also to the first client – the first
client will serve what it has so far to the second
Some Java developers will tell you that their client. As more clients come on board, the transfer
language is an improvement on C++ because Sun speed picks up.
corrected all the design errors in C++. On the
How does the tracker know who
flipside, lots of C++ developers will tell you that Java
has many brainfarts all of its own, proving that it’s >> has what parts of the file?
awfully hard to improve on something without When a client first connects, the tracker sends it
weakening it in other ways. information over HTTP about other clients
downloading the file so that it can start downloading
So you’re saying that PDTP
>> isn’t perfect?
from them. BT is quite smart in this respect, with
clients being programmed to download the least-
Well, a key sign that the developers might not be popular chunks of a file first so that overall
firing on all cylinders is their claim that PDTP must distribution of the file is kept equal. As clients receive
be better than BitTorrent because BT is written in sections of the file, they report back to the server so
Python and is therefore slow. That’s true, but unless that other clients can use them as a server for the
you’re running on a 486 you probably won’t notice part they’ve just downloaded.
the difference. Python is very portable, which is a
OK, thanks for the refresher. Apart
huge advantage over C – the language in which
PDTP is written. >> from Python, what’s so
terribly wrong with BT that we
Surely the choice of language is need PDTP?
>> pretty minor in the grand scheme
of things?
Well, we can only hope. But there are many other
key differences between PDTP and BT.

48 LXF70 SEPTEMBER 2005

LXF70.woe 48 8/7/05 5:16:51 pm


WHAT ON EARTH PDTP

Ah. So are PDTP clients different

ILLUSTRATION: CHRIS WINN


BT is designed to allow scalable downloads – to
distribute a file to thousands of users simultaneously >> from BT clients?
rather than just a few. It turns out that each chunk of Apart from being written in C rather than Python,
a file is just 256KB in size, which takes under ten they are largely the same – the real magic comes in
seconds to download on a broadband internet the protocol.
connection. So, even if only 1,000 people are trying
Go on…
to download our DVD ISO file we still get 1,000
HTTP requests going over the network every ten >> Well, unlike the very basic Torrent files
seconds as the clients update the tracker with their associated with BT, PDTP uses an XML-based
download status. A hundred requests a second is a format to allow metadata to be attached to files.
lot for most servers, and a huge bandwidth waste in Want to know what codec a video file uses before
itself; but what if we 10,000 people are downloading you download it? How about grabbing the name of
a file, or 100,000 people? In these scenarios BT falls an artist and the album while you download music?
over spectacularly – instead of the original file server
But downloading music is piracy!
getting swamped, the tracker gets swamped.
>> That depends on where you live, and what
How does PDTP get around this?
>> Well, in the same way that BT distributes file
you’re downloading. But the use of XML is very cool…

Yes, but XML hardly makes things


downloading among the clients, PDTP also allows
you to distribute the job of the tracker across >> easier – the nice thing about
multiple machines. These trackers communicate to standards is that there are so many to
clients, but also with each other to maximise choose from, right?
bandwidth usage. That’s true, but the developers are working towards
using the Dublin Core Metadata element set, so you
should be able to interface with the metadata from
many XML-enabled applications. It should make it
much easier to search networks for files you’re
interested in…

I didn’t think there were that


>> many BT downloads around…
Well, no, there aren’t. But that’s largely as a result of
the overhead of setting up a BT download – it’s
really designed for individual files. On the other hand,
PDTP is designed to replace FTP and HTTP for
popular downloads, and so has been designed to
handle multiple nested directories of files, like an
FTP server. One of the promised features is the
ability to run a simple script that indexes a directory
and makes it available online automatically.

That sounds a lot easier, but surely


>> if one file server is expected to
provide many files it will just get
overloaded that much faster?
In a very basic PDTP configuration, that’s quite true.
In fact, with multiple tracker servers it becomes
possible to serve many more clients, resulting in the
file server getting overloaded much faster than it
would with BT. However, PDTP lets you spread the
load, allowing you to set up a PDTP piece proxy
server that spreads the load of the PDTP file server.

Wait, your terminology is


>> confusing me – there’s a server, a
file server, a proxy server… they all
sound the same!
Although a lot of the technology is the same,
PDTP uses different terminology from BT,
which causes some initial confusion. You
already know what the client is – that’s us,
downloading files. A PDTP server is what we >>
would normally called a tracker – it tracks

LXF70 SEPTEMBER 2005 49

LXF70.woe 49 8/7/05 5:16:54 pm


WHAT ON EARTH PDTP

>> which clients are around, which parts of the files


>> Hold up there – you didn’t
>> That sounds quite CPU-intensive –
they have, and also makes sure that clients upload a mention checksums before. I thought PDTP was fast?
fair amount of data compared with what they Only because it’s a common-sense precaution. It is fast, but it doesn’t achieve that by compromising
download. A PDTP hub hosts the files being served Transferring a big file over the internet is very hard to on security. For a start, PDTP ditches HTTP in place
to the network, and is the ultimate root of the do, but transferring several thousand small files that of its own new protocol. HTTP is a very easy,
network – which is why it’s called the hub! combine to make the big file is even harder. BT gets connectionless protocol that was designed for
The hub serves up the XML description files so around this by using the Secure Hash Algorithm transferring textual information. BT uses it because
that everyone knows what files are available and (SHA1) to generate a checksum of each file part, most developers understand how HTTP works and it
their checksums. There’s also the piece proxy, which which is used to ensure that the part arrived safely. already has a lot of support in the industry. However,
spreads the load of the hub, and a standard proxy, PDTP takes this a step further by using the Digital HTTP is much too complicated when all you want to
which is designed to allow hosts behind firewalls to Signature Standard (DSS) to cryptographically do is let a server know you have successfully
take part in the network. protect and checksum each file part. downloaded a file chunk and want the next one.
PDTP uses a binary protocol that can be validated
easily to make sure each request and response is
valid, and is much faster for computers to use than
HTTP. Keep in mind that HTTP is text-based, which
means that it needs to be parsed and understood by
the computer before it can be acted on; binary
protocols get around this.

But what about the security issues


>> associated with binary protocols?
The ASN.1 protocol recently had two
big security holes!
That’s true, and that’s why PDTP doesn’t use ASN.1.
Not only does the complexity of ASN.1 breed
security issues, but it also slows things down – PDTP
is about performance, remember! Having a binary
protocol does make development harder, but the
PDTP development team are working around that by
creating a client library.

Something accessible that


>> everyone can use…
…without having to learn the protocol themselves –
precisely. The client library will have all the binary
protocol data handling and validation, but expose to
developers a wrapper that means they shouldn’t
need to get their hands dirty with the hard stuff. It
also means that developers can go ahead and use
Python or their language of choice, but the core of
the system will remain in lightning-fast C.

I’m seeing lots of “will”, “should”,


>> and “promised”; nothing concrete
at all. What’s going on?
PDTP is largely still on the drawing board, where it
has been for some time. You see, BT filled an
immediate need: home users were increasingly using
broadband, which moved the bottleneck from users
to servers – they just couldn’t keep up with people.
BT made it possible for lots of users to download
popular files; the design was very simple. Of course,
it has evolved from that point to add more features,
but this bottom-up approach to development has
meant that incremental improvements have been
added to something that’s already in use. The PDTP
developers are trying to put all the features they
want into the initial release, which is taking a very
long time. As Linus Torvalds once said: “Nobody
should start to undertake a large project. You start
with a small, trivial project, and you should never
expect it to get large. If you do, you’ll just overdesign.”

50 LXF70 SEPTEMBER 2005 www.linuxformat.co.uk

LXF70.woe 50 8/7/05 5:16:57 pm


WHAT ON EARTH PDTP

So PDTP has overdesigned a little?


>> Well, it’s certainly not starting small, that’s for
This is written using Qt for cross-platform support –
Linux is one of the key target platforms, naturally,
stand between yourself and the server. So, instead of
client A downloading a file directly from server B,
sure. The team had planned to release the first but Windows, BSD, Mac OS X and Solaris are also client A asks client C to download the file from B,
milestone version at DefCon 12 last summer, but on the list. and it passes the file along – B need never know A’s
they missed that deadline. Large parts of the project IP address. Of course, even this isn’t secure: all it
I think I’ve grasped all the
are still in pre-alpha stage – the code is there, it’s
usable, but it’s not suitable for public testing. Some >> technical bits now. Practically
would take is the RIAA (or some other litigious
group) to create a number of C clients and watch all
parts are already in alpha testing, but the whole speaking, how will PDTP make a the traffic.
project needs to be complete for any one part to difference in a world of BT?
Wait – BitTorrent isn’t anonymous?
really be usable. Top down, you see. Some things
have been left out so far, such as support for IPv6.
For most people, the key difference will be PDTP’s
directory-oriented nature. Sites like SourceForge, >> No, and neither is PDTP. Can you hear the
Support for standard IPv4 is already there, and it’s MySQL.com and PHP.net all rely on an outdated sound of sirens approaching?
not hard to add support for IPv6, but it is hard to system of mirrors that requires you to go to a
I’m innocent!
add support for IPv6 hosts that want to talk to IPv4
hosts – hence the lack of code. This may be added
website, choose your file, go to a different website
depending on your location in the world, then finally >> Tell that to the judge! BT and PDTP aren’t
in the initial release, but it will probably be delayed. get the file you were after. Not only is this a waste of designed to be anonymous, and it’s unlikely they
time, it’s a waste of resources: while one server is ever will be. To be fair, there’s little need: unless
Hey, this is supposed to be “What
>> on Earth is PDTP?”, not “What on
groaning under the weight of a thousand users, it’s
quite possible that three others are crunching
you’re trying to download Revenge of the Sith, you
don’t really need anonymity. Downloading illegal
Earth might PDTP be one day?”! SETI@Home blocks in their idle time. PDTP software and movies would be made easier, yes, but
that’s the last thing that the BT and PDTP
developers want. They already have a hard enough
“WITH PDTP YOU DON’T HAVE TO time avoiding lawsuits as it is, without adding
features that will almost inevitably be used for
CHOOSE A MIRROR, WHICH SHOULD copyright theft.

SAVE MONEY AND SPEED THINGS UP.” But what about freedom of
>> speech? What about my rights?
Yes, but we do try to use this space to highlight new eliminates the need for human intervention. Rather I’m sure there’s something in the
and interesting technologies. Otherwise, how can you than choosing a mirror, each user is served by every Universal Declaration of Human Rights
look cool in front of your friends? mirror along with other users. Not only does this about this!
eliminate the need for distributors to spend so much I think you’re on your own there. If you want to
Fair enough. So are they looking
>> for developers to help out?
time mirroring data, it should also save money and
make things faster.
download legal stuff, great, just do it – no one cares
who downloads Fedora or Mandriva, and no one is
Is a bear Catholic? Anyone with an interest in C or spying on you. You’re just not that interesting, sorry.
It sounds like they’ve really got
network programming is encouraged to help out –
even if it’s just running the code and seeing what >> it under control. Is this the end
But if you want to avoid paying people for their work
and download copyrighted things for free, think
breaks. It’s under the OSI-approved Apache License, for BitTorrent? again: PDTP doesn’t come to the rescue.
and you should be prepared to contribute your work Well, no. In fact, BT is moving the goalposts
So where do I go from here if the
back under the same licence. somewhat by altering its infrastructure to work
around many of the problems PDTP is designed to >> software isn’t available just yet?
So is the actual specification
>> available to work to?
fix. In May of this year, Bram Cohen (the creator of
BitTorrent) uploaded a new beta of BT that added
You can download one of the nightly source code
builds straight from the PDTP repositories. The client
There are drafts at http://ptdp.org/protocol.php, support for trackerless torrents, effectively library is available from http://svn.pdtp.org/
but at the time of writing they are all under decentralising the BT system. This was the biggest snapshots/libpdtp-snapshot.tgz and the server
production and remain incomplete. For example, the scaling issue in BT, and the prime reason for the components available from http://svn.pdtp.org/
developers are still waiting for a permanent port creation of PDTP – the slow development of PDTP snapshots/squall-snapshot.tgz. If you have
number to be assigned to them from the Internet has caught up with it. And there are other BT Subversion installed (see our tutorial series if not),
Assigned Numbers Authority (IANA). However, aside improvements on their way, such as the ability to you can get your mitts on the very latest code with
from that, the rest of the protocol specification is search the new trackerless torrents for specific the command svn co http://svn.pdtp.org/svn/
available for developers to read and implement if content direct from Firefox. This is a busy time for BT, libpdtp or svn co http://svn.pdtp.org/svn/squall.
they can’t wait for the client library. but the important thing is that each improvement is If you’re interested in helping out with the
incremental: users can enjoy all the benefits of the development effort, you can contact the lead
Are the developers producing the
>> client library alone, leaving third
existing system without having to wait for the
updates, unlike with PDTP.
developer directly at tarcieri@pdtp.org.

parties to do the rest? Any particular dependencies I


Is PDTP the only thing trying to >> need to be aware of?
Not at all! The server components – the hub, the
server, the proxy, and the piece proxy – are all being >> edge out BT? Well, remember that the software is still pre-alpha,
actively developed by the core PDTP development In the spirit of choice, there are a number of other so the developers haven’t had time to clean the
team. The project is called Squall, and you can distributed download systems around, including code up much. One thing you definitely should have
download it from the SourceForge site at http:// GNUnet, Rodi, MUTE, and others. Rodi is particularly installed is libcrypto, which adds the DSS support for
squall.sourceforge.net. They are also working on interesting, as it is able to offer some degree of checksumming. For more information, go to the
a client program that uses the library, called Skyfire. anonymity by using other clients on the network to ecxellent FAQ at http://pdtp.org. LXF

www.linuxformat.co.uk LXF70 SEPTEMBER 2005 51

LXF70.woe 51 8/7/05 5:17:01 pm


DEBIAN AT A CROSSROADS

COVER
FEATURE Debian at a
crossroads
Sarge is out at last – a release that at one time seemed as likely as soaring swine –
but it’s delays and waning influence, not features and improvements, that people are talking
about. Richard Drummond assesses the road ahead for this freest of Linux distributions.

O
n June 6 this year you could
almost hear the collective sigh
of relief from a thousand the next one. And the Debian Project
Debian developers around the has some challenges to face as its
globe: the next version of the developers get to work on Etch, the
Debian GNU/Linux distribution name for what will eventually become
– version 3.1, codenamed Sarge – had the next stable version of Debian.
at last been officially released after a The primary challenge appears to
difficult three-year gestation period. be an internal management one: how
Some of us had wondered if we would does the Debian Project ensure that
ever see it. users aren’t made to wait another
In software development you’re three years for Etch? That people
seldom allowed much time for rest, might be prepared to wait that long at
however. No sooner is one version out all says much for the project’s unique
the door than it’s time to think about standing in the open source community
and the affection users feel for it. But
with its many derivatives gaining
momentum and large user bases of >>
their own, Debian has little time to lose.

www.linuxformat.co.uk LXF70 SEPTEMBER 2005 53

LXF70.feat_debian 53 11/7/05 11:01:23 am


DEBIAN AT A CROSSROADS

>> The Debian Project is an GNU/Linux, although they’re generally First, Debian is a non-commercial
association of developers who have just known as Debian for short. entity, funded by the charity Software
come together with the purpose of In terms of user numbers and In The Public Interest, and, in the main,
creating a high-quality operating mindshare, Debian is by best estimates Debian developers are all volunteers.
system built entirely from free software. the second most popular Linux Second, Debian is serious about
The name Debian combines the first distribution today, behind Red Hat. It’s only using free software. Its promise to
names of its founder, Ian Murdock, and also the largest, supporting 15,000 free software and the needs of its
his girlfriend (now wife) Deborah. To software packages on 11 fundamental users are set out in the Debian Social
date, all official Debian releases have hardware architectures and many Contract, which explicitly states,
What a difference three years been built on the Linux kernel more sub-architectures, ranging from ‘Debian will remain 100% free’. The
make. K3b, OpenOffice.org and surrounded by an essential core of PDAs to mainframes. But Debian is Debian Free Software Guidelines
Firefox were all just twinkles in tools from the GNU Project, and so very different from its competitors. (DFSG) list the conditions under which
developers’ eyes when Debian 3.0 have been rightfully called Debian software is considered to be free and
(aka Woody) was released.
thus eligible to be part of the main
Debian distribution.
Incidentally, the DFSG was used as
a basis for the ‘Open Source Definition’
used by the Open Source Initiative to
sell the concept of free software to big
business. Community guidelines and
statements like this date back to
Debian’s inception, 12 years ago.

A new kind of distro


The Debian Project was announced to
the world in August 1993. At that time
none of the big commercial Linux
vendors of today – Red Hat, SUSE,
Mandriva – even existed, and the
distributions that were available were
generally of poor quality. Debian
founder Ian Murdock was scathing of
the SLS distribution popular at the
time. In the Debian Manifesto he wrote:
“It is quite possibly the most bug-ridden
and badly maintained Linux distribution
available; unfortunately, it is also quite
possibly the most popular.”
With the confidence that only the
very young and very old have,

A TRULY COMMUNAL PROJECT


The Debian Project is Ian Murdock disappears Ian Jackson becomes
1993 born when Purdue
University undergraduate Ian Murdock
1996 from Debian
development due to his university
1998 Debian project leader in
January. Later, in July, Debian 2.0
announces on the comp.os.linux. workload and leadership of the Debian (Hamm) is released for i386 and m68k
development newsgroup the “imminent Project passes to project member and architectures. This is the first Debian
completion” of his Debian Linux Pixar programmer Bruce Perens. Under release to be based on the glibc2
distribution release. Murdock pens the Perens’s stewardship, Debian 1.1 (Buzz) C library rather than libc5. Scott K Ellis
Debian Manifesto, setting out the goals of appears in June, and 1.2 (Rex) in starts the APT, or Advanced Package Tool,
the Debian Project. December. Ian Jackson writes the first project, which will become the famous
Debian Policy Manual spelling out how front-end to dpkg for package
The first recognisably Debian software should be packaged. management. Debian developers ratify
1995 modern version of
Debian, Debian 0.93 release 5, is made A busy year. Debian goes
version 1.0 of the Debian Constitution,
which specifies the organisational and
available. It is the first to use Ian
Jackson’s dpkg tool to install and
1997 into orbit aboard the
Space Shuttle Columbia, running a
decision-making policy within the Project.
Bruce Perens: the man behind
those codenames.

maintain packages. Meanwhile, the first computer controlling a hydroponics The first Debian choose the swirl design still in use today.
port of Debian to a non-x86 architecture
is started for the Motorola 68k family by
experiment; Debian 1.3 (Bo) is released;
and Perens drafts the Debian Social
1999 derivatives are
announced, as Corel and then Stormix
Wichert Akkerman is elected Debian
project leader. Debian 2.1 (Slink) is
Harmut Kopstein. Contract and the Debian Free Software choose to use Debian as a base for released in March, supporting the Alpha
Guidelines, codifying the Debian Project’s commercial distributions. Debian and Sparc architectures and becoming
commitment to free software. developers vote on a new logo and the first release to ship with APT.

54 LXF70 SEPTEMBER 2005 www.linuxformat.co.uk

LXF70.feat_debian 54 11/7/05 11:01:27 am


DEBIAN AT A CROSSROADS

Murdock, then a student at Purdue when combined the packages would commitment was carved in stone in
University, Indiana, believed he could create a seamless whole, a cohesive the Debian Social Contract.
do better. Fortunately, his hubris didn’t operating system. No matter how Debian has
stop him from recognising where the It’s easy to forget how revolutionary changed throughout the years,
other distributors were going wrong. this idea was, because now all however, its goal has always been to
Distros such as SLS were typically distributions are built this way, but create and support a high-quality, bug-
compiled by a single person or small Debian pioneered it. It took time for free Linux distribution. In Murdock’s
group and simply didn’t have enough Debian to develop and evolve the words, again from his Manifesto: “The
manpower to produce, test and tools and practices that make it what primary purpose of the Debian project
support a high-quality distribution. To is today. The very first Debian releases is to finally create a distribution that
do the job properly, Murdock realised,
he’d need help from volunteers.
His second big realisation was that
he could borrow the distributed
“IT’S EASY TO FORGET HOW
development model that Linus REVOLUTIONARY IAN MURDOCK’S IDEA
Torvalds used so successfully to
develop the Linux kernel – a model OF MODULAR PACKAGES WAS.”
later christened the Bazaar by the free
software community’s anthropologist, didn’t use the dpkg suite of tools for lives up to the Linux name. Debian is
Eric Raymond. The key to developing packaging software. That and the being carefully and conscientiously put
an operating system in a distributed, policy to go with it were created by together and will be maintained and
decentralised manner was modularity, Debian developer Ian Jackson during supported with
and in Murdock’s scheme the unit of 1994. Also, while Debian has always similar care.”
modularity was the software package. been committed to using free software >>
Each volunteer was given – Murdock’s Manifesto criticises other
responsibility to separately maintain distributors for “a tendency to not
one, two or a handful of packages. mention that Linux is free” – it wasn’t
Strict guidelines as to how packages until Murdock passed the leadership
should be constructed ensured that baton to Bruce Perens that this

CODENAME: TOY STORY


Since the release of Debian 1.1, all unstable development tree, is from Sid
Debian versions have been blessed with Philips, the unstable kid from next door.
an alias based on a character from the So what’s the connection between
film Toy Story. Thus Debian 1.1 was Debian and Toy Story? Well, former
called Buzz after Buzz Lightyear, 2.2 Debian developer and project leader
was called Potato in memory of Mr Bruce Perens worked as a systems
Potato Head, 3.0 was Woody, named programmer at Pixar, the maker of Toy
after the cowboy star of the film, and so Story, until 1999. Pixar even hosted the
on. Sid, always the name for Debian’s Debian mailing lists in the early days.

Debian 2.2 (Potato) is export laws, and Debian begins to Debian 3.0 Debian developers vote
2000 released, the first to
officially support PowerPC and ARM
support big iron as IA-64 and S/390
ports are started.
2002 (Woody)
eventually appears in July, having been
2004 to amend the Social
Contract so that ‘free’ applies to
architectures. A study shows that Debian delayed by problems with boot floppies. documentation and firmware, not just
2.2 contains 55 million lines of source Meanwhile, Bdale Garbee is elected software proper. This and a slew of
code that would have cost $1.9 billion if Debian project leader and HP ships blade problems throughout the year hold up
developed using traditional proprietary servers with Debian pre-installed. Sarge’s advance, but progress is made as
methods. The first unofficial ISOs for Lindows Inc ships its Debian-based the first release candidates of the new,
Debian GNU/Hurd are made available. It Windows replacement, LindowsOS, later modular Debian-Installer become
is the first Debian distribution to use a to be available pre-installed on $199 PCs available after four years of
kernel other than the Linux kernel. from Wal-Mart. development. A new easy-to-use desktop
Linux based on Debian, Ubuntu Linux,

2001 A bad year for Debian


derivatives as Corel sells 2003 The port to AMD64 is
begun, while the
appears complete with a plan for an
aggressive six-monthly release schedule.
its Linux division, Stormix declares Dreamix project brings Debian to the
bankruptcy and Ian Murdock-founded
Progeny stops development of its
Xbox. Other spin-offs appear including
SkoleLinux and MEPIS Linux, while Bruce 2005 Branden Robinson
becomes project leader.
distribution. Ben Collins is elected Debian Perens outlines the strategy for a new Debian 3.1 (Sarge) finally ships, with the
project leader, cryptographic software is business-focused Debian derivative, new Debian-Installer and hardware
moved from the non-US repository to the UserLinux. Martin Michlmayr is elected detection by default. An unofficial version
Now chair of Progeny, Ian Murdock
main distribution due to relaxing of US has stayed close to the project. project leader. for the AMD64 architecture is released.

www.linuxformat.co.uk LXF70 SEPTEMBER 2005 55

LXF70.feat_debian 55 11/7/05 11:01:30 am


DEBIAN AT A CROSSROADS

THE DEBIAN
ADVANTAGE Debian has some high-profile
adherents. HP offers solutions and
support based on Debian, the City of
Munich has rolled out Debian to its
14,000 desktop users, and the
government of the Extremadura region The Debconf system provides a consistent means for Debian packages to
in Spain has created its own Debian- prompt the user during post-install configuration.
based distribution, Linex, for use in its
offices and schools. Actually, the affinity of business with More than this, Debian is serious
In fact, Debian is becoming Debian isn’t that hard to explain. about using only free software, and its
increasingly popular as a base for Debian is attractive for many of the definition of what ‘free’ means is more
creating custom distributions. same reasons that Linux and open- rigorous than most. Only software
Commercial Linux vendors Xandros source software in general are whose licence complies with the
and Linspire both derive their easy-to- attractive. Beyond any technical merits, Debian Free Software Guidelines
use variations of Linux from Debian. A the key advantages of using Debian are (DFSG) can be part of the ‘main’
recent Slashdot article even claimed freedom and the strength of the Debian package archive (see Degrees
Of Freedom box, below). The DFSG
only permits licences that protect
“DEBIAN IS A NON-COMMERCIAL ENTITY, users’ freedom to use, modify and
redistribute software. It doesn’t require
SO IT CAN’T GO BANKRUPT AND IT that a licence enforce a copyleft,

CAN’T BE BOUGHT – IT’S A SAFE CHOICE however. Thus the GPL, the X11
licence and BSD licences are all

TO BET YOUR BUSINESS ON.” compatible with the DFSG.


Last year, Debian developers even
voted to strengthen this commitment
that there are now more Debian- community that develops it. Debian has to freedom and apply the guidelines
derived distros than there are those been around for 12 years and it’s not beyond software – for instance, free
based on Red Hat. Not only are there going to go away any time soon: not documentation with no restrictions on
more, but according to distrowatch. unless all 1,000 of its developers modification is now required too.
com they are more popular than the decide they’ve had enough and take The first guarantee of this
Red Hat-based distros. up gardening instead. Debian is a non- amended Social Contract talks about
What is it that attracts the millions commercial entity, so it cannot go free ‘works’, not simply free ‘software’:
of users worldwide that it now boasts? bankrupt and it cannot be bought. ‘We provide the guidelines that we use
And why is Debian – a community- to determine if a work is “free” in the
developed distribution – so popular Safety in numbers document entitled “The Debian Free
with business and governments? Thus Debian is a safe choice to bet Software Guidelines”. We promise that
your business on. As Ian Murdock the Debian system and all its
DEGREES OF FREEDOM wrote on www.ianmurdock.com, components will be free according to
The Debian package archive is split into To aid package management, “This isn’t about technology at all… It’s these guidelines. We will support
three principal sections: main, contrib packages are classified further into about freedom. It’s about controlling people who create or use both free
and non-free. Only packages with a ‘subsection’ and ‘priority’. your own destiny, building a future for and non-free works on Debian. We will
DFSG-compatible licence can be placed Subsections group packages according yourself that doesn’t bind you to the never make the system require the use
in the main section; packages with to the problem-space they address – so profit motive of a single American of a non-free component.’
non-DFSG-compatible licences go into there are subsections named mail, web,
company.” This freedom applies as Thanks to the DFSG, businesses
non-free. Additionally, packages in main math, science, games, and so on.
much to individual users as to the can be confident that as long as they
cannot require any non-free packages to Priority groups packages according to
build or to run; free software that does how necessary they are to create a world of business. In a piece called use the ‘main’ Debian packages, they
must be placed in the contrib section functioning Debian system – for ‘Why Linux? Why Debian?’ written this are using free software, unencumbered
(for example, open-source Java software example, ‘required’ packages are summer, Debian developer Manoj by any licence issues, and unlikely to
that uses the non-free Swing toolkit and absolutely necessary, and ‘important’ Srivastava exclaimed: “I do not want meet legal repercussions.
free emulators that require non-free packages are those you’d typically find my OS to be held hostage to anyone’s People often attribute Debian’s
firmware must go in contrib). on any Unix system.
business plan!” popularity merely to its APT package

56 LXF70 SEPTEMBER 2005 www.linuxformat.co.uk

LXF70.feat_debian 56 11/7/05 11:01:33 am


DEBIAN AT A CROSSROADS

NOT JUST LINUX


Debian offers more than just a slick microkernel-based Hurd kernel, fulfilling
package manager. It has an experienced GNU’s aim of creating a Unix-like OS
community, a rigorous software based entirely on GNU software. More
packaging policy and the tools to back recently, other controversial Debian
that up. So it’s only natural that these ports have been initiated using NetBSD
attributes be applied to tasks other than and FreeBSD kernels. A port to
building Linux distributions. Thus various Windows, using Cygwin’s POSIX layer,
official Debian projects have sprung up was under way at one point, but activity
to create operating systems based on on that seems to have fizzled out now. packaged. It is Debian’s policy
kernels other than Linux. The first such Outside of the official projects, the and the tools that support it
project was Debian GNU/Hurd. This Debian packaging tools have been used that are the distro’s ‘killer
replaces Linux at the heart of the in the Fink project, which brings Unix app’. And, critically, a stable
Debian system with the GNU Project’s open-source software to Mac OS X. Debian release will never ship
with packages that don’t match
manager. This (or, more commonly, a the debconf system as a standard Debian Policy. This strong policy
graphical front-end to APT, such as means for packages to prompt the and the power of dpkg enable a basic
Synaptic) is what lets you simply fetch user for information with dialogs Debian install to be much smaller and
new or updated software – and, during such post-install configuration. lighter than RPM-based distros. In
crucially, any software required to use it What’s more, dpkg supports multiple particular, Debian policy mandates that
– and install them on your machine. interface types (text-only or GUI- shared libraries should be packaged by
APT handles dependencies for you based using GTK or Qt toolkits) and themselves (not with binaries that
automatically, and thus takes the pain can be configured to ask the user depend on them) and have a package
out of installing software. APT is different types of question based on name that reflects the ABI (Application
Debian’s ‘killer app’, they say. Is there priority. For unattended installs, Binary Interface) version of the library.
any truth to this? In short, no. debconf can be told not to prompt at This does much to lessen ‘DLL hell’,
all and packages will then be the pain caused when it’s impossible
Beyond APT configured with whatever the defaults to install different version of the same
While APT is an excellent tool, it is not are for the questions that would have library due to conflicts. With Debian
APT alone that makes Debian great. In been asked. this is simply not an issue.
fact, Conectiva (now merged with Actually, neither RPM nor dpkg is Technical advantages such as these
Mandrake as Mandriva) ported APT for perfect, although dpkg is more – along with the guarantees of
use with its RPM-based distro four versatile and more robust. The main freedom that Debian provides – make
years ago, and it just doesn’t work as reason why package handling is so Debian perfect for customising and a
well there. Other APT-like solutions
such as urpm and yum are available,
much better in Debian-based
distributions than it is in RPM-based
>>
popular distro on which to build your
own derivative.
The strengths of Debian make it an
but again fare no better. So perhaps distros is Debian’s comprehensive ideal basis for rolling your own
RPM is inferior to Debian’s APT tool, policy on how software should be distro, as the large number of
dpkg. Indeed, Mandriva developer Debian derivatives proves.
Debian Linux
Claudio Matsuoka blogged (online at
http://tweek.dyndns.org:8080) on
the “top ten problems in RPM” and
complained about “the non-uniform
Corel Linux Progeny Debian
handling of file dependencies and the
large number of hidden dependencies
automatically added by RPM”. Demo Linux Knoppix Storm Linux Libranet Linux
Certainly, dpkg is more flexible than
RPM. For example, dpkg allows a richer Xandros Lindows OS
relationship between packages to be
specified – packages don’t simply
depend on one another. A package
can ‘pre-depend’ on another, if that
package must be installed and Morphix
configured for it to be installed; a
Overclockix MEPIS Linux Linex Damn Small Linux
package can ‘recommend’ another as
a non-absolute, weaker dependency;
Whoppix Kanotix Skole Linux
or a package can ‘suggest’ another, if
that package can enhance its
Guada Linex Linspire
functionality, but is not required. Ubuntu Linux
Dpkg also permits the use of post-
install scripts, which can perform all Gnoppix User Linux

manner of (possibly interactive) per-


package configuration. Debian provides Kubuntu Linux

www.linuxformat.co.uk LXF70 SEPTEMBER 2005 57

LXF70.feat_debian 57 11/7/05 11:01:34 am


DEBIAN AT A CROSSROADS

TROUBLE IN
both of these problems, actual and Steve Langasek, a member of the
potential, Debian will be irrelevant by release team for Sarge, wrote in an
the time Etch is out.” email that has come to be known as
So why did Sarge take so long? the Vancouver Prospectus that “it is
There were no great technical not sustainable to continue making

FREETOWN
transitions between Woody and Sarge. coordinated releases for as many
Introducing the new Debian-Installer architectures as Sarge currently
was the only large change, and that contains… keeping 11 architectures in a
has been in development for years. A releasable state has been a major
naive conclusion might be that Debian source of work for the release team,
has simply grown too big and the the d-i [Debian-Installer] team, and the
The fact that Debian now has release processes have failed to scale kernel team over the past year.”
glacially slow release cycles – Sarge with this growth. Earlier versions of This Vancouver Prospectus
took three years and Woody took two Debian, when there were many fewer advocates reducing the number of
before that – is now firmly entrenched packages to deal with, were developed architectures that Debian supports and
in the open-source psyche. and released much more quickly. has sparked some controversy, partly
The question is, why did Sarge take It is evident, however, that the due to confusion and partly due to the
so long, and how can Debian number of packages in the Debian way it was presented as a fait accompli.
developers learn from that to ensure archive is not the sole issue. Sarge has In fact it hasn’t yet been officially
that Etch ships in a timely manner? 15,000 packages maintained by adopted as Debian policy. According
First, does it even matter how long around 1,000 developers, and this is a to newly-elected DPL Branden
Etch takes? Debian is under no better developer-to-package ratio than Robinson, “this is the beginning of a
commercial pressure so can release either Fedora or Mandriva can field. process to figure out where we’re going
when the code is in a fit state for The tardiness of Sarge was not simply to, not the end of it.”
release, not when market forces due to package count. The confusion stems from a prior
100,000 proposal to split the supported
Size isn’t everything architectures for purposes of reducing
What’s more of a problem is the the bandwidth required to mirror the
number of architectures that Debian Debian repository. There would be
10,000
supports. Debian developers put a lot primary architectures – likely to be
of effort into porting Debian packages x86, AMD64, IA-64 and PowerPC –
to the ‘minor’ architectures. For and so-called Second-Class Citizen
1,000
instance, typically the upstream (SCC) architectures, which have far
developers of a package won’t fewer users. The SCC proposal will be
explicitly support ARM, HP-PA, MIPS enacted, since it’s a requirement to
100 or m68k CPUs. If there are problems provide enough bandwidth to add
in porting to these architectures, it’s up additional ports such as the AMD64.
to the Debian developers to correct But the Vancouver Prospectus,
10
and fix them. In particular, stabilising which essentially says that there won’t
the kernel and the installer and getting even be releases made for the SCC
Packages the infrastructure up and running to architectures, is still being discussed. It
Developers
support the Sarge release with security states the conditions under which an
1
updates were all factors that delayed architecture will be considered for
95

96

97

98

99

00

01

02

03

04

05
n
n
n

n
n

Sarge’s release. release; and among these are that


Ja
Ja
Ja

Ja

Ja
Ja

Ja

Ja

Ja

Ja

Ja

The number of packages in Debian versions might have grown


dramatically, but so has the team of developers.
TESTING, TESTING, TESTING
The Debian project maintains three trees repository. The idea behind the testing
dictate. Surely users who want more
of packages, named ‘stable’, ‘testing’ tree is that it is always close to release.
up-to-date software can use the
and ‘unstable’. The stable tree End users can choose to install packages
‘testing’ or ‘unstable’ trees or corresponds to the current stable from testing or unstable if they want (or
one of the numerous Debian release of Debian (currently version 3.1, indeed mix and match packages from
derivatives such as Ubuntu? aka Sarge) and this doesn’t change until stable, testing and unstable trees).
One person who believes in a new revision is released. Security Using testing should be relatively safe.
the importance of getting Etch updates for the stable release are made There will be few show-stopping
via a separate APT repository at problems with testing, although be
out the door at a predictable time
http://security.debian.org. warned that it is not supported by
is Ian Murdock. In a blog posted on
Unstable is the testing ground for the security updates from the Debian
his website shortly after Sarge’s next Debian release. New packages are security team as the stable tree is, so it
release, he wrote that Debian should uploaded to the unstable repository and definitely shouldn’t be used for mission-
make a timed release cycle a priority, after a certain period – if they don’t critical applications. Only the really
as well as maintaining its position at accrue any additional release-candidate adventurous who enjoy living on the
the heart of its growing family of bugs and they don’t depend on any bleeding edge should use the unstable
packages not already in testing – they tree, since from time to time some
derivatives. “What’s at stake? Bottom
are automatically moved to the testing unstable update may break your system.
line: if we don’t do something about

58 LXF70 SEPTEMBER 2005 www.linuxformat.co.uk

LXF70.feat_debian 58 11/7/05 11:01:36 am


DEBIAN AT A CROSSROADS

THE RISE OF
UBUNTU LINUX
The most popular Debian derivative is
also one of the most recent: Ubuntu
Linux, founded and funded by
ex-Debian developer, internet
entrepreneur and space tourist Mark
Shuttleworth. Shuttleworth is a native
of South Africa and ubuntu is an
African word meaning ‘humanity to
others’. Thus Ubuntu Linux bills itself as
‘Linux for Human Beings’ and is a user-
friendly desktop-oriented distribution
based on Debian.
The Ubuntu project echoes many of
the same commitments to freedom
that Debian does. You can even get an
install disc mailed to you anywhere in
the world free of charge, which is
perhaps one reason for its rocket-like
take off. Ubuntu also promises a
regular six-monthly release cycle,
another reason for its popularity.
Ubuntu is currently available for
x86, AMD64 and PowerPC
architectures, both in regular
installable and Live CD editions. Sparc
and IA-64 are supported as minor,
unreleased architectures.
■ Read Mark Shuttleworth’s thoughts
on Debian, Ubuntu and the
fork/derivative argument in the next
Mark Shuttleworth, father of Ubuntu: will the African Buzz Lightyear’s distro help or harm Debian?
issue of Linux Format.

hardware must be available to buy Thanks to Debian’s modularity, the Debian package maintainers. Robinson
new, that 98% of the non- degree of compatibility between Sarge had this to say in a recent interview:
architecture-specific source packages and its derivatives (as well as Ubuntu, “Ubuntu is a mixed blessing, but one
must build on that architecture, that Linspire and Xandros are well known) with a net positive. It has helped raise
the Debian security team must be is impressively high – especially when Debian’s profile in a mostly positive
willing to support it, and so on. you compare how incompatible Red way… The downside is that Ubuntu has
While some measure to increase Hat and its spin-offs are. Still, many prompted some people to come to
the manageability of the release say that Debian and derivatives should doubt Debian’s ‘relevance’. As a
process seems to be necessary, it will
be a sad day for Linux if Debian no
longer supports the smaller
architectures, such as ARM and MIPS.
“THERE IS TENSION BETWEEN THE
Other measures to speed up the DEBIAN PROJECT AND ITS OFFSPRING,
release process centre on better
communication and spreading the
PARTICULARLY UBUNTU.”
burden. A lone release manager has
been replaced by a release team, and work much more closely. Ian Murdock consumer of Debian’s OS with a
Branden Robinson has been elected wrote: “We need to tap into Debian’s derivative product, I think Canonical
as the head of a leadership team, unique asset, namely the collective [Ubuntu’s sponsor] could do more to
codenamed Project SCUD (another power of the Debian derivatives. On emphasise just how much of a service
Toy Story reference). their own, the derivatives aren’t Debian does provide. If Debian were to
significant players; but, taken as a vanish tomorrow, Canonical would be
Unite and conquer group, they dwarf the individual in a bit of a bind.”
The late release of Sarge had an affect leaders (Red Hat and Novell).” Clearly better communication
of increasing the divide between the There is tension between the between Debian and its derivatives is
stable version of Debian and those Debian Project and its offspring needed. The various projects will
distros based on Debian, such as though, particularly the recent off- always have different goals, but
Ubuntu. Now that Sarge is here – and shoot Ubuntu. Debian developers have ensuring that Debian releases are
thus a stable version of Debian with debated whether Ubuntu is actually a predictable will provide a solid, stable
relatively current software – the gap derivative or a more damaging fork, basis for others to build on and thus
between Debian and its progeny has and whether Ubuntu developers do lessen the risk of incompatible >>
been narrowed. enough to feed their changes back to derivatives and forks.

www.linuxformat.co.uk LXF70 SEPTEMBER 2005 59

LXF70.feat_debian 59 11/7/05 11:01:37 am


DEBIAN AT A CROSSROADS

LOOKING
these are issues that were known problems were exacerbated by the
about before but postponed to get short time given to testing Sarge after
Sarge out the door. the feature freeze. “This needs to be
done automatically,” he wrote, “… [in]
Key transitions roughly the same way as builds work.”

FORWARD
First of all there are some software Another transition long overdue is
transitions to overcome. This includes to replace the ageing Xfree86 4.3.0
updating the default Debian toolchain server with the X.org server. Again this
to either GCC 3.4 or 4.0, which shouldn’t cause problems, and the
involves a change in the C++ ABI, Debian X Strike Force have been

TO ETCH
causing backwards compatibility of working on packaging X.org for some
C++ shared libraries to break. Thus all time. Other software updates currently
the C++ apps and libraries will have to targeted for Etch include Gnome 2.10,
be rebuilt. This shouldn’t prove to be a KDE 3.4 and OpenOffice.org 2.0.
big problem, and plans are already in Secondly, the AMD64 port will
place to handle this, but it will take definitely join the list of supported
Sarge is here and the dust is time to happen and for the results to release architectures in Etch, but as we
beginning to settle, so it’s an trickle through to the testing tree. discussed earlier, it’s possible that the
appropriate time to start thinking about According to developer Bill overall number of release architectures
what will eventually become the next Allombert, the reliance on C++ in the will be greatly reduced. Related to
stable Debian release, codenamed Etch APT and Aptitude tools is one of three supporting architectures such as the
(named after the Etch A Sketch from main areas of Sarge that need work, AMD64, which provides multiple
Toy Story). Although Etch isn’t even along with circular dependencies and execution environments (32-bit and
three weeks old at the time of writing, packages that “mess with conf files 64-bit in this case), proposals on how
we still know a lot of the changes that causing useless dpkg conf file to fully support and manage multi-
will be introduced during its handling”. In an email to the Debian architectural run times in Debian are
development. This is because many of community Allombert said these being examined (see Multiarch
Proposals box, right) and some testing
has already been done.
It’s too early to say whether these
changes will be implemented in Etch,
but if they are it will be a huge boon
for backwards compatibility and for
users who do cross-development.

More freedom
Thirdly, changes are required because
of the decision to strengthen the
Debian Free Software Guidelines. In
future they’ll cover not only software,
but supplementary material such as
documentation and firmware as well.
Documentation licensed under the GNU FDL cannot be included with Etch,
and already some FDL docs have been removed. These changes were postponed to
allow Sarge to be released, but they
take effect now. One particular

“RELEASING ETCH WITHIN 18 MONTHS problem area is the GNU Free


Documentation License, which has
WOULD DO MUCH TO REPAIR THE been deemed to be non-free. This will
require a lot of documentation to be
DAMAGE CAUSED BY SARGE’S DELAY.” re-licensed or removed from the main
section of Debian. Also, drivers that
require binary only firmware must be
THE UNFREE DOCUMENTATION LICENSE removed from the kernel.
We can reasonably expect the
The GNU Free Documentation License distributing modified versions of the text. Debian packages contain documentation
(FDL), the Free Software Foundation’s Debian developers have long discussed licensed under the FDL. For each one, Debian task system and hardware
complement to the GPL for covering free the problems with the FDL, but have either the offending text will have to be detection to improve with Etch. The
software docs, is considered by many to finally voted on the issue and decided relicensed under a new, DFSG- task system provides a way of speeding
be inconsistent and by others to be non- that documentation licensed under the compatible licence or the documentation up installs by allowing users to select
free. The crucial problem is with FDL cannot be included in the main removed from the main section. and install sets of packages rather
‘invariant sections’ that the FDL allows. section of the Debian repository. While Some work has already been done,
than having to select packages
An invariant section cannot be modified the effect of this decision has been notably a few Debian maintainers
individually. Sarge provided only a
or removed – even when it becomes postponed so that Sarge could be removing FDL-licensed documentation
obsolete – and so is a barrier to freely released, it will apply to Etch. Numerous from their packages for Sarge. handful of such tasks, so this is one
area Etch can definitely improve on.

60 LXF70 SEPTEMBER 2005 www.linuxformat.co.uk

LXF70.feat_debian 60 11/7/05 11:01:39 am


DEBIAN AT A CROSSROADS

Already a laptop task has been grained configuration of security policy.


proposed which will automatically The libselinux library and associated MULTIARCH PROPOSAL
install power management tools utilities are already part of the Debian Many modern CPU architectures support the IA-64, which can run IA32 and
suitable for laptop use. The base repository, but other components of multiple ABIs (application binary HPPA code as well as its own instruction
Debian install in Etch will be slimmer the SELinux project – such as the interfaces). The AMD64 can execute set? What about big-endian CPUs?
and no longer require the C compiler patched versions of the standard file IA32 or AMD64 code for example, the What about ABIs from different
IA-64 provides compatibility for IA32 operating systems? And what about
to be installed, so a C development manipulation tools (the coreutils
and HPPA code, and the PowerPC even software emulation provided by systems
task will be necessary. package) which supports access supports big- and little-endian code. The such as Qemu?
One suggestion for hardware controls, patched init and daemons – problem is that binaries require shared The proposed solution is to specify
detection is the ability to detect and are not. libraries with precisely the same ABI, the ABI (CPU and OS) as a suffix to the
react to changes in hardware The Debian release team have and there’s only one standard place to lib path. For example, you would have
configuration (such as when an pencilled in December 2006 as a install libraries. To be able to execute /lib/ia32-linux, /usr/lib/ppc64-darwin7.0
IA32 code binaries on the AMD64, you to uniquely identify where the correct
installed graphics card or network card target date for Etch’s release, giving
need 32-bit versions of whatever shared libraries can be found. If necessary,
is replaced). Debian should them 18 months of development time.
libraries that those binaries use, such as paths of the form /lib32 and /lib64
automatically offer the user the ability Right now this deadline looks the C library, X libraries and so on. How can be provided as symlinks for
to reconfigure X or the network achievable. Of course, this will mean are distros going to handle that? backwards-compatibility.
settings. Such a feature has been achieving certain milestones along the The current FHS (File-Hierarchy The multiarch proposal for Debian
available in Kudzu, the Red Hat way as the various transitions required Standard) and LSB (Linux Standard goes further and addresses the problem
hardware detection system, for aeons. are performed, and we’ll have a better Base) have little to say about this issue, of how to manage software for non-
so practice varies among distributions native ABIs with the Debian packaging
idea of whether Etch will be released
and CPUs. For processors that can system. Rather than force the user to
Security changes on time as work progresses.
execute 32-bit and 64-bit code, the manually install and maintain the 32-bit
Etch will also improve on security. One Critics warn that Debian is in 32-bit libraries wil typically be installed environment on an AMD64, say, why not
change is the incorporation of danger of becoming irrelevant if its in /lib, /usr/lib, and so on, while 64-bit let them install libraries packaged for
APT 0.6.0, which supports developers cannot get the release libraries will be in /lib64, /usr/lib64, etc. the Debian i386 port? This is a cheaper
cryptographically verifying the origin of processes in shape and get Etch out The AMD64 is different. 64-bit code is proposal than repackaging the libs
a package. This is so that when you on time. This is overstating the case, preferred, and so 64-bit libs will be in separately for native and emulated use,
/lib64, although Debian on AMD64 but requires some changes to dpkg to
download a package from the net you but it’s clear that releasing Etch in
stores 32-bit libs in /emul/ia32-linux/. handle specifying the architecture in a
can be sure that it really is a Debian 18 months would do much to repair The practice of using /lib, /lib64, and dependency. Happily, such changes have
package and hasn’t been compromised the damage caused by Sarge’s so on is just too inflexible. What about already been implemented and tested.
during transfer. APT 0.6.0 has been in interminable delay.
the experimental Debian repository for But as a reward for getting Sarge
some time and is already in use in out we think the Debian developers
Ubuntu, but the infrastructure changes deserve a little rest and recuperation,
needed to roll it out in the Etch testing and need to marshal their
tree are not yet in place. strength for the long
Still on the security theme, full road to Etch. LXF
support for the SELinux (Security-
Enhanced Linux) project is a oft-
requested feature for Etch. The
SELinux project was created by the US
National Security Agency and adds
support for mandatory access controls
to Linux. This allows for the fine-

The revamped task system that appeared with Sarge will be expanded
with more tasks in Etch to further speed up installation.

www.linuxformat.co.uk LXF70 SEPTEMBER 2005 61

LXF70.feat_debian 61 11/7/05 11:01:39 am


BEAGLE INSTALLATION GUIDE

Go fetch!
ST
STEPEGP BY
U
install B IDE:
e
on Man agle
driva
Linux

It’ll sniff out documents and emails you thought you’d lost forever: is
Beagle man’s new best friend? Get it running here with Graham Morrison.

B
eagle, along with other HTML, popular image and music
desktop search tools, is formats, Gaim instant messages and
threatening something of a many, many others. Once you get
computing revolution. It’s such used to using Beagle, traversing vast
a simple idea: enter a few hierarchies of folders to get to a single
words or phrases into a search file will start to feel arduous and
window and Beagle will respond antiquated. For more about the
immediately with a list of links that technology and development history,
contain your search term. Sometimes visit the Beagle homepage at
these links are files, but the clever part http://beaglewiki.org/Main_Page.
is that they can also be links to As we mentioned in our LXF67
conversations, emails, images and review of Mandriva Linux Limited
music, and each one is located Edition 2005, we were dismayed not
somewhere in your home directory. to find Beagle included in the copious
It’s similar to the way Google’s package list. Obviously, the people at
Gmail service works. This offers Mandriva were far too busy at the time
gigabytes of storage, and encourages to include packages as wayward as
you to never delete a single email. Beagle, so we’ve
How are you expected to organise all decided to
this data? Well, Google would rather cover each
you just left it as it is. Gmail’s strength of the
lies in using Google’s redoubtable steps

“ONCE YOU GET


USED TO USING
BEAGLE, YOUR OLD
METHODS WILL FEEL
ARDUOUS AND
ANTIQUATED.”
searching algorithms to instantly involved in installing Beagle
provide you with a list of emails that on to a Mandriva system. If
match your search criteria. For you use another distribution,
example, you may want to check an many of the stages will be
online order: simply enter ‘compact identical – just replace Mandriva’s
disc’ and ‘britney spears’ into the package manager with that of your
search field, and any emails matching own distro, and things should work. installation of some large
the target will be listed immediately. The main problem with getting applications. Having said all
It’s this kind of integration that Beagle Beagle to work is Mandriva’s that, we’ve tried to remove
aims to bring to your desktop. sometimes bizarre naming and most of the pain from the
But Beagle has one advantage dependency problems. Installing process and we’re going to hold
over Gmail: it’s not just your email that Beagle isn’t for the faint of heart; it your hand through each step, so
can be queried, but a whole host of can be rather stressful. It has dozens it doesn’t require any specialist
Gnome-centric applications, including of dependencies, requires a knowledge. Just keep clear of the
OpenOffice.org documents, PDFs, compatible kernel and the manual moors and beware the moon!

62 LXF70 SEPTEMBER 2005 www.linuxformat.co.uk

LXF70.feat_beagle 62 11/7/05 12:48:10 pm


BEAGLE INSTALLATION GUIDE

STAGE 1 – LOW-LEVEL CONFIGURATION

Beagle actively watches for Compiling your own kernel is tough,


changes in your filesystem. You might so it’s far easier to download one that’s INSTALLING THE EASYURPMI WAY
expect this to consume a significant precompiled and nicely packaged for The advantage with installing by hand is
chunk of your system’s resources, but it Mandriva. The kernel we’re after is that you get the latest release, and have
doesn’t, becuase Beagle uses a kernel- called kernel-multimedia-2.6.11-9.mm, more control over how Beagle works on
your system. The flipside is that it can
level event-monitoring system called and you can find it online by entering
take hours to get it to work. Mandriva
Inotify. This is included within many the name into the search field at does offer a compromise though, using
modern kernels, but the problem is http://rpm.pbone.net. Once you’ve its Contributions repository – this allows
that Beagle needs a specific version of got hold of the file, install it by typing you to install the whole shooting match
Inotify to be able to work. As we’re the following into a console as root: with a single command.
going to install Beagle version 0.0.11.1, urpmi kernel-multimedia-2.6.11- ‘Contribs’, as it is affectionately
known, is a repository for the packages
released on June 15, we will need a 9.mm.4mdk-1-1mdk.i586.rpm
that don’t make it into the final release.
kernel that contains Inotify 0.23. Urpmi also makes changes to your
They’re generally not as stable as their
Earlier versions of Beagle system boot menu, allowing you to disc-bound counterparts, and installing
need earlier versions select the newly-installed kernel at software from the Contribs repository
of Inotify. boot time. It should also add the can compromise your system’s stability.
necessary option for enabling Inotify, But you do get to play with some of the Installation couldn’t be any easier
which you can check by looking for more avant-garde applications of the with EasyURPMI.
Linux world, Beagle being one of them.
inotify=on in the append field of
The easiest way to set up Contribs as in the Core Distribution section. Then
/etc/lilo.conf. A simple reboot to this
a source is to use a website called you just need to click on the Proceed To
kernel should now provide you with a EasyURPMI (http://easyurpmi.zarb.org), Step 3 button, and the corresponding
working Inotify system, which should which configures the various repositories urpmi command is generated
create a device node in your file available to Mandriva users. automatically. This needs to be pasted
system located at /dev/inotify. To add the Contributions repository, into a console and executed as root.
first make sure that your system is the After urpmi has finished downloading
one automatically selected (it should the package list from the server,
File secrets read 2005, for 2005 LE). Then you installing Beagle is as simple as:
There’s one other morsel of need to select a local server for Contribs urpmi beagle
low-level configuration that
Beagle relies upon, and that’s something like this: Next up is a list of specific
enabling extended attributes /dev/hda7 /home ext3 noatime,user_ dependencies. Each one of these
for your local filesystem. xattr 1 2 needs to be installed, and will in turn
Extended attributes are a You can quickly remount the install many other related packages
neat way of attaching affected partition without having to automatically, depending on your
information to a file from reboot your machine with system’s configuration. Install them via
within the filesystem mount -o remount /home Mandriva’s Control Center, or on the
structure itself, as opposed command line with urpmi.
to a database or within the Dependency hell ■ bison
file. It could be something The next step is to install the Mandriva ■ libglib2.0_0-devel
as mundane as the file type packages that Beagle depends upon. ■ gcc-c++
or when the file was last You can install these packages from ■ libxml2-devel
accessed. Beagle uses the rpmdrake utility, or using urpmi ■ libexif12-devel
extended attributes to from the shell, logged in as root. ■ libwv-1.0_2-devel
transparently keep track of files Before delving into the separate ■ gnome-vfs-devel
and their contents. Most modern packages, first ensure that all the ■ mozilla-firefox-devel
filesystems support extended Gnome Workstation packages are ■ libxorg-x11-devel
attributes, with a couple of installed. You can do this from ■ libpango1.0_0-devel
exceptions: Reiser4 and NFS. Mandriva’s Control Center by selecting ■ libgtk+2.0_0-devel
Reiser4 implements its own extended Software Management, followed by ■ libsqlite0-devel
attribute interface, while NFS doesn’t Look At Installable Software Packages ■ libgnome-vfs2_0-devel
support them at all. So for now, both and selecting Gnome Workstation. ■ libgnomecanvas2_0-devel
are off limits for Beagle users. Clicking on Install should take you ■ libgnomeui2_0-devel
To enable extended attributes, you through the long process of installing ■ libgnomeprintui2-2_0-devel
simply need to add user_xattr to the dozens of files that you’ll need. ■ gtkhtml-devel
each partition in your /etc/fstab file.
As Beagle is intended to be run as a
user, you only really need to add this to “DOWNLOAD A KERNEL
your home partition. Otherwise, if you
use a single partition, you can just
THAT’S NICELY PACKAGED
enable it for / (root). Your /etc/fstab
partition entry should then look
FOR MANDRIVA.” >>

www.linuxformat.co.uk LXF70 SEPTEMBER 2005 63

LXF70.feat_beagle 63 11/7/05 12:48:11 pm


BEAGLE INSTALLATION GUIDE

STAGE 2 – ROLLING YOUR OWN

>> We have used as many readymade configure scripts, you – and the least destructive way of
Mandriva packages as we can, but just need to enter making the connection is to create a
there are five that we need to make and make symbolic link between Mandriva’s
download, compile and install: install, as with Mono’s version and the one that the configure
■ Mono 1.0.6 or newer Novell’s installation. script will be expecting:
implementation of Microsoft’s .NET Apart from Beagle $ ln -s /usr/lib/pkgconfig/mozilla-
framework. http://mono-project.com itself, the two firefox-gtkmozembed.pc /usr/lib/
■ gtk-sharp 1.0.x A set of GTK GUI remaining packages pkgconfig/firefox-gtkmozembed.pc
.NET bindings for graphical interfaces. that need to be $ ln -s /usr/lib/pkgconfig/mozilla-
http://mono-project.com/Downloads downloaded and firefox-xpcom.pc /usr/lib/pkgconfig/
■ gecko-sharp 0.6 A wrapper to installed (gecko-sharp firefox-xpcom.pc
embed the Mozilla rendering engine and gmime-2.11 . 3) We also need to add a single
into GTK# applications. www.go- shouldn’t pose any option to Beagle’s configure script to
mono.com/packagers/gecko-sharp/ particular problems. include the new web service. This lets
gecko-sharp-0.6.tar.gz Install all the necessary Beagle packages using Just download the files, you query the Beagle database directly
■ gmime-2.1.13 A mime message Mandriva’s package manager. un-tar them, run from any web browser. To execute the
parser for reading all your emails. ./configure --prefix=/ configuration script including this
http://spruce.sourceforge.net/ provides. The first package we need is usr from the package directory, and service, type the following:
gmime gtk-sharp-1.0, which is mainly used for make then make install as root to $ ./configure --prefix=/usr --enable-
■ beagle-0.0.11.1 The star of the the GUI, and it’s important that it’s the install each package. If all has gone webservices=yes
show. We’ve used version 0.0.11.1. older 1.0 version rather than the more
http://ftp.gnome.org/pub/GNOME/ current 1.9 release that we use. In
sources/beagle/0.0/
Of those five, it’s Mono that’s by far
common with all the packages that we
need to build, there are four stages to
“YOU CAN EVEN QUERY
the biggest and takes the longest to each installation. These are: BEAGLE WITH YOUR
obtain, so that’s a good place to start.
The download weighs in at close to
un-tar the archive, configure the build
process, build the application and, WEB BROWSER.”
15MB, but can be easily grabbed from finally, install.
http://go-mono.com or by using the tar xvzf gtk-sharp-1.0.10.tar.gz well, this should leave us with one Running the script should now
following wget command: cd gtk-sharp-1.0.10 more package to manually install, and proceed without any errors. When the
wget http://go-mono.com/sources/ ./configure --prefix=/usr that’s Beagle. script is finished, the last block of text
mono-1.1/mono-1.1.8.tar.gz There is one difference with gtk- should inform you of which compatible
Compiling Mono should be sharp, and that’s the output from the Installing Beagle extensions it has found, thus:
straightforward, if a little time- configure script. This output shows you This stage is actually pretty Target OS: linux
consuming. We first need to un-tar the which gtk-sharp components are going straightforward as long as all pre- Extended Attributes: libc
archive, run the configure script so to be installed. If you’ve got each of requisite packages have been installed Prefix: /usr
that the compilation can be optimised the necessary development packages, first. After you’ve downloaded the tar GNOME Prefix: /usr
for your system, and finally run the you should see something like this: file, un-compressed it and changed to KDE Prefix: /usr
make command, which should go off Optional assemblies included in the the newly-created directory, you may Evolution-Sharp? no
and build the application. This should build: be tempted to go straight ahead and (missing dependencies)
take around 30 minutes on a modern * art-sharp.dll: yes run the ./configure --prefix=/usr gsf-sharp? no
machine – just enough time to filter * gnome-sharp.dll: yes command. If you do, you will be gst-sharp? no
some water, grind a little coffee and * glade-sharp.dll: yes presented with an error that will look Epiphany Extension? no
make a refreshing beverage. * gda-sharp.dll: no something like: (Epiphany not installed)
In our examples, we always use the * gnomedb-sharp.dll: no ‘configure: error: unable to find Mozilla Extension? yes
/usr prefix within the configure * rsvg-sharp.dll: no grkmozembed; this can be wv1? yes
command, as Mandriva uses this * gtkhtml-sharp.dll: no found in the mozilla/firefox/ libchm? no
location specifically. You may need to * vte-sharp.dll: no thunderbird development Local SqliteClient? yes
change this to reflect your own The only libraries we need are art- packages’. Enable WebServices yes
distribution’s filesystem. sharp.dll, gnome-sharp.dll and glade- The configure script is complaining that Any further extensions you may wish to
tar xvzf mono-1.1.8.tar.gz sharp.dll, so you can safely ignore the it can’t find grkmozembed, usually add, such as Evolution-sharp (this
cd mono-1.1.8 rest. If one of those three required installed as part of the Firefox allows Beagle to index Evolution
./configure --prefix=/usr packages is not included (that is, has development package. The problem is address books) can be downloaded
make ‘no’ instead of ‘yes’ beside it) you need that Mandriva has already installed the and installed from Beagle’s own
sudo make install to make sure that you’ve installed all required package when we installed optional prerequisites page at
Mono provides the development the correct Gnome development mozilla-firefox-devel, but has changed http://beaglewiki.org/
platform for Beagle, and the other libraries. You can easily check by the name of the file the package Optional_Prerequisites.
components we need to install are all entering -devel as the search criteria configuration manager is looking for. Finally, type make and make
related to augmenting the .NET in Mandriva’s package manager. If In fact, there are two files we need to install as root to compile and install
compatible framework that Mono you’re happy with the output from the provide for the configure script to work Beagle on to your system.

64 LXF70 SEPTEMBER 2005 www.linuxformat.co.uk

LXF70.feat_beagle 64 11/7/05 12:48:13 pm


BEAGLE INSTALLATION GUIDE

STAGE 3 – RUNNING BEAGLE

Beagle runs as a daemon from a either the directory or any of its


user’s own account, using the beagled children. You can include the names of
command. If you’re having problems, specific files and directories within the
adding the -debug parameter can help file and this will allow others that aren’t
determine what could be going wrong. specified to be indexed as normal.
The most common problem The second option is to add a list
encountered when running Beagle of files and directories to a central file
looks something like this: called .neverindex in your home
[graham@stinky ~]$ beagled directory. This works in the same way
ioctl: Bad address as the list of files and directories added
Unhandled Exception: System. to the .noindex file, and they both
IO.IOException: Attempt to watch / accept wildcards and regular
usr/share/applications failed! expressions. You shouldn’t notice the
in <0x0026c> Beagle.Util.Inotify: indexing process too much, as Beagle
Subscribe... manages its CPU usage. This means
This is caused by the kernel’s that CPU usage is kept to a minimum
version of Inotify being incompatible when you’re at the computer, but
with Beagle, and you’ll need to find a Beagle will absorb idle CPU cycles
new one (such as the multimedia when you’re not using your machine.
You can search locally
kernel from stage one). Otherwise, if using a web browser
running beagled seems trouble-free, Console or GUI such as Firefox.
you can check the running status using Now that we’ve gone to such lengths
the beagle-info command: to get it to work, we may as well put
Scheduler: Novell’s pooch to task. Staying on the Once Best has been launched, all need to run the daemon with an
Count: 114 command line for a few more you can see is a benign Beagle icon in extra option:
Status: Working moments, you can query Beagle using your toolbar. Clicking on this opens a beagled --web-start
1 Generator 0 the aptly-named beagle-query simple search interface where you can You then need to point your
File System Crawler command: enter your search query in the time- browser to http://localhost:888/
last=/home/graham/beagle/beagle- beagle-query sausage honoured way. Results should appear beagle/search.aspx. Your browser will
0.0.11.1, uncrawled=964, dirty=964) This will search your home immediately, listed below. You can then present an interface very similar
Now that Beagle is running, it will directory for any Beagle-compatible launch a viewer for each result by to that of the Best search tool. It’s also
automatically index your home files that contain the word ‘sausage’. clicking on the link. If you leave the worth noting that you can download a
directory in the background. If for any This includes Word documents, Gaim results window open, it will update Beagle toolbar for Firefox that contains
reason there are parts of your home instant messages, emails, text and whenever Beagle finds any new much of the same functionality.
directory you do not wish to be binary files. Unless you collect sausage content, such as extra lines in an IM
indexed, you can choose between two recipes, this isn’t going to find much, conversation, or a new email. A new way to search
options. The first one is to create a but you get the idea. The best way to You can even query Beagle using Why does such a simple idea deserve
hidden file called .noindex in every query Beagle, however, is to use a your browser. This is why we added the so much attention? The answer is that
directory you wish Beagle to exclude. graphical tool called the Bleeding Edge configure option when we compiled you no longer need to worry about
This will stop Beagle from indexing Search Tool – Best for short. Beagle. In order for it to work you organising your data so much since it’s
always available immediately via Beagle
THE INSTALLED BEAGLE AT A GLANCE – potentially transforming how you
index and store your data. Sending out
[1] This is the Bleeding Edge Search Beagle is a far more efficient retrieval
Tool, or Best, a graphical utility for
querying the Beagle database and process than hunting out the file for
displaying the results as a list. yourself; and what’s more, Beagle will
[2] When message are logged from 2 3 bring up files sharing a keyword that
the Gaim Instant Messenger, your you might never have thought of
conversations can be queried. looking for.
[3] Firefox needs the beagle.xpi Beagle is still in the early stages of
extension, after which your
development, and it can only go from
browsing history can also be 1 strength to strength as more filetypes
queried, letting you jump straight
to the link. are added and stability issues are
[4] Word documents, either from addressed. It won’t be too long before
Microsoft’s venerable application or Beagle is as integral to your desktop
OpenOffice.org, can have their
contents indexed. experience as a web browser or media
[5] Rather than waste time sifting 4 5 player, and hopefully easier to install.
through your inbox, why not let With any luck, you’ve been able to get
Beagle retrieve any important Beagle working on your system so that
emails for you?
you can see for yourself. LXF

www.linuxformat.co.uk LXF70 SEPTEMBER 2005 65

LXF70.feat_beagle 65 11/7/05 12:48:14 pm


WEB DEVELOPING

Playtime on the

WEB
While we’ve been getting excited by innovation on the desktop, web developers have been making
giant strides in interaction, content delivery and pure, raw speed. Amias Channer looks at three
pulse-quickening projects: an XML breakthrough that promises a quicker, smoother user experience,
an exciting opportunity for hackers from Google and, first up, a new service at the BBC, whose
openness is being rewarded by some thought-provoking applications of its RSS content.

BBC BACKSTAGE FEEDING INNOVATION

W
e love web programming – Well, now there is. The BBC is RSS feeds are available covering fairly simple and easy to comply with.
sitting up late, drinking opening up its content for free, news, sport, BBC community projects, For those who read licences a lot, this
coffee and watching Buffy, non-commercial use at a new site at travel, weather, entertainment, radio will be a breath of common-sense
waiting for a visit from the http://backstage.bbc.co.uk for and TV listings. Some of the feeds are flavoured fresh air compared with the
elusive muse… the thrill of anyone interested. Only the RSS feeds more complete than others but the usual legalese. The gist of the
a sudden idea, and the and several content-access APIs are service is growing: the listings service, agreement is that you aren’t allowed
fevered tapping into the night as it available at the time of writing, but for example, previously limited to to charge site visitors (hardly the first
becomes reality. But in the morning, much more is expected soon. The BBC4 information, has just added thing open-source developers think
all you have is a jazzier way to show project is meant to engage the web- seven-day listings from other BBC of) nor summarise the content, and
off your holiday snaps online. If only development community in the huge channels and radio stations. you must provide a link back to the
there were some source of real, hard amount of content that the BBC Before using the service you originating BBC site – easy.
content; important stuff worthy of your provides, and also to provide beta should definitely read the terms and Though you’re not allowed to
programming skills. testing for its RSS feeds service. conditions, but don’t fret: the licence is charge for the content, you will be

66 LXF70 SEPTEMBER 2005 www.linuxformat.co.uk

LXF70.feat_bbc 66 8/7/05 5:15:00 pm


WEB DEVELOPING

control of the environment and group of people to


CASE STUDY: EXPERIMENTING way it’s work with, and makes me more
WITH BBC BACKSTAGE presented and comfortable when thinking about how
“I’ve been experimenting with the context it’s technology could improve in the future.”
audio content, blogs and RSS for a presented in to Some of our favourite submissions
while, but the real insight came the end user,” he are in the Five Of The Best box, below.
when I realised the power of what says. “However, “We have been very impressed with the
Dave Winer and Adam Curry were
that obviously quality of what’s being produced,” says
developing, with podcasting. I
provides numerous Metcalfe. “We will certainly be looking
could download a feed, synthesize the text then
redistribute this enhanced feed as a podcast. The benefits on the flipside – such as into how we can incorporate some of
Holy Grail for me has long been to get legal access improved reach, innovation around those ideas back into the main
to a world-class news source. So when the BBC your content, and so on.” bbc.co.uk content. People who
Backstage project came along, I was overjoyed. I Since the Backstage site was submit prototypes to us retain the
crank out all my feeds, from the weather in opened it has attracted an active intellectual property of their work, so
Prudhoe Bay, Alaska to BBC news, on a $600
developer community and some truly we’ll be working with them on that.”
Linux box in my basement. I use the Festival speech
innovative prototypes. There have
synthesis system, a wonderful piece of open
source software. I program in Perl, using dozens of been no abuses – yet – of the terms RSS goal
TED GILCHRIST
modules developed by the Perl community, and and conditions, but the prototypes are The British Broadcasting Corporation is
Rebotcast of BBC
world news feed distributed at CPAN.org. My use of the feeds checked when they’re submitted, and unique in the field of broadcasting
http://feeds.feedburner. themselves depends on the kindness of strangers, regularly after that. because of its charter and not-for-
com/bbcworldRebotcast either explicitly or via Creative Commons.” To learn more about BBC profit status, both of which make it
Backstage you can subscribe to the very internet-friendly. It has always
allowed to display adverts on your site The launch is also expected to mailing list, which is rapidly becoming used open technologies where
but you cannot claim that the content feature some of the results from the a high-quality source of RSS hacking possible and even runs a few of its
is yours or charge for the use of it. BBC’s recent flirtations with podcasting, information for UK-based projects. own open-source projects.
The official launch of the as well as the rest of the Open Tech The mailing list is also a great way to The corporation’s reputation on the
http://backstage.bbc.co.uk site programme, which is all about get a feel for what’s going on at the internet is strong, and the Backstage
will happen on July 23 at the Open technologies that everyone can have a cutting edge of web development. project shows its commitment to
Tech 2005 meeting in Hammersmith, go at – be it familiar open source Duncan Metcalfe, a recent A-Level making sure that its web content is as
London, organised by the UK Unix and

“IT IS A REALLY ENJOYABLE,


Open Systems User Group – a huge
tip of the BBC hat to the open-source
community. There is much speculation
in the geek media and blogs that the ENCOURAGING ENVIRONMENT AND
BBC will allow the downloading of its
huge library of TV series. Think Dr
GROUP OF PEOPLE TO WORK WITH.”
Who, The Tripods, Bagpuss…
While this would seem likely to software, or ‘repurposing’ everyday student who has submitted several well respected as the rest of its
dent the BBC’s profitable DVD and electronics hardware like, say, an Xbox. prototypes using the RSS feeds, says services. The project also provides
video sales, it would be an enlightened he’s been inspired by the ideas and somewhere for it to grow into following
response to the explosion in illegal Best behaviour support in the project. “As my first time the success of the online news service
downloading that threatens to do the The Backstage project lead is Ben being involved in any way in a – it is aiming for 10% of its
same anyway; at least this way the Metcalfe, who spent months working developer network, it is a really news.bbc.co.uk traffic to be driven
BBC would be able to monitor what on it in the BBC’s new media and enjoyable and encouraging by RSS by the end of the year.
was going out, rather than leave things technology division. He says parts of
to the pirates. the BBC initially needed some
Such a move would also be in line “persuasion” to make its content
with the BBC’s charter. Licence payers available. “You’re actually asking quite
have already paid for the shows, so a lot from a content stakeholder for
they could argue that they have the permission to let their content be
right to watch them again without reproduced on other people’s websites,
having to pay again. where they will lose the physical

FIVE OF THE BEST


BBC BACKSTAGE PROTOTYPES
■ www.chatbots.co.uk/newsbot Have a virtual newsreader read news to you.
■ www.assistmedia.com/trafficlite Traffic updates from the BBC on your mobile.
■ www.missingwords.co.uk Online version of the Have I Got News For You missing
words round, with new headlines generated every 15 minutes from RSS.
■ www.backstage.min-data.co.uk/sport Find news about your nearest British
football team.
■ www.justinflavin.com/tagsoup/tagsouprss.php Tag soup of BBC technology news.
www.missingwords.co.uk: just like having Ian Hislop in your living room.

www.linuxformat.co.uk LXF70 SEPTEMBER 2005 67

LXF70.feat_bbc 67 8/7/05 5:15:13 pm


WEB DEVELOPING

wheel every time you go for a drive. Document Object Model (DOM),

AJAX PUSHING FOR CHANGE One of the main problems with web
architectures is that they tend to follow
very heterogeneous structures, so best
whereas Ajax applications can request
data directly. This trick is usually
performed with a new JavaScript
practice is often hard to isolate and function, XMLHttpRequest(), which
Used by Google Maps, Gmail and having to visibly reload. Cacheing and reproduce in other scenarios. Noticing has only recently become part of
parts of the Flickr photo-sharing clever layout design can make the that your work follows a design pattern mainstream browsers’ JavaScript
program, the technology known as client>server>client journey smoother, is a skill in itself. Design patterns won’t implementations. With this lovely little
Ajax has been gaining notice for some but there is always a noticeable delay necessarily help you build the best function, a page can request any XML
months now. At first, we were unclear or break for the user. code, but they do give you a set of feed from anywhere on the internet via
about what it actually was, though we The Ajax approach brings in a third useful pointers on how not to trip HTTP. The possibilities here are
were pretty sure it was neither a layer for a structured data stream. This yourself up. immense: you could get an up-to-date
cleaning solution nor a Dutch football is usually XML, but can be JavaScript The MVC model is one of the most list of blog articles, news headlines,
team, and we did know that the sites Object Notation. You might think common design patterns used in traffic announcements, syslog
it’s being used on were pretty cool, so adding an extra layer would slow the programming today, with almost all messages from a server or, if you have
by extension we assumed Ajax was process down even more, but it graphical operating systems using it. Its no imagination at all, stock quotes.
too. Now we know a little more about actually speeds some things up. This main advantage is that it allows It is also trivially easy to generate
it, and we’re pretty excited. an XML feed from a database for use
The term Ajax was coined by long- with Ajax.
time web developer Jesse James (no, “THIRD PARTIES CAN And the fun doesn’t stop there –
really) Garrett, pictured here, as he
related earlier this year. “I needed ENHANCE YOUR SITE OR because the XML data is structured, it
can easily be put into the page from
something shorter than ‘Asynchronous
JavaScript+CSS+DOM+XMLHttpRequ ADD EXTRA DATA SOURCES.” which it was called, with judicious
manipulation of CSS and the DOM.
est’ to use when discussing this This will happen in the background via
approach with clients,” he wrote on the separated data layer allows logic to be separate development of the interface the JavaScript events mechanism,
website of web applied to data before it goes back to and back-end components, whereas which can even make use of
consultancy the server, or even for the intervening the conventional web development eXtensible Stylesheet Language
Adaptive Path, Ajax machine to handle some basic paradigm, as we’ve mentioned, keeps Transformation (XSLT) to turn your
which has been tasks by itself, and for new data to be the two heavily intertwined. XML into HTML within the browser.
using the collected and dropped into the user Traditional web paradigms would
technology for a interface. This is very useful for XML in the mix require the page – or some horrible
while but didn’t validation, but really comes into its own If you’ve been around web developing hidden page – to reload. Either way it
invent it as such. when you need high-speed interaction. for a while you might think this sounds tends to make the browser busy and
In fact, Ajax Design pattern aficionados out rather similar to DHTML, and indeed it unresponsive, in the worst cases it can
isn’t particularly there will recognise this as MVC is. But there’s something extra special even hide the page entirely. Add to
new or even original technology. It’s (model view controller) architecture. about Ajax – XML! Conventional that creation and rendering of PNG
PHOTO AND DIAGRAMS COURTESY ADAPTIVE PATH

really just a clever new way of using Design patterns are definitions of DHTML was limited to manipulating images and you can start to see why
some old favourites. Specifically, Ajax common types of program structures data supplied with the interface via the the word ‘website’ suddenly seems a
uses mature, open-standard that almost all programs fit into, and bit wishy-washy… ‘application’ seems
technologies (HTML, CSS, JavaScript/ they allow you to refer to best practice more appropriate, with all the
ECMAScript and XML), so minimal for whatever it is you are trying to do –
Browser client interaction that’s going on.
extra learning is required and you don’t you shouldn’t have to reinvent the User interface

need any new browser plugins. What is


Browser client Future of the web
new are the ideas behind Ajax, and Because there’s no interface reloading,
new ideas can take a little getting
Browser client HTML+CSS data
the Ajax approach (if done correctly)
used to – but it should be an User activity should yield massive speed benefits
Ajax engine
interesting process, and the results are over more old-school methods. After
seriously impressive. the initial page load, each call to your
HTTP request HTTP request server will just be fetching data without
It’s actually useful! HTTP(S) transport HTTP(S) transport having to fill out a template or make
Conventional web applications have a decisions about interfaces.
HTML+CS data XML data
very simple client–server structure, Examined on a per session basis
with user requests, or HTTP ‘calls’, this seems a small benefit, but over
having to go back to the server, almost Web server Web and/or XML server the whole site it adds up to a
always resulting in a complete page significant decrease in server load,
refresh. Traditionally, the server does which in turn makes the data retrieval
Data stores, back-end Data stores, back-end
all the logic and presents the client processing, legacy systems
even faster.
processing, legacy systems
browser with simple interface pages, Another benefit of Ajax is its clean
though many people have tried to find Server-side systems Server-side systems separation of the data, interface and
ways to allow web pages to manipulate logic layers, which means that third
their own information or to allow a Classic Ajax parties can drop in replacements to
page to receive more data without web application model web application model any of the layers without the need to

68 LXF70 SEPTEMBER 2005 www.linuxformat.co.uk

LXF70.feat_bbc 68 8/7/05 5:15:20 pm


WEB DEVELOPING

FIVE OF THE BEST AJAX-BASED WEBSITES Ajax paradigm with a robust back-end
– Ruby on Rails appears to be the
■ http://maps.google.co.uk most popular so far. These toolkits can
Google’s jaw-droppingly amazing Ajax-powered mapping site. be a great way to get used to Ajax, but
■ http://gmail.google.com Google’s Ajax-driven über-email service. will not be so useful if you are hoping
■ www.google.com/webhp?hl=en&complete=1
to add to an existing site.
Google’s new search interface with autocomplete.
With the continuing provision of
■ www.monoplylive.com
Online version of Monopoly using GPS and wireless data from cabbies. useful open content such as RSS
■ www.basecamphq.com feeds under flexible licences, Ajax
Project management site that was so good it spawned Ruby on Rails. apps will soon become the norm,
leaving conventional websites looking
know the internals of any of the acceptance in the world of uninteractive and dull. While there are
others. If you wrote your website’s web development. The second is that, because its many competing technologies,
initial scripts with JavaScript classes, But there are two other factors that standards compliance is not owned by paradigms and buzzwords out there,
third parties will be able to subclass or have set Ajax apart from its peers. The any particular entity (unlike Java), there Ajax deserves your consideration
override your methods to enhance first is that with Ajax, unlike Flash, you can be no sudden changes of direction because of its great combination of
your site or add extra data sources. can view the source, which leads to or lock-in. Already there are several tried and tested component
Already Google Maps has spawned rapid community-based growth as toolkits for producing Ajax-based web technologies and the proven potential
several modified versions, each using developers examine each other’s code. applications that claim to integrate the it offers for innovative user interfaces.
the mapping engine to present
interfaces to various geographical
Classic web application model (synchronous)
keyed data such as business finders.
Before you allow third parties
access to your data, it would be wise
CLIENT
User activity User activity User activity
to create an acceptable use policy and
> > > > > >
some sort of developer program (such
Data transmission

Data transmission
Data transmission

Data transmission
as a Wiki or mailing list).
>

>
>

>
Disability drawbacks
You’re probably thinking: “This sounds Time
>

>
>
>

great – what’s the catch?” Well, there


are a few, but they’re easily avoided.
While the standard web paradigm
degrades nicely in situations where the
>

>

>

>
client is not the latest web browser, or
even a web browser at all, Ajax > > > >
applications aren’t nicely behaved at System processing
Syste ocessing System processing
stem pr sing
all and can be a real nightmare when SERVER
it comes to accessibility. Speech
readers and Braille printers will be
Ajax web application mode (asynchronous)
utterly mystified by an Ajax application
and will not be able to handle CLIENT
XMLHttpRequest() for some time.
For these browsers you will need to Browser UI
provide alternative access, or ensure
User activity
Input display

Input display

Input display
Input display
>

>

>

>

that everything can be done via the


>

>

>

>

normal forms or with standard links.


Not all of the core Ajax functions Ajax engine
>

>

>

>
>

>

>

>

are available in all browsers. To get


around this, several JavaScript libraries Client-side processing
Data transmission
Data transmission

Data transmission
Data transmission

>
>
>

>

>

>
>

>

are available that provide a unified API


across all browsers and help degrade
nicely in situations where Ajax support
cannot be used.
Time
>
>
>

>

>

>
>

>

Only now that the underlying


standards have matured has Ajax
moved from being interesting but
unusable in the real world to the point
>
>
>

>

>

>
>

>

where it’s powering some of the most


impressive sites around. Its
Server-side Server-side Server-side Server-side
namechecking on Google Maps, processing processing processing processing
Google Suggest et al has proven its
suitability and helped it gain
SERVER

www.linuxformat.co.uk LXF70 SEPTEMBER 2005 69

LXF70.feat_bbc 69 8/7/05 5:15:28 pm


WEB DEVELOPING

XML. This XML is fed at load time to

GOOGLE MAPS A HACKER’S PARADISE XMLHttpRequest() via a call to a


function on the parent page. Now
here’s the odd thing – Ajax could have
been used to do this directly. We don’t
know why it isn’t being used to the full,
but it could be that Google’s
developers didn’t want to expose the
XML server directly, so they’ve put a
cacheing proxy server in front of it.
Given the maturity of HTTP cacheing
technologies they may have found
more scalability in having the XML fed
through a more conventional HTTP
request than requesting raw XML
alone with no protocol-level cacheing.
Once this data is received it is fed
to the _load() function from the
parent window, and an XSLT transform
is applied to the XML to turn it into the
local info panel at the side. This reload
also triggers the creation of those cute
pointers, speech bubbles and route
lines of the Seattle Busmonster shot.
Because of Ajax, the data can be
sourced from anywhere, but it will only
be meaningful if it has geographical
positions within it.

Hack me happy
So we know how it works – let’s hack
it! To generate a new map, we don’t
actually need to build much ourselves
(more details are available on the
Google Maps website), as an informal
API has evolved due to the emergence
of several mailing lists and Wikis for
Google Map hacking. But unless you
Google Maps’s aerial maps are certainly useful, but add the information coming in from Ajax and it all gets much like having to rebuild your site every
more interesting. Here, bus stop information is tied to the map’s co-ordinates and overlaid. day it might be a good idea to wait for
the official Google Maps API.
If you’re looking for an example of geographical co-ordinates (known as The map images are impressively If you really can’t wait, the simplest
something cool that you can do with geolocated data) over maps or satellite handled, but the real magic is in the way to get started is to generate a map
Ajax, you could do a lot worse than images. It has all the comfort and overlaying of data points and polylines. at www.mygmaps.com using the
taking a look at Google Maps. If you usability of a native application, so The user request is sent to the online interface, which will get you a
haven’t seen it yet, hurry along to much so that it’s hard to believe that server in the conventional way, with basic data file, host the resulting map
maps.google.co.uk for a treat. you’re looking at two separate systems the server returning a page in a hidden and probably give you a few ideas for
Anyone familiar with Keyhole.com, occupying the same screen space. frame that contains lots of embedded what you might achieve. You could
which used satellite images, 3D
geography and maps, will probably Two techniques GOOGLE MAPS COPYRIGHT
experience a touch of déja vu: Google So how does it work? Interestingly, only
recently bought Keyhole, and it’s the the query data uses Ajax methods: the Google has been intentionally vague large poster-size image. In doing this,
Keyhole system that provides the map image-fetching is done using the about what it will allow with respect to the site broke the licence under which
reuse of its mapping system. As long as Google obtained the data. Extracting the
underlying mapping engine. Google more conventional IFRAME inline
Google and the original copyright map images and using them for
took the Windows-only application and frame method, so you can still use the
holders of the map image are credited something else infringes the copyright
ported it to the web, making it much Back and Forward buttons – each on your site, it look like you can use it of the map data owners, so this site had
more versatile, accessible and free. IFRAME refresh causes a History entry for anything within the normal non- to be stopped to prevent the copyright
The really clever thing, though, is to be created in the browser. This is porn, non-terrorist, non-offensive owners taking it out on Google.
what Google did next. It used Ajax also the reason why the map will boundaries. So far there has only been a Incidentally, the takedown notice itself
methods to retrieve data and plot it on display in all browsers but the query single takedown notice served on a was typical Google. It was written as if it
Google Maps derivative project – which was a note from a friend – it even
its maps. The result is a truly functions work only in the latest ones
was a website that automated the apologised to the site’s creator for
groundbreaking system for displaying (though Internet Explorer has
sticking together of map tiles to create a having to shut him down.
data from XML files that contains supported them since version 3).

70 LXF70 SEPTEMBER 2005 www.linuxformat.co.uk

LXF70.feat_bbc 70 8/7/05 5:15:36 pm


FIVE OF THE BEST
GOOGLE MAPS HACKS Quality, low-cost Co-Location
■ www.chicagocrime.org
Chicago puts in a bid to be the next Grand Theft Auto city.
■ www.busmonster.com
Hopefully the final nail in the coffin of the Seattle motorist.
■ www.gtraffic.info
Make sure the police behave by watching them on London traffic cams.
■ www.dynamite.co.uk/local
Simplify your stalking with geostamped Flikr photos.

Co-locate your server


■ www.housingmaps.com
Find houses and then check them out in satellite photos.

with us from just


£27.50 per month

for 1U of rack space, with 100GB of


high quality monthly data transfer.
Down and out in Chicago? No problem – here’s where to hustle
your money back.

then use the code from http://stuff. The word from the bloggers is that
rancidbacon.com/google-maps- Google is developing an API for site
embed-how-to to embed a map in developers to integrate Google Maps
your page. Simply call a wrapper into their own sites, but as yet this is
function and enter the name of the not finalised. Google has continued its NEW Quality Rack Mountable Servers
DIV tag that you want to display your tradition of being annoyingly good at now available to buy or lease
map. The first hacks were very doing websites, and seems to be
unreliable – Google Maps is still in getting even better despite having not
beta and the underlying API can much monetary incentive to do so –
change without notice. They did, all involved have (or should have)
however, demonstrate perfectly the already made Croesus-like amounts of High quality bandwidth with 99.9% SLA
potential for hackers, and should now money. With the release of a
be very stable. That potential is being commercial API for Google Maps they Modern Manchester-based data centre
tested by creative types the world over: will probably double this fortune. More
for our favourite hacks. power to them – and to us. LXF Pricing from just £27.50 + VAT per month
Friendly, approachable support
CASE STUDY: EXPERIMENTING
WITH GOOGLE MAPS Remote reboot switches available
DUNCAN BARCLAY “I decided to try to make something that mapped
Firewalled connection as standard
News by county
http://backstage.
BBC news stories to roughly the right place on a
Google Map by doing it by county. It was fairly
24/7 Emergency Telephone Support
min-data.co.uk/news simple to get the data from the RSS feed and on
to the map. It was simply a question of working
Online monitoring of your bandwidth
out the longitudes and latitudes of the places,
downloading and parsing the data (I used PHP),
then putting the values into the XML for the
Google Maps scripts to deal with. Getting the
Google Map on to the page was a bit more
difficult, but basically involved looking at the
source code for Google Local, and cutting out all
the code that didn’t involve the map. There have
been a few problems with it, such as when Google For more information, call us free on
updated their maps script, making me go through
the whole process again!” 0800 915 8771 or visit NorthernColo.co.uk

LXF70.feat_bbc 71 8/7/05 5:15:43 pm


INTERVIEW GAËL DUVAL

Le
Comeback
THE LXF

King
INTERVIEW

Gaël Duval, founding father of Mandrakesoft, has


seen his baby go from the brink of disaster to
becoming part of a multinational Linux empire. How
did he do it? What next for Mandriva? And how can
two coffees and a diet Coke come to 33?

R
ising from the ashes of everybody and the third step is to see were in discussion with them, so…
bankruptcy, Mandrakesoft has if it makes sense to merge with or to Before the merger we already started
changed its name and more acquire that company. Then once most to work together, we started the LCC, moving your market a little bit?
than doubled in size through people in the management staff agree the Linux Core Consortium, so there GD: I think the markets are quite
acquisitions in the last six that it would be a good idea – was already a good feeling with them. similar. There is just the question of
months. At its head remains And on their side, they were interested the product line, so we have to merge
Gaël Duval, the quiet Frenchman with LXF: On both sides? to buy the deal because they were the product lines, the brand names,
a penchant for Jimi Hendrix and a fear GD: Yes, on both sides. Then we enter quite small and not very famous, a because it’s more efficient to have
of flying. Linux Format took a trip to a formal process, which is to have the marginal player, so it’s an opportunity only one product line and one brand.
Paris, meeting Gaël at the Louvre for board of Mandriva give their opinion for them to have more visibility. That’s one of the reasons for the new
lunch and a chat over a cup of coffee about the merger, and then we have name, because Conectiva plus
to ask about the future of Mandriva, to have all the shareholders vote yes LXF: Did the LCC actually help get Mandrake gives Mandriva.
the pressure from its competitors, and or no. So it’s a long process, and it you anywhere? We are in the process of merging
just what it was that almost drove the took nearly one year – nine months GD: There is not much activity on this the products into only one line of
company to destruction... from the beginning. side currently. There shouldn’t be any Linux solutions, and maybe they will
LXF: How close was the match impact – it’s just that two members have some specific solutions for South
LXF: A year ago, Mandrake was between Conectiva and Mandrake? have become one member. America if there is a particular need
almost bankrupt. Now you’re Was it quite similar in terms of for them in the local market, but
coming out fighting with the company strategy, or did you want LXF: As a result of the merger, do globally we will merge everything. We
Conectiva and Lycoris deals. What
brought about these changes so
soon after bankruptcy?
GD: Maybe Mandrake lost some time
“I THINK THE RESPONSE FROM THE
with the financial issues in the past, so COMMUNITY WAS THE KEY FACTOR THAT
when all these problems were solved
we had to have things go faster… HELPED US TO NOT STOP EVERYTHING
LXF: To catch up?
AND SAY, ‘OK, WE GIVE UP’.”
GD: Yes. So the merger with Conectiva
was an opportunity to show that first, something quite different? you see Mandriva’s goals being take the best of Conectiva Linux and
we are still alive and well, and second, GD: It was interesting for us to merge closer to Conectiva’s goals, or we put it in Mandrake, and everything
to show that we can expand the with a company which was not exactly closer to Mandrake’s goals, or a becomes Mandriva.
company and grow the business and in the same market. It was not an mix of the two?
become strong and so on. exact competitor to Mandriva because GD: Basically they are the same. We LXF: What are the best bits of
they have a local market in South do a Linux product and we sell it to Conectiva Linux?
LXF: Whose decision was it to America so it’s interesting for us individuals and corporations – they do GD: They have some good technology
merge with Conectiva? Was it a because it’s a complement to it in South America, we do it especially in the Smart software. It’s like urpmi,
number of people’s? Mandriva, it’s not a… I don’t know how in the USA and Europe. the dependency software of Mandrake,
GD: The first step is to collect to explain that. And it was a company but they have better algorithms and
opportunities, so there was Conectiva, with a similar size with approximately LXF: Do you think Mandriva will it’s more sophisticated. We are going
but there were other opportunities as the same number of people in place. continue to be all the things to merge urpmi with Smart into a >>
well. The second step is to discuss with There was a good feeling when we Conectiva used to be? Are you great separate package.

72 LXF70 SEPTEMBER 2005 www.linuxformat.co.uk

LXF70.iview 72 11/7/05 3:13:24 pm


INTERVIEW GAËL DUVAL

TOP TRUMPS
LXFtrumps
Gaël Duval

COURTESY: WI
Created the Ma
nd
as a fork from Re rake distro
1998, turning it d Hat in
int
profitable compa o a

NNING
ny
boxed sets. Stee providing
re
from near-bank d it away
ru
Edge-IT and Lyco ptcy to buy Conectiva,

MOVES UK LTD
ris.
AGE
NATIONALITY 32
YEARS USING Frenc h
LINUX
PROGRAMMIN 10
G LANGUAGES
NUMBER OF PC 8
S
DAILY COFFEE 12
INTAKE 2 x decaf
SANDALS OWNE
D
HE SAYS “People 1
who claim that
100% ready to Linux is
replace Window
don’t know wh s
at they are talkin just
g about.”

www.linuxformat.co.uk LXF70 SEPTEMBER 2005 73

LXF70.iview 73 11/7/05 3:13:29 pm


INTERVIEW GAËL DUVAL

GD: Maybe 60 programmers. We had


a team in the US also; that was very
expensive. A sales team but engineers
also. Maybe a third were developers.

LXF: It must have helped your


finances enormously to have
people in the community buying
MandrakeClub memberships.
GD: At the end of 2002 we knew that
there was a very serious money issue,
and we knew that if we wanted to
grow further we had to find some
money. We were unsuccessful at
finding more investment so we tried to
explain to the community of users that
we had serious problems with money
and that if they wanted to help
Mandriva, they could do so by buying
our products, subscribing to
MandrakeClub… I think the response
from the community was the key
>> LXF: Is Conectiva Linux On the other hand, there are good LXF: Wow! OK, now we know factor that helped us to not stop
APT-based? signs with the recent release of Nero where the money went. everything and say “OK, we give up”.
GD: No, no, it’s RPM, but it can for Linux and the new Acrobat Reader. GD: Yeah. You know, in France the
understand APT to a certain extent. And maybe the move of Apple towards laws to fire people are very strict, so it LXF: So they kept you alive?
Intel [see News, page 6] could have a took a very long time to decrease the GD: Yes, yes, we realised that
LXF: Do you plan to visit positive effect as well, by reducing the number of employees and to break Mandrake was very important to them
Conectiva’s offices? costs and simplifying the work of even, so between 2001 and 2003 we and at the same time many people
GD: Maybe one day. Not soon, software vendors to port their progressively decreased expenses. But subscribed to the club to help us
because I have to find a boat. applications to Linux. On the other this took time – three years – and we financially, so we realised we had to at
hand, if we wait enough we will ran out of cash. When you run out of least try to continue and find solutions.
LXF: You don’t like to fly? certainly see every piece of Windows cash you have to close the company
GD: I can’t fly, I’ve got a plane phobia... software have an open-source and find some solutions. LXF: Are you worried that you’re
equivalent, so this time Linux will be expanding too quickly and might
LXF: Had you considered really ready for the desktop – and it’ll LXF: Was poor decision-making repeat your earlier problems?
merging with SUSE instead? be too late for commercial software. part of the problem? GD: [Lycoris] is our third acquisition in
They’re a lot closer! GD: Yes, a little bit. It’s hard to know if one year and we haven’t spent much
GD: Well you usually take planes to LXF: Can we expect another something was wrong or not, because money – [it’s been] mostly through
Germany, so, same problem! name change? you have to try another path and to the stock exchange. Additionally,
GD: No! know if it’s a good path, but I think the Edge-IT and Conectiva were profitable
LXF: Tell us about the Lycoris buy- decision to hire too many people was companies, like Mandriva. So the risk
out – what prompted the move? LXF: Going back before the a wrong decision. After that there were and our situation are really not the
GD: Mandriva started as a desktop merger with Conectiva, what led decisions that were taken, like starting same as before when our expenses
Linux distribution, although we have Mandrake into the problems that the e-learning business, which had a were three or four times our revenues.
diversified on the server. But we think it had, and what have you learned cost, and the management at this time
that it’s important for us to go further as a result? took some decisions that were very LXF: Lycoris was originally based
on the desktop because it’s part of our GD: I think it’s a problem of timing: we costly because they thought money on Caldera Linux [forerunner of
image and also because we want to started in 1998, and Mandrake was would always come in to the company SCO] – do you think that kind of
be ready for when the Linux desktop successful very quickly. The problems and cover all the costs. association may harm Mandriva?
takes off. came after, in the noughties, and they GD: I don’t think so – the Lycoris
were connected to the dotcom crash. LXF: Not very realistic. image was not really associated with
LXF: So you don’t think Linux is In 1999 and 2000 we got plenty of GD: No, and all the management staff Caldera or SCO.
ready for the desktop just yet? cash coming into the company had to leave, because it wasn’t
GD: I think that Linux is technically – investment from venture capitalists. It possible to go on like that in the long LXF: Do you foresee further
ready. I mean, the technology is here. was more than €20 million, and of term. We started to clean up consolidation of the Linux market?
But we have to wait for course when you’re a young company everything, but it took a few years. Do you think that’s a good thing?
independent software and there is a lot of cash coming in, GD: We’re very happy to be in a
vendors to release you start to spend too much, to hire LXF: Of those 150 employees at situation where Mandriva is buying
more often for Linux, to too many people. In the middle of the height, how many were other companies instead of being
consider it as a viable 1999 we were approximately 12 engineers for programming, and absorbed by a bigger one. And that’s
market. Of course this employees at Mandrakesoft, and one how many were sales, a good thing for Mandriva to be able >>
is a virtuous circle. year after, we were 150. administration and management…? to expand.

74 LXF70 SEPTEMBER 2005 www.linuxformat.co.uk

LXF70.iview 74 11/7/05 3:13:38 pm


INTERVIEW GAËL DUVAL

“WE DON’T THINK THAT


LINUX IS READY YET FOR
THE MASS MARKET.”

LXF69 AUGUST 2005 75

LXF70.iview 75 11/7/05 3:13:41 pm


INTERVIEW GAËL DUVAL

>> LXF: So have we seen the end of


the Mandriva spending spree for
the time being?
GD: It’s likely that there’s going to be a
pause because it’s already a big job to
have Conectiva and Lycoris join
Mandriva in terms of organisation and
processes. But who knows?

LXF: There’s only been one limited


edition Mandriva release so far in
2005, whereas previously we had
PowerPack, PowerPack Plus… will
there be only one release in future
or will there be different levels?
GD: The limited edition is really a
special version, so there will only be
one. The name of the next version will
be in track with this version, because
we will add 2006 in full, but there will
be the demo pack, and PowerPack
Plus, and Discovery.

LXF: Mandriva has switched to a people saw Mandriva come out offer very stable software in
yearly release cycle; but there has two weeks after SUSE and yet it official releases, and on the other yet for this market. We will be ready
also been a recent announcement had older Gnome, older KDE… hand we can offer more cutting-edge for when it starts to explode but for
that every two months there will GD: Traditionally Mandrake was at the software to club users and people who now we have to offer products to our
be a club release with new cutting edge of software. SUSE and always want the latest. I think maybe core user base and we have to expand
features. Is that yearly, or every Red Hat and others were more SUSE takes some risk to put… I don’t the business in the corporate market.
two months, or a bit of both? conservative and they tried to be sure know how stable it is, but…
GD: There are the official products on that they only offered the most stable LXF: So how about around the
the one hand – the product line that software. And now they are trying to LXF: The new Mandriva release globe? Obviously Mandriva’s got a
you find in boxes with documentation do what we did before so it’s a bit has had a lot of criticism among presence in France and Brazil, but
and support, so people can buy it in funny, but if we release every two our readers because the graphics where else do you have a strong
stores and stuff, and on the other months it’s not because of SUSE or are very cartoony. You’re trying to market presence, and where
hand there are club subscribers, who anyone else, it’s because our users tell appeal to the business market, but would you like to be stronger?
have access to all this product and us that they like to have things those graphics just don’t work in a GD: We are strong in the corporate
more. The message is that if you want updated. business environment. market in France, because our
all official Mandriva products, you have LXF: So why is Mandriva 2005 GD: This version in particular is a presence in Paris makes it easier to
to be a member of the club. Club behind SUSE in terms of numbers? special version. We had planned to meet people and to go to big
members can download an updated As you say, Mandriva has always have an official version in March with corporations and governments and
version every two months, with new had all the latest software and Mandrake, Conectiva and many other places. But speaking about individuals
features such as the new KDE and the now suddenly it doesn’t. What things, but it was not possible, so we … yes, we have a good user base in
new Gnome. happened there? decided to release a special France, but we have a good user base
GD: Compared to what we did before transitional version. It’s not targeted at in the UK, in the US, and in many
LXF: Does that update itself we have more formal processes in the the corporate market or the regular other places in Europe. For individuals
continually, or do you have to company because we want the quality market – it’s just for power users. we make a big part of our business
keep on downloading new ISOs to be very good. When you have Power users have no problem with through our online store, and we ship
and installing, installing, installing? formal processes you have to choose cartoonish pictures. to approximately 150 different
GD: You have the choice. There are which version of software you will put countries, so the market is big but we
updated packages, but you can also on the product, maybe three or four LXF: Where do you think can’t have offices everywhere.
download the complete distribution. months before the release, so it’s hard Mandriva’s key markets are?
to put the very latest version on it. I What’s the biggest place for you in LXF: Do you think the market in
LXF: Was this decision to have a don’t know how SUSE does it! terms of revenue? South America is very different
new release every two months There are two types of Linux users. GD: We have a strong core of home from the Linux market in Europe?
related to your competitors There is the geek, who always wants to users. We can rely on this market – it’s GD: There is a big Linux market in
having more frequent have the latest version. And then you a big part of our revenues. But we South America, especially in Brazil,
releases? The new have the corporate market, and think that the corporate market, the because I think that more than here
SUSE 9.3 has Gnome individuals who don’t know much business market, offers more the governments really want to get rid
2.10, KDE 3.4, Xen, about Linux and just want to try it, opportunities for us to expand. And of Microsoft – they don’t like Microsoft
Beagle, F-Spot, maybe to use it, but they don’t want maybe later another step would be to too much and I don’t think they like
Mono, Java – it’s got the latest version. We want to address address the mass market, single users, the USA too much as well. So there is
all these things, and both these people. I think it’s good to but we don’t think that Linux is ready a big market and it’s different because

76 LXF70 SEPTEMBER 2005 www.linuxformat.co.uk

LXF70.iview 76 11/7/05 3:13:45 pm


INTERVIEW GAËL DUVAL

it has its local rules, but it’s a Linux and so on. This has to be handled by GD: It depends on where you’re project – this is the primary developer
market for big corporations and common standards such as the LSB talking. Sales are decreasing contribution. And the guys who
government agencies. [Linux Standards Base]. If each Linux everywhere that people have package KDE and Gnome at Mandriva
distribution builds their own graphical broadband access: they prefer to are also directly involved in the KDE
LXF: How about some of tools to address this configuration layer, subscribe to the Mandriva Club and and Gnome projects so they work on
Mandriva’s non-core products, like there is no problem, and it’s actually a get instant access to our latest this project in their work time. For a
Mandriva Move? A while back you plus for Mandriva. commercial products. But in other long time we had David Faure, who
did a TransGaming boxed product areas, they sell well. did a lot of work for KDE.
incorporating WineX; plus you did LXF: Does Mandriva plan to
an Xbox Mandrake distro. These compete in all the same market LXF: What’s your opinion on LXF: Do you think that the
aren’t really desktop Linux, these segments as Red Hat and SUSE? software patents? Mandrake and Conectiva merger
are non-core products. Do you Red Hat has Enterprise Linux, GD: Most small proprietary software will result in some layoffs?
expect them to continue? which goes up to IBM mainframes companies are going to be equally GD: No plans. Maybe if we… who
GD: Ah yes, Mandriva Move will – really high-level machines. Does hurt by software patents. At the same knows what can happen in the future
continue because it’s the easiest way Mandriva plan to compete in all time I’m confident that the European but there are no such plans.
for Joe User to try the product – the same areas? Parliament is going to adopt the good
amendments so that we reach an LXF: At what point did Mandrake
acceptable law. stop being a hobby and become a
“I NEVER PLANNED TO DO LXF: Obviously you’re not
proper career?
GD: On December 15, 1998 I guess,
A CAREER, I JUST WANTED proprietary, but would you class when I became the first employee of

TO DO WHAT I LIKE.” Mandriva as a small software


company? How many employees
the just-born Mandrakesoft! Anyway I
don’t know if we can call that a career.
do you have? I never planned to do a career, I just
everybody who can switch on a GD: Yes, if we have the opportunity GD: Employees… currently there are wanted to do what I like, and that’s
computer can try Linux just by putting we will do so. around 60 in France and appriximately one of the reasons why I preferred to
the CD in the CD-ROM. So yes, we 60 in Brazil. So 120 in total. start a business when I finished at
are going to continue with that. But I LXF: Also, Red Hat has a lot of university, instead of finding a job in an
don’t think we are going to release support in place. They guarantee LXF: And how many of your existing company.
another gaming box. Yes, we have support for seven years – the employees are engineers?
Xbox versions but it’s very… it’s not a lifespan of the product. Is GD: 35 in Paris and about 30 in Brazil. LXF: Do you think you’ll work on
market decision. If you take the Mandriva capable of doing that? Mandriva forever? Do you enjoy it?
example of the Xbox version with the GD: We offer support for two or three LXF: Thirty-five just in Paris? Wow. GD: Yes, of course. I started the
latest Mandriva, I’m pretty sure that years at least, but we are going to So what kind of projects do they Mandrake project alone, and then it
our CEO didn’t know about it before increase that because there are very work on? Or is it really bugfixing became a company, and I started with
the release! big opportunities in the corporate and packaging? development, and then obviously I
market for us. GD: You mean for software projects? worked on the website and so on, and
LXF: What are the areas in which Most engineers, when they find a bug now I’m in charge of communications,
Mandriva is behind its LXF: Do you see a viable future in or something they will report it and and I think I am going to change to
competitors? Where do you think selling your boxed distros? contribute a patch to any free software something else, so... who can say? LXF
they are better than Mandriva?
GD: If we talk about technology, I think
the core is Linux, so choosing a Linux
distribution is a bit like choosing a car
– you just choose a colour and brand,
but most components are the same
inside, and it’s true for most Linux
distributions. There are things that
make Mandriva easier to use than
other Linux distributions. But maybe
you will find some technology, a
feature, in another distribution that will
make you prefer that over Mandriva.

LXF: Mandriva has always had


great configuration tools. Do you
see that as a selling point for
Mandriva, or an area in which
distros should work together?
GD: I think that it’s better that all
Linux distributions rely on a common
configuration layer, such as
configuration files in the same place

www.linuxformat.co.uk LXF70 SEPTEMBER 2005 77

LXF70.iview 77 11/7/05 3:13:47 pm


TUTORIAL First Steps: Upgrades

FIRST STEPS SYSTEM MAINTENANCE SERIES

Upgrades
Get the best from Gnome 2.10
PART 3 Andy Channelle dons a pointy red hat and grabs his toy fishing rod
to look at some of the new features of Gnome 2.10.

While KDE is winning users the Linux world over by that you must use the exact application suggestions of the
offering everything but the Kitchen sinK, the GNU developers or the recommended method of working with
Object Model Environment, or Gnome as it is Gnome once you’ve installed it.
commonly called, remains a popular choice for its clean looks, One of the more contested innovations introduced into
innovation and admirable goal of promoting simplicity on the Gnome recently is the spatial mode of the Nautilus file manager.
Last month we looked at
desktop. Gnome is the default desktop environment for several This tutorial will look at the pros and cons of ‘spatial’ navigation
some of the aesthetic and
practical updates in KDE 3.4 distributions, including Fedora and Ubuntu, and seems destined and show you the quickest way to go back to a more traditional
including the new RSS to play a larger part in Novell’s desktop plans, as the company – non-spatial – way of managing files with Nautilus. I will also
reader aKregator. If you has become one of the largest corporate backers of the project examine some of the customisation options and new features
missed the issue, call 0870 via its Ximian acquisition. available in the latest 2.10 version of the desktop.
8374722 or +44 438794 for In the past, Gnome has faced criticism for its reductive A successful desktop is one that doesn’t require the user to
overseas orders. approach and some of the controversial decisions taken in its go through complicated procedural hoops in order to
name. However, Linux use is about choice, and that’s true even accomplish simple jobs, and one where the user can adapt the
after you’ve chosen your desktop environment – there’s no rule environment to suit them – not the other way round.

80 LXF70 SEPTEMBER 2005 www.linuxformat.co.uk

LXF70.tut_begin 80 11/7/05 9:57:27 am


TUTORIAL First Steps: Upgrades

PART 1 – CONFIGURE THE DESKTOP

The typical desktop in Gnome 2.10 – prior to any


user-led changes – can look incredibly stark. Ubuntu, for
example, goes for the completely bare look, relegating even the
trash/recycle can to the lower taskbar, while SUSE removes
trash, Home and Computer from the desktop and just provides
a link to them instead.
At the top of the screen is a taskbar, which houses Gnome’s
equivalent of KDE’s kpanel, the system tray and a clock. A
second taskbar at the bottom of the screen allows one-click
access to all running applications. Just as in KDE, there are a
few ways for you to alter the look and feel of these panels or
remove them altogether. One word of warning though: the
presence of three menus in Gnome’s top bar (see Part 2)
means that attempting to decamp this to either side of the
screen makes for a very ugly and intrusive panel, and it is not
Gnome ships
a straightforward process to get things back to normal. with a range of
Start by right-clicking on the top panel. This provides applets suitable
access to various resources, quick-launch applications and for putting in
the system tray and clock. Right-clicking will bring up a new The desktop the panel.
menu with which we can add or remove items from the panel, background tools demonstrate one of the
change its size or look and generally move things around. There ways Gnome is changing itself and following a ‘simple = good’
is quite a decent range of things we can add to a panel beyond approach. Earlier versions had an option for setting backgrounds
the ordinary, such as a mini-command line, a drawer for holding for individual virtual desktops, but this has been dropped.
files and folders that might otherwise be dropped on the
desktop and swift access to your Tomboy notes (see Tomboy Virtually unlimited
Speaking of virtual desktops, these allow us to open, for
Configuring the example, communication applications on one desktop and a
Pager is word processor on another without having to deal with a
straightforward.
confusing array of open windows. They are also useful for those
times when a spouse or boss interrupts a game of Frozen
Bubble and you need to switch quickly to a work screen! Most
distros tend to install with four virtual desktops and these are
accessed with the Pager, which is usually placed somewhere on
the bottom panel. There is, of course, no reason why we should
stick with four desktops. If you think you’ll only need two
desktops (or 10 or 16, for that matter) simply right-click on the
pager and select Preferences to open the relevant dialog.
There are three ways you can get an application window on
to a particular desktop. The most obvious is to select that
desktop with the mouse and then open it. The second is to click
on the window’s Properties icon, which is usually at the top left
of the window. Just choose Move To Another Workspace and
select the workspace name or number. However, the coolest
way to do it is to grab the window’s icon within the Pager and
simply drag and drop it on to the right desktop. This is great, but
box, page 83). Simply select Add To Panel and choose the a little difficult if you have loads of windows open.
required applet. It should be added exactly where you did the
right-click. If you want to move it, right-click on the icon and
select the Move option.
More fundamental changes can be made to any panel by
selecting the Panel Properties option. In this dialog it is possible
to force panels to follow the style of the Gnome theme, use a
background image or use a solid colour, complete with the usual
transparency options including the ability to set different levels
of transparency on each panel.
Change the background of the desktop by right-clicking on
any open space and selecting Change Desktop Background.
Any images or patterns already on the system will be shown in a The easiest way to
list. There are options here for adding images and changing the move a window to a
way they are displayed, such as tiled (for patterns), centred or different workspace is
filling the entire screen. It’s also possible to remove the image – through the window’s
just select No Image – and then choose a plain desktop colour
right-click menu.
>>
in the dialog’s lower section.

www.linuxformat.co.uk LXF70 SEPTEMBER 2005 81

LXF70.tut_begin 81 11/7/05 9:57:31 am


TUTORIAL First Steps: Upgrades

PART 2 – SYSTEM NAVIGATION

The best way to gain entry to your Gnome desktop is via


the three menu entries on the top bar. These are Applications,
Places and System (or Desktop in SUSE).
The first of these gives you access to the applications
installed on the system – no surprise there. These are sensibly
divided into task-centric submenus. So, under the Internet
entry, we find applications such as Evolution for email and Gaim
for instant messaging. You can launch these applications simply
by selecting them with the mouse, and you can also drag and
drop their icons on to a taskbar or the desktop for rapid access.
The Places entry is discussed below, so we’ll turn to System as
this is where we can change many of the ways in which Gnome
has been set up by your distribution’s engineers.
The most important entry under this menu is for the Gnome
Control Panel or Preferences, where we can change most of the
Gnome-specific options. Below this you should find more distro-
Make use of the otherwise redundant ‘Windows’
centric entries and these might include YaST or some other
key in this dialog.
administration tools. If your distro has set up a non-standard way
of getting into the various options, you should be able to launch a range of pre-made themes, including their own house styles,
the control panel by selecting Run Application from the but these are just a starting point as each of the three main
Applications menu and typing gnome-control-center (note the parts – controls, window borders and icons – can be individually
Americanised spelling). customised using the Theme Details tab.
This tab is divided into three parts and new elements can
Look and feel easily be downloaded and installed from websites such as
In this large utility, we are most concerned with the Look And http://art.gnome.org (which is also a useful place for desktop
Feel section, which lets us choose desktop themes and set up background art, by the way) and, once you’re satisfied with the
fonts for the system. setup, can be saved under a suitable name using the Save
■ Windows This section allows us Theme option in the main dialog box.
to set up how the mouse interacts ■ Font The Font dialog box lets us set up the textual look of the
with windows – for example desktop, applications (the menu bars and stuff), window titles
making windows ‘active’ just by and the terminal. It is also where we can set up the font anti-
moving the mouse pointer over it aliasing to make your screen look beautiful; there are options for
for a pre-defined time, or ‘rolling monochrome CRTs, LCDs and so on.
up’ an open window with a ■ Desktop I have already mentioned this, but briefly this is
double click on the title bar. It is where we set the desktop image. In this dialog box, you will also
also where you can dictate which find, under the Personal section, an entry called Shortcuts, which
key can be used in tandem with allow us to set up some keyboard shortcuts to access particular
the mouse to move windows applications, processes or folders. To set something up, simply
around. By default this is the Alt choose the entry from the left side of the dialog box and hit the
key, but it’s a good idea, if your key (or combination) used to initiate the command. This is where
keyboard supports it, to use the you might set up a non-standard keyboard to access the
Super/Windows key as this may multimedia features of Gnome: volume, play/pause and so on.
otherwise be redundant. The last thing we’re looking at here is the Session dialog,
Gnome can deal with any ■ Theme This is where we can define the visual which is where we can kill naughty applications (under the
sort of key presses you’d elements of Gnome including window borders and widgets – Current Session tab) and the Startup Programs tab where we
care to throw at it. buttons, menus, scrollbars, and so on. Each distribution ships with can set applications to be launched automatically on startup.

PART 3 – FILE NAVIGATION

Gnome’s developers and maintainers caused some end up with a ton of open windows on the desktop, and that’s
consternation recently by changing the way Nautilus works when just annoying! The good news is that it is quite simple to change
accessing files. The big change in the addition of a so-called this behaviour either universally or individually. Doing it
spatial navigation mode, which basically launches a new window universally used to involve going into Gnome’s GConf editor,
every time you open a folder. which was the equivalent of using the Windows Registry – and
So far, so Windows 3.1. But Nautilus is a bit cleverer than we know how intuitive that is – but the latest versions have
that. It remembers, for example, both the position of each made things easier.
window on the screen and the view mode selected when the To change the annoying default, open any Nautilus window
window was closed. So while you may want to view a folder full by double-clicking on a folder to open it in spatial mode. Now
of images as Thumbnails, it is better to browse a folder full of do Edit > Preferences and go into the Behaviour tab. The entry
spreadsheet files as a list complete with creation and that makes the difference is Always Open In Browser Windows.
modification details. The downside is that it is possible, when Select this, close the dialog box and all subsequently open
navigating to a document at the bottom of a stack of folders, to windows will follow the browser paradigm.

82 LXF70 SEPTEMBER 2005 www.linuxformat.co.uk

LXF70.tut_begin 82 11/7/05 9:57:36 am


TUTORIAL First Steps: Upgrades

appropriate tag. Again, Gnome updates automatically


to include your changes.
Of course, as these emblems are just normal Quick browsing
PNG files (usually with transparent backgrounds) it is You can speed up Gnome for
entirely possible to make your own emblems that file browsing by going into
reflect your particular situation. Once you have Edit > Preferences and
designed an emblem you can either drag it into the ensuring all the entries under
/.nautilus/emblems/ folder within /home or open a the Preview tab are set up for
window, do Edit > Backgrounds And Emblems, select Local Files Only. Slower
the Emblems tab and click on Add A New Emblem. hardware would also benefit
from removing the
You’ll notice in this dialog that you can also change
background image and just
the background colour or texture of windows and this
having a solid colour.
is really where the spatial thing comes
into play, because alterations made to
individual windows (such as
/home/Documents) are persistent.
One other cool usability feature is
Navigating through a network volume can leave the the Zoom tool, which enables us to
desktop full of windows. reveal more of the contents of a file
without having to open it up. This
There are still a few other things we can do to make the makes obvious sense when it comes to images
setup even more Windows/KDE-like. Chiefly this means adding a (in which case why don’t Windows or OS X do
sidebar that we can use to access the complete file tree. To do it?) but Nautilus can also do the same job with
this select View > Sidepane. By default this sidepane displays text files. By default Nautilus displays previews
information about the currently selected folder or file, but we at 100%. Just as with the behaviour of
can change this by selecting the Information drop-down and particular windows we can change this on a
changing it to Tree. window-by-window basis or universally. The
If you quite like the spatial method but occasionally need a simplest thing is to keep the default and then,
less cluttered desktop you can right-click on a particular folder when needed, use the Zoom options within
icon and instead of choosing Open, select Browse Folder and the Nautilus user interface to change
this will open up the folder in the browser interface – the best individual windows. Using the spatial mode
of both worlds. you can zoom in or our using the View
One feature that tends to be forgotten or overlooked is menu, while ‘browser’ users can do the same with the + and Say it with me: spatial
Gnome’s emblems. These can be added to individual files to – icons on the toolbar. Nautilus remembers these settings so it navigation is an OPTION!
give us an extra method of sorting files in sensible ways. For is safe to set up bigger previews for image-filled folders while
example, it is possible to add an ‘Art’ emblem to images in a keeping small previews for more general locations.
folder and then select View > Arrange Items > By Emblem to One of the newer ideas in Gnome 2.10 is the Places
corral all the pictures together. Of course, you could also
arrange items By Type but then the GIF and PNG files would be
menu entry, which provides easy access to storage devices,
significant locations and network volumes on the NEXT
potentially far away from the JPEGs. Using emblems depends –
like so many things – on diligently tagging files with the
computer, and it all does pretty much what you might
expect: Floppy is linked to a floppy drive, Desktop opens MONTH
We’ll wade into
appropriate emblems. To add an emblem, select the image or a folder with the contents of the desktop, and so on. The
the often confusing
file with a single right-click and choose Properties from the Computer menu item opens up a Nautilus window with
world of file
menu. Click on the Emblems tab and then select the icons for filesystems attached to the system. LXF
compression.

FROM THE F-SPOT AND BEAGLE STABLE: TOMBOY


Provided with many of the Gnome 2.10-based F-Spot, an excellent photo management application, and We now have two notes, Start Here and Tomboy.
distributions currently available, Tomboy is one of a new the Beagle desktop search tool. Close Tomboy so that Start Here is active, and begin
breed of Gnome applications that are coming into the To call Tomboy a note-taking application is much too typing some text. Now the clever bit: if, in the course of
desktop as a result of the Mono project. Others include weedy; this is a notes app with the muscle and your typing, you enter Tomboy as a text string, it will
simplicity of a world-class bodybuilder. It is a kind of automatically become a link to that page. A return link
personal Wiki system which makes linking notes and can be created simply by typing Start Here anywhere in
thoughts brilliantly easy. What’s more, it integrates with the Tomboy page.
a Gnome panel so that you can open, browse and Access to notes is provided under the Tomboy icon on
search your notes straight from the desktop. the taskbar, and amazingly, the application remembers
On first run, Tomboy consists of a single note called the position on the screen that each note occupied just
Start Here. On the surface this is the same as any other as Nautilus does.
note-taking app, but there’s far more going on beneath. As well as the usual selection of text formatting
To demonstrate its power, let’s make a new note called options, Tomboy also has a decent and fast search tool
Tomboy. Simply type Tomboy somewhere on the Start to make note management easier.
Here page and highlight it with the mouse. Now select In my opinion, Tomboy is reason enough to make sure
the Link icon at the top of the window. A new note will that whatever distribution you opt for, both Gnome and
be created called Tomboy and you can begin adding Mono are installed. In the future, it may be linked up
Time to rethink the ‘My Favourite text to it straight away. Unusually, there is no ‘saving’ or with Beagle and F-Spot and other Gnome apps to
Application’ award. ‘loading’ involved. Everything is saved automatically. completely change the way we use the desktop.

www.linuxformat.co.uk LXF70 SEPTEMBER 2005 83

LXF70.tut_begin 83 11/7/05 9:57:43 am


TUTORIAL Gimp

ILLUSTRATION & IMAGE EDITING

Gimp Fixing smiles


Michael J Hammel helps you brush up on masks, scissors, the Clone tool and
other Gimp techniques to create a dentist’s vision of the perfect smile.

A fairly easy way to get started using Gimp in a small found several potential images in stock image collections and
graphics business is to create print adverts for local purchased the one I’m using here. I did the patchwork for her
magazines and newspapers. Actually, most advertisers to clean up the smile and she submitted the ad, along with
don’t really know how to create graphics that draw eyes to an some other designs, to the client.
advert that eventually leads to revenue for the business. You’ll The client loved the modified image but in the end rejected
I grafted a dog’s head on to a
man’s body to show what an
often find poor designs done by local print shops that crowd the ad in favour of a completely different design that removed
important role transparency images with too much text or bathe an image in a rainbow of the smiling person completely (something she had
plays in merging images. If colours that cost an arm and a leg to print but end up bleeding recommended from the start, mind you). Still, the modified
you missed the issue, call and fading on cheap paper. Picking out poor adverts and image came out so well that I felt it worth sharing the design
0870 837 4773 or +44 1858 approaching the advertiser with alternative designs can often process with LXF readers.
438795 for overseas orders. lead to the start of repeat business with a loyal customer. This tutorial is more advanced than some of the others I’ve
This month’s project comes from just such a real-world done recently. You won’t be able to just follow along and do
encounter. My wife created some adverts for a local catering what I do. The goal here is to put into practice what you’ve been
business, which happened to do a job for a dentist’s office party. playing with all this time. At some point the wheels have to hit
The dentist, just getting started in the area, needed to produce the pavement, and this tutorial is a good example of how that
advertisements of his own and contracted my wife to produce a happens. What is more important is that this is what Gimp is all
print ad for his office. The requirements for the ad included about – doing real work. Eventually you have to stop exploring
using a picture of a male model sporting a big, bright smile. She your tools and just use them. Now’s the time.

84 LXF70 SEPTEMBER 2005 www.linuxformat.co.uk

LXF70.tut_gimp 84 8/7/05 4:11:29 pm


TUTORIAL Gimp

THE PROJECT

To be fair, he’s not a bad-looking guy as he is, and the original


image was reasonable, but this ad was for a dentist’s, so
anything less than the perfect smile just wouldn’t do. There are
three main fixes required: clean and straighten the top teeth;
clean and straighten the bottom teeth; and adjust the bottom lip
to make it more symmetrical.
The bottom lip is the easier fix, but we can only do this after
we’ve fixed the teeth. This is because the lower lip will be
adjusted using the IWarp plugin, and we’re better off doing that
after the new, improved top and bottom teeth have been
merged into a single layer.
The upper teeth present three problems:
■ They aren’t symmetrical.
■ They aren’t even at their lower edges.
■ They aren’t white.
None of these will be especially difficult to fix, but it will take
some skill to create the initial selection. To make the teeth
symmetrical I’ll be using some large patches created from
selections. To fix the lower edges I’ll be using the Clone tool on a
separate layer. Cleaning the teeth needs to be done after
patching and cloning, and then only after merging any layers
that make up the visible upper teeth. Wait till you’ve done all
that before you brighten the teeth, and it should help guarantee
that you don’t end up with strange blotches where colour
changes weren’t uniform.

THE SOLUTION

1 2

1/ Use the Scissors for an accurate copy 2/ Create a new layer for the selection
The first thing we want is a copy of the upper teeth: we’ll use the Scissors tool Feather the selection by five pixels, then paste a copy of the selection in as a
for this. This tool works by looking for natural edges between anchor points. In new layer. The layer window will be snug around the copied selection, and you’ll
this example I’ve clicked very close together, creating a large number of anchor need some extra space to work in here, so expand the layer size a bit (Layer >
points – this enables me to create a selection that matches the teeth very Layer Boundary Size). Turning off the background layer, you can see what you
closely. We’ll be blending the copied teeth in with the original image, so we don’t need to work on! What I noticed most about this image is that the left-hand side
need an exact match here. of the top row of teeth is a little better off than the right; so we’ll copy left to right >>
Once the outline is created (remember that the anchor points can be moved first, and work from there.
before you create the selection), click inside the anchor points to convert them
to a selection, then save this selection to a channel.

www.linuxformat.co.uk LXF70 SEPTEMBER 2005 85

LXF70.tut_gimp 85 8/7/05 4:11:34 pm


TUTORIAL Gimp

>> 3/ Replace imperfect teeth


Create a rectangular selection around the left half of the teeth,
copy and paste the selection, convert the floating layer to a new
3
layer, then flip it horizontally. The selection doesn’t have to be
perfect – it gets blended into the other teeth with a mask
anyway. Then place the copy over the right-hand side of the
teeth, add a layer mask and blend the copy into the original
teeth using the mask. The two teeth furthest right are better
than the two furthest left, so we can mask out the copies of
those left-side teeth completely.
This image shows the flipped and masked layer and the
teeth with the masked copy overlaid on the original teeth. To
complete this process, we need to copy the right-hand side
teeth on to the left and merge with a mask again. The result is a
more balanced appearance to the shape of the teeth.

4 4/ Straighten out the smile


You should now merge these three layers (original copy of
upper teeth, right side flipped and left side flipped) together.
Employ the Clone tool to straighten the lower edge of the front
teeth. Pick a soft-edged brush to give weight to the lower edge
of these teeth, then a hard-edged brush to clone the straight
edge. Take the clone source point from just above where the
cloning is started and draw a straight line (hold down the Shift
key while dragging the mouse) with the Clone tool. Turn the
brush opacity down
slightly to add
blending to
the clone
process.

5/ Tidy up the bottom row


The same process is applied to the bottom teeth: 5
1 Selection.
2 Copy.
3 Paste to new layer.
4 Copy right side.
5 Flip.
6 Move to left.
7 And finally, merge.
You don’t have to do much to the bottom teeth, however,
because their cutting edge is hidden behind the top teeth. You
can also see that the amount of upper gum showing on the
left-hand side is greatly reduced, and the gap between the teeth
on the right is also reduced. On the lower teeth, the left side no
longer appears to be receded from the front of the mouth.
After all this, the alignment of the teeth is greatly improved.
Next we should attend to their colour.

86 LXF70 SEPTEMBER 2005 www.linuxformat.co.uk

LXF70.tut_gimp 86 8/7/05 4:11:42 pm


TUTORIAL Gimp

6 QUICK TIPS
Touching up images
■ Copy. Paste. Add Layer Mask… Work on layer
copies and then merge back into the original.
■ Blend, blend, blend. Layer masks, reduced
opacity on clone operations and soft-edged
brushes help merge bits and pieces of images
together seamlessly.
■ Colour in context. Colour adjustments in
portraits, especially those in flesh, bone or
body tones, should be subtle. Reducing
yellowing in teeth is a reduction in saturation
and increase in lightness.
■ Symmetry is ideal, but not real. Copying
left-to-right sides of the upper teeth in this
project helped provide some symmetry in the
shape of the teeth, but blending those copies
with the original helped provide enough
variation to keep the copy-and-flip from being
plainly obvious. Nature is nothing if not a wee
bit random.
■ Why did we save that selection? Because we
just don’t know when our experimentation with
copying, cloning and merging will work out just
right. It can take many attempts at trial and
error to get it right. And all of them – in this
6/ Adjust curves and saturation to whiten the teeth project in particular – start with getting a copy
So far I’ve focused on the teeth, ignoring the context of the picture. When adjusting the smile’s colour you need to
of the original upper teeth. I didn’t show that,
step back and look at it within the colour range of the whole image. If you don’t do this you risk making the teeth but now you know why you sometimes do
too bright, causing the effect to look fake. things that don’t seem necessary.
The yellow tint and dark stains in the teeth can be fixed in a number of ways. It’s easy to adjust the curves, but When you don’t do
in this case it would leave the top teeth too bright. We can adjust the bottom teeth with curves, though, so they those things,
have the same lighting appearance as the upper teeth, which should bring them out from the shadow and into line it’s inevitable
with the upper jaw. You’ll need to make only minor adjustments to the saturation (reducing it slightly to remove the that you’ll
stains and yellow tint), and brighten them up slightly to make them appear whiter. need them.
Perfection is achieved with one last tweak. The lower lip has slight bulges on either side. These are easily fixed
with the IWarp plugin after merging all the layers together. To get to IWarp, right-click on the canvas and go to
Filters > Distorts > IWarp.

THE RESULT

BEFORE

The result is obvious: a little


dental work can go a long way.
This tutorial shows how
important transparency is to NEXT
the Gimp artist, but we’ve also
used a number of simple MONTH
techniques to carry out this
project. Real-world AFTER Come with me on a trip
through text effects to go
beyond your everyday, canned
applications like this are a
logo effects.
good opportunity to practice
what you’ve learned, and we’ll
do the same next month.

www.linuxformat.co.uk LXF70 SEPTEMBER 2005 87

LXF70.tut_gimp 87 8/7/05 4:11:49 pm


TUTORIAL Emacs

GET MORE FROM EMACS TEXT EDITING SERIES

Emacs The custom buffer


PART 2 Biagio Lucini adds extras to your newly compiled text editor.

You might feel inspired to use Emacs by this month’s the solution is to click on Options > Save Options. This will

LAST Roundup, and one of the many reasons to pick Emacs


as your editor of choice is its unbelievably high level of
create a .emacs file (if not already there) in your home directory
where the desired features will be recorded, which is loaded at
TIME customisability. Extending Emacs with options is a huge topic
that could easily fill a book, so my goal here is to introduce the
startup by the editor.

We went through a detailed


guide to installing Emacs from
general strategy and basic concepts so that you can use them Customising with Custom
to go further on your own. A minor point: to make them clear in The last entry in the Options menu opens the Custom buffer.
source. We’ll use the version
in that tutorial (21.4) for the the text, I’ll present each option in upper case, such as This provides an intuitive interface for tweaking just about every
rest of the series. If you Reset To Saved, even if it’s written slightly differently as Reset to aspect of Emacs. The buffer is navigable, pretty much like an
missed the issue, call 0870 Saved on screen. HTML page in a web browser, and highlighted boxes show what
8374773 or +44 1858 OK, let’s start by opening up the Options menu. look like hyperlinks. Various options are grouped according to
438795 for overseas orders. the general topic they refer to. A given customisable option can
The Options menu be reached from within any of the groups to which it is
A handful of the most used and most useful setup options can reckoned to be relevant. Apart from the Options menu, it is
be accessed through this menu, for quick customisation (Fig 1). possible to access the customisation buffer with the command
Here’s what they do in detail, from top to bottom: M-x custom
■ Syntax Highlighting This gives you coloured keywords when This opens the top-level customisation buffer, in which all
writing code or text in any supported language (basically, all parent groups are displayed. A specific option is reached by
programming and markup languages are supported). following a logical path through the groups down to the
■ Active Region Highlighting When it’s turned on, this option appropriate entry. It can take some time to familiarise yourself
uses a different background colour to differentiate a region with this approach, but the level of personalisation it allows you
marked for an operation such as cutting. to achieve is a good reward for the time spent customising
■ Paren Match Highlighting Particularly useful when Emacs in this way.
programming, this shows with colour whether the parenthesis Each screen has a set of general options for setting and
under the cursor is balanced correctly. saving globally the customisation you’ve performed in the buffer.
■ Truncate Long Lines In This Buffer Use this to prevent text They are:
belonging to a single line from being pushed on to more lines, ■ Set For Current Session This applies the new options to the
independently of the extension of the line itself. current session.
■ Word Wrap In Text Modes This is the reverse of the ■ Save For Future Sessions Ensures the new values are the
previous option: whenever the characters in a line exceed a default for future Emacs sessions and saves the options for the
Console prompt default number, that line is automatically broken. current one.
By default, at each startup ■ Case-Insensitive Search Select this to toggle between a
Emacs loads some case-sensitive and case-insensitive word search.
initialisation files that ■ Use Directory Names In Buffer Names Here, you can give
influence its behaviour by a unique name to buffers referring to files with the same name
assigning value to a bunch of located in different directories by adding the name of the
variables. If you think that
directory to the buffer name.
Emacs is not reacting to your
■ Save Place In Files Between Sessions If this is selected
changes as it should, try
when you reload a previously edited file, the cursor will return
calling it from the command
line in the following way: to where it was when the previous session was closed.
emacs --no-init-file --no-site- ■ Automatic File De/compression Decompress files on
file loading then re-compress them on saving.
where --no-init-file inhibits ■ Enter Debugger On Error and Enter Debugger On Quit
the loading of ~/.emacs and These are mainly useful for software developers.
default.el, while --no-site-file ■ The Mule submenu The gate to customising the default
prevents the loading of site- language, encoding and input methods. Fig 1/ The Options menu with the tooltip box for Active
start.el. The meaning of Region Highlighting. Note the different state of the check
Each option (excluding the submenus) has a box next to it.
those files will be explained in boxes for options that are set (such as Save Places In Files
To set an option is just matter of checking this box. However, by Between Sessions) from option boxes that are unset such
future instalments.
default, these settings are lost on exit. If you want to save them, as Case-Insensitive Search).

88 LXF70 SEPTEMBER 2005 www.linuxformat.co.uk

LXF70.tut_emacs 88 8/7/05 5:37:23 pm


TUTORIAL Emacs

■ Reset Sets all your currently edited options back to their it; if different or multiple choices are offered, they can be
previous values. entered by selecting the one you want from a drop-down menu YOUR
■ Reset To Saved This sets all modified options back to the (if they are mutually exclusive) or by checking the box next to FEEDBACK
previously saved values. them (if more sub-options can be set at the same time). I’d welcome your comments
■ Erase Customisation Use this to reset all options in the If you need help for the various options, click on the Show on this series and any Emacs
current buffer back to their default settings. button (clicking on Hide will decrease the level of verbosity). questions. Send them either
■ Finish Takes you to the previous Custom buffer (or the buffer The strategy for setting a value is straightforward: navigate the to lxf.letters@futurenet.
from which Custom was launched). custom buffer to the option you want to change, then perform co.uk or directly to me at
biagio.lucini@gmail.com.
Clicking on the Status button next to each option opens a the wanted changes and finally press Save For Future Sessions
drop-down menu that gives you access to those very same or Save For Current Session, according to whether you want the
options, but here you configure not the whole buffer but that modification to be temporary or permanent. Reset and Reset To
single option. Backwards navigation is provided by the Go To Saved can be used when the end result looks worse than the
Parent Group option, which highlights one or more parent initial configuration.
groups (depending on the current group). An editable option Work through the following mini-tutorial for an example of
can have several forms: if a value is required, you can just enter using Custom.

SET THE LEVEL OF UNDO

1 2

1/ Go to the customisation window 2/ Identify the present level


Open a new Emacs window, type M-x custom and click on the Go To Group link Scroll down the window to the Undo group and click on Go To Group. You
after Editing Group. should see that the undo level is set at 20,000 actions, which is the default
value. The green text after the State button tells you that no modification has
been performed.

3 4

NEXT
3/ Edit the undo level 4/ Save as the default
MONTH
I’ll discuss advanced usage
Change the value from 20,000 to 30,000. The green text after the State button Click on Save For Future Sessions in the of Custom and give you
shows that the value has been edited. Also the global state of the buffer shows Operate On Everything In This Buffer session. alternative techniques for
that some options (only one in our case) have changed. Clicking on Finish will take you back to the customising Emacs.
Editing Group. If no more customisation is required,
the window can be safely deleted. LXF

www.linuxformat.co.uk LXF70 SEPTEMBER 2005 89

LXF70.tut_emacs 89 8/7/05 5:37:26 pm


TUTORIAL Perl

LESSONS IN PERL PROGRAMMING SERIES

Perl Sort your code


PART 2 Scared by abstruse Perl operators and regular expressions? Even more
scared of the word abstruse? Explain everything Marco Fioretti can.

Before we go on with our journey through Perldom, In this line, the first argument is the array name: STAR_
you’ll need to remember the three variable types of WARS_PLANETS. Next comes the index (starting from zero!)
scalars, arrays and hashes. Marked with a $, scalars from which we wish to splice: in this case, Tatooine. The third
hold a single piece of information like a string. Arrays, which parameter is how many elements must be removed. Here I
begin with an @ sign, are just ordered scalars. Hashes, marked don’t want to remove anything, just add more planets, so I type
In part 1 of this series we
unsurprisingly with a # sign, are groups of scalars defined by zero. The last, optional argument is the list to be added in the
defined and tested out Perl’s
other scalars referred to as keys. In this second tutorial we’ll position we’ve just specified. If you don’t include this argument,
variables, getting used to all
those $s, @s and #s. If you learn how to manipulate the most complex variables – arrays splice() wouldn’t add anything.
missed the issue, call 0870 and hashes – and then introduce the real black magic of Perl, If you want to order things alphabetically, Perl has a sort()
8374773 or +44 1858 its regular expressions. function which, by default, considers all elements as strings,
438795 for overseas orders. even when they are numbers. So for example, if you type the
Sorting and listing following code at the prompt:
Remember how arrays order scalars? Perl list literals work in a perl -e “@A_LIST = (‘Dominions’, 180, 3, ‘10, Downing
similar way. These are unnamed, ordered sequences of scalars St.’,Admiralty’); print join( \”\n\”, sort @A_LIST), \”\n\”;”
enclosed in parentheses. A good use of list literals might be to what you’ll get is an alphabetically-sorted list:
assign values to two or more variables in a single instruction, or 10, Downing St.
to swap them around in some way. 180
($X,$Y,$Z) = ($Y,$Z,$X); # Circular shift 3
($Name,$Surname,$Phone) = (‘John’, ’Smith’,5556791); Admiralty
($DARTH_VADER,@JEDI) = (‘Anakin Skywalker’, ‘Yoda’, ‘Obi- Dominions
Calculate the size of an array Wan’, ‘Mace Windu’); sort() function can order elements according to other criteria:
How do you know how many The first two lines are pretty self-explanatory. In the third, @SORTED_LIST = sort AS_I_WANT @UNORDERED_LIST;
elements there are in an array the list on the left collates a scalar ($DARTH_VADER) and a AS_I_WANT is a subroutine that takes two scalars as inputs and
or hash? Very simple: just
named array (@JEDI). Everybody knows what happens if we returns -1, 0 or 1 depending on which of them comes first by the
assign it to a scalar. Since the
assign it to the list on the right: to the Dark Side of the Force desired criteria. We’ll look at subroutines later in the series.
latter can only hold one
value, Perl puts just the
young Anakin goes alone. This works because $DARTH_
number of elements into the VADER, being a scalar, can only hold one value. That value is
scalar. A similar trick works the first one out of our four Jedi knights. And since the only HOW TO RUIN YOUR LIFE WITH
with hashes. The keys other thing in the left-hand list is one array, @JEDI, all the other REGULAR EXPRESSIONS
function returns an array knights in the right-hand list go there, in the same order.
containing all and only their Let’s now look at the splice() function, which is used to Perl probably has more regular expressions than any other
keys, like so: delete, add or replace elements inside an array. First, we’ll computer language. To see with your own eyes how perverse, er,
$HOW_MANY_JEDI = powerful, they can be, check out the longest regex ever seen at
define some planets:
@JEDI; www.ex-parrot.com/~pdw/Mail-RFC822-Address.html. Rumour
@STAR_WARS_PLANETS = (‘Naboo’, ‘Tatooine’, ‘Geonosis’);
$HOW_MANY_ITEMS_INTO_ has it that it validates email addresses, but I wouldn’t look at it for
Use splice() to add Coruscant and Alderaan right after Tatooine: too long. To write your own instead, the ultimate reference is
AN_HASH = keys %SOME_
HASH;
splice (@STAR_WARS_PLANETS, 2,0, (‘Coruscant’, Mastering Regular Expressions by Jeffrey Friedl (O’Reilly, 2002).
‘Alderaan’));

90 LXF70 SEPTEMBER 2005 www.linuxformat.co.uk

LXF70.tut_perl 90 11/7/05 12:01:24 pm


TUTORIAL Perl

One last thing about arrays. There is one that no Perl hacker is. The second goes a bit further: it will be true only if there is a
can live without, even if it doesn’t really look like an array. I’m key equal to ‘Leia’ and if its associated value has been explicitly
talking about our beloved STDIN, the input text stream of every defined before.
well-behaved Unix program. Luckily, it’s very easy to use. I’m
mentioning STDIN here because, believe it or not, it can be Regular expressions
loaded into an array in a heartbeat: To manipulate great quantities of text, Perl has developed maybe
@LINES = <STDIN>; the most complete and powerful set of regular expression
There. In just one instruction, you’ve loaded every line of input facilities of all programming languages. A regular expression, or
text in one separate element of @LINES. Handy, isn’t it? regex, is a description of the structure of a string of text, made
with a custom syntax. The description is made up of regular
Pure hash text and special metacharacters corresponding to the string’s
In part 1 of this tutorial I introduced hashes and their concept properties. Some of these metacharacters are listed in the
of indexing scalars through other scalars (keys). As we know, a Regular Expression Cheat Sheet box, below left.
hash consists of keys representing values. Once you have a The beauty and ultimate purpose of all this is that if you can
hash, it’s easy to manipulate it using just the keys, rather than describe any string in full detail you can also tell a script how to
the underlying values. After all, if you wanted to get to those find specific patterns and edit them automatically. This is best
values to put them in a fixed relative order, you would have just explained with some examples:
used a regular array, wouldn’t you? /Jedi/
Unlike arrays, Perl hashes are not arranged in any specific /\bJedi\b/
numerical order, nor in the order in which the keys are added. /^Jedi$/
The result of this is that hash values must always be addressed /Jedi/i
by key instead of position. This is true even when you want to /Jedi|Sith/
delete a key and its associated value. The way to do this is with The first regex is true whenever a string contains the Jedi
delete(), which takes as its argument the key of the element substring, perhaps as part of a longer word. If you only want to
you want to get rid of. Using this function is necessary because find ‘Jedi’ when it appears as a complete word, enclose it
if you, for example, simply assigned an empty value to it between word boundary markers (\b) as in the second
nothing would be removed. The element would still exist, just command. The third regex is even more precise: it will be true
with a null value. only when ‘Jedi’ is both at the beginning (^) and at the end ($)
As a matter of fact, sometimes the first thing to do with a of a line, or in other words when ‘Jedi’ is the only word of that
hash element is to find out if it exists at all, and if any value has line. A Perl regex is case-sensitive, so if you don’t feel like
been assigned to it. To do this Perl provides two functions typing JEDI|jedi|JedI and so on, use the i modifier, as in the
named (who would have guessed?) exists() and define(), fourth line here, for a case-insensitive match. Finally, the last
which we use like this: command is true whenever Perl finds either ‘Jedi’ or ‘Sith’.
if exists ($STAR_WARS_ACTORS{‘Leia’}) { # do something...}; All this is worth knowing because when Perl recognises the
if defined ($STAR_WARS_ACTORS{‘Leia’}) { # do something text pattern described by a regex it can take any actions you
else...}; want or modify the corresponding string according to your
The first command is executed only if the hash includes a key instructions. Here are the two corresponding formats:
equal to the ‘Leia’ string, regardless of what the associated value if ($STRING =~ m/some regex here/) {do something}
$STRING =~ s/some regex here/some other text pattern/;
The actual regex is delimited by slashes. Strings are
REGULAR EXPRESSION CHEAT SHEET
associated to it by the =~ operator. When the slashes are
This is a list of the most common special characters found in Perl preceded by an m character it means, ‘does the string match
regular expressions. Photocopy it and keep it close to your this regex?’. When there is an s instead of an m and some other
keyboard; it will be a real time-saver.
text between slashes right after the regex, it means ‘take
. ...................... Any single character except a new line.
$STRING and, inside it, substitute the regex with whatever is
^ ..................... Beginning of the string.
$ ..................... End of the string.
written between the two last slashes’.
* ...................... Zero or more of the previous character. Regexes can contain scalars and store their results in special
+ ..................... One or more of the previous character. variables. This makes them an extremely flexible tool.
? ..................... Zero or one of the previous character. $JEDI = ‘Anakin’;
\n .................... New line. s/Master $JEDI/The future Darth Vader/g;
\t ..................... Tab. s/Master (Obi-Wan|Yoda)/The Jedi Knight $1/;
\w ................... Digits and alphabet letters, regardless of case. Here we start by saying that all the occurrences of ‘Master
\W ................... Every character that is not a letter or a digit. Anakin’ (Anakin because Perl will substitute the $JEDI variable
\d .................... Old fashioned digits: 0, 1 and so on up to 9.
with its current value) must be replaced by ‘The future Darth
\D .................... Everything but digits.
Vader’. The g modifier at the end means globally: without it
\s ..................... Whitespaces: space, tab, new line…
\S .................... Any non-whitespace character.
only the first match would have been replaced instead of
\b .................... Word boundary. all of them.
| ....................... Alternative between two values (eg A|B).
[] ..................... Square brackets delimit a character class.
The second regex shows another really neat feature. It
finds a match whenever one of the two Jedis mentioned is NEXT
() ..................... Normal brackets remember the enclosed substring.
Note: when you need to match one of the characters literally, for
example a plus sign, it must be preceded (escaped) by a backslash
called Master. As the names are in parentheses, they are
not forgotten when found, but saved in the special MONTH
The flow of a Perl script, how to do
variable $1. Therefore, the same regex will substitute
to distinguish it from its role as a regex. ‘The Jedi Knight Yoda’ for ‘Master Yoda’ or ‘The Jedi Knight file I/O, and techniques for
A+ # matches one or more capital As presenting data in the most
Obi-Wan’ for ‘Master Obi-Wan’. If more matches must be
\+ # matches one plus sign readable way.
remembered they are associated in the same way as $2,
\++ # matches one or more plus sign
$3 and so on until $9. LXF

www.linuxformat.co.uk LXF70 SEPT 2005 91

LXF70.tut_perl 91 11/7/05 12:01:27 pm


TUTORIAL Subversion

VERSION CONTROL

Subversion
Branches, tags and mergers
PART 3 Graham Morrison explains how to manage your repository once development starts to
expand.
This is the final instalment in our three-part tutorial Subversion branches can go on to become the main trunk of
dedicated to the Subversion version control system. development, which would make a real tree fall over. Subversion
After covering the basics of setting up and branches can strengthen the development process rather than
administering a server and using Subversion from a client’s unbalance it.
perspective you should now have a good idea of some the There are numerous reasons for creating a branch from the
In LXF69’s tutorial we looked
benefits that using Subversionn can bring to your project; but if main development trunk. The most common reason is to
at downloading, modifying,
you do take that leap, it won’t be long before you need what facilitate development of a new version, while still allowing for
uploading and analysing work
using Subversion as a client. If we’re about to cover in this month’s final instalment, which deals critical updates to be made to a previous one. To put this into
you missed the issue, call mainly with ‘branches’. context, every major release needs to be updated. The KDE 3.4
0870 8374722 or +44 1858 I’ll be using some of the concepts from last month to release, for example, was followed by an update called 3.4.1.
438794 for overseas orders. introduce some good server practices. These will have an This fixed many bugs and added several translations, but it didn’t
impact on how you run your Subversion repository, but it’s all add any new features or functionality. Those are reserved for
going to be done using the client. We’ll be drawing on the any upcoming major release.
lessons learned in the two previous tutorials, so it might be a Using two separate branches makes it much easier to
good idea to refresh your memory before continuing with the maintain both a stable release version and a development
final instalment. version. Bugfixes can be applied to both, while new features
need only be applied to the development version; significant
Arboriculture revisited changes can be merged back into the stable version. This
Real trees (the kind that grow in forests) have branches. means developers can forge ahead with new ideas using the
Branches grow off the main trunk of the tree, and so do those development branch, safe in the knowledge that their work
of the Subversion variety. But there is a difference: some won’t affect the stability of the release version.

92 LXF70 SEPTEMBER 2005 www.linuxformat.co.uk

LXF70.tut_sub 92 11/7/05 11:35:44 am


TUTORIAL Subversion

PART 1 – MAKING A BRANCH

Look at a branch as nothing more than a copy of the main


trunk made at a certain point. There’s nothing stopping you
Tag 1.0
using a simple local copy to implement this but there’s no need.
Subversion treats a branch as nothing more than a copy, albeit
with an initial history common to that of the trunk, and this is
reflected in how you create a branch.
For these examples, we’re still using the simple ‘helloworld’
example from the previous two months. This simple project is
nothing more than a small source file (helloworld.cpp) and a Branch 1.1
corresponding Makefile. Both files are currently in a single
directory, but as we’re moving to a branched development cycle,
they need to be moved to their own branch.
$ svn mkdir branches
A branches
$ svn mkdir branches/stable_1_0
1.0 1.1 1.2
A branches/stable_1_0
$ svn mv helloworld.cpp branches/stable_1_0/
A branches/stable_1_0/helloworld.cpp Subversion history
D helloworld.cpp
$ svn mv Makefile branches/stable_1_0/ need to be using Apache for repository access. The reason for Branches and tags are
A branches/stable_1_0/Makefile this is that the best way to provide per-user access rights is by taken from the main
D Makefile installing the mod_authz_svn Apache module. development trunk.
A tag can’t be modified,
We’ve just created a branches directory in our local working A new working copy of the development branch can now be but is just a snapshot of the
copy, followed by another called stable_1_0 to hold the stable checked out by downloading from the HEAD directory. trunk taken at a certain
development branch. We then moved the two source files into $ svn checkout file:///usr/share/subres/branches/HEAD point in the development
stable_1_0 in preparation for taking a branch from the stable A HEAD/helloworld.cpp process (to record
significant releases, for
directory. The next stage is to copy the stable_1_0 branch A HEAD/Makefile
example). See page 95.
directory to the directory we’re going to use for the unstable Checked out revision 6. A branch, on the other
development branch, but we first need to commit the previous The history information for the HEAD directory will only go hand, is a snapshot that
changes before Subversion will allow us to copy a directory. back as far as the branching. But the history for the files within can be worked on, either
$ svn commit -m “Created new branch structure.” each branch will have been brought forward from their previous independently of the trunk
or with the intention of
Deleting Makefile location. The difference now is that the helloworld.cpp has merging parts back into
Adding branches been copied into two separate directories (the two branches). the trunk.
Adding branches/stable_1_0 The history for helloworld.cpp will also branch to reflect the
Adding branches/stable_1_0/Makefile changes made to each file individually. You can easily check this
Adding branches/stable_1_0/helloworld.cpp using the log command – here is a truncated version of the
Deleting helloworld.cpp output from svn log helloworld.cpp in the HEAD branch:
Committed revision 5. r7 | Added a cutting-edge feature.
The -m added to the commit command lets you enter your r6 | Added HEAD development branch.
comments without Subversion having to launch an editor. Now r5 | Moved project into a branch structure
that the previous revisions have been committed, we can make r4 | Resolved conflict by incorporating both changes.
a development branch by copying the stable_1_0 directory: You can see that helloworld.cpp has inherited the history
$ cd branches/ from before the creation of the branch at r6 (revision 6).
$ svn copy stable_1_0 HEAD Depending on how a project is organised, the process of
A HEAD adding new features to a project’s development branch can
$ svn commit include bug- and stability fixes that should be ported to the
Adding branches/HEAD stable branch. For this, we need to merge the changes into the >>
Committed revision 6. stable branch.
In our example, we’ve used a copy of the stable branch to
create a development branch suitable for adding features and BUBBLE-UP
fixing problems with. As this is at the ‘head’ of the development
Subversion stores every single revision as a new Changes are managed through a process
effort, we’ve called the branch HEAD.
filesystem tree, creating a logical copy of all the known technically as bubble-up. Every change is
files in a repository – mostly a series of links to copied to a new file – the start of the bubble.
Managing access the previous version. This is what makes Each revision is actually a complete file tree,
Creating branches is easy; the most important part of branching Subversion so efficient: it doesn’t copy made up of copied versions of any changed files,
is how you manage them, which is usually down to project everything, only the changes from one revision to using links to previous files that haven’t changed.
policy. Now that the branches have been made, any developers the next. Subversion creates a new revision link between
joining the project would work on the stable branch for bugfixing In Linux terminology, it’s a similar concept to a the edited file and its parent directory. From
and the HEAD branch for adding new features. hard link. A hard link looks and behaves just like a here, the links continually bubble up through the
If security is a concern, you may want to restrict access to file, but is just a connection to the location of the file tree until the process reaches the root, at
specific branches to certain people, or only allow certain people file on disk. In fact, filenames themselves are which point the new revision is complete.
hard links, as they don’t contain any document By comparison, CVS needs to read every file in
to create branches in the first place. If you only want to grant
data – just a name and a link. the directory tree whenever there’s a branch.
certain developers the ability to modify specific branches, you

www.linuxformat.co.uk LXF70 SEPTEMBER 2005 93

LXF70.tut_sub 93 11/7/05 11:35:50 am


TUTORIAL Subversion

>> PART 2 – MERGING ONE BRANCH WITH ANOTHER

Working on the development branch of a project often $ svn diff -r 6:7 file:///usr/share/subres/branches/
involves solving problems that should be applied to the stable Index: HEAD/helloworld.cpp
branch, especially when working with security problems. In our =================
simple helloworld.cpp example, the development branch has --- HEAD/helloworld.cpp (revision 6)
been modified to include another output line containing ‘a +++ HEAD/helloworld.cpp (revision 7)
cutting-edge feature’. Of course, changes will be significantly @@ -6,6 +6,7 @@
more complex in the real world – but the principle remains {
the same. cout << “Hello World!” << endl;
Despite their sharing the same ancestry, Subversion sees the cout << “Both modified additions.” << endl;
two files as totally separate. Last month we used svn diff to + cout << “Cutting edge feature.” <<endl;
check the differences between various revisions of the same file. return(0);
This time we need to rationalise the differences between the }
same file but now copied to two branches. For this we need svn The only difference is the addition of the “cutting edge
merge to apply the differences between two sources. First, from feature”, signified by the + symbol at the beginning of the line.
the stable working directory, we need to check the differences As we saw last month, we could use the svn diff output to
against those changes made within the unstable HEAD branch. make a patch. But there’s no need with Subversion, as you can
If we examine the log of helloworld.cpp from the stable use merge to apply the differences to your local working copy
branch, it’s pretty obvious that none of the changes that have immediately. From a local working copy of the stable branch,
been made to the development branch: svn merge will add only the changes specified by the revision:
r5 | Moved project into a branch structure $ svn merge -r 6:7 file:///usr/share/subres/branches/HEAD/
r4 | Resolved conflict by incorporating both changes. helloworld.cpp
We’re missing revisions 6 and 7 from the HEAD branch. As U helloworld.cpp
you can see from the previous log messages from HEAD, $ svn status
revision 6 was the process of copying the files to the new M helloworld.cpp
branch, while revision seven was the addition of some fantastic Our code tells us that the changes made to the HEAD/
new feature (r7 | Added a cutting-edge feature). helloworld.cpp file are merged into the local copy of the same
You can see the differences between the two revisions with file, represented by the M in the first column of output from svn
the svn diff command in the next column: merge. The developer is now free to examine the changes
made to the helloworld.cpp file, and commit them to the
stable branch. There is a chance that there is going to be a
“BRANCHES ALLOW A NEW conflict between the merged and original version, so take care
when merging between branches.
VERSION TO START WHILE THE Rewind
OLD ONE CAN STILL BE UPDATED.” One unconventional side-effect to using the revision numbers to
specify which changes are to be merged is that you don’t have
to use them to update from one revision to another. You can
The code within a development tree is inherited by each successive version. also turn them around – using 7:6 instead of 6:7, for example,
[1] The original release (1.0). has the effect of winding back any revision 7 changes back to
[2] Updates to the original release should just add fixes (1.1).
revision 6. Using the previous example, we would type:
[3] Features are reserved for a significant revision update (2.0).
svn merge -r 7:6 file:///usr/share/subres/branches/HEAD/
helloworld.cpp
G helloworld.cpp
The G is to show that Subversion has successfully merged
the repository’s changes into the local file. This is a good
moment to mention the svn revert command, which is a much
safer method of reverting any local changes back to the version
2 held in the repository.
Another neat trick you can perform with branches is to
switch the branch that your local working copy references on
the server. The command for achieving this magic is svn
switch. In fact, it doesn’t actually do anything all that clever – it

1 3 just changes the URL that your working copy references. You
can see the current URL for your working copy using svn info:
$ svn info
URL: file:///usr/share/subres/branches/stable_1_0
From the above example, we can change our working copy
branch from stable_1_0 to HEAD using svn switch:
$ svn switch file:///usr/share/subres/branches/HEAD
U helloworld.cpp
Updated to revision 7.
$ svn info
URL: file:///usr/share/subres/branches/HEAD

94 LXF70 SEPTEMBER 2005 www.linuxformat.co.uk

LXF70.tut_sub 94 11/7/05 11:35:52 am


TUTORIAL Subversion

REMOTE ACCESS THE PROJECT WITH SVNSERVE


The first tutorial showed you how to repository’s conf directory. The
configure the Subversion server to use an configuration file is well documented,
Apache module for remote access. But we and you can revoke or allow anonymous
have also used the svn:// protocol URL for write access under the [general] section.
accessing remote servers. The server To add per-user permissions, enable it
application responsible for servicing this in the Auth-access field, point
protocol is called svnserve, and is usually password-db to the location of a
part of a typical Subversion installation. It’s password file and create the password
not used by default, because it’s meant for file yourself. For example:
smaller and less demanding access, but it is svnserve.conf:
a worthwhile alternative to Apache. [general]
Getting the server running is actually anon-access = none
incredibly straightforward: you just need to auth-access = write
execute the command with a couple of password-db = passwd
parameters – the operating mode and the passwd:
path to the repository. For example: [users]
svnserve -d -r path_to_repository graham = grahampassword
This runs the server as a daemon (the You will then be able to access the
other operating modes use Internet repository as a user by specifying the
Daemon, AKA inetd), and points to the username before the server address and
repository with the -r parameter. Once the entering the password, as in installed, and a user account on the server Once svnserve is running
server is running, you can access your svn co svn://graham@localhost machine. Svnserve is run as the connecting you can access the server
repository directly using the svn protocol: The only problem with the above method user, so there’s no need to have it running with Konqueror.
svn co svn://localhost is that passwords are sent as plain text, and beforehand, but the client needs to specify
By default, svnserve provides only therefore pose a security risk. The answer is the location of the repository on the server
read-only anonymous access to the to use the ever-versatile SSH to harden the filesystem. For example:
repository. You can change this by editing connection between the client and the svn co svn+ssh://graham@localhost/usr/
the svnserve.conf file located within the server. All you need is to have OpenSSH share/subres

PART 3 – VENDOR RANCHES AND TAGGING


Vendor branches let you integrate third-party projects
into your project tree, like external libraries that might provide
essential functions for your application. By using a vendor “SCRIPTS MAKE IT EASY TO UNDO
branch you can keep on top of any changes in these external
projects, but (more importantly) you can also make sure all your
CHANGES MADE ACCIDENTALLY
developers are using the same version. CVS has specific support
for vendor branches, but Subversion is versatile enough to
TO THE TAGS BRANCH.”
integrate them without too much difficulty.
A vendor branch usually exists as a separate folder structure To create a tag from our previous example:
under the root of the Subversion repository. This is often under a $ svn mkdir file:///usr/share/subres/tags
directory called vendor – hence the ‘vendor branch’. You need Committed revision 8.
to import the entire third-party project into this folder. Whenever $ svn copy file:///usr/share/subres/branches/stable_1_0 file:///
the third-party project releases a new version, you need to usr/share/subres/tags/release_1
Structure your repository
merge these changes against a local working copy so that your Committed revision 9.
The way the filesystem is
own changes won’t be lost. You can then commit these changes There’s only one problem with this approach: there’s nothing structured is is entirely up to
back to the repository in order to update the version of the to stop a developer changing the contents of the tagged the project maintainer, but it’s
third-party application for other developers to use. directory. Most of the time this won’t be a problem – it’s usually worth bearing a few things
project policy to leave the contents of the ‘tags’ directory alone. in mind.
Playing tag But there is the option of hardening access if you need to. If you’re developing
To be able to use vendor branches effectively, you need to mark This takes us right back to the first episode in our Subversion different applications within
the third-party branch to show it can’t be modified. This is series (LXF68), because you can solve this problem using the same repository, you’ll
probably want to separate
known as ‘tagging’ in version-control speak, and to Subversion, Subversion hooks. In case you can’t remember, these are scripts
them at the top level into
it’s simply a branch that shouldn’t be edited. Like a branch, a tag that are executed when a specific Subversion event is triggered.
different directories. You also
is a complete copy of the repository at a certain point in time. Using a script in this way makes it easy to undo any changes
need to consider how you’re
This may seem like any revision point within the repository – that may accidentally have been made to the tags branch. You going to manage branches
and it is – but creating a tag is often a good way of marking a can also restrict access using the mod_authz_svn, as and tags. Most projects use a
specific point in the development cycle. mentioned earlier. folder called trunk for the
One of the main reasons for creating a tag is to mark a And that’s it! The end. C’est tout. Je suis un sandwich! After main development source
significant release version, such as the stable_1_0 in our this brief series of three tutorials, I hope you now have the tree, and create separate tags
example. Just like branches, tags are nothing more than copies confidence to not only run your own server, but also to and branches directories at
of the repository, and it’s the svn copy command we use to contribute to a project. If the project is a success, you will no the same level. It doesn’t
have to be this way of course
create them. The only differences are that the comment for the doubt need to merge and manage changes as we have
– the filesystem structure you
revision should reflect the creation of the tag, and that covered this month, hopefully bringing the whole development
use is left entirely up to you.
developers mustn’t edit the tagged development branch. cycle full circle. LXF

www.linuxformat.co.uk LXF70 SEPTEMBER 2005 95

LXF70.tut_sub 95 11/7/05 11:35:53 am


TUTORIAL PHP

SCRIPT PROGRAMMING

PHP The Monty Hall problem


Having problems with last issue’s LXF bounty? Paul Hudson shows you how to prove such problems
using brute force, a dash of brain power and a highly-trained team of goats.

Anyone who has studied advanced mathematics has a called Let’s Make a Deal, where something similar to this
deep – if somewhat unconventional – appreciation of problem was done on most shows. The problem goes like this:
numbers. We lovingly bestow names on certain types you are on a show, and asked by the host to choose one of
of numbers to show our admiration for their magic: harmonic three doors. Behind one door is an expensive car – the star
numbers, perfect numbers, semi-perfect numbers, hyperperfect prize – but behind the other two doors are goats. Once you’ve
Last month was all about
numbers, amicable numbers and even, believe it or not, weird picked a door randomly, the host (who knows which door leads
curses – the tricky but
rewarding graphical library. If
numbers. We love them because they’re predictable, to the prize) opens one of the other two doors to reveal a goat.
you missed the issue, call unchangeable and exact, and therefore can be relied upon for He offers you the chance to stick with your chosen, unopened
0870 837 4773 or +44 1858 logic, building complex proofs and pretty much anything else door, or change to the other unopened door. Do you switch, or
438795 for overseas orders. except paying the bill when you take one out to dinner. do you stick with your original choice?
In the rare times when I venture into the outside world, it The answer – naturally – is that you should always change,
has come to my attention that the great unmathed do not have as there is a greater chance that the other door contains the
the same respect and love for numbers that the rest of us do. car. This issue we’re going to write a PHP script that proves the
Numbers scare them, and, as we all know, fear leads to anger, correctness of the ‘switch’ decision in the Monty Hall problem
anger leads to hate and hate leads to suffering. How wrong they and, once that’s done, I’ll add some options for raising the
are! However, we can at least glimpse their irrational terror: early difficulty a little.
in your numerical romance you too may recall being
overwhelmed by their immense strength, or bamboozled by My brain hurts
their exotic attractions. Before we write any code, it’s important to understand why the
Take, for example, the Monty Hall problem. This is a Monty Hall problem (MHP from now on) causes people such
relatively simple question that has caused many people great anguish. There are a few other things we should also nail down
fear – until they come to terms with the magic of numbers. It is now to avoid confusion: “win” means to pick the door with the
named after Monty Hall, the host of an old US game show car; “lose” is to get one of the two doors with a goat; the doors
are numbered 1, 2 and 3; “host” is the game show host; and
“contestant” is, well, the game show contestant – duh. With that
“THIS IS A RELATIVELY SIMPLE out of the way, let’s analyse the problem. In MHP you get to
pick a door to win a prize, and because there are three doors
QUESTION THAT HAS CAUSED and cheating is ruled out we can safely assume that there is a
one in three chance of winning.
MANY PEOPLE GREAT FEAR.” Say you were to choose door 1. At this point, there is a 1 in
3 (1/3) chance that you have the correct door. The host knows

96 LXF70 SEPTEMBER 2005 www.linuxformat.co.uk

LXF70.tut_php 96 11/7/05 9:58:10 am


TUTORIAL PHP

where the car is, and so opens door 2 to reveal a goat. This If I have a 2/3
leaves door 1 and door 3 closed. It’s at this point that most chance of winning a
people go wrong, because they will now believe that there’s an goat by sticking, then I’m
sticking – I want a
equal chance of door 1 and door 3 containing the car. “After all,”
goat!
they will explain, “there are two doors, no clues or cheating, so
we can just follow the basic rules of probability – it’s just the
same problem again with one fewer door.”
Of course, that’s a whopping great big fallacy – the basic
rules of probability won’t help you much here. Instead, you need
to know about the rules of probability when something else has
already happened. If you pick door 1, you know that there is a
1/3 chance of having picked the door that leads to the car.
However, it is equally correct to say that there is a 2/3 chance
that the car is behind one of the other two doors.
Now, when the host opens one of the other two doors (we’ll
say he opens door 2), there is still a 2/3 chance that the car is
behind one of those two doors, except now you know that one
of them contains a goat. This effectively gives door 3 a 2/3
chance of holding the car. So, if door 1 has a 1/3 chance of
leading to the car, and door 3 has a 2/3 chance, what do you
do? Switch, of course.
This is shown in the diagram below right. If we presume you
pick door 3, there are three possible outcomes. In possibility A,
door 3 contains a goat, and the host will open door 2. If we
stick with door 3 we lose, but if we switch to the other door
(door 1), we win. In possibility B, door 3 contains a goat, and
the host will open door 1. If we stick with door 3 we lose, but if
we switch to the other door (door 2), we win. In possibility C,
door 3 contains a car, and the host will open either door 1 or
door 2 – it doesn’t matter, so let’s say he opens door 1. That
leaves door 3 (our choice) and door 2. If we stick with door 3
we win, but if we switch to door 2 we lose. So in possibilities A
and B, we need to switch to win; in possibility C we lose if we
switch. Switching, therefore gives us a 2/3 chance of winning,
and sticking gives us a 1/3 chance of winning.

Cracking the code


The way to empirically prove this is to write a script that opens
doors thousands and thousands of times, switching and not
switching, to see what results we get. This calls for a PHP script
that accepts user input (whether to switch or not; how many 1-3 are the doors, and
attempts we get), runs the calculations, then prints the results. A-C are your choices.
In terms of code, we need three parts: a function that runs
a single Monty Hall problem; something that parses user input,
runs the problem multiple times, tracks results and prints them
1 2 3
out; and some HTML that allows users to specify the test to run.
The whole thing comes in at under 100 lines, but we’re going to
take it in chunks, starting with the easy bit – the HTML:
<form method=”post”>
<p>Number of iterations: <select name=”Iterations”>
A
<?php
/// generate all these using a loop, rather than lots of typing
for ($i = 50; $i <= 10000; $i += 50) {
if (isset($_POST[“Iterations”]) && ($_POST[“Iterations”]
B
== $i)) {
print “<option value=\”$i\” selected>$i</option>”;
} else {

}
print “<option value=\”$i\”>$i</option>”; C
}
?>
</select></p> <option value=”No” <?php if (isset($_POST[“DoSwitch”]) &&
<!-- This sets the box to “No” if that was its previous value -- ($_POST[“DoSwitch”] == “No”)) print “selected”; ?>>No</
> option></select></p>
<p>Should the contestant switch? <select <p><input type=”submit” value=”Prove it!” /></p> >>
name=”DoSwitch”><option value=”Yes”>Yes</option> </form>

www.linuxformat.co.uk LXF70 SEPTEMBER 2005 97

LXF70.tut_php 97 11/7/05 9:58:15 am


TUTORIAL PHP

>> OK, so I lied a little bit: there’s a bit more to it than just the initial score to zero, then run the function multiple times
HTML, but it’s definitely the easiest part of the script. There are (passing in the should the contestant switch doors?
two comments in there to explain what’s going on, but it’s all variable). Each time the function runs, we catch the return value
very easy: it prints out a form for the user to choose how many and alter the scores appropriately. Still with me?
times we should execute the problem, and whether the Now on to the serious code: the MontyHall() function itself.
contestant should switch doors or not. As you’ve just seen, we need to make this accept a parameter
Moving on, we need to handle the form we’ve just written to store whether the user wants to switch or not, but that’s the
using PHP, then run the problem a suitable number of times. easy part. Here’s the rest:
Here’s the code for that: function MontyHall($DoSwitch) {
if (isset($_POST[“DoSwitch”])) { /// make an array of the doors, then randomise its order
/// only run this if the form has been completed $doors = array(1=>”Goat”, 2=>”Goat”, 3=>”Car”);
$wins = 0; shuffle($doors);
$losses = 0; /// pick a door, then remove it from the $doors array
/// run the function many times. This returns either “Win” $our_choice = array_rand($doors);
or “Lose” $our_door = $doors[$our_choice];
for ($i = 0; $i < $_POST[“Iterations”]; ++$i) { unset($doors[$our_choice]);
$result = MontyHall($_POST[“DoSwitch”]); /// now to “open” a door
/// keep track of the results /// get the first remaining door, and check whether it’s a
if ($result == “Win”) { goat
++$wins; if (reset($doors) == “Goat”) {
} else { // first door in the array contains a goat,
++$losses; // eliminate it from the list of choices!
} // get the current key
} $cur_key = key($doors);
/// print out the results unset($doors[$cur_key]);
print “<h1>The Amazing Monty Hall Empirical Proof } else { // first door not a goat, so remove the next door
Device</h1>”; next($doors);
print “<p>Number of iterations: {$_POST[“Iterations”]}</ $cur_key = key($doors);
p>”; unset($doors[$cur_key]);
print “<p>Contestant switches: {$_POST[“DoSwitch”]}</ }
p>”; /// should the contestant switch?
print “<p>Number of wins: $wins</p>”; if ($DoSwitch == “Yes”) {
print “<p>Number of losses: $losses</p>”; /// yes, switch. Is the remaining door the car?
} if (reset($doors) == “Car”) {
Again, very easy stuff: if the form has been submitted, set // yes - we won!
return “Win”;
} else {
CALLING ALL SUDOKU SOLVERS! // a goat :(
We started a coding bounty last month that columns, etc. Anyone can write a program that return “Lose”;
asked people to create programs to solve Sudoku guesses: it takes skill to write a group of }
puzzles. Sadly, no one here at LXF Towers is algorithms that mimic human behaviour. } else {
allowed to enter (we are the judges, after all!), ■ Once you have a script that’s able to solve // contestant shouldn’t switch
but I can at least give you some tips: problems in a human-like manner, you can get if ($our_door == “Car”) {
■ You must create a GUI for your app. That’s down to the business of making it generate // we picked the right door first time
fine: PHP makes GTK GUIs very easy. If you don’t puzzles. This is important, because you need to
return “Win”;
have a complete set of LXF back issues (why be able to a) pass those puzzles through your
} else {
not?), then you missed an 8-page special tutorial solver to make sure that it works, and b) grade
// another goat! :(
on how to use PHP to create GTK apps back in the puzzles. By solving the puzzles like a real
LXF40. We’re lovely people here, so we’ve put a person would, your solver can count the steps it return “Lose”;
PDF of the tutorial on to our coverdiscs this took – the more steps, the harder the puzzle. }
month so you can swot up. ■ Use Glade, and you’ll be able to make much }
■ Don’t bother creating a complex file format. nicer interfaces. }
If you have PHP 5, you should be using XML, with That’s enough hints for now: using PHP you Again, there are comments throughout that should explain
SimpleXML to load and save. have a big advantage over coders in tougher everything – I even used meaningful variable names, so there’s
■ Think about how humans solve Sudokus. We languages, so the best way to win the puzzle is to no excuse if you don’t get it! The one area where you might get
work by getting the easiest answers first, then spend more time thinking about the algorithms confused is in the handling of the $doors array. In the code,
looking for twins, marking possible answers on a than you do actually programming. Good luck,
I’ve used reset(), next() and keys() – functions that aren’t used
scratch pad, trying to complete rows and and if you win, I want a cut of the prize money!
all that often. The first of them moves the array cursor (the

“THE WAY TO PROVE EMPIRICALLY THAT MONTY HALL


WORKS IS TO WRITE A SCRIPT THAT OPENS DOORS
THOUSANDS AND THOUSANDS OF TIMES.”
98 LXF70 SEPTEMBER 2005 www.linuxformat.co.uk

LXF70.tut_php 98 11/7/05 9:58:17 am


TUTORIAL PHP

HOME IMPROVEMENT
It’s time to separate the sheep from the goats. If this ■ Tricky… Our present script makes no attempt to print 98 doors after we choose ours, and we’d have a 99/100
has been enough programming for you, then go off and out any sort of result percentages based on the chance of winning if we switched. This can’t be tested
enjoy the summer of numbers with your pals. But if number of wins and losses. For simple values of n this is with our current script, but you could do it by adding an
you’re a real programmer, you can think about how to quite easy – if there are 1,000 test runs you can see extra form element to let people choose the number of
improve the script. what’s going on at a glance. But if you do 19,350 runs, doors, passing that element to the MontyHall() function,
There are at least three changes you should try out to let’s say, the answer is less immediately obvious. constructing the array with many goats and adding a
flex your coding muscle: Calculate the win and loss percentages and display single car to the end.
■ Fun… Make the script run n number of tests with them in the output. ■ Mayhem! Assume the game show host doesn’t know
switching turned on, then n number without, to save ■ Taxing… MHP extends above and beyond a three- which door contains the car – what happens to the
the user having to toggle the select box. These results door problem. We could theoretically have a hundred chances of winning now, and why? Answers on a
should be kept separate on the screen. doors, with 99 goats and one car – the host could close postcard to the usual

internal pointer that tells the array which element is being read) should also add a call to srand() near the top of the script.
to the start of the array, and returns the value of that element. Without this, PHP might not bother randomising things much,
So our line if (reset($doors) == “Goat” means ‘go to the and your results are likely to be very predictable between runs.
start of the $doors array, get its value and if it is “Goat”, the Now all that remains is to go ahead and run the thing using
condition is true’. Then we use the key() function, which returns your web browser of choice – copy the script from your home
the key of the element that is currently pointed to by the cursor directory to /var/www/html (this may vary according to your
(ie the first one, because we just used reset() to move to the distro), and go for it. You may want to compare your script
beginning), and uses that value to remove the element. This is against mine, just to make sure it’s in the right order.
quite a big hoop to jump through, but remember that we don’t That’s it for this month, but hopefully you’ve learned a bit
have any other way of indexing in to the array because we don’t about numbers and probability, a bit about PHP’s array
know which value we removed. If the value of the first $doors functions, and a lot about how PHP can be used to test all
element is not “Goat”, we remove the second element by possibilities in a problem to find the right answer. What’s more,
calling next(), which moves the array cursor forward one place. we did all that without me having to goat to town on goat
jokes. Miraculous.
Top and tailing Many people disagree with the solution of switching their
We now have one door in $our_door, and one element in the decision when they’re shown the first goat; and of course they
$doors array. The remaining question is: should the contestant are wrong and should be mocked publicly. But if the
switch? Of course, this was passed in as a parameter, so we just unenlightened are people you actually care about, it’s much
check that and act accordingly. So, if we’ve opted to switch, we better to show them the error of their ways and spread some
return “Win” if the value in $doors is “Car”, and “Lose” number love. So use this script to prove to your friends just how
otherwise; if we’ve selected not to switch then we return “Win” if Monty Hall works – and why not slip them a copy of Abbott’s
the value in $our_door is “Car”, and “Lose” otherwise. Simple. Flatland to show them what they’re missing? LXF
You’re not done just yet: you should add some top-and-tail
HTML code to present it nicely, but more importantly you

DOOR 2

NEXT
MONTH
Next month I’ll be sneaking in
more hints on how to win our
Sudoku competition, by
covering file handling
A car is yours if you can find it: with XML.
do you switch doors or stick?

LXF70.tut_php 99 11/7/05 9:58:18 am


ANSWERS

Answers
If you are really stuck and the HOWTOs yield no good result, why not write in?
Our resident experts will answer even your most complicated problems.

OUR EXPERTS The magic’s gone

Q
I recently installed
Whatever your question is, we can Fedora Core 3 on to my
find an expert to answer it. From Dell 510M laptop, in a
installation and modem woes to
network administrations, we will get dual-boot setup with
the answer for you – just fire off a Windows XP, and it’s giving me a
letter or email and it'll all be taken problem. One of the Linux
care of. partitions (/) is nearly full, while the
other one (/home1) is almost empty.
I used Partition Magic 8.0 on the
LXF Answers guy
David Coulson is XP partition to resize it before
a networking and installing FC 3, but I’ve used PM on
security guru with another PC to resize a Linux
plenty of sysadmin partition and it messed up the
experience to boot.
whole Linux partition – it didn’t
boot anymore and I had to reinstall
everything from scratch – so I’m
reluctant to use PM again.
Nick Veitch is the
editor of the On the Linux partition of my
magazine, and laptop I have installed QtParted,
DSL modems are a pain to get working but with easy-to-install tools such
answers your easy but this doesn’t allow me to as these for the BT Voyager, much of the headache can be avoided.
questions! Or manipulate a mounted partition. I
indeed anything to
do with GRUB, LILO, netatalk, Vi...
can see the settings, but can’t
change them. How do I safely partitions, or even to copy everything change the partition structure around,
transfer unused space from the to a second disk (or the Windows but it’s hit or miss whether you
/home1 partition to the / partition partition if it is not NTFS-based) and actually adjust the partition correctly
Hans Huberland without destroying my Linux then go back to the beginning and this way.
is Rackspace installation or losing data? I’ve install Linux again. To resize the filesystem on
Managed Hosting’s
Linux expert and a
spent so much time installing and I would recommend that when /dev/hda1 to 512MB, you would
real-life system configuring everything on this installing Linux for the first time you issue the following command as root:
administrator on machine and I really don’t want to create a separate /home partition in resize2fs /dev/hda1 512M
call for your questions. have to re-do it from scratch. addition to the mandatory / (root) and Unmounting is a good idea prior to
Send your questions for our experts to: Vincent Borreux swap partitions. In this way data is making any changes that modify the
As you are using partitions separated from the system so you can structure of the filesystem. DC

A
Linux Format, Future Publishing,
30 Monmouth Street, Bath BA1 2BW rather than volumes, it’s do an update or a complete reinstall
or email: lxf.answers@futurenet.co.uk. very difficult to resize them while keeping your data safe. Radeon redux

Q
Got a sysadmin query? Send it to Hans without wiping everything If QtParted isn’t working, you might I’m having a problem
at sysadminqa@rackspace.co.uk. out. A smart option is to back consider using resize2fs to shrink with the Linspire 5.0 Live
everything up prior to altering the ext2 or ext3 filesystems then distro. I can run it as a
Live CD with no problem,
but when I try to install it by typing
startx at the prompt the cursor
appears and the screen turns grey –
then it just stops. I’m not sure what
to do to get it to work. Any help
would be appreciated. My hardware
specs are:
Pentium 4 3.00 GHz
512MB DDR2 RAM
200GB ATA hard drive
ABIT AA8 DuraMAX motherboard
ATI PCIE Radeon vGuru series
RX600 graphics card.

LXF70.answr 100 11/7/05 2:42:31 pm


ANSWERS

Linspire has a voiced


tutorial on how to run ALL ABOUT RACKSPACE
Linux – but not how
to install it! LXF Sysadmin
Answers – in
PJ
association
It sounds as if

A
with Rackspace
Linspire doesn’t like your Knoppix from LXF63 may
Managed
not recognise the Voyager modem.
video card. It might not Hosting
have recognised it correctly, I have a BT Voyager 100 USB
or even support it. ADSL modem, which I received when I
As you have a high-end and fairly first went to broadband with AOL, and
new Radeon chipset, the chances are now use for my current ISP,
that Linspire doesn’t even know what Central Point. I have no idea where to
it is. Video card drivers for X are go for drivers for this modem or how
updated frequently but many to go about installing them. When it comes to managed hosting the outset and will remain on your
Rackspace is unique. We are the only account. All Rackspace employees are
distributions are a few revisions behind, The current drivers from BT also
hosting company to guarantee 100% committed to ensuring customer
and some are a long while overdue for launch into the sign-on interface –
network uptime and we will even satisfaction, and they will not rest until
an update. would this come with any Linux- pledge to replace faulty hardware (let’s a client problem is resolved.
You may want to try another Linux compliant drivers? I would like to face it, it does happen) within an hour. Since Rackspace was established in
distribution, such as SUSE (which lists install either Fedora Core or SUSE. As you would expect from Red Hat’s 1998, it has specialised in managed
your card as fully supported in James only Advanced Hosting partner you will hosting – nothing else. We’re not an ISP,
version 9.2 and 9.3), Fedora or The Voyager 100 is a receive Fanatical SupportTM and instant we don’t sell domain names, and we
Mandriva, just to see what they do
with the card. These distros tend to be
updated a little more frequently than
Linspire, plus they have more
community support to get updates in
A popular modem, but it isn’t
supported by many Linux
distributions. However, you
can obtain drivers that will work with
most systems.
emergency response from fully-
qualified level three technicians,
available 24 hours a day, 365 days a
year. No answering machines, no
diversions, no silly on-hold messages.
won’t offer website design – all we do
is managed hosting. As a result, we do it
very well and 97% of our customers
would happily recommend us.
For information on how we can
All our customer platforms are improve your web hosting, please
the mix early. I’d suggest you head over to housed in state-of-the-art, secure data contact us at www.rackspace.co.uk
Linspire may also have updates http://eciadsl.flashtux.org/ centres and can be fully customised to and ask any questions you have about
available, but you’re kind of stuck if it download.php?lang=en and scroll meet any requirement. A dedicated the ultimate managed hosting service.
won’t even start a graphical desktop. down till you find the EciAdsl Nortek account manager is allocated to you at See page105 for Rackspace’s star letter.
DC section. Now download the .bz2 file,
and reboot to Linux. Copy the .bz2 file
Now, Voyager to somewhere like /usr/src and start a make cfg modem, type 10 and enter the

Q
I tried the Knoppix Live CD shell prompt: cp GS7470_SynchFiles/gs7470_ chipset as GS7470. When choosing
from the cover of your tar -jxvf eciadsl-usermode-0.10- synch01*.bin /etc/eciadsl synch files, you want gs7470_
magazine [LXF63], and it nortek-alpha.tar.bz2 Now you have to configure the synch01.bin. There is some other
recognised almost all of cd eciadsl-usermode-0.10-nortek- driver with the settings BT gave you. information in the tarball in case you
my hardware except for my ADSL alpha The VPI is 0 and the VCI is 38, and run into problems, but this should be >>
modem – for me, the most important ./configure the password can be anything you enough to get you up and running. DC
bit of hardware by a mile. make install want. When it asks you to choose a

A QUICK REFERENCE TO: SSH


For many years, administrators used even being typed into the client. This can Clients
good old Telnet, or even rsh, to access help to secure systems where passwords for SSH are
systems. However, as internet security may have been compromised, as available for
has become a concern for more and password-based authentication can be almost any
more individuals and corporations, it’s a completely disabled and everyone forced operating
growing liability to use platforms and to use keys. system you
protocols that use plain text You can forward other TCP sessions can think of,
authentication. Both rsh and Telnet send over an SSH connection, encrypting all including
everything back and forth between the information as you go – essentially mobile
client and server without any form of creating a secured proxy service. For devices and
encryption or verification, so attacks that situations where a mail server has been Windows.
involve an intermediate system collecting unavailable – or all you can do is SSH The standard Unix SSH The sshd service is a reliable and
information and replacing it with out – being able to forward a TCP implementation is known as OpenSSH secure way to permit remote
malicious content are a real problem. connection from the SSH server, or (www.openssh.org), and ships with access to Unix systems over the
SSH is an excellent alternative as it within the network it lives on, can help nearly every Linux distribution. For public internet.
performs encryption of the work around local firewall issues or Windows users, PuTTY (www.chiark.
authentication stages of the connection, configuration problems. Anything you greenend.org.uk/~sgtatham/putty)
as well as for the actual terminal session forward over SSH will appear as a TCP is particularly popular, and supports
itself. SSH can also perform port on a local system, avoiding the need all of the features offered by SSH,
authentication using keys rather than for any major configuration changes on including the TCP port forwarding and
passwords to avoid the system password the client. key-based authentication.

www.linuxformat.co.uk LXF70 SEPTEMBER 2005 101

LXF70.answr 101 11/7/05 2:42:36 pm


ANSWERS

FREQUENTLY ASKED QUESTIONS KERNEL


FAQ How do I find out what FAQ Do I have to use the cd linux
kernel I’m running? kernel that came with make mrproper xconfig dep clean
These days, most up-to-date my distribution or can I go bzlilo modules modules_install
distributions ship with 2.6 kernels, and build my own? First, you need to configure your
although some are still using the It’s probably best to answer this with kernel. The defaults will give you
2.4 kernel. You can easily check what an example. Red Hat distributes a something that will boot but you’ll
version you’re running with the uname kernel that’s heavily patched, and probably need to select other
command. Simply do some of its tools and utilities don’t options for hardware devices, such
$ uname –a work properly with a kernel that as soundcards and SCSI interfaces.
and you’ll get a line that should look doesn’t have its patches. Likewise, As long as there is a backup kernel
something like this: some third-party patches will conflict available via LILO, it shouldn’t be a
Linux cr2 2.6.11.6 #1 SMP Mon with the contents of the Red Hat major issue to try different options to
Mar 28 18:48:32 BST 2005 i686 kernel, as they will be expecting a decide which supply the required
GNU/Linux clean kernel tree. capabilities for the system.
This system is running 2.6.11.6, Unless you need specific kernel Running bzlilo will build the kernel One of the main projects that
which is the sixth revision of 2.6.11. capabilities that render a Red Hat and copy it to /vmlinuz. Run lilo to distributes combined kernel patches
Your distro’s creators might have kernel useless, due to incompatibility, install the new kernel. You’ll have to is WOLK, the Working Overloaded
applied their own patches, so it won’t it’s often good to stick with distribution modify LILO to use /vmlinuz as the Linux Kernel. Rather than having to
be a simple 2.6.x.y kernel version. kernels. Of course, if you don’t need image, rather than /boot/vmlinuz, apply individual patches one at a
any of the patches within the although you can hack the Makefiles time, WOLK provides a single patch
FAQ Where do I download a distribution’s kernel, a vanilla kernel to install the kernel into /boot/. that adds a whole bunch of different
kernel from, and what tree should work perfectly well. The last two make options in the patches. It is available from
do I have to get? above code build the loadable http://sf.net/projects/wolk.
You can download a tarball of the FAQ I’ve got my kernel tar modules and put them in the right There is also the -ac kernel series,
latest kernel from the Linux Kernel file. How do I compile it? place for the kernel to use. Once you distributed by Alan Cox. These
Archives at www.kernel.org. The general build location is have a kernel built with loadable kernels contain many updates that
Generally, you’ll just want to grab /usr/src/linux, so you need to cd into module support, you can just go in haven’t yet made it into the
linux-2.6.11.6.tar.gz from /usr/src then untar it with and reconfigure the kernel and install mainstream kernel, along with some
linux/pub/linux/kernel, which is the tar xzf ~/linux-2.6.11.6.tar.gz the modules. basic fixes for things broken in
complete tarball of the kernel source. Once the kernel tarball is existing kernels. Many people use
If you already have a kernel source unpacked you will have a linux FAQ Can I add capabilities to -ac kernels instead of the regular
tree available, you can obtain the directory, which contains the source the kernel source tree? kernel tree; although, as with
patch between that and the next code for compiling the kernel. There are many patches available for distribution kernels, other kernels
revision – which saves you having to The general routine to configure, the Linux kernel, which enable it to do may object to being applied to an
download the entire source tree. build and install a kernel is things that a standard kernel can’t. -ac tree.

Windows partitions for Apache, and


>> Reaching Apache what and where to write in the

Q
I am a newcomer to Linux Apache config file httpd.conf.
Linux, and am trying out I noticed the httpd.conf setup
Mandriva Linux before I file for Apache is considerably
make the switch from shorter in Linux than it is for the
Windows. On my Windows setup I Windows machine, so that’s doubly
have installed Apache, PHP and confusing me about how to edit the
MySQL – all of which I use to test file. Editing Linux line-ending files
my websites offline, before I expose when in Windows is no problem, as
them to the public. Everything I have an editor that will read and
works fine. In Linux, Apache auto- write both Windows and Linux
loads (I noticed this from a previous format text files and line endings.
Mandrake install), and I have also From the LXF forums
installed PHP and MySQL. You can edit the config file
So far, so good. The problem is
that all my data is on my FAT32 /
Windows drives. I don’t want to
copy over the files to a Linux
partition because then I wouldn’t
A httpd.conf and adjust the
DocumentRoot option to
point to your web directory
mounted from your FAT32 filesystems.
You can check with mount which
Configuring Apache can be complex for beginners, but a well-commented
httpd.conf will get you off to a good start.

that Apache doesn’t much like files


with spaces in them, and is case-
You can find httpd.conf in
/etc/apache, which is generally well
have access to them from Windows. filesystem is mounted where on the sensitive under Linux, so your existing commented under Linux so you can
So I would like to know if it’s Linux file structure and point to the websites may not work exactly as they easily adjust configuration options
possible for Linux to access the appropriate directory. Bear in mind do in Windows. without worrying what they will do. DC

102 LXF70 SEPTEMBER 2005 www.linuxformat.co.uk

LXF70.answr 102 11/7/05 2:42:38 pm


ANSWERS

LinBox and WebBox to establish if


Ping pong there is any configuration variation

Q
I have three machines within Samba on the two systems, and
connected on my to ensure that Samba is running
network, and problems correctly on your server. DC
working between them.
They are: Which CMS?

Q
LinBox running Mandrake 10.0 I work for a company
WinBox running Windows 2000 with about 75 people in
WebBox running Mandrake 9.1 as different departments,
an internal web server. some of them technical,
The network seems to be some of them not. I would like to
working only partially. The have a content management system
connection seems fine between the to hold all the data that could be
Linux and Windows boxes – I can shared within the organisation,
ping between them and WebBox ideally with the minimum
can ping to both – but I can’t ping technical input possible. Tools such as iptraf provide valuable
to WebBox from either of them. Maybe text files or information for anyone checking
However, I can open the default Word documents. Can performance issues on a network.
web page on WebBox (running you recommend one?
Apache) at http://192.168.0.3:80, and Lindsay local network you can use NFS to
using LinNeighborhood I can see the As a matter of share a filesystem on the server and
Linux and Windows boxes on all
three machines, but not the web
box (they are all in the same
workgroup INTEGRANE). Can you
suggest anything?
A fact, I have looked
into this issue recently
and I’d like to share some of
my findings. Mambo (get it from
www.mamboserver.com) takes the
underprivileged user in it, log in as
that user and you’ll see that in Edit
mode it is nowhere as scary as the
access it on the workstation as if it
were local. This is usually the best
configuration, as NFS runs at near to
line rate. However, it is insecure on
anything close to a public network.
Mike cake: it’s the most popular, most others – it’s quite inviting and intuitive. For a Windows client, you can
It sounds to me like your versatile and most configurable CMS. One last thing – I’d invite you to always install Samba on the Linux

A web server box is not


participating in the Windows
network properly, even
though its IP configuration is sound. It
may be that there is a firewall running
The only snag is that it has by far the
steepest learning curve around, and
from what I know, customisation
involves delving into the code.
I won’t comment on the usual
look at www.opensourcecms.com,
which has live websites of web systems
that are reviewed and rated to help IT
managers make up their own mind on
the subject. HH
server and access the web directories
using a share. Copying data back and
forth is simple, although Samba might
take a little coaxing to work exactly as
you want it to. DC
on the system, and it’s blocking the suspects – PHP-Nuke, Postnuke and
SMB traffic from the network. the like – because they’ve been amply File transer Snail-paced backups

Q Q
To verify whether a firewall is discussed elsewhere. I would like to I have a networked web I’m trying to set up
running, run iptables –nvL. mention TWiki here (http://twiki.org) server set up with Apache, Unison so that it will
If you can ping the system by IP because it is a nice little system, which I am going to use synchronise backups on
address, in this case 192.168.0.3, I though before customisation it looks for testing websites. I can a small LAN. It all works
think it is unlikely to be a routing issue. overwhelming to the non-techie. access the web pages via port 80 fine, except that the transfer rate is
The fact that you can access the web But the CMS I liked the most was over the network, but at the moment very slow compared with the LAN’s
server directly pretty much discounts Exponent (www.exponentcms.org). only the default index.html file is normal speed.
any IP problems. It’s the most configurable, the most available in /var/www/html. The PCs are both using Unison
What I’d suggest is that you straightforward and the most docile to What is the best way to upload on SUSE 9.2, connected by SSH. I’m
compare the smb.conf files from the untrained eye. Just set up an files? Can I set up FTP, and if so, how getting about 80KB/sec on a
do I do it? 100MB/sec LAN that normally
Mike Davies manages about 10MB/sec over NFS.
Actually there are a number Is the lack of speed due to SSH

A of ways to get remote file


access with Linux, the most
popular of which is the SSH
protocol. SSH offers secure transport
for shell or file transfers, although
or to Unison? Is there any way to
tweak whichever is causing the
slowdown to improve matters?
Neil Lewis
Depending upon the speed
there is some overhead due to the
decryption and uncompression that
takes place (more of which in Snail-
paced Backups). Of course, on a
public network security is a major
A of the systems transfering
data, the encryption
overhead can cause the
throughput rate to drop significantly,
but for modern workstations and
concern, so the safety of SSH offsets servers, it probably won’t be noticable.
many of its throughput problems. SSH However, when you’re accessing the
works with Windows using a client drive and possibly zipping up the
such as WinSCP for file transfers and contents, things can run slowly and
PuTTY for shell access. start to drag. 80KB/sec is pretty
WinSCP is a great tool allowing Windows systems to copy files securely to If you are going from a Linux dismal – we doubt SSH has anything >>
Linux servers over a network. workstation to a Linux server on a to do with this. You could try to run

www.linuxformat.co.uk LXF70 SEPTEMBER 2005 103

LXF70.answr 103 11/7/05 2:42:44 pm


ANSWERS

WIN A NEUROS DIGITAL AUDIOCOMPUTER


with Rackspace Managed Hosting

WIN!
www.rackspace.co.uk

Every month, the best question NeuroCast automatically scans the


related to systems administration FM radio dial for an available
that a LXF reader sends in wins a frequency and broadcasts using all-
prize. This month you have the digital stereo encoding, just like
chance to win the life-enhancing broadcast towers used by
Neuros MP3 digital audio computer. professional radio stations.
With a Neuros, you can manage The Neuros has many recording
all the music stored on your PC. capabilities that make it a robust tool you can play your
Create play lists. Delete songs. Get for the recording hobbyist. The favourite stations
new files, thanks to the Neuros device includes an on-board with one click,
Synchronisation Manager. No more microphone, perfect for the quick just like on your
getting stuck in front of the PC to memo or recorded lecture. It has car stereo.
make changes – do it all on the line-in recording capabilities and you Tempting, isn’t it?
Neuros, and get on with it. can record to MP3 or WAV, with a You know what to
Then use its NeuroCast feature to choice of seven recording qualities. do: email
broadcast the music on your Neuros Neuros also features a built-in sysadminqa@
device through any FM radio. FM radio with five preset buttons so rackspace.co.uk.

>> Unison over rsh or rsync and see if Also on Fedora, I’ve noticed that
you’re able to squeeze any more life I can’t ping any Windows systems No limits processes that have to be in memory

Q
out of it. Trying to copy some data by hostname, although they can I would like to use HTTP or the memory footprint of the
using SSH directly will help to indicate ping me by hostname. Both systems to upload large files (in processes themselves.
if SSH is really any burden at all. DC have nmbd and smbd running and excess of 200MB) to a Also make sure you’re not allowing
both these machines have their server, because some of uploads via SSL, to avoid the
Share where? hostnames set as well as other our customers aren’t able to use overhead that encryption would incur.

Q
I’ve got a Samba web general networking settings (IP, gw, FTP due to firewall restrictions If you’re using Perl, you should fork so
server on Fedora Core 3, netmask, broadcast, etc). (using Perl or PHP as the upload that you release the httpd process
which is fine for From the LXF forums handler). What issues are there and have your child process handle
browsing and generally You can always add a Linux with Apache handling this amount the rest of the transaction. I couldn’t
works OK, so I decided to try a
Debian server as well. I set up a
very simple Debian Stable system
and Samba, and the storage share is
A system to the hosts file on
Windows, which can be
found using the Search
option. Here you can set specific
of traffic in an occasional burst, or
even frequently? Should there be
any tuning done to the server that
would help? Or are there any
tell you anything about that in PHP as
I haven’t used it for quite a while. HH

Look don’t touch

Q
working fine, but I can’t browse to hostnames for IP addresses on your amends I could make to our Apache I have discovered the
it. I can open the share by IP network, which will work in the event configuration file that would help? wonders of Knoppix
address, so it seems to be a of it becoming unreachable via John Moylan while waiting for my new
NetBIOS problem. I don’t NetBIOS. Indeed, there are a number PC to arrive. The HD
understand this, because I’ve been
going over and over the smb.conf
and comparing the two. The only
difference is that Debian is using
domain authentication and I used
You can also add the following
option to the global section of your
smb.conf. Of course, this needs to be
unique for each of the Samba servers.
netbios name = SambaServer
A of configurable limits to how
big the file size is. The ones
that might affect you are
Apache’s LimitRequestBody, though
it defaults to unlimited in version 2.0,
from my Linux PC is on /dev/hdb
and all my data is there. I wanted to
copy a few files from /mnt/hdb7 to
/mnt/hda5 but I get a read only
message. I have done su and
SWAT on it instead of hand editing DC and PHP’s upload_max_filesize and checked the /etc/fstab and listed
as I did with Fedora. post_max_size. However, what the permissions – it all looks fine.
generally affects Apache the most in I have never worked with
file uploads is the memory Knoppix before; I just booted it up
consumption and how long the httpd as a novelty. Now that it is a truly
process stays up. The latter limits the useful tool I need to know how to
number of requests httpd can handle, make the most of it. I am sure that I
either because of the number of am missing something obvious.
From the LXF forums
The general philosophy of

A Knoppix is to allow users as


little write access as
possible. For this reason,
existing partitions are either not
mounted or only mounted as ‘read
>>

104 LXF70 SEPTEMBER 2005 www.linuxformat.co.uk

LXF70.answr 104 11/7/05 2:42:47 pm


ANSWERS

★ STAR QUESTION WINNER!


This issue's lucky winner is Goran – your new Neuros digital audiocomputer will be with you shortly!

Discover crontabs A quick search on the web tells us be run. The seventh and last field is accepts not only defined values,

Q
Back up, back up, back that crontabs are actually a bunch of the command, which in the example but also ranges and lists of values.
up is the first rule of files that allow us to run commands above is run-parts /etc/cron.hourly. Ranges are defined as <start>–
the trade. Besides my at an hourly, daily or monthly interval. Let’s go through the rest of the <end>: lists are defined as a group
business, I run a small Ah, we’re getting somewhere. On crontab entries to further of comma-separated values, such
home web server and tend to closer inspection of the files provided understand the format of /etc/ as ‘value1, value2, value3...’. So
back up my files on it as often as by the same package, we get: crontab. In the line 02 4 * * * root the command you want to run can
possible. I use rsync on my [root@carve ~]# rpm -ql crontabs run-parts /etc/cron.daily, it tells be implemented with the following
backup machine: /etc/cron.daily crond that it should run run-parts / lines of code:
rsync -avz myserver:var/www / /etc/cron.hourly etc/cron.daily every 02 minutes * 0,4,8,12,16,20 * * * root rsync -avz
backup. /etc/cron.monthly when the hour is 4, no matter what myserver:var/www /backup
What I would like to do is /etc/cron.weekly day of the month, month or day of Alternatively, you may use a step-
schedule the process so that it /etc/crontab the week it is, as the user root. So type hour definition:
runs every four hours or so. Any /usr/bin/run-parts run-parts /etc/cron.daily runs daily * 0-20/4 * * * root rsync -avz
advice is welcome – my data Looking at the code, /usr/bin/ at 4:02. myserver:var/www /backup
needs you! run-parts is just a script that makes Moving on to the next line, 22 4 * This is an instruction to go
From the LXF forums those intervals work with crond just * 0 root run-parts /etc/cron. through the integers from 0 to 20,
Well, we know that by adding a script in the first four weekly, we can tell already that run- incrementing the counter by four

A scheduling tasks in Linux


is possible, because, as
most of us have found to
our cost, the /tmp directory
automagically deletes files with
directories in the listing above. run-
parts does not in any way make
scheduling possible, which leaves us
with /etc/crontab.
[root@carve ~]# cat /etc/crontab
parts /etc/cron.weekly will run as
the user root at 4:22 no matter what
day of the month or month it is, at
day 0 of the week. Or, translated,
run-parts /etc/cron.weekly will
each time, which would equate to
exactly the hour definition above.
Alternatively, you could use an
‘under-privileged’ or non-root
crontab, which can be done with
tmpwatch at defined intervals – SHELL=/bin/bash run at 4:22 on Sunday. the userspace tool crontab. HH
often before their usefulness has PATH=/sbin:/bin:/usr/sbin:/usr/bin A description of the values you
expired! So let’s explore how that is MAILTO=root can use in each field is available in
implemented. First we’ll find the HOME=/ section five of the crontab manual
tmpwatch configuration file: # run-parts pages. You should read it, as some
[root@carve ~]# rpm -ql tmpwatch 01 * * * * root run-parts /etc/cron. fields start with 0, others with 1.
/etc/cron.daily/tmpwatch hourly Now, let’s set up a
/usr/sbin/tmpwatch 02 4 * * * root run-parts /etc/cron. cron job for you. You
/usr/share/man/man8/ daily said you want the job to
tmpwatch.8.gz 22 4 * * 0 root run-parts /etc/cron. be run every four
It looks like the only file in /etc is weekly hours no matter
there under cron.daily. Let’s see 42 4 1 * * root run-parts /etc/cron. what day or
what’s in there: monthly month it is.
[root@carve ~]# cat /etc/cron.daily/ The listing now makes it obvious Fortunately,
tmpwatch that our answer is in those crontab’s
/usr/sbin/tmpwatch -x /tmp/.X11- encrypted-looking lines just after the hour field
unix -x /tmp/.XIM-unix -x /tmp/ variable assignments. Let’s inspect
font-unix -x /tmp/.ICE-unix -x / the first line: 01 * * * * root run-
tmp/.Test-unix 240 /tmp parts /etc/cron.hourly. A quick
/usr/sbin/tmpwatch 720 /var/tmp rummage in the manual pages
for d in /var/{cache/man,catman}/ provides us with an explanation. The
{cat?,X11R6/cat?,local/cat?}; do first entry on the line is the hour at
if [ -d “$d” ]; then which a command should be run,
/usr/sbin/tmpwatch -f 720 $d the second entry is the minute, the
fi third is the day of the month, the
done fourth is the month and the fifth is
If you checked the man pages for the day of the week. Any interval can
tmpwatch, you’d find no switches be defined providing we use the *
for setting a time or an interval for character to tell cron (the running
running it, so obviously something daemon that’s configured via /etc/
else is driving this program every so crontab) that it should run the
often. Let’s query the rpm database command we want at every iteration
for the owner of the parent directory: of the field type – in other words,
[root@carve ~]# rpm -qf /etc/cron. every second or every day.
daily/ The sixth entry (root) is the user
crontabs-1.10-7 under which the command should

www.linuxformat.co.uk LXF70 SEPTEMBER 2005 105

LXF70.answr 105 11/7/05 2:42:50 pm


ANSWERS

>> only’. If you click with your


right mouse button on an
to a PC (172.16.2.120) on
the subnet via the
the following three commands as su:
iptables -t nat -A POSTROUTING -o
icon, the ‘read only’ firewall, thus: ppp0 -j MASQUERADE
attribute under item iptables -A FORWARD -p echo 1 > /proc/sys/net/ipv4/ip_
‘device’ can be un-checked. tcp -s 0/0 -d 172.16.2.120 forward
After this, the partition can --dport 22 -j DROP route add default ppp0
be mounted ‘read write’ However, this rule is What files do I need to edit to
(for already mounted still allowing other PCs on put those commands into so I don’t
partitions, first click on the subnet to connect to have to manually do this each time?
Unmount). the PC. I’ve also tried the Once you add the iptables
CAUTION: writing to
NTFS partitions can lead to
data loss, since Linux does
not really support this
filesystem! However, DOS
following rules, and even
gone to the point of
specifying an individual
source PC on the subnet,
dropping all SSH traffic to
A rule, you can do /etc/init.d/
iptables save, which will
save your iptables
configuration for the next reboot.
IP Forwarding is enabled through /etc/
and FAT32 filesystems are the destination PC and sysctl.conf, where you can add a line
safe for write access. In the changing the FORWARD policy ‘net.ipv4.ip_forward = 1’ to set up IP
shell, the command mount to DROP. Forwarding next time you reboot.
PHOTO COURTESY LACIE

-o remount,rw /mnt/ iptables -A FORWARD -p tcp -s For the default route through ppp0,
<partition name> can 172.16.2.0/24 -d 172.16.2.120 -- you should be able to reconfigure your
allow already-mounted file dport 22 -j DROP dialer to automatically add a default
systems to be made iptables -A FORWARD -p tcp - route when the modem connects. It’s
writeable. DC s172.16.2.220 -d 172.16.2.120 -- difficult to stop it setting a default route,
dport 22 -j DROP so checking the logs to establish why
Writer’s block iptables -A FORWARD -p tcp -d one is not being added may be a good

Q
I am using a USB2 160GB 172.16.2.120 --dport 22 place to begin. DC LXF
Lacie external hard drive, the device sdb1 to /media/sdb1. -j DROP
formatted as a primary I am using Kubuntu with KDE 3.4 iptables -P FORWARD DROP
FAT32 partition. Mike Smith Yet I can still contact the
Submission advice
Whenever the disk is connected, an You can try passing the destination PC from another PC on
unmounted icon is placed on the
desktop, which mounts just fine
when I click on it. Unfortunately, I
cannot write to it. I checked the
relevant permissions and as far as I
A User option to fstab, which
will allow the disk to be
mounted by a non-root user
so that the disk can be written to and
read by the user who mounted it.
the subnet. I’ve read and read and
read till I’m blue in the face, and
can’t for the life of me figure out
why this isn’t working.
Missy
can see there’s no reason why I Alternatively, you can pass uid= and As you are SSH-ing
shouldn’t be able to write to it –
but it still denies me write access.
Ideally I would like to just put the
entry for this disk into my /etc/fstab
file. I tried to do that with
gid= statements to set the disk’s
default UID/GID, although with certain
filesystem types, such as ext3 or VFAT,
this won’t make any difference. DC
A between two systems on a
local network, you won’t
route across your firewall for
this access. Thus, the packets will
never be inspected by the firewall. If
We are happy to answer all sorts of
Linux-related questions. If we don’t
/dev/sdb1 /mnt/LACIE vfat 0 0 Severed connection you want to block SSH access, you will know the answer, we’ll find out for

Q
I have even tried it with I’m configuring a firewall have to set a firewall up on the SSH you! But in order for us to give you the
fmask=775 and mask=775 but it that’s got an eth0 link to server to block traffic itself. best service, it helps a lot if you read
still won’t let me write. Also when I the internet and an eth1 Another option if you have a spare the following submission advice.

have mounted sdb1 to /mnt/LACIE link to an internal subnet NIC is to split the network into two ● Please be sure to include any relevant
the automated USB icon gets (172.16.2.0). I’ve put in the sections and bridge the two using the details of your system. “I can't get X to
work” doesn't really mean anything to us if
confused because it wants to mount following rule to stop all SSH access bridge-utils package in Linux. You will
we don’t know things like what version of
then be able to perform packet X you are trying to run or what hardware
filtering on the firewall for traffic that you are running on.
goes between the two LAN segments,
● Be specific about your problem. Things like
even though the packets are not “it doesn't work” or “I get an error” aren’t
actually routed. Lots of information on all that helpful. In what way does
this configuration can be found at something not work? What were you
http://bridge.sf.net. DC expecting to happen? What does the error
message actually say?

Again and again and… ● Please remember that the people who
write this magazine are NOT the authors

Q
I have a two computer
or developers of Linux, any particular
network at home, one package or distro. Sometimes the people
running Windows XP and responsible for software have more
the other Mandrake 10.1. information available on websites etc. Try
The Mandrake box acts as the server reading the documentation!

for the windows machine and shares We will try to answer all questions. If we don't
the internet connection. answer yours specifically, you'll probably find
My trouble is that every time the we've answered one just like it. We can't
Iptables can be used to configure either IP packet filtering on a router or
really reply to all your questions.
a bridge to secure a LAN or public network. internet is restarted I have to enter

106 LXF70 SEPTEMBER 2005 www.linuxformat.co.uk

LXF70.answr 106 11/7/05 2:42:55 pm


LXF BOUNTY

Solve this puzzle and


News of a new challenge for you, and there’s more to it than meets the eye.

4 3
S 1 6
udoku is the craze
that’s sweeping the

7
world – as we write

6 1
there are batteries
of statisticians
being employed to

8
work out just how many

7 5
man-hours are being lost
compiling statistics about people
playing Sudoku when they
should be working.
Usually Linux Format is the
first to turn and run at the sight
of a new trend, but this one’s got

8 2 4
5 3 6
numbers in it and looks slightly
geeky, so we’re hooked. Welcome,

1 9 7
then, to a special LXF Hyper
Mega Sudoku!

8 9
On the right is a diverting
puzzle for you but, this being
Linux Format, we’re not going to
just give you cash for writing a few
numbers in some squares. That’s a 3
mug’s game – why go to all that
effort when you could write a
complex algorithm that could not
only solve problems, but generate 9 7 5
9 8
them too?

2
That’s right: we don’t want you to
solve the puzzle, we want you to write

7 9
some software to solve the puzzle.

The challenge
There are already a small number of
Sudoku solvers available, but quite
1 3
frankly we aren’t greatly impressed.
Some are better than others, but we
demand that open source does better
and believe that LXF readers can ■ Create a standard file format,
deliver a classier solution. preferably XML- or text-based, for
MORE TO COME
What do we want? We want you to storing and exchanging puzzles. This is the first of our programming maybe, just maybe, something that
write a nice, flashy, friendly GUI-driven ■ Solve puzzles. challenges. We want to help make Linux should be a lot better documented?
app that can do the following: ■ Generate new puzzles. better, and we need you to help us do We may need to have different rules
■ Display Sudoku puzzles of varying ■ Make sure solutions are unique. that! Is there some feature that your and schemes for different projects, but
favourite text editor should have but it’s all open to debate. Why not join the
formats – 3x3, 4x4 and 5x5 minimum Your solution must also be
doesn’t? Some file format that should discussion on our website at
(see What On Earth Is Sudoku? box, released under an open source
be supported by your audio player, or www.linuxformat.co.uk/bounty?
above right). licence, preferably under the GPL, but

112 LXF70 SEPTEMBER 2005 www.linuxformat.co.uk

LXF70.sudoku 112 11/7/05 1:46:15 pm


LXF BOUNTY

win a share of £500!


WHAT ON EARTH IS SUDOKU?
Originating from the US, a Sudoku is just For larger puzzles, the range of
a number puzzle made up of a standard numbers and dimensions of the grid
9x9 standard grid, which is made up in need to increase. For example, a
turn of nine smaller grids of 3x3. US 16x16 grid might need to use 0-9 and
readers might know it as Number Place. then A-F to give you 16 characters.
The rules are simple – you must add a There is plenty more information
number from 1 to 9 to each empty on Suduko available. Just pick up any
square until the grid is full. No number daily newspaper in the UK, for a
can be repeated in any one line, any start. Alternatively try visiting a few
column or any small 3x3 grid. Sudoku resources, such as
Given a handful of numbers to start http://en.wikipedia.org/wiki/sudoku
with, it should be possible to complete and www.sudoku.org.uk.
the grid, and if the puzzle has been You could also ask for clues and
compiled correctly, there will be only advice at the LXF bounty forum,
one solution. www.linuxformat.co.uk/bounty.

HOW TO ENTER
Send your program to lxf.competitions@futurenet.co.uk by September 30
2005. Entrants will be assumed to have read and accepted the following
rules and conditions.

THE RULES
1. The challenge is open to anyone of any age and nationality, other than employees of
Future Publishing Ltd and their families.
2. You may submit as many solutions as you like.
3. Proof of email sending is not proof of delivery. Incomplete entries may be treated as invalid.
4. Winning entries will be chosen by judges after September 30 2005. A list of winners will be
published on www.linuxformat.co.uk/bounty. The list may also be obtained by written request
from: The Editor, Linux Format, 30 Monmouth Street, Bath BA1 2BW.
5. The judges’ decision is final and no correspondence may be entered into.
6. No purchase is necessary.
7. Entrants must be able to claim the work as their own.
8. LXF intends to publish the winning entries in the magazine, on the coverdisc and online.

any licence that complies with the priceless, but if you need a little more
Open Source Initiative will do. We’ll incentive there is also a prize pool of
award bonus points for solutions that: £500, to be divided into £300 for the
■ Look good. winning entry, £150 for second place
■ Are cross-platform. and £50 for third.
■ Solve puzzles quickly. This is the first of our programming
■ Solve puzzles elegantly (not just challenges: we hope to introduce
brute force). more LXF bounties in the months to
■ Can grade puzzles (such as easy, come. The deadline for entries to this
medium and hard). challenge is September 30 – all code
■ Are easy to install and build. must be submitted to us by then.
Good luck!
The prize Oh, and by the way, Nick
The admiration you’ll win from the completed the puzzle on this page in
Linux community for completing the around ten minutes. If you can beat
Sudoku challenge is of course this, let the forum know! LXF

www.linuxformat.co.uk LXF70 SEPTEMBER 2005 113

LXF70.sudoku 113 11/7/05 1:46:23 pm

You might also like