Professional Documents
Culture Documents
Linux Format - 2005-09
Linux Format - 2005-09
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 ■
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
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.
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
debut in Karlsruhe
David Cartwright is an IT
consultant who specialises
in providing Linux Systems
and solutions.
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
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
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.
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
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.
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
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
FIREWALL
HIGH-PERFORMANCE COMPILER
SciMark2 benchmark results on the Pentium 4 system SciMark2 benchmark results on the AMD Athlon XP system
running PCLinuxOS Preview 9. running Debian Woody.
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
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
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
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
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
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
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
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
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
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
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 ✔
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.
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.
PASSWORD MANAGER
QPaMaT
■ VERSION 0.4.3 ■ WEB http://qpamat.berlios.de
TEXT READER
Lukutoukka
■ VERSION 0.2 ■ WEB www.helsinki.fi/~pakaste/lukutoukka
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.
KXDocker
■ VERSION 0.33 ■ WEB www.xiaprojects.com/www/prodotti/kxdocker/main.php
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
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
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?
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.
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.
>> 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.
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.
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
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,
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
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
Ja
Ja
Ja
Ja
Ja
Ja
Ja
Ja
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.
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
The revamped task system that appeared with Sarge will be expanded
with more tasks in Etch to further speed up installation.
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
>> 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.
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.
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
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
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
>
>
>
>
>
>
>
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
>
>
>
>
>
>
>
>
>
>
>
>
>
>
Data transmission
Data transmission
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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).
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
Le
Comeback
THE LXF
King
INTERVIEW
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.
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.”
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
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
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.
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.
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.
THE PROJECT
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.
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
You might feel inspired to use Emacs by this month’s the solution is to click on Options > Save Options. This will
■ 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.
1 2
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
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’));
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
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.
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
SCRIPT PROGRAMMING
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
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.
}
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>
>> 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
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?
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.
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.
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
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.
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
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
WIN!
www.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
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
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
-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
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
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