Plaintext
The magazine that gives back to the Free Software community
April 2014
PRIVACY RASPBERRY PI YE OLDE CODE 114 PAGES
PGP BREWPI LOVELACE OF NEURAL
Stop President Obama Brew fine ales with free Tonight we’re going
ENHANCEMENT!
from reading your emails software. Mmm, beer… to program like it’s 1843
THE BEST
FREE
SOFTWARE
2014
Discover the 51 best
things about free
software right now with
our ultimate roundup
32+ PAGES OF TUTORIALS
PYTHON Pipe live data into your website
April 2014 £5.99 Printed in the UK
SYSADMIN Secrets from the server room revealed
BITCOIN Get your head around the gold bullion of the internet
REVIEW DON’T BE EVIL
MAGEIA 4 OWNCLOUD 6
The KDE 4 desktop is Free yourself from
now a beautiful swan Google’s tentacles
WELCOME
Friends, geeks, hackers
The April issue
Linux Voice is different.
Linux Voice is special.
Here’s why… GRAHAM MORRISON
A free software advocate
1 At the end of each financial and writer since the late
year we’ll give 50% of our profits 1990s, Graham is a lapsed
to a selection of organisations KDE contributor and author
that support free software, of the Meeq MIDI step
decided by a vote among our sequencer.
readers (that’s you).
A
s I write this, it’s a sunny Saturday morning and I’m sitting
2 No later than nine months after in the kitchen. The issue is 90% finished and we’ve got eight
first publicaton, we will relicense hours until the PDFs need to be at the printers. We’re used
all of our content under the to crunch times like this. Stacey is adding the barcode to the cover.
Creative Commons CC-BY-SA Andrew is working his magic. Mike is organising our online store
licence, so that old content can while Ben polishes the new website. It has been sometimes difficult,
still be useful, and can live on even sometimes challenging but always absolutely wonderful. We’ve
after the magazine has come off created the magazine we always wanted to create, which we hope
the shelves. best represents the Linux and Free Software communities.
Which is why there’s no better place to start than with a
3 We’re a small company, so we celebration of the very best that Free Software has to offer. For
don’t have a board of directors or our cover feature, (p38), we chose 51 of the most awesome
a bunch of shareholders in the City projects, but we could have chosen hundreds. The extent of SUBSCRIBE
of London to keep happy. The only
people that matter to us are the
open source penetration is staggering, and it’s only going to
become increasingly influential. The next few years will be the ON PAGE 36
readers (you again). most exciting and revolutionary yet – all of us at Linux Voice
can’t wait to start making our own modest contribution.
Graham Morrison
Editor, Linux Voice
THE LINUX VOICE TEAM
Editor Graham Morrison
graham@linuxvoice.com
Deputy editor Andrew Gregory
What’s hot in LV#001
andrew@linuxvoice.com
Technical editor Ben Everard
ben@linuxvoice.com
Editor at large Mike Saunders
mike@linuxvoice.com
Malign puppetmaster Nick Veitch
nick@linuxvoice.com
Creative director Stacey Black
stacey@linuxvoice.com
Editorial contributors: ANDREW GREGORY BEN EVERARD MIKE SAUNDERS
Mark Crutch, Liam Dawe, She doesn’t get the credit she For me, it’s the delicious fusion of FOSDEM: so many passionate,
Juliet Kemp, John Lane,
deserves, so it’s an honour to have hardware hacking, the Raspbery inventive and inspiring geeks
Vincent Mealing, Simon Phipps,
Jonathan Roberts, a tutorial on Ada Lovelace’s work Pi and quiet inebriation promised under one roof recharged my
Mayank Sharma with the Analytical Engine. p88 by Graham’s BrewPi guide. p76 passion for Free Software. p30
www.linuxvoice.com 3
CONTENTS
April LV001
We are all in the gutter, but some of us are looking at the stars
38
SUBSCRIBE
ON PAGE 36
Discover the 51
best things about
Free Software
right now.
50 REGULARS
06 News
To paraphrase Marvin Gaye:
what’s going on?
BITCOIN 08 Distrohopper
The latest comings and
going on planet distro.
10 Gaming
What in the name of Yes! Linux is a serious
gaming platform, at last!
Zeus is going on with 12 Speak your brains
this unregulated Because ‘letters’ is an
archaic term for this bit.
digital currency? 16 LV on tour
We go where others fear to
tread. Its name? Blackpool.
30 Group test
Find the best encryption
tool for you.
46 Interview
Florian Effenberger, on
forking OpenOffice.
106 Masterclass
This issue: say hello to
Vim and Firefox.
112 On your DVD
What’s inside your free
monster 8GB disc.
56
LINUX VOICE 60
FAQ Wayland: what 62 SYSADMIN 114 My Linux desktop
The mad journey is it, and why should Jon Roberts on the The bodger of Crunchbang
show us his man cave.
we’ve been on so far. we even care? brave new init world.
4 www.linuxvoice.com
REVIEWS
TUTORIALS
74 76
22 Mageia 4 If you’re a desktop
magpie, constantly distracted
by new shiny things, this user-
PGP: Keep your BrewPi: Brew beer at friendly Linux flavour is for you.
messages secure home with a Raspberry Pi
Encrypt your emails and reclaim Control and monitor the
a little bit of privacy from Big brewing process with the help
Brother/the NSA/GCHQ. of a handy Linux-powered kit.
84 88
24 LibreOffice 4.2 Better than
Microsoft Office? You bet your
life it is – the #1 office suite for
Linux is more than just a clone.
25 Lightworks Pro 11.5 Video
editing on Linux just got a hell
of a lot better. Now prepare for
OwnCloud: Say goodbye Old code: Ada Lovelace your close-up, Clooney.
to Google Docs & Gmail & the Analytical Engine 26 FreeBSD 10 We’ve always had
a soft spot for this stable Unix
Set up your own cloud services Travel back to the dawn of time derivative. You see, Linux is not
and get the convenience of the to see how programming began the only fruit…
cloud without the intrusive ads. – then try it for yourself.
92 96
Code 101:
100
Euclid’s
algorithm
Learn Python from
the Ancient Greeks.
27 Google Nexus 5 We’ve lived
Arch Linux: Python: Bash: Fun
102
with the Nexus 5 for three
Installation and Build dynamic with regular months – is it worth paying
300 Imperial Credits for?
setup made easy web pages expressions
Stay effortlessly* up Pipe live data into Trust us: you can
28 Books From the Arduino to
OCaml to feudalism, there’s
to date. *Some effort required your website. enjoy using Grep. something for everyone in the
Linux Voice library.
www.linuxvoice.com 5
ANALYSIS
NEWSANALYSIS
The Linux Voice view on what’s going on in the world of Free Software.
Opinion
“…and the filters don’t work/
they just make it worse…”* *sincere apologies to The Verve
Web filters to protect children from dodgy online content don’t work. Here’s why.
Simon Phipps decide for us all? The answer in most cases supplier may actually prohibit them from
is president of the is “nobody knows”, since the ISPs are largely helping me.
Open Source Initiative buying the blocking facility from third party Most content providers might not even
and a board member suppliers rather than building it themselves. think to check anyway, even if there were a
of the Open Rights
Statements by filtering advocates take it as way to do so. Recently, the jQuery website
Group and of Open
Source for America. read that there’s a consensus on what’s bad was added to the block list for UK ISP Sky
are deceptive. after the domain was mistakenly listed in the
“malware and phishing” category. This
I’m sorry Dave, I can’t do that unexpectedly broke many websites, since
The government proposes a whitelist of over three-quarters of the top 10,000
T
he UK government has pressured sites that should never be blocked, but this websites use jquery.com-hosted
ISPs into applying content filters to approach is flawed too; partly because their components. A church website in Sheffield
their customers’ connections, in the vision of which sites should be whitelisted was blocked; my own company website was
name of protecting children from unsuitable only includes obvious, politically appealing blocked. The robots that do the ranking can
content. During 2014, ISPs will be cases like child welfare charities, omitting to take potshots at pretty much anything, and
approaching their customers and trying to mention harder cases such as mutual- only the customers of the ISP involved could
persuade them to turn on filtering. But this is support groups, political comment and ever know.
a mistaken approach arising from magical satire and completely ignoring the sort of
thinking – “this thing should exist so it must free speech cases that are politically Think of the children!
be possible”. Content filters can’t work, for unappealing to the government. Indeed, a Meanwhile, parents are lulled into a false
several reasons: comprehensive whitelist is probably sense of security. The web is something of a
For the most part they can be avoided. impossible, because the internet, like space, mystery to many, and the assurance that
Techniques such as using a freely-available is vastly, hugely, mindbogglingly big. “parental control filters” are keeping their
VPN tool such as TunnelBear, or switching Even if a whitelist could work, most children safe may well reduce the urgency of
to non-ISP DNS enable users to effortlessly content providers won’t know they should understanding how to supervise children on
route round filters. As a consequence, be on it as blocking is invisible to them. the web. The correct path is sitting with
relying on filters to do your parenting for you Since the filter service is applied by ISPs to children, assisting their use of technology,
is foolish. Not only are they no substitute for their customers’ connections as part of the explaining how to decide who to trust,
parental oversight and care, they inculcate a service, they rely on customers raising the explaining when to ask for help or
careless reliance. alert on overblocking. As a web page permission, applying discipline wisely.
They attempt to make objective a task provider, I have no way to know whether a If it were possible to magically determine
which is subjective. For example, some given ISP is blocking my site, and when I the suitability of any random website for any
people will regard websites promoting gay eventually find out there’s no deterministic random web user, and if filtering could be
rights or giving information about abortion way to get it fixed since neither the ISP nor made uncircumventable without destroying
as unsuitable, while others will treat both their third-party provider have any duty to the utility of the internet, maybe it would be
topics as essential resources. Who gets to help me; in fact, the ISP’s contract with their OK to have a censorship switch that parents
could flip. But none of that is possible, and
the facilities we’re being sold will do more
“The government proposes a whitelist of sites that harm than good. You can help; check out
should never be blocked, but this approach is flawed.” blocked.org.uk. That will help practically,
and also fuel the political battle.
6 www.linuxvoice.com
ANALYSIS
SUSE • Firefox 27 • Valve • Tizen • Developers • OpenSSH • Chakra Linux • Kernel
CATCHUP Summarised: the nine biggest news
stories from the last month
SUSE announces live kernel-patching system
1 Imagine being able to patch your kernel without having to reboot. And imagine the
staggering uptimes you’d be able to achieve… A few methods have been developed to
do this, but they have never made it into the mainstream kernel. Now the SUSE team
has announced kGraft, with a first release due in March. http://tinyurl.com/susekgraft.
Firefox 27 released
2 Given the break-neck pace of development in Firefox, it’s hard to keep track of all the new features. Firefox 27 enables
you to run more than one service at a time with its Social API (so you can get notifications from multiple sites), and also
enables support for TLS 1.1 and 1.2 by default. SPDY 3.1 is included too.
Valve offers free games to Debian developers
3 SteamOS, Valve’s gaming platform based on Debian, could massively shake up the computer games market. Users will
be able to play Valve’s ever-growing range of titles without having to even boot Windows. A healthy relationship between
Debian and SteamOS is important, so Valve is now offering free subscriptions to Debian developers.
First Tizen smartphone leaked
4 We’ve seen a bunch of Linux-based mobile platforms come and go – Maemo, Moblin and Meego – and now we have
Tizen. The Samsung ZEQ 9000 will be the first phone to run this operating system, sporting a 4.8-inch display and a
2.3GHz processor. Physically, the phone looks a lot like the current Galaxy range; it’s due for launch later in the year.
80% of kernel developers are paid
5 Every year the Linux Foundation tracks changes to the Linux kernel source tree, and determines how much code is being
contributed by commercial companies. Newly released stats show that over 80% of developers are being paid to work
on the kernel, with Red Hat, Intel and Texas Instruments the three biggest contributors.
OpenSSH 6.5 released
6 You’d think OpenSSH is secure enough already, what with it being
a product from the OpenBSD camp, but given the NSA spying
revelations you can’t be paranoid enough. Version 6.5 includes new
cyphers and key types, to reduce even further the chance of someone
peeking at your remote login sessions.
Chakra 2014.02 available
7 With most distros you upgrade once or twice a year and get a bundle of new stuff. There are also rolling-release distros
such as Arch, which give you a constant stream of new software. Chakra uses a “half-rolling release” model: the base
system is updated only after extensive testing, whereas new desktop apps flow in all the time. www.chakra-project.org
Kernel 3.13 brings new packet filter
8 One of the biggest new features in kernel 3.13 is nftables, the successor to iptables. This is a “packet classification
framework” – ie, a system for choosing where network packets go, as used in routers and firewalls. Nftables compiles
rules down to pseudo-bytecode, and promises to make life easier for administrators thanks to a simpler syntax.
2014: the year of code
9 After more or less being shamed into action by the efforts of Code Club, Young Rewired State and the Raspberry Pi, the
UK government has launched something called the Year of Code, which is supposed to encourage more people to learn
to program. According to the website, 1 in 6 adults lack digital skills, though what this actually means is anyone’s guess.
www.linuxvoice.com 7
DISTROHOPPER
DISTROHOPPER
We’ve tapped GCHQ’s communications to find out what’s going on in distro land.
The end of the road for Pear OS
This slick desktop OS takes its final bow. Or does it?
P
ear OS never really hit the big time,
but it still managed to court more
than it’s fair share of controversy.
Fans adored its slick good looks and
ease-of-use (both heavily influenced by
Apple’s OS X), while critics pointed out that it
was little more than a tweaked version of
ElementaryOS with an icon set that looked
suspiciously similar to Apple’s.
Late January, Pear OS disappeared. The
website switched to a holding page saying
that a “very large company” had bought Pear
OS, and that its future was in the hands of
its new owner. The downloads were taken
offline, and anyone with data stored on the
Pear OS cloud servers had 10 days to
recover it before it was deleted. By the time Pear Linux faced accusations that it wasn’t sharing its source code, as required under the GPL.
you read this, more may have been revealed
at http://pearlinux.fr. released until after Ubuntu 14.04 comes out but still has a similar look and feel. Not only
About a week after Pear’s mysterious in April. In the mean time, the Clementine that, but it’s a much better open-source
disappearance, Clementine OS appeared at project is hosting the Pear OS ISO images, citizen. Not only does it they produce its own
www.clementineos.hj.cx promising to though we wouldn’t recommend people desktop environment, but it’s also helping in
continue PearOS. It’s not clear exactly how install a distro that won’t be supported. the development of the Shotwell photo
they’ll do this, or if they have access to Pear’s For people now at a loss with the passing manager. Elementary OS also has a
source code that others haven’t been able to of Pear OS, or who like the screenshot, we substantial development team, and doesn’t
get. It’ll be a while before we find out though, humbly suggest you take a look at just rely on a single person, so its unlikely to
since the first version isn’t scheduled to be Elementary OS. It’s less Apple-like than Pear, disappear overnight.
STEAMOS AND THE COMMUNITY
Valve’s gaming distribution has dominated the news In further Steam news, Valve has provided all PC game modder community, which shares a
recently, and we won’t rehash everything here. Debian developers with free access to all Steam tinkerer philosophy with the open source and free
Instead, we’re going to talk about some smaller games. Debian is known for its strong adherence to software community.
aspect of development. The original installer was a the principles of free software, so it’s not clear how
bit of a pain to use and required UEFI. This wasn’t a many of the developers will take up this offer of
huge problem, because it was only a beta release commercial software, but we think it’s a nice
aimed at experts. gesture either way.
However, as it’s built on Linux, the whole
platform is open for tweaking. A group of users How free is Valve?
including directhex and ecliptik took to github to Valve is a relative newcomer to the Linux world, and
create a new version of the OS with support for its background in proprietary software has led some
non-UEFI devices, DVD installing, and other basic people to question how well they’ll fit into the open
features. They called their project ‘Ye Olde source ecosystem. It’s too early to tell exactly, but
SteamOSe’. Valve has now pulled these the early signs are about as favourable as they can
improvements into a new version of Steam OS, be for a proprietary software company. It’s worth There are 302 games available for SteamOS,
making it easier to get up and running. remembering that Valve’s history lies firmly in the and it hasn’t even made it out of Beta yet.
8 www.linuxvoice.com
DISTROHOPPER
System Rescue CD & Caine
Not a lot of people know about these super rescue distros.
H
ardware failures are always difficult, The first of these is pretty much the
but they’re a lot less difficult now standard in rescue discs, but the latter has
than they were a few years ago, some interesting uses. Caine is designed for
thanks to the advent of live distros. Almost computer forensics -- think CSI but with
every distro now comes with a live version computers. There’s a large cross over
that can be put into use should your hard between this and extracting information
disk fail, or some other calamity befall your from a breaking system. While System
system. However, there are a few Linuxes Rescue CD remains our favourite for most
that are specially designed to help in this repair jobs, Caine comes into its own when
case, and two of the more popular got an you’re more interested in pulling data off a It’s worth getting to know your way around a
update earlier this year: System Rescue CD system than repairing it. It’s also got some rescue distro before you have a system failure,
and Caine. useful tools for investigating phones. so you’ll know what to do when things go awry.
Gobo: rethinking the file structure OPENBSD AND CASH
Asking ‘How much money does it take to create
Everything you know about the Linux filesystem is wrong. a distro?’ is a bit like asking ‘how long is a piece
T
of string?’ Both can be as little or as long as
he Linux filesystem is more or less /Depot, /Files, /Mount, /Programs, /System you like. If you really wanted, you could create
the same in just about every distro. and /Users. Perhaps /Programs is the best a new distro based on something like Ubuntu
or Fedora in a weekend with no budget, but
This means you can switch between example of how it differs. It doesn’t use a it probably wouldn’t add much to the already
them and still know where to find things. package database for package existing sea of distros.
You’ll even find your way around BSDs and management because it doesn’t need one. On the other hand, the OpenBSD foundation
Unixes without any major problems. Is this The file hierarchy holds all the information. is hoping to raise US$150,000 this year (that’s
standardisation holding back the evolution For example, the program bash is held in about £91,000 in old Imperial money). $20,000
is needed just for electricity in the build farm.
of the system though? Does it still make /Programs/Bash/<version-number>/ where This all has to come from donations since
sense to split bits of programs up into /bin, there’s a separate folder for each installed the foundation doesn’t have any commercial
/etc and /usr/share? Is /opt really useful? Is version. /Programs/Bash/Current is a link to interests. It looked like it may be the end of
/var still relevant with modern hardware? the folder containing the latest version. the road for this security-centered Unix when,
The answer to all questions may well be yes, Packages, then, are just archives that can be late last year, a campaign to raise funds for
the power bill failed. Early this year, though,
but can you really be sure without trying out unpacked into this structure. Alternatively, a final donation drive caught the attention
some alternatives? The answer to that is any software you compile yourself can of the internet and $100,000 flowed into the
definitely no. simply be copied into the correct place. foundations coffers in just the first three
Gobo Linux is a distro that’s thrown out The project has just sprung back to life, weeks of the 2014 with donations from Google,
the old filesystem paradigm and invented its and is working on its first new version since Facebook and the MPEx Bitcoin Securities
Exchange amongst others.
own. The root directory has six folders: 2008. We applaud this bold experiment! This is good news not just for BSDers, as
OpenBSD projects – most notably OpenSSH –
are included in most Linuxes. The work by Theo
de Raadt and the rest of the team help keep us
all safe regardless of the kernel we use.
GoboLinux wouldn’t
start on our hardware, OpenBSD’s may not be pretty, but it is
but ran fine in Qemu. secure (and other desktops are available).
www.linuxvoice.com 9
GAMING ON LINUX
GAMING ON LINUX
The tastiest brain candy to relax those tired neurons
LINUX FOR THE WIN!
0 A.D.
Battle in real time strategy like an Egyptian.
L
ike an overdue
Christmas present the
team at Wildfire Games
has released the fifteenth alpha
version of the epic open-source
real time strategy game 0 A.D.
The latest alpha version
Liam Dawes is the brains behind
www.gamingonlinux.com, the home added some really essential
of Linux gaming on the interweb. features that were previously
missing, including a multi- A new army is
L
inux has long been a viable player lobby, so it should now readying for battle!
platform for gaming, but it is be a total cinch to find people
only now that mainstream
to play online.
gamers are starting to sit up and take
notice. Despite what many people In addition to being easy to 0 A.D. aims to be of AAA this strategy has paid off. They
may think, the thanks for this play online there is yet another production quality, which have run several successful
shouldn’t solely go to Valve for using playable civilisation – the shows in abundance. It was crowdfunding, and are now
Linux as the basis of its Steam OS: Ptolemaic Egyptians – with originally closed source, but the using it to fund programmers
there’s a long history of gaming on
unique units and gameplay team opened it up with the aim to make 0 A.D. even better!
the Linux platform.
Id Software was one of the first features included for them. of gaining new members, and http://play0ad.com
major names to bring its games to
our little platform, starting with Doom
and ending with its latest Linux port
of Enemy Territory: Quake Wars. Id’s
involvement doesn’t end there though
– it also open sourced many of its
THE BATTLE FOR WESNOTH
game engines, which have given rise A seriously slick open-source turn-based strategy.
to some of Linux’s best-known first
C
person shooter, such as Xonotic. heering the cold,
dark winter months
Not just Valve
The flow of indie games coming to considerably, the team
Linux prompted a leading game store behind The Battle for Wesnoth
to open up to Linux and push out the have released a new version
Desura Linux client, which was itself of this well known turn-based
open sourced enable others from the
strategy adventure.
community to help out; even though
licensing issues meant that the They have further tweaked
number of contributors never really the UI of the game to make
took off, this was progress. it more playable, including
And we now have Steam, the an overhaul of the mouse
behemoth of PC gaming. Who would
interaction in the game, and the
have thought that Valve would bring It’s like Game of Thrones
its AAA games to Linux? Khalifate faction, which doesn’t without Sean Bean.
My question to you, readers, is: will use magic, is now playable in
Linux ever overtake Apple to become more multi-player areas too.
the second biggest desktop operating Battle for Wesnoth has some been around a few years now, It’s currently Stable, meaning
system? With Steam Machines using
great single-player gameplay but that doesn’t mean it hasn’t game-breaking bugs should be
the Debian Linux based SteamOS it
could finally be a possibility. alongside online multiplayer aged well! It is updated all the very hard to find, so feel free to
Liam Dawes, gamingonlinux.com too, so you can play your time with new features, tweaks really enjoy this one.
friends across the world. It has and bugfixes to keep it fresh. www.wesnoth.org
10 www.linuxvoice.com
GAMING ON LINUX
METRO: LAST LIGHT ALSO RELEASED…
The most graphically intensive first-person shooter on Linux!
G
raphics cards of a nervous
disposition, look away now: what
we have here is probably the most
demanding, hardware-punishing game
on Linux. You won’t be surprised to learn
that it’s a first-person shooter, from 4A
Games called Metro: Last Light, which
promises to simultaneously cooing with
delight at its prettiness while screaming Boom! Take that slaver scum!
with terror when an enemy jumps across
your screen.
4A Games is a Ukrainian studio, and
Faster Than Light
Faster Than Light has announced a free DLC
Metro: Last Light draws on the the work expansion pack to this infuriating game.
of Russian novelist Dmitry Glukhovsky, Included in this free update are new ship
particularly his novel Metro 2033. Set in layouts, and a brand-new alien race called The
a bleak world that has been ruined by We don’t care if the future’s an apocalyptic Lanius, whose members don’t need oxygen to
wasteland, as long as it looks as nice as this. live. Not only that, but they will suck oxygen
nuclear weapons, the game forces you to
out from any room that they are in. Scary!
rely on your wits as much as brute force, www.ftlgame.com
with limited ammunition forcing players to just yet, it will hopefully only be a matter of
think rather than just run around shooting time now that we have 4A Games bringing
at things. its catalogue to Linux.
While we Linux gamers don’t have the http://store.steampowered.com/ Our hero catching up to his
minions for another fight.
prequel game (also called Metro 2033) app/43160
CORSIX-TH OPENMW
Bullfrog’s classic hospital sim brought Massive open-world RPG engine brings
back to life. Ooh, matron! Skyrim predecessor. Dota 2
Valve has graced us with another great
free-to-play title: Dota 2. A multiplayer online
battle arena (MOBA), Dota 2’s Linux version
includes some pretty nifty features not
available on other platforms, as well as a
pop-up notification when a game is ready to
play – very handy for serial Alt+Tabbers.
http://store.steampowered.com/app/570
Remember Theme Hospital from Bullfrog? The post-Christmas presents haven’t Go red power ball, go!
Well Corsix-TH is an open source engine stopped yet folks! There’s another open
for playing the comedy hospital simulation source game engine with a brand-new
game natively on Linux, and it recently release: this time it’s OpenMW, which
released version 0.3 which further brings us The Elder Scrolls: Morrowind
enhances the engine. RPG. This new version includes probably
While the engine is free, you have to the most important features, including
purchase the game assets from a site combat AI and spell casting, including
such as GOG.com. This is one of the visual effects for magic. Awesomenauts
awesome things about the Linux and Much like Corsix-TH, OpenMW is an There’s an expansion pack to Awesomenauts,
titled Starstorm, which includes new playable
open source community – rather than open-source engine designed to let you
characters, game replays and custom game-
being forgotten, games that we loved run Morrowind on your favourite open modes. This is another MOBA although it’s
when we were younger get revived with source operating system. It’s undergoing far simpler than Dota 2 and plays like a
brand-new features. heavy development and missing some platformer. The community is a little friendlier,
It may be in beta, but Corsix-TH is fully essential features from the original, but it’s due to it being a simpler game to get into.
http://store.steampowered.com/app/204300
playable and extremely fun. well worth keeping an eye on.
https://github.com/CorsixTH https://openmw.org/en
www.linuxvoice.com 11
MAIL
YOUR LETTERS
Got something to say? An idea for a new magazine feature?
Or a great discovery? Email us: letters@linuxvoice.com
LINUX VOICE STAR LETTER ON A ROLL
I have two computers here, one
of which is running Mint. I have
THE FIRST TASTE OF FREEDOM installed every version since
Maya, the LTS release, and having
I remember when I finally community of enthusiasts fears were dispelled and I a separate home partition it has
ditched Windows. At last when something went found that the gamble had been no problem. But, with each
I’d broken free from the XP wrong? Would I cope without paid off. install, I have had to re-download
safety net, but it felt a little the comfort and security of a Then I remembered all the all the added programs from the
bit like OS freefall. Could familiar brand in a new world headaches and issues I used repositories. Not an intuitive task
I really manage without a where things weren’t the to have with Windows which for at least two people I have
corporate-backed product? same and sometimes broke? lead me to this decision in persuaded to try Linux.
Could I genuinely rely on a It didn’t take long before my the first place. If any of the Last year I came across
above sounds strangely SolydXK, ran the KDE version in
familiar territory with your VirtualBox, and was impressed by
latest publishing venture, the way everything was updated
then fear not. You are still every month. On behalf of novice
among friends and we have users, would it be better to have
made this journey together, a rolling release, or stick with an
for the better. eighteen month-ish distribution?
Chris Sandles Richard
Graham says: Well said Chris. Mike says: Novices are better off with
The Linux and Free Software the clearly defined releases, I think.
community may be incredibly Rolling distros are good for living on
passionate and argue a lot, the bleeding edge, but major kernel/X/
Who needs Microsoft for technical support? Linux fans at user but it’s also the most helpful library updates can cause unexpected,
groups help for free (photo credit: http://tinyurl.com/plz7tfp). community I’ve ever known. hard-to-fix breakages.
XFCELLENT
It would be great if your magazine Ben says: Thanks for the feedback
could review a few more Xfce Alvin. You’re right that Xfce doesn’t
distributions. I noticed Xfce often get as much attention as the
gets overlooked in comparison to “big” desktops, but the times are
bigger desktop environments such a-changin’. We’ve seen a large bunch
as Gnome and KDE. of former Gnome fans move to Xfce
I was hoping you guys could after the Gnome 3 redesign, as it
do an a round up of several provides a lot of what Gnome 2 used
Xfce distributions and write a to: a familiar-looking, reliable GTK-
comparison for your readers. based desktop environment. We’ll
Looking forward to your keep an eye on Xfce-based distros;
magazine. I’ll be getting my digital Xubuntu is the most notable, but we
subscription soon. always like to hear of others. If you Xfce has come a very long way since its days as a clunky-looking
Alvin Wilson discover one, let us know! clone of CDE (the Common Desktop Environment).
12 www.linuxvoice.com
MAIL
BANGIN’ CHOONS THE CODE AHEAD
I wonder if readers would like to Just a note on Linux and FOSS
share their favourite songs? I in general. I made the big move
love anything by GNU Kids on about five or six years ago.
the Block, and we should all be Since that time I started coding
grateful for the contribution that again and have really started to
Kernel Parker made to modern enjoy computing again. In short,
music, but I think my all time bests computing is fun again.
are Cliff Richard’s “She’s a I hope that you continue with
/dev/null Woman”, Buddy Holly’s coding tutorials in Linux Voice.
“Wake Up Little SUSE”, Paul They are great for those who have
Young’s “Wherever I Lay my Red Andrew says: All groovy beats, but Stallman can sing too: an itch, but don’t where to start,
Hat” of course, and Phil Collins’ let’s not forget the classic “Stand by www.youtube.com/ and for those of us who have
breathtakingly un-annoying “Su your man(page)”. If anyone can some- watch?v=9sJUDx7iEJw. a favourite language, but don’t
Sudo”. In fact I like any cd. how fit Slackware into a song title, let like change. We get to see how
Owain Clarke us know… the other language is structured,
which means we can then better
read source from other languages.
DISTRO HUNT Do keep up the good work we
have all seen from you in the past.
I’ve been using Ubuntu for quite (bundled monthly updates) may help Bill Palone
some time, installed 13.10, and to avoid the occasional breakage
got quite disappointed. So I had that can afflict other rolling distros. If SolydXK: not well Mike says: Thanks for the feedback Bill.
to look for a new distro. After a anyone else wants to check it out, the known now, but could Hopefully you’ll be glad to see a regular
little searching the net, I found website is www.solydxk.com. be a big distro soon. coding section in Linux Voice, and in
a young KDE distro, based on next month’s cover feature we’ll have
Debian, inspired by Mint Debian programming projects for newbies as
edition, does monthly update- well as experienced hackers.
packs (semi-rolling releases), looks I totally agree that coding makes
great, has the latest and greatest, computing fun, and it’s great that the
comes with Firefox, Thunderbird, Raspberry Pi is encouraging kids in
LibreOffice… I think I found a new schools to learn the art – apart from
home: SolydXK! helping kids out in the job market,
Sofie Struyve programming skills help language,
maths and logical thought. One of my
Mike says: Wow, that’s two mentions next projects is to port MikeOS to the
of this distro in the same letters page! Pi, but given that it’s all written in x86
SolydXK’s relatively conservative assembly language and the Pi works on
approach to the rolling release model an ARM chip, that’ll be a truly epic job…
www.linuxvoice.com 13
MAIL
SATNAV SIGHS
Linux Voice! I’d like to express my
absolute disgust that your maga-
zine isn’t called GNU/Linux Voice.
I will be writing to my MP about
this very important… Only joking.
Good luck with the magazine, and I
hope you do give credit to the GNU
project when appropriate, even The GNU/Linux naming FAQ weighs in
though I think the naming debate at over 9,000 words. Nomenclature is
a serious business indeed...
is rather overblown.
Dan Konovalov
Andrew says: Rest assured, the GNU/ Software Foundation have contributed
Linux FAQ on www.gnu.org is my hugely to the operating system we use
bedtime reading material. One day and love today. Big thanks to them.
I’ll get to the end… In all seriousness, But there must be a prettier name
GNU, Richard Stallman and the Free (and “Lignux” isn’t it).
GNU’S TALKING?
TomToms are very annoying; they
may use a Linux kernel to work the new magazine – I’m really
but to update them you require looking forward to the first (and
a Windows or Apple computer. subsequent) editions falling
Their update program just will not through my letter box.
work with a Linux Box, even when Ray Woods
running with Wine.
Plugging the satnav into the Mike says: I’m not au-fait with sat-nav
USB socket on my Linux Mint systems, as I navigate by the moon,
computer allows me to see the stars, and ancestral memory, but
inside the TomTom just as if it maybe one of our readers can write in
were an attached disk. This is all with a recommendation. Or you could
fine and dandy but, unless you perhaps add your name to the “Tom
can download the appropriate Tom Linux Support” petition online:
files from TomTom and then www.petitiononline.com/tomlinux.
know what to do with them, it all And yes, there is something very
becomes a bit pointless. silly about devices that run Linux,
Do you have any ideas? Is but don’t actually integrate well with
there such a thing as a Linux- desktop Linux installations. It seems
friendly satnav on the market like manufacturers are missing an
in the UK? And good luck with opportunity for a big, easy win .
Try to run
TomTom’s
software under
Wine, and you
may well get
a “device not
supported”
message. Fail.
14
MAIL
HAPPY HACKING MATHS TIME
It is nice to show us some coding I was wondering, since as far as
rules and some languages, but I understand this publication is
what I really want to learn is how aimed more at the intermediate
to help out existing projects. user level, if you could perhaps
Could the following be done? do an extensive tutorial series
Review a piece of software, and on algorithms. Kind of like a
find a bug or propose a new comprehensive guide from the
feature. Go through the particular basics to advanced subjects.
case for raising the issue Algorithms are one of the most
(Launchpad, Gitorious, Bugzilla), important and most fun parts of
find the bit of code that needs being able to progam a computer,
changing, patch it or propose how yet other publications seem to Graham says: Wow – it’s like your Poor Euclid didn’t have
to solve it (eg “the for loop does largely ignore them or devote a read our minds! Algorithms are a access to Emacs, so he
not take into account iteration couple of pages to them. fascinating subject, so turn to page had to write his works
from zero and causes it to ignore Tirab 100 for a look at Euclid’s. on scraps of papyrus.
the first item of a list”) without
actually writing any code. Or
maybe correct a translation from
German in MikeOS, or go over
WHAT CLOUD?
push, pull, SVN, CVS, Git or Bazaar, I have recently bought a HP format. Versioning would also be
or improve documentation. Or Microserver, as my concern for a bonus but not essential.
take the constructive criticism privacy after the Snowden stuff Andrew Walker
nicely even if a Linus-school-of- came to light just kept growing. Seafile is an attractive
thought lead maintainer calls you My dilemma now is which self- Ben says: Great idea Andrew; we’ll try and open source
a backbirth. hosted cloud storage solution to include it in an upcoming issue. alternative to DropBox.
Anyway, please show us how to to go with. The candidates are
be outstanding citizens of the free SparkleShare, Seafile, Pydio,
software world! Syncany or git-annex assistant.
Andres I’m struggling to decide and
thought you may be able to do a
Mike says: This is a good idea. At review. It has to be open source
FOSDEM I spoke to Wolfram Sang, and needs to run on Arch.
a kernel hacker who gave a talk on Ideally I would like to have
improving the kernel without having the files stored in their normal
to contribute any code. I’d like to write manner, so that I can put the
an article about this in an upcoming drives in another PC and access
issue. There’s also a really niggling them should my server die, ie
LibreOffice bug that I plan to fix – not encrypted or some special
maybe I’ll document that. If I don’t get
totally lost in the huge codebase.
OHHH VIENNA
Mike, I wonder what you are do-
ing in Vienna? Are you trying to
change the civil service to Linux
like it was done in Munich?
Martin Domanski
Mike says: Er, yes, that’s right.
Honest. Nothing to do with the beer
and Schnitzel or anything like that.
Incidentally, Graham and I went to
Munich has migrated
Munich to interview the people behind
15,000 desktops from
Wolfram Sang wants to make kernel the city’s Linux transition, so keep an Windows to Linux – find
development more accessible – find eye out for our full report next month. out how next issue!
out more in the next few issues. (And yes, we did drink Weißbier).
www.linuxvoice.com 15
LUGS ON TOUR
LUGS ON TOUR
Blackpool LUG
Our Lancashire correspondent Les Pounder
reports from Blackpool LUG & Makerspace.
Photo credit Les Pounder CC-BY-SA
B
lackpool LUG meets once a Arduino, but fully compatible with
week, making it a rarity, as the Uno range of Arduinos.
most groups meet monthly. Every week, there will be three or
The venue is the business premises four different projects on the go. For
of Mike Hewitt, the LUG’s organiser, example, the youngest member,
and just happens to be a PC Kieran, has been learning Python to
recycling centre full of old kit that augment his computing lessons at The members working unconference. Blackpool LUG have
they can use for projects. A typical school. His skill has grown each on their individual supported Oggcamp since 2011
LUG meet involves brioche and week and now he is readily creating projects around the and can be found working in the
coffee, oh and quite a lot of hacking his own programs such as a lottery communal table notice crew along with the other
and making. Past projects include number generator. Blackpool LUG’s the coffee pot is empty. magnificent volunteers.
repurposing thin client computers most senior member, Elizabeth, has Linux is a community, and what
(using Puppy Linux) for Oggcamp been learning Grub and how to makes a LUG so special are the
signage, and a step-by-step video configure it to maximise her people, who all have a shared
guide on how to dismantle and workflow, while Mike and Donald, interest in Linux and that bonds us
rebuild a desktop computer. our two electrical experts, have together. But the friendships
Blackpool LUG recently became a recently repaired an old LCD TV to created are more than this. I’d like to
makerspace, growing with the full working order, enabling the LUG say thanks to Mike Hewitt, for
group’s interests in maker culture to have a purpose-built Google keeping the LUG open over the
and hardware hacking. It now has Hangout device on the main wall. years and giving us a great home.
lots of great facilities, such as a If you have yet to find your local
soldering room with extractor fan BLUG on the road UK Linux user group, head over to
and data sheets for all of the Members of Blackpool LUG have http://lug.org.uk and sign up to
different microcontrollers that they done many great things, both inside your nearest meetings mailing list.
tinker with. They especially enjoy and outside of their meetings. They Drop them a line and say hi.
hacking with Arduinos, and now have travelled the UK providing If there isn’t a LUG in your area,
everyone has an-Arduino logistical and technical support for why don’t you start your own? For a
compatible device called “The many high profile events, you might venue, why not try a coffee shop or
Shrimp”, which is a barebones know of one, the mighty Oggcamp local pub? Start small and build
upon each success – that’s what
Blackpool LUG have done.
TELL US ABOUT YOUR LUG!
Chances are that you are already a
member of a Linux User Group (LUG).
LUGs are all over the world and each
one has its own unique selling point,
Photo credit Les Pounder CC-BY-SA
which draws its members to meet
and discuss their favourite topic. We
want to know more about your LUG
or hackspace, so please write to us at
Kieran learning more lugs@linuxvoice.com and we might
about The Shrimp by send one of our roving reporters to
building a Persistence your next LUG meeting
of Vision kit.
16 www.linuxvoice.com
LUGS NEWS
Sheffield LUG
Richard Ibbotson on the history of ShefLUG.
“I
remember back in the step. In Sheffield at that time
1990s helping Manchester there were a few historians and
LUG to come into other academic people who had
existence. Dr Owen le Blanc, David realised that open source and free
Clark, Dr Dave Gilbert, Professor Ted software based on the General
Harding and some other notables Public Licence was going to be
used to get together on Saturday something more than a music hall
afternoons to create the first LUG joke. Although, they hadn’t really
meeting in the UK. It was at about understood what I understood.
this time (1992 to 1997) when the Which was ? That open source
people at Manchester Computing software is the future. Rüdiger Berlich demonstrating SUSE 7.1 in front of Sheffield LUG.
Centre were working together with Released in 2001, SUSE 7.1 was the first release to feature the
Yast package manager/configuration centre.
Linus Torvalds that Dr Owen le Gradual improvement
Blanc created MCC Interim Linux. When I first started ShefLUG
A Dr Rüdiger Berlich arrived from in 1999 we had a really nasty based operating system and other
Germany. I helped him to start website. This is much improved things like tablets have come along.
SUSE Linux Ltd in London and also in the present day. People didn’t Recently people at the Linuxcon in
helped him with the same thing in really know what they were doing Edinburgh were saying “We won”:
California. The SUSE ethic at that at meetings. We had to slowly GNU/Linux has taken over the
time was “SUSE Linux. Have a lot evolve a venue for meetings. world. Whatever the truth might be
of fun”. Eventually we had a solid core I find it best to remember one thing
Since I am from Sheffield of followers. Some of them are throughout the FUD and fog that
originally I thought that creating still around today. Times have is out there. Which is ? GNU/Linux.
ShefLUG was the next logical changed. The Android GNU/Linux Have a lot of fun.”
Bradford LUG
John McLear and Shi Hussaini on a hive of activity.
S
hi Hussaini got in touch with
us from Bradford LUG to tell
us about what they’re up to
in the land of dark satanic mills:
“My husband and I have been The Pi is thriving
working on Swanky Paint, a Deluxe in its homeland
Paint clone (old school pixel editor of South Wales.
used in the games industry since
the 80s) targeting the Raspberry Pi
natively, as well as Linux, Android, Pi Cymru
NaCl etc. but the Pi is our minimum Wallow in the retrostalgia. Doug Gore reports from South Wales.
spec. So far we have basic editing
P
and animated gif support so it’s stored on their ring and when they i Cymru, the can put their Raspberry Pi
actually usable!” touch the TV it plays from a list of Raspberry Pi to good use. There will be
tv shows recommended/streamed community for Wales, talks, project demonstrations
One ring to rule them all for them.” is hosting their first event - a and open discussions on the
John McLear wrote to tell us about We’ll admit that we didn’t really Raspberry Jam at TechHub Raspberry Pi. The event is
a cryotic Raspberry Pi/XBMC understand this until we realised in Swansea city centre on free and open to everybody
project. “I have been hacking on Pi/ the NFC ring is a project that John Saturday 8 March from including families and
NXP Explore so I can use an NFC funded on Kickstarter, raining 1.30 to 5.30pm. The event children. You can register for
Ring to pause/play VLC/XBMC almost a quarter of a million brings Raspberry Pi users the event at swanseajam.
videos by touching a panel under a pounds to develop a ring that can in the area together to meet eventbrite.co.uk, and find
TV. Next step is so each person in be worn on your finger, and which in person, learn from each out more on our website at
my house can have a profile GUID transmits data to nearby devices. other and find out how they www.picymru.com.
www.linuxvoice.com 17
SHOW REPORT FOSDEM
The crazy cats of The Document
Foundation show us all how to run
LibreOffice on a Raspberry Pi.
Semi-recursively, the Fedora
team used Fedora to print
little Fedora badges.
FOSDEM 2014 Free Software, free stickers and delicious beer – Mike Saunders
and Andrew Gregory just had to be there…
G
eeks work hard, but they play hard as well. security, games and open hardware. Hackers could
While the vast majority of Linux and Free watch presentations about new technologies, before
Software development takes place over the exchanging ideas with other programmers and doing
internet, real-life meetups are hugely important as some on-the-spot coding.
well. One of the biggest such European meetups is
FOSDEM, which takes place every February in Many, many speakers
Brussels. We went along to see the action, and we Michael Mrozek introduced the DragonBox Pyra, the
didn’t come away disappointed. follow-up to the Pandora open source handheld
Scattered across various halls of the ULB Solbosch games console, while Daniel Naber explained how
Campus, FOSDEM was packed with talks from LanguageTool, a Free Software proofreading program,
developers working on projects across the whole Free has been used to find over a million style and
Software spectrum: desktop applications, networking, grammar errors in the English-language Wikipedia.
18 www.linuxvoice.com
FOSDEM SHOW REPORT
The latest build of
OpenSUSE works on ARM
chips, as shown here on a
humble Tegra laptop.
OpenMandriva and Rosa teamed up to talk about We also spoke to Wolfram Sang, a kernel hacker
The relaxed crowds and
porting their distros to ARM devices, and Laurent who is trying to get non-coders involved in kernel fast-food vans give
Eschenauer showed off the Nodecopter, a drone that’s development. How can you improve the kernel if you FOSDEM the feel of a
programmable with JavaScript. don’t know any C? Well, Wolfram explained how it’s music festival rather than
fairly easy to add new device IDs to drivers, so if you a tech conference.
People power buy a new webcam and it doesn’t work out-of-the-box
We met a bunch of awesome people on our travels. in Linux, you may be able to add its device ID to an
Pieter Hintjens, anti-software patents campaigner and existing driver to make it function. We’ll have more
author of the ZeroMQ distributed computing from Wolfram in Linux Voice soon, so stay tuned.
framework, kindly gave us a copy of his latest book,
Culture & Empire: Digital Revolution (see page 28). Red Take a stand
Hat evangelist and “transnational citizen” Jan But our favourite part of FOSDEM 2014 was the
Wildeboer told us how he disabled the RFID chip in his stands. Most computer shows tend to have boring
passport using his microwave – he’s a fascinating stands with gelled-hair salesdrones parroting the
guy, and we hope to get an interview with him in the latest blurb about their products, but it’s totally
next few months. different at FOSDEM. Small projects are well
represented, and the people at the stands are the
geeks who work on them. Anyone could walk up and
chat to developers of the Enlightenment window
manager, for example, and the same goes for CentOS,
LibreOffice and OpenSUSE.
The OpenSUSE team showed us their VM-based
automated distro testing system (that sends
keyboard and mouse input to the VM window to
perform automatic installations), while the Fedora
stand wooed everyone with an awesome 3D printer
creating Fedora badges. Also present were the Free
Software Foundation Europe, the Mozilla Foundation,
and the Apache OpenOffice project.
Beer was tasty and plentiful; the WiFi network did a
good job as well, given that there were several
thousand geeks connected to it at any one time. It
was great to meet so many Linux Voice fans as well
The canteen, where all the best – your support and enthusiasm is amazing. So,
people hang out and much of the thanks to everyone who attended and showed off
unofficial ‘beer track’ takes place. their awesome work, and see you next year!
www.linuxvoice.com 19
REVIEWS INTRO
REVIEWS
The latest software and hardware for your Linux box, reviewed
and rated by the most experienced writers in the business
On test this issue...
22 24
Andrew Gregory
When he’s not gently massaging his Linux Mint
Mageia 4 LibreOffice 4.2
installation, Andrew enjoys a game of Oolite. We still can’t agree on how to pronounce Ben dives head first into the latest
its name, but this Mandriva spin-off has release of this mighty office suite – are
lasted longer than some thought it might. the days finally numbered for Microsoft?
S
ome things change without you
noticing them. For years we’ve
seen LibreOffice come on in 25 26 27
leaps and bounds, adding stacks of
new features and better support for
non-native file formats. We’ve pored
over every update and marvelled at how
the suite has become a challenger to
– and in many ways the superior of –
Microsoft Office. Lightworks 11.5 FreeBSD 10 Nexus 5
What hasn’t been so immediately
It ain’t cheap, but this Unix goodness with a more Fancy hardware and no silly
evident is the vastly improved
pro-level video editor is conservative development OEM bloatware: is this the
performance. I only thought about this
brimming with features. model. And some daft bugs. perfect smartphone?
the other day: LibreOffice starts in a
couple of seconds now. OK, so I have a
fairly modern PC with an SSD drive, but
I thought back to the bad old days of BOOKS AND ROUNDUP
OpenOffice.org 1.x and 2.x, which would
Trees are good. They release oxygen into the
take around 15 seconds to start.
atmosphere and prevent us from dying of
A huge amount of work has been asphyxiation, and they can also be turned into thin
done under the hood of LibreOffice slices containing written material. This month we
to enhance its performance. Our look at Culture and Empire: Digital Revolution, a great
good chum Michael Meeks has been read explaining how the powers-that-be are waging
war on the internet.
responsible for much of this work, and
Over in the Group Test we look at encryption
kudos to him: it’s not a glamorous job, software: given the amount of spying going on, it’s the
but someone has to dig into the guts of right time to start encrypting your communications.
the codebase and remove the cruft. We look at the best tools for the job.
andrew@linuxvoice.com
www.linuxvoice.com 21
REVIEWS MAGEIA 4
Mageia 4
Graham Morrison takes on the 64-bit version of one of the strongest
distributions to appear in recent years. Vive la différence!
W
e dove straight into a fully fledged minutes and 5.5GB to install from the DVD. After
DATA installation off the 64-bit DVD, rather than package installation had completed, we did have
Web
playing around with the live CD first. As problems telling the installer not to install a bootloader
www.mageia.org ever with Mageia, the installation process looks – see the box on EFI And GPT Partitions – but
Developer fantastic. It recognised our drives and made it clear otherwise, this was a first-class process.
The Mageia Community which drive we’d selected and what the consequences
Price of installing might be. We used the manual Boot camp
Mostly Free Software
partitioning option and created a new root partition Our first boot was delayed for a considerable time in
from free space on our drive, although clicking on the Checking For New Hardware state, but this didn’t
Done quickly brought up the formatting dialog without happen with second and third boots, so we’re
any final chance to check the settings – a security guessing this had something to do with the many
blanket we’d got used to with Ubuntu. USB devices we’ve got connected to our system.
We were also able to choose between a vast array Logging into the default KDE desktop bought back
of desktops, which is a defining feature of Mageia 4. many happy memories of Mandriva, mainly because
KDE and Gnome were the main options, but clicking Mageia uses a similar blue colour scheme. But it’s
on ‘Custom’ brought us to the ‘Package Group also that Mageia is augmented by many of the same
Selection’ screen, familiar to any former Mandrake tools that made Mandriva so good. The Mageia
user. This page gives you a great overview of which Control Center, for example, still has its own icon in
packages are going to be installed, enabling you to the toolbar and provides easy access to software
freely change what you’d like. From here, for instance, installation, hardware configuration, networking and
Mageia defaults to a great
you can install Xfce, Mate, Cinnamon, RazorQt, E17 system management, in exactly the same way
KDE desktop, but also
offers the most unrivalled and LXDE without resorting to the package manager DrakConf used to in the olden days.
selection of alternatives after boot. We’ve never seen such a comprehensive We also really like the MageiaWelcome application,
we’ve ever seen in a selection of desktops from a single DVD, and we which presents itself when you first reach the
distribution. clicked on them all – which is perhaps why it took 80 desktop. This is a great tool for beginners, featuring
22 www.linuxvoice.com
MAGEIA 4 REVIEWS
direct links to release notes, errata, how-tos, the wiki,
forums and chat rooms. Unfortunately, the last link EFI AND GPT PARTITIONS
will only take you as far as launching X-Chat, leaving
the beginner to discover for themselves how IRC It’s a little unfair to pick on Mageia for not initramfs images from Mageia’s /boot folder
works and where to find Mageia’s support group. Not working with GPT and EFI, because this is a into our EFI partition, and created a simple
problem that’s only just beginning to emerge configuration file for gummiboot that pointed
a great feature. for many distributions. But its release notes to the location of both, as well as set the root
KDE 4.11 is the version shipped with Mageia 4. The do boast ‘experimental support for UEFI’, so device for our installation. As we were using
launch-menu is the classic ‘click and execute’ style, as we’re going to mention it. GPT and EFI Nvidia’s proprietary drivers, we also had to
you’d find on Windows 98, but we miss the pervasive replace the old partitioning and boot include nokmsboot as a boot option within
search of the application launcher – enabled with a schemes that we’ve used for 20 years, and the configuration file too. But after this was
it’s only now that PCs are appearing on the set, booting was perfect and we had no
right-click whilst the widgets are unlocked. Sound market that default to EFI rather than a further issues. We’ll just have to keep an eye
works perfectly through the GStreamer back-end to legacy BIOS option. With Mageia, one of the on any kernel updates so we can copy the
PulseAudio, and it detected our complex array of biggest problems we found installing on one files over again if necessary.
kernel audio devices without difficulty. of these systems was that you couldn’t
We wish a KDE distribution would be brave enough choose to ignore the bootloader. The only
options were to install Grub, Grub 2 or even
to drop KDE’s default blue ‘Active Window Glow’, Lilo! We wanted to skip this stage so we
inherited from the Oxygen window decorator, but this could sort out our EFI bootloader ourselves,
can also be changed when you know where to look. but in the end, the only way forward was to
There’s a great selection of the best KDE applications install Grub 2 onto the partition itself, rather
including Amarok, Digikam, Kopete and KMail, but its than the non-existent MBR.
After installation, we were able to get
office suite is deprecated in favour of LibreOffice. Mageia booting off GPT/EFI without too
much difficulty. Using gummiboot, a very EFI support in modern distributions is
Desktopification simple bootloader, we copied the kernel and becoming increasingly important
The available software from a default installation is
fantastic, making Mageia a great one-click install
option for a comprehensive Linux/Open Source and panels. Openbox wins for absolute minimalism,
software suite. Having tools like Audacity, FileZilla, so we’ll just say it works. More interesting was
Ekiga, Scribus and Abiword just a click away is great RazorQt, and this is the first time we’ve tried this
for office environments, or for friends and family, nascent Qt desktop from a default installation.
although we’d like to see VNC added to the mix. Our Perhaps because we had so many others installed, we
installation had Kdenlive running in the background, could choose between four different window
for some reason, taking up 99% of a single CPU core. managers. The Razor desktop became our favourite
We then took a quick tour through the various low-resource option simply because KDE apps felt
installed desktops; it’s great that you’re able to do this almost native in this Qt environment. Finally, there’s
after only just installing the system from a DVD. Xfce 4, which we also
Cinnamon was nicely accelerated, although the
bottom panel was a little small on our high-resolution
love, because of its
great default options. “The amazing selection of
screen. Enlightenment 17 was its minimalist self, This amazing desktops available from a single
DVD is Mageia’s killer feature”
although asking us for our preferred size of window selection of desktops
title bar was a nice touch. We’d have to question available from a single
Inkscape’s high-priority placing in the toolbar, but installation DVD is
Enlightenment on Mageia fels fantastic – slick, Mageia’s killer feature, and serves a great purpose for
polished and lightweight. people who may be finding their way with Linux
Next up in the login menu is Gnome 3.x, which we desktops. And this is definitely a distribution we’ll keep
have to admit is starting to make sense after years in around for updates, because it bundles all these
the wilderness. Apart from the background and the desktops together. But Mageia 4 is also a serious
welcome window, this is the default Gnome distribution, full of tier-one free software and a modern
experience. IceWM follows Gnome in the desktop emphasis on kernel updates and security – Shorewall
selection menu, and this gives perhaps the most is running, for example. It’s also one of the few
basic desktop experience of the lot. The background distributions where suspend and resume has worked.
image isn’t scaled, for example, and there are no icons With a few caveats about EFI installation and custom
in the launch menu. But that’s IceWM, and it’s good to control panels, Mageia 4 is highly recommended.
have it here for low-powered Linux machines. We
prefer LXDE for the lightweight experience because it LINUX VOICE VERDICT
has just a few more niceties, such as icons, but they
Despite a few rough edges, this has
both work well in Mageia. Mate, too, is a fuss-free two to be the distribution to choose if
panel desktop. It’s quick and will feel familiar to you’re a serial desktop swapper.
anyone used to an older version of Windows, and
looks great with reasonable sized anti-aliased fonts
www.linuxvoice.com 23
REVIEWS OFFICE SUITE
LibreOffice 4.2
It’s not often an office suite excites us, but Ben Everard
discovers LibreOffice 4.2 has a trick up its sleeve.
A
fter every new release of LibreOffice, reviewers
DATA talk about the same handful of things: code
Web
improvements, graphical improvements,
www.libreoffice.org improved support for document formats. It’s all very
Developer important and we’ll get to it in a bit. This time, though,
The Document there’s a new feature that’s genuinely exciting to us:
Foundation GPU-accelerated spreadsheets. In a nutshell, the new
Price
Free under LGPL
version of Calc enables users to offload processor-
intensive calculations performed in the spreadsheet to
a GPU-compatible graphics card.
This means that, for the first time, non-
programmers can harness the power of the graphics
card for non-graphics purposes. While it’s still early LibreOffice Writer one of the key programs we use to
days, this could easily lead to speed improvements of create Linux Voice. Thanks, Document Foundation!
a factor of ten or more for complex sheets holding a
lot of data. This is potentially a massive improvement argument for using LibreOffice over commercial
not only over the old state of affairs, but over any options even without considering the implications of
other spreadsheet out there. free software.
This is important because it shows that LibreOffice Not only is the GPU-accelerated spreadsheet a
isn’t simply a clone of Microsoft Office, as some great new feature, but it also shows the benefits of
people claim. It’s actually a project with its own ideas open source code. It was developed in part by AMD,
about what makes a great office suite, and it’s which could only do this because it had open access
implementing them regardless of what other office to the code.
suites do. This is also one of a slowly increasing
number of areas where LibreOffice is noticeably better Free as in better
than the Microsoft equivalent. When you couple it with There have apparently been improvements to the
things like embedding Visio files in documents (only import of MS Office files, though we’re not sure where,
possible in Office if you have Visio itself installed, as it’s been a long time since we’ve had any problems
which isn’t cheap), there is an increasingly strong importing files. Code re-factoring and translation of
German comments to English are both featured so
“LibreOffice isn’t simply a clone of Microsoft much in LibreOffice press releases that they’ve
Office, as some people claim.”
become clichés, but they are of course important.
Once done (it’ll take a few more releases), this should
make it far easier for developers to add new features
(many more developers speak English than speak
German), so although it doesn’t sound exciting now,
it’s preparing the code for exciting things in the future.
The crux of any review is the question: should you
install this software? Unless you’re having issues with
the old version, or have a large spreadsheet you want
to offload to your GPU, there’s probably little to be
gained from rushing out and grabbing this version
rather than waiting for it to appear in your package
manager. What’s exciting is the way that, with this
release, LibreOffice has taken such a commanding
position in the office suite market.
LINUX VOICE VERDICT
Another solid release of LibreOffice
with a great new feature – exactly
what we’ve come to expect.
The smiley in LibreOffice 4.2 (shown here in Draw) has been improved to make it happier.
24 www.linuxvoice.com
LIGHTWORKS PRO 11.5 REVIEWS
Lightworks Pro 11.5
It’s taken a long time and a metric ton of development work to get
here, but has Nick Veitch found the Final Cut Pro for Linux?
O
ver recent months, we’ve learnt quite a bit
about video editing. From lighting, sound and
taking multiple shots, through to getting the
best from the software we use. And unfortunately, one
of the toughest lessons was that there just wasn’t a
good video editor for Linux. Lightworks could be our
saviour. It’s been around on Windows for a long time,
and a Linux version was announced way back in 2012
– alongside a commitment to release an open source
version, which has yet to materialise. After a beta
release last year, 11.5 is the first stable version for our
favourite operating system, and is something of a
milestone for non-linear video editing on Linux.
Lightworks has a free version and a Pro version.
The free version features the same editing
environment but is restricted to web-friendly output
formats and a 720p output resolution. The Pro version
unlocks broadcast output formats and resolutions, Lightworks defaults to using your entire screen, but it can be coaxed into a window.
and even 4K and 5K as image sequences. Ubuntu and
Fedora derivatives are officially supported, and we images. We missed embedded thumbnails, but they’re
DATA
installed the 60MB download on 64-bit Mint 16 by not essential, and it’s not always obvious where
simply clicking on it. The recommended computer features hide. The all-important wipes and transitions, Distros Ubuntu 13.10,
specification is on the demanding side (see side for blending from one shot to another, are hidden Mint 15, 16,
Fedora 18, 19
panel), but that’s not surprising. Video editing anything behind a press of the F8 button, for example, with no
Intel i7 or AMD
other that cat videos from your smartphone requires menu or icon we could see to indicate its existence. equivalent
as much CPU and memory as you can throw at it, The selection of effects is brilliant, and give the editor 3GB RAM or higher
with your GPU in particular used to accelerate many a fantastic palette of powerful processing that 1GB PCI-Express VGA
processing tasks. remains functional rather than over-stylised, which is NVIDIA or ATI with
OpenGL
the problem with many effects in Final Cut Pro. Our
Web www.lwks.com
The Final Countdown favourite feature is the all-powerful keyframes, which Developer EditShare
Coming from Final Cut Pro (Apple’s market leader), can easily be used to change parameters over time, Price £180 or £49.99pa
Lightworks takes some getting used to, although creating slow-pans or focus effects with aplomb.
many of the same features and facilities are present. Keyframes can even be edited from a graph, and while
Lightworks gives you more freedom to organise clips, we couldn’t find an option for Bézier curves, there’s
create, composite and pull these together into edits, more then enough detail
here to get exactly the
“Lightworks is a professional
which themselves can be stacked and re-used in a
very modular way. Clips can be dragged against one results you need.
another, changing the time in both, or moved around There’s nothing like
Lightworks on Linux. It’s a video editing suite that really
does deliver results.”
on a timeline. Selecting Delete will split a clip, and you
can drag and drop other clips, transitions, audio and professional video editing
suite that really does
deliver results. If you make
money from editing, you won’t begrudge the cost. If
you don’t, the free version is good enough for many
projects – with the ‘Creative Cloud’ like pricing giving a
reasonable entry point for one-off projects.
LINUX VOICE VERDICT
It’s the only application of its calibre
on Linux, and in terms of features,
we’ve barely scratched the surface.
Keyframes are brilliant for changing parameter values
over time. Look at that beautiful face.
www.linuxvoice.com 25
REVIEWS OPERATING SYSTEM
FreeBSD 10.0
Without great fanfare, the FreeBSD project keeps pumping out releases.
Mike Saunders explores what’s new in version 10.
F
or many of its users FreeBSD is a more
DATA traditional operating system than Linux: it’s
Web
Unix-like, it’s free, it’s open source, it’s reliable,
www.freebsd.org and it carefully integrates new features in a gradual
Developer development cycle. The entire FreeBSD source code
The FreeBSD Project tree, including the kernel, core libraries and system
Price utilities, is developed as a whole – in contrast to Linux,
Free under the
BSD license
where one group maintains the kernel, another
maintains glibc, and so forth.
FreeBSD 10 is available in various formats, from
traditional CD/DVD ISOs to a .img file that can be
written to a USB key. The installer is largely The installer, bsdinstall, was originally created as a “stop
unchanged from 9.x; it’s a text-mode tool reminiscent gap” tool but has stuck around since 2011.
of older Linux distro installers, and while it’s not pretty
it gets the job done quickly, and is much simpler than been extensively improved, so FreeBSD now runs on
the plain text OpenBSD installer. the Raspberry Pi, while a new type-2 hypervisor
In general use, FreeBSD looks and feels much like a (bhyve) has been added along with support for
GNU/Linux distribution. Almost all major open source running on Microsoft’s Hyper-V.
programs have been ported to FreeBSD (often TRIM and LZ4 compression has been added to the
requiring no modification), and there’s a fairly reliable ZFS filesystem, and FUSE (filesystem in userspace) is
Linux compatibility layer to run Linux-only binary now in the base system, so you can use all of the
programs. As a desktop OS it’s close to Linux in awesome FUSE drivers that were developed on Linux.
features and performance – although hardware Then there’s USB audio 2.0 support, wireless
support isn’t quite as extensive. Under the hood many networking improvements, and boot time speedups.
command options and filesystem locations are It’s an impressive bunch of enhancements touching
different, and the OS expects more prior knowledge almost every area of the OS.
than a newbie-oriented Linux distro, but the great
documentation makes things clear. Regrettable slip-ups
FreeBSD’s phenomenally
Most notably, GCC is gone from FreeBSD 10’s base A major setback for FreeBSD 10, though, is the
stable base system doesn’t
include anything graphical, system, being replaced with LLVM/Clang. The embarrassing bugs that have somehow slipped into
but a quick ‘pkg install FreeBSD team has wanted to switch to a BSD- the final release. Sure, major new versions of software
xorg xfce’ command will licensed compiler for years, and now it has. (GCC is are going to have some flaws, but the issues in
get you a usable desktop. still available to install, though.) ARM support has FreeBSD 10 should have been caught much earlier.
Look at www.freebsd.org/releases/10.0R/errata.
html and you’ll see alarming examples like this:
“A bug in killall(1) has been discovered. It makes
killall -INT deliver SIGTERM rather than the desired
SIGINT, and may cause blocking behaviour for scripts
that uses it, as -I means ‘interactive’.”
This is very alarming, and the same can be said of
the pw(8) bug, which changes the behaviour of a
critical system tool. When an OS prides itself on
stability and a conservative development process, for
such silly bugs to slip through is awkward. It doesn’t
mean that FreeBSD 10 is a disaster – far from it – but
it’s bad for the project’s image.
LINUX VOICE VERDICT
Plenty of new features to explore,
but the silly bugs let it down. Here’s
hoping it’s just a one-off.
26 www.linuxvoice.com
NEXUS 5 REVIEWS
Google Nexus 5: three-month review
After some time with Google’s flagship smartphone, Graham Morrison
reaches a conclusion on whether it’s worth the upgrade.
A
couple of us on the team have a Nexus 5. On
paper, when value is a consideration, it’s the DATA
best phone you can buy, and will likely stay as Web
Google’s flagship device for some time yet. But price/ www.google.co.uk/
specification comparisons don’t tell you the whole nexus/5
story. You have to spend time with a device to be able Manufacturer
to say whether it’s really a successful product. Which LG
Price
is exactly what we’ve done, reporting our findings on £299 for 16GB version;
whether the Nexus 5 is still the go-to phone for £339 for 32GB
Linux-loving smartphone users.
After a flaky start, Android has become a wonderful
operating system. When notifications appear in the Even though the screen on the Nexus 5 is larger, the
top-left of the display, they’re subtle, functional and phone feels thinner and lighter than the Nexus 4.
easily swiped away. With a few choice applications,
such as ‘Status Agenda’ for adding appointments to We do have problems with some aspects of
the notification area, a replacement launcher or a Android, and by far our biggest is with its unrelenting
better text messaging application app than the default appetite for personal data. Google Now begs you to
(the awful Google Hangouts) you can build an turn on browsing history, and refuses to unlock its
environment that works best for you, which is best features until you do. Every time you open your
something that can’t be said about Apple’s iOS. photos you’re pleaded with to enable online backup.
Many things seems enabled until you turn them off,
Hardware and you only have to look at your Google location
The hardware is fantastic. After three months’ daily history to get a terrifying snapshot of where you’ve
use without a case, the screen is still unblemished. physically been, helpfully logged by your phone even if
Nor have we noticed any problems being understood it’s just down the road to get some milk.
through the diminutive microphone grille – which We’re uncomfortable with this, which is why
some users have complained about. Cyanagonmod may be our
Speaker output is quite low for hands-free, and the
quality of audio recording is about only average – it’s
best option. Cyanogenmod
is Android with the Google “Our biggest problem with
legible, but it’s not crystal clear. The headphone cloud services taken out.
Android is its unrelenting
appetite for personal data.”
outputs are also on the low side, although subjective Similarly, the F-Droid
audio quality is excellent. And the camera was vastly repository seems to be
improved by an Android update. The screen, as it was going from strength to
in the beginning, is stunning, but the auto-brightness strength, and it’s become an essential resource for
setting can be hit and miss. With average use, our open source apps and utilities. The OwnCloud app, for
phones last us about 40 hours without a charge, example, automatically uploads photos to your server,
which is perfectly usable. and is particularly helpful, as are the terminal and SSH
clients. We still don’t like SMS and chat integration, but
a small SMS icon now tells you whether you’re
chatting on your mobile network. Fortunately, you can
download the previous version of Messaging through
Google Play, thanks to again to Cyanogenmod.
Not withstanding privacy issues, the ability to
customise nearly every aspect of your phone’s
operating system will appeal greatly to the average
Linux user. And we can’t argue with that.
LINUX VOICE VERDICT
A wonderful phone made even more
wonderful by the availability of
Cyanogenmod.
If you want to scare yourself, take a look at the location
history for your account. Google is watching you.
www.linuxvoice.com 27
REVIEWS BOOKS
Real World OCaml
Mike Saunders starts learning his eighth programming language.
O
’Reilly doesn’t shy away from users, but if you’re planning to learn OCaml
covering esoteric topics. Few for doing some cross-platform coding, it’s
developers have ever dabbled in worth bearing in mind.
OCaml, but this object-oriented, functional Otherwise, the book is typical O’Reilly fare:
programming language has a lengthy 483 pages of minimal presentation and
history behind it, extending Caml (which serious text, but it’s extremely clear, well
itself is a dialect of ML, stretching back to written and authoritative. There’s no
the early 70s). hand-holding here, so if you’re completely
This book describes OCaml as “an new to programming you might find the
industrial-strength programming language pace too fast. But if you’re already well
designed for expressiveness, safety and versed in a couple of languages and want to
speed”, and the opening chapters do a good get into OCaml, this is a good choice.
job of setting out the advantages of using
the language. LINUX VOICE VERDICT
Weirdly, Real World OCaml avoids using the Authors Yaron Minsky,
language’s standard library, instead basing Anil Madhavapeddy and Jason Hickey
its teaching and examples on the Jane Publisher O’Reilly
ISBN 978-1-449-32391-2
Street Core library, an alternative with more Price US $39.99
features and syntax extensions. Fair enough Typical O’Reilly: a no-nonsense, extensive
– but this Core library isn’t yet supported on and confidently written guide to all aspects
Windows. Instead, the book recommends of the language.
that Windows users install Linux in a virtual It had to be a camel, of course; but we wonder
machine. This isn’t a big deal for us Linux how Perl will feel about having to share?
Arduino Projects for Dummies
We’re not sure how many dummies use Arduino, so Ben Everard read it instead.
A
rduino Projects for Dummies starts section introduces both of these subjects. you’d need if you wish to take things further
with the assumption that the reader The writing’s clear and easy to follow as you by yourself. For example, I2C gets just one
knows very little about either might expect from an experienced teacher paragraph, but this is still better than SPI,
electronics or the Arduino, and the first like Brock Craft. which merits only a single sentence.
The focus of the book, though, isn’t these It would be unfair to heavily criticise the
introductory explanations, but a series of 12 book for these omissions though, because it
projects that get harder from simple LED doesn’t claim to be an all-encompassing
controllers to a remote-controlled car and guide to the platform, but a projects book to
GPS data loggers. The projects are all help the reader quickly and easily get started
achievable for someone with limited with fun builds. It does this admirably. In this
experience and time. After getting the basic context, then, the focus on just what you
skills from the basic projects, most people need to know, rather than getting bogged
should be able to take on even the more down in excessive detail, is a point in its
advanced projects. The clear writing and favour rather than a downside.
clear diagrams make them easy to follow.
Because of the ecosystem of Arduino LINUX VOICE VERDICT
shields and libraries, features like RFID tags Author Brock Craft
and accessing Twitter are easily achievable Publisher John Wiley & Sons
ISBN 978-1118551479
and this book introduces them in a fun way.
Price £17.99
The book does cover building projects
Some useful projects to help you get started
well, and looks at a number of common with the Arduino Uno.
shields and simple components. However, it
completely passes by some things that
28 www.linuxvoice.com
REVIEWS BOOKS
Culture & Empire: Digital Revolution ALSO RELEASED…
Andrew Gregory gets out his tin foil hat, then puts it away again.
C
ulture & Empire: Digital Revolution, by
Pieter Hintjens, is a remarkably
clear-sighted overview of how
mass connectivity leads to social change
and provides an examination of why some
forces are resisting this change
Culture & Empire
Hintjens’ analysis is part sociology, part is licensed CC-BY-
free-market economics, part Marxist SA-3.0, so the author Get ahead of
theory, but it coalesces into a convincing is practising what he the curve by
argument (admittedly with the odd preaches. coding Glass
digression). If you’ve looked around you at apps today.
state surveillance, SOPA and David vocabulary. This book is the serious work Programming Google Glass
Cameron’s Porn FilterTM with growing that this serious subject deserves. Even if Bruce Sterling isn’t a fan, there’s no
unease, this book is unlikely to make you doubt that Google’s wearable tech has already
feel more comfortable; instead it clarifies had a huge impact. You could probably use this
exactly why your gut feeling is right and LINUX VOICE VERDICT book to write your own inane bird physics
game and take over the world.
helps intellectualise the reasons why the Author Pieter Hintjens
Publisher iMatix Global Services
powers that be want to control us. ISBN 978-1492999775
If that sounds abstract and academic, it Price £14.93 print
isn’t. For a work of social theory there’s £1.90 (Kindle)
PDF download Free
very little of the made-up nonsense words
Goes on occasional flights of fancy, but
that usually pervade the subject; instead,
retains throughout a core of truth. Highly
the writing is clear, explaining complex recommended.
ideas in simple terms that make you think
without having to work on your
Mediaeval technology & social change perl -n -e
‘tr/[a-z]/
Can Graham Morrison learn anything from Mediaeval tech? [A-Z]/;print’
T
his book was recommended to us Mastering Perl, 2nd Edition
The definitive tome on Perl programming gets
by Robert ‘r0ml’ Lefkowitz when an upgrade. This is not light reading for the
we spoke to him last year. It was bath. It’s not even heavy reading. It’s about
published in 1962, but r0ml had us Perl, and so exists on its own plane.
enraptured by its principle argument –
that the appearance of the horse stirrup in
medieval Europe was a precursor to What can we learn
feudalism. The book’s thesis explains that from the tech shifts
this form of combat, where a knight wields of 1,200 years ago?
heavy weapons while remaining in full Quite a bit, actually…
control of his steed, altered the structure
of society because it was such an effective interested in the northward shift in
form of combat. Those knights were European powerplay. Regardless, it’s a
bribed into service by offers of land which, fascinating book that’s easier to read than
The cool kids
in turn, was farmed by peasants pledged you might imagine for an old title devoted
don’t use
to serve their master in battle. to constructing an academic thesis.
Bash.
r0ml was working on a theory that used They use Zsh.
some of these ideas, replacing the stirrup LINUX VOICE VERDICT
with the computer and pondering feudal Author Lynn White, Jr Learning Shell Scripting with Zsh
emancipation. It’s all about resources, and Publisher Oxford University Press Zsh is awesome – you don’t know it yet. It can
as long as open source exists and ISBN 978-0195002669 do so many cool things that Bash can’t, and
Price £13 also makes you look more l337 at conferences
everyone is taught how to code, we’ll be and LUG meetings. This book should tell you
The perfect excuse to raid every second-hand
free from bondage forever – huzzah! Or bookshop you see. everything you need to know.
something like that. Later chapters aren’t
quite so interesting, unless you’re
www.linuxvoice.com 29
GROUP TEST ENCRYPTION
ENCRYPTION GROUP TEST
Mayank Sharma gathers the best file encryption tools
to help you take charge of your personal privacy.
On Test Encryption
Let’s define what we mean by this vague term.
TrueCrypt
T
he Snowden revelations Then there are applications that
URL www.truecrypt.org
Version 7.1a have reinvigorated interest will help you create encrypted silos
Licence in personal privacy. You can within your filesystem, or entire
The TrueCrypt licence control access to the data in your partitions. The hallmark of these
Multi-platform graphical computer with the use of file applications is that they can do
solution. permissions and user accounts. on-the-fly encryption. This means
But this type of protection isn’t they will automatically encrypt your
BestCrypt enough to deter a determined
intruder. The only sure way to keep
data before writing it to the disk and
decrypt it when called for, assuming
URL www.jetico.com your personal data to yourself is to you have the right credentials.
Version 2.0-3 encrypt it. Working with encrypted On the downside, there’s usually
Licence Proprietary data is an involved process, but it’ll a performance hit with transparent
The paid-for solution –
go a long way in reinforcing your encryption, depending on the type
does it offer enough to
justify the price tag? security and insulating your data of cipher you’ve used to scramble
from unwanted attention. the data. However some tools can
You’ll find lots of open source take advantage of dedicated
zuluCrypt encryption software in your cryptographic hardware extensions
distribution’s package repository. built into many modern desktop
URL http://code.google.
com/p/zulucrypt Some leading distributions, like processors to minimise the
Version 4.4.7 Fedora, Ubuntu and Linux Mint, performance degradation.
Licence GNU GPLv2 even let you encrypt your entire disk Now then: which of our chosen
Flexible, graphical and while you are setting it up. contenders is best for you?
intuitive encription.
eCryptfs
“You’ll find lots of encryption software
URL http://ecryptfs.org
in your distribution’s package repository”
Version 103
Licence GNU GPLv2
THE CRUCIAL CRITERIA
Speedy encryption that
works at kernel level. All the tools were installed using their We also look at usability with respect
recommended installation mechanisms. to their feature set: a feature-rich
Tools that were easier to install and use command-line app isn’t necessarily a
were rated higher. However, encryption better option than a simpler but intuitive
EncFS is a complicated subject that needs graphical tool that gets the job done.
to be handled with care, which is Finally we also test the performance
URL www.arg0.net/encfs why we also looked at the help and of each app by creating containers of
Version 1.7.4 documentation offered. equal size using the default ciphers. We
Licence GNU GPLv2 We didn’t test the security provided then copy a bunch of small and large
Command-line utility by the tools, because they all use files and time the operation with the
powered by FUSE industry-standard ciphers to encrypt the time command. This isn’t by any means
(filesystem in userspace). data. We do however take note of the a reliable benchmarking technique, but
ones that enable their users to select it should give you an idea about the
the encryption cipher and its strength. relative performance of each tool.
30 www.linuxvoice.com
ENCRYPTION GROUP TEST
Supported ciphers What can it
Do they meet industry standards?
encrypt?
Disk, partitions, swap…
T
he encryption tools in this group test
can be classified into two types based
on how they operate. TrueCrypt,
BestCrypt and zuluCrypt perform block device
encryption – that is, they encrypt everything
written to a certain block device. The block
device can be a whole disk, a partition or even
a file mounted as a loopback device.
With block device encryption, the user
creates the file system on the block device,
and the encryption layer transparently
encrypts the data before writing it to the actual
lower block device. One advantage of this is
that attackers learn nothing about the
Attackers will try to break your password rather than the encryption, so make sure you use a filesystem unless they have the means to
long and random password with special characters to mitigate dictionary attacks. decrypt the data. They wouldn’t even know the
type of filesystem or the directory structure.
A
ll encryption software relies on a Another security feature that all these – while encrypted it just appears like a large
cipher to encrypt. A cipher is an encryption tools offer is the use of key blob of random data.
algorithm that does the files. A keyfile is a file whose content is On the other hand, a disadvantage of block
encryption and decryption. Also important combined with a password. Until the device encryption is that a fixed region of
is the key size of the cipher that’s used to correct keyfile is provided, no volume that storage must be pre-allocated. That’s where
encrypt. As the key size increases, so does uses the keyfile can be mounted. stacked filesystem encryption solutions, like
the complexity of exhaustive search to the eCryptfs and EncFS, come into the picture.
point where it becomes impracticable to Salt data They add an additional layer to an existing
crack the encryption directly. TrueCrypt also supports adding salt data filesystem. Files that are written to an
The most popular encryption cipher is to the encrypted container. The salt encryption-enabled folder are encrypted on the
the Advanced Encryption Standard (AES) comprises values generated by TrueCrypt’s fly before the underlying filesystem writes
which is based on the Rijndael cipher. AES random number generator, and makes it them to disk. While they don’t need a fixed
with a key size of 256 bits is widely used difficult to pre-compute all the keys for a region of storage, on the downside they don’t
as it offers the right balance of speed and dictionary attack (if a 512-bit salt is used, hide file metadata such as the number of files,
security. Everything in this group test there are 2^512 keys for each password). directory structure, file sizes, permissions, etc.
defaults to this cipher combination. We’d also like to point out that zuluCrypt Using TrueCrypt and zuluCrypt you can
Besides zuluCrypt, which only uses AES, is a front-end to the cryptsetup utility, create an encrypted disk within a file or within
all others offer additional ciphers. EncFS which can setup encrypted LUKS volumes a non-system partition or USB disk. They
and eCryptfs also support the Twofish based on the dm-crypt kernel module. cannot encrypt the boot partition or the boot
algorithm, while TrueCrypt additionally LUKS is the Linux Unified Key Setup, drive in Linux (TrueCrypt supports this feature
offers Serpent, and BestCrypt offers which is a disk-encryption specification in its Windows version), but you can use
Blowfish, CAST, and GOST 28147-89. designed specifically for Linux. dm-crypt, zuluCrypt to encrypt/decrypt any file with
Serpent and Twofish are considered by via the cryptsetup command-line tool, can either a passphrase or a keyfile.
the US National Institute of Standards and use any algorithm that are built into your BestCrypt offers different encryption
Technology to have a higher security kernel which you can find out with the cat products but only the Containers app is
tolerance than AES, but are also slower. /proc/crypto command. It can also add available for Linux, which creates encrypted
TrueCrypt is the only tool that supports salt when creating LUKS containers. containers in which to store files.
cascade encryption, which is the process
of encrypting an already encrypted VERDICT VERDICT
message, either using the same or a TrueCrypt TrueCrypt
BestCrypt BestCrypt
different algorithm. It supports five zuluCrypt zuluCrypt
eCryptfs eCryptfs
algorithms for this purpose, including EncFS EncFS
AES-Twofish and Serpent-Twofish-AES.
www.linuxvoice.com 31
GROUP TEST ENCRYPTION
Noteworthy Usability
features Do you need a superior intellect to use these tools?
T
ools that encrypt your data should This places even more responsibility on
be handled with care. The FAQs of the developers of encryption software to
What makes our chosen few encryption software deal with make sure their users aren’t overwhelmed
stand out from the crowd? accidental data loss because of forgotten by the tools at their disposal. In addition to
passwords, misplaced key files or being easy to install, a well designed tool
T
rueCrypt is the most portable solution damaged headers. The same software should expose its features correctly, so
of all the tools in this group test, that guards your data might also prevent that it doesn’t force the user to look for the
because you can use the application you from accessing it ever again. help file or support on the forums.
without having to install it. One of its most
notable features is the ability to create a
hidden volume inside another encrypted TrueCrypt
volume. Although many experts have Because of TrueCrypt’s unclear licensing line. The step-by-step volume creation
played down this feature’s effectiveness terms, the software isn’t available in the wizard makes the tool ideal for new users.
in concealing the fact that there’s a hidden repositories of any Linux distro and has to TrueCypt also has an option to benchmark
container from a determined attacker, it be downloaded from its website in the the speed for encryption/decryption of
does provide plausible deniability to casual form a compressed installation script. We various supported encryption ciphers.
inspection. Under Windows you can even run also don’t like it that TrueCrypt requires You can use the software to organise
a hidden operating system from this partition, you to either use a sudoers configuration volumes and mount them with a single
though this functionality, as with many of or run the tool as the root user. click. The tool also lets you change the
TrueCrypt’s specialist features, is unavailable The app has a graphical interface and encryption password and add or remove
on Linux. can also be controlled from the command keyfiles to volumes.
BestCrypt also enables you to create a
hidden container inside an already encrypted
volume. In fact, with BestCrypt, unlike
TrueCrypt, you can create multiple hidden
containers. BestCrypt also offers the ability
to protect existing hidden containers when
creating a new one. Using the tool you can
also encrypt the container headers, which TrueCrypt suffers from its
conceals the fact that you have an encrypted bespoke licence, which keeps
container. The tool also enables you to it out of distro repositories.
re-encrypt containers, change their ciphers
and encryption keys, and also lets you add
multiple passwords. BestCrypt
The proprietary tool isn’t the easiest to new container or load an existing one.
Zulus, Sir – faahsands of ’em install, but its documentation explains the New users can create a container simply
zuluCrypt’s main attraction is that it lets you process in detail. Like TrueCrypt, the app by specifying a size and selecting the
manage different types of encrypted volumes, has a graphical interface and a command- location of the container. Advanced users
including those created by dm-crypt/LUKS line utility, which has more functions than can optionally bring up additional options
and TrueCrypt. It can also encrypt individual the GUI. For example, you can benchmark to select a filesystem for the container,
files with GPG. the performance of the various ciphers change its encryption algorithm and
The one feature common to both supported by BestCrypt only via the CLI. encryption mode.
stacked filesystem encryption tools is the The graphical interface is pretty simple You can perform various tasks on the
portability of the encrypted files that can be to navigate. You get buttons to create a container before mounting
decrypted on other operating systems as
well. Furthermore, eCryptfs lets you assign
independently revocable multiple keys for the
same encrypted data.
VERDICT
TrueCrypt
BestCrypt
zuluCrypt BestCrypt costs €49.95, and
eCryptfs the Linux version doesn’t
EncFS
support full-volume
encryption.
32 www.linuxvoice.com
ENCRYPTION GROUP TEST
zuluCrypt
ZuluCrypt’s GUI isn’t as polished as
BestCrypt’s but is more intuitive than
LUKS container, the app will remind you
to back up its header immediately after Support and
documentation
TrueCrypt’s. You get separate options to creating the container. The tool also has
create an encrypted container in a file and options to encrypt and decrypt standalone
in a partition. You can also create random files and securely erase a device by writing
keyfiles and use these to encrypt the random data to it, as well as a graphical
When you’re stuck and you need
containers. If you use the app to create a tool for mounting and managing volumes.
help, where do you turn?
T
rueCrypt includes a comprehensive
150-page user guide, which provides
detailed instructions on using the
application as well as educating users about
the precautions they must take when dealing
ZuluCrypt is a front-end to with any kind of encrypted data. There’s also
the crypsetup utility, but it a step-by-step beginner’s guide and an FAQ
also has its own CLI version. that discusses common issues such as
forgetting encryption passwords and how to
use the software on a removable device. The
eCryptf forum on the website (forums.truecrypt.org)
The best thing about eCryptfs is that it’s When you create a new encrypted has a dedicated board on problems related to
available in all major Linux distributions, directory, the tool will take you through the Linux version of TrueCrypt.
so you can install the ecryptfs-utils a command-line wizard to help you When we checked, the latest update was a
package using your distribution’s package configure the directory. You’ll be asked to week ago, whereas the Mac forum had been
manager. This will install a bunch of select one of the six supported ciphers updated that day. Either Linux users are better
individual utilities to create, mount, and and its length to encrypt the directory than Mac users at using encryption software,
manage all aspects of the file system level and you can also choose to encrypt the or there just isn’t as much interest in the Linux
encryption system. filename within this directory as well. version. Or maybe it’s a bit of both.
Read the manual, and the FAQ
BestCrypt also has a detailed user guide as
eCrypt is simple to set up: well as a quick start guide and a forum board,
just create a directory that
but no paid support, while the primary source
you want to encrypt and
mount it as the ‘ecryptfs’ of usage information about eCryptfs is in the
type. You can also use the form of man pages for the various utilities. It’s
utilities to set up a private the same with EncFS, although its website
directory and encrypt the hosts some information about the tool for
swap. new users.
Documentation is the weakest point of
zuluCrypt. It has no user guide and no
EncFS how-tos that explain basic usage of the
EncFS doesn’t have an official graphical binary. EncFS also requires that two application. However its developer makes up
front-end, but Gnome users can use the directories are used to keep encrypted and for that by being quite vocal and active on the
Gnome Encfs Manager to manage and decrypted files. It’s common practice to popular forum boards. From the Help menu in
mount directories with it. The EncFS utility store the encrypted files inside a hidden the app you can find out the default ciphers
comes in several distros, including Fedora. directory. When you mount a new for the various types of containers you can
Setting up an EncFS-encrypted folder is encrypted directory, you get two pre- create with the app and some brief but
similar to eCryptfs, although instead of configured settings with different important information such as the
using mount you need to use the encfs encryption settings. importance of backing up LUKS headers. The
FAQ on the zuluCrypt website answers some
pretty useful questions and is a must-read for
all users.
VERDICT
TrueCrypt
BestCrypt
You can invoke EncFS in zuluCrypt
eCryptfs
expert mode, which lets you EncFS
manually pick the various
encryption settings.
www.linuxvoice.com 33
GROUP TEST ENCRYPTION
Performance Mounting volumes
Do they add much overhead? Working with the encrypted containers.
AES is the fastest cipher, with Blowfish just behind. Twofish is eCryptfs bundles a script that can use cryptsetup to encrypt the swap
relatively slower, and Serpent is the slowest. partition, as well as the more usual dasa partitions, such as /home.
T T
rueCrypt supports parallelised encryption for multicore o mount an encrypted volume you provide the correct
systems. This means that it can use all the cores in a password and/or keyfile. Once mounted, an encrypted
multicore processor in parallel to encrypt and decrypt the volume behaves like any other disk. You can even play or
data. Furthermore, header key derivation is also parallelised, which record multimedia content, like a video from a mounted encrypted
means TrueCrypt can also mount volumes faster. However, one volume – the app will load bits of the video and decrypt it in RAM.
performance enhancing feature in TrueCrypt, pipelined read/write The biggest advantage with both eCryptfs and EncFS is that
operations, is only available on the Windows version of the tool. they can be used to protect existing filesystems without block
The Quad-Core AMD A8 processor on one of our test machines device access, such as Samba shares or cloud storage folders.
supports hardware-accelerated encryption, and thanks to this They also allow offline file-based backups of encrypted files.
instruction set, which makes the encryption/decryption several eCryptfs has its own set of scripts to mount and unmount
times faster than when performed on a purely software encrypted directories. eCryptfs also has utilities that can mount
implementation. TrueCrypt isn’t the only app to take advantage of the encrypted directories from an Ubuntu live CD to help you
hardware acceleration. So too can eCryptfs and BestCrypt. recover data.
However, we couldn’t find the option to control the state of the AES EncFS also has its own CLI tool to mount encrypted folders. Like
hardware acceleration, either in the graphical front-end or the CLI eCryptfs it also needs two directories -- one to hold encrypted data
version. There’s no information on whether zuluCrypt uses and the other to hold unencrypted data.
hardware acceleration but cryptsetup does support it. You can mount BestCrypt and TrueCrypt encrypted volumes
from the graphical interface as well as the CLI. The graphical
FUSE boost interfaces of both tools enable the user to mount the volumes as
Since EncFS ties in to the Filesystem in User-Space kernel (FUSE) read-only. BestCrypt additionally lets you specify a mount point for
module, you should expect some drop in performance when using the container.
it. For the same reasons the authors of eCryptFS claim their tool is
faster than EncFS because there is no overhead caused by context More Zulu excellence
switching between the kernel and userspace. Many tools have a But both are topped by zuluCrypt, which includes the zuluMount
benchmarking tool built into them to help you compare the tool. This is a general-purpose mounting tool that can mount all
performance of the various ciphers for your setup. Some tools, encrypted volumes supported by zuluCrypt, including LUKS and
such as BestCrypt, measure performance by averaging the time it TrueCrypt volumes. You can also mount volumes from the main
takes to encrypt small amounts of data several times, while others zuluCrypt app, but zuluMount has a simpler interface and is
let you specify the size of the buffer you wish to encrypt. designed with the sole purpose of mounting and unmounting
In our tests, TrueCrypt was the fastest, writing over a gigabyte of filesystems. In fact zuluMount can mount and unmount
files in under a minute. eCryptfs was marginally slower while unencrypted volumes as well and can even manage plugged-in
BestCrypt took over three minutes and was the slowest of the lot. devices. Like zuluCrypt, the zuluMount tool has a CLI interface as
EncFS, despite its userspace disadvantage, repeatedly edged out well. zuluMount also lets you make a mount point public and share
zuluCrypt sometimes by as much as 20 seconds. it with other users.
VERDICT VERDICT
TrueCrypt TrueCrypt
BestCrypt BestCrypt
zuluCrypt zuluCrypt
eCryptfs eCryptfs
EncFS EncFS
34 www.linuxvoice.com
ENCRYPTION GROUP TEST
OUR VERDICT
ENCRYPTION TOOLS
Block device vs filesystem encryption.
If you are serious about encryption, pick a distro that offers the
B
roadly speaking we have platforms. In effect you can bundle option to encrypt all contents in your disk.
covered two types of TrueCrypt executables in a
encryption tools in this
group test. Three do block device
removable device along with the
encrypted containers and decrypt
1st zuluCrypt
Licence GNU GPL v2 Version 4.6.7
encryption and two do stacked them under any OS.
filesystem encryption. The app also offers denial http://code.google.com/p/zulucrypt
You’d use the latter if you wanted encryption just like BestCrypt. But Built on a solid foundation, the tool’s intuitive graphical interface
to keep an encrypted folder within, the use of hidden folders can be makes up for the lack of documentation.
say, your home directory. For this dangerous in the hands of
purpose you can use either
eCryptfs or EncFS. If you want
inexperienced users: any changes
you do to the mounted main part
2nd TrueCrypt
Licence TrueCrypt Licence Version: 7.1a
speed, go with eCryptfs, which can overwrite and damage the
operates in the kernel space. hidden part. www.truecrypt.org
The other three tools create All things considered, zuluCrypt One of the most popular encryption tools currently undergoing an
audit to iron out some long pending issues – such as its licensing.
“zuluCrypt gives you most of TrueCrypt’s
functionality with a clearer licence.” 3rd eCryptfs
Licence GNU GPL v2 Version 103
encrypted containers. In their comes out on top, as it has several http://ecryptfs.org
encrypted form these file distinct advantages over TrueCrypt. One of the strengths of this tool are its wonderful utilities that can
containers appear like unintelligible To begin with, the app doesn’t also help locate and recover encrypted data.
files, and you can work with them expect you to have a sudo setup
just like any other file on the
system, within your file manager.
like TrueCrypt. Also with zuluCrypt
you get most of TrueCrypt’s
4th EncFS
Licence GNU GPL v2 Version 1.7.4
functionality with a clearer licence.
A worthy runner-up zuluCrypt can create encrypted www.arg0.net/encfs
The most popular tool for volumes in both files and partitions The lack of an official graphical tool is made up by the availability
creating such containers is and allows the use of keyfiles. of a pretty good third-party one.
TrueCrypt. The biggest advantage zuluCrypt can also encrypt
of the app is its portable nature,
which means you can run in
individual files and can read
different types of containers. To top
5th BestCrypt
Licence Proprietary Version 2.0-3
without installing the app. This is it off, it has a nice intuitive graphical
truly a useful feature especially interface and a specialised tool for www.jetico.com
when combined with the fact that managing encrypted and The proprietary tool doesn’t offer anything worth recommending
the app is available on multiple- unencrypted partitions. over its open source competitors. Did we mention it costs €49.95?
YOU MAY ALSO WISH TO TRY…
zuluCrypt is a front-end to the cryptsetup and utilities without the zuluCrypt GUI – that is, uses the utility to encrypt the swap partition.
tcplay command-line utilities. As we’ve direct from the command line. It can also encrypt files as long as they
mentioned earlier in the group test, the dm-crypt/LUKS can be applied to any type mounted as a loopback device (with the
cryptsetup utility lets you create encrypted of device that is natively understood by the losetup utility), and thus available under the
volumes based on the dm-crypt kernel kernel. It can encrypt whole disks, removable /dev directory. cryptsetup can take advantage
module. Then there’s tcplay, which is a media, partitions, software RAID volumes, of accelerated encrypted hardware, and you
feature-rich BSD-licensed implementation of and logical volumes. It can also encrypt the can format the container with any filesystem
TrueCrypt. If you prefer you can use these swap partition and in fact the eCryptfs tool that’s supported by the kernel.
www.linuxvoice.com 35
SUBSCRIBE
SUBSCRIBE shop.linuxvoice.com
Not all Linux magazines are the same
Introducing Linux Voice,
the magazine that:
Gives 50% of its profits
back to Free Software
Licenses its content
CC-BY-SA within 9 months
12-month subs prices
UK – £55
Europe – £85
US/Canada – £95
ROW – £99
6-month subs prices
UK – £38 DIGITAL
Europe – £53 SUBSCRIPTION
US/Canada – £55 ONLY £38
ROW – £60
Each month Linux Voice includes 114 pages of in-depth tutorials,
features, interviews and reviews, all written by the most
experienced journalists in the business.
Payment is in Pounds Sterling. 12-month subscribers will receive 12 issues of Linux Voice a year. 6-month
subscribers will receive 6 issue of Linux Voice. If you are dissatisfied in any way you can write to us to cancel your
subscription at subscriptions@linuxvoice.com and we will refund you for all unmailed issues.
36 www.linuxvoice.com
NEXT MONTH
NEXT MONTH IN
EVEN MORE AWESOME!
ON SALE HELLO
WORLD! HELLO
THURSDAY WORLD! Old Code
27 MARCH We stand on the
shoulder of giants:
none broader than
Rear Admiral Grace
Hopper, the brain
behind UNIVAC and
filer of the best bug
report ever.
Hack the kernel
The impenetrable
HELLO mysteries of the
WORLD! Linux kernel are ours
to command. Well,
we can perform the
HELLO kernel equivalent of
WORLD! ‘Hello, World’, which
is still pretty cool.
Munich migration
CODE FOR ALL Find out how Munich
city council switched
15,000 Windows
Bring your evil genius to life on every kind of desktops to its own
Linux: Firefox OS, Android, desktop Linux – custom Linux and
made Steve Ballmer
even QML, so you can have your apps ready even angrier than he
when the Ubuntu phone roars into life! normally is.
LINUX VOICE IS BROUGHT TO YOU BY
Editor Graham Morrison Editorial consultant Nick Veitch through the use of advice in this magazine. Copyright Linux is a trademark of Linus
graham@linuxvoice.com nick@linuxvoice.com Experiment with Linux at your own risk! Torvalds, and is used with permission.
Deputy editor Andrew Gregory Distributed by Marketforce (UK) Ltd, Blue Anything in this magazine may not be
andrew@linuxvoice.com All code printed in this magazine is licensed Fin Building, 110 Southwark Street, London, reproduced without permission of the editor,
Technical editor Ben Everard under the GNU GPLv3 SE1 0SU until November 2014 when all content
ben@linuxvoice.com Tel: +44 (0) 20 3148 3300 (including images) are re-licensed CC-BY-SA.
Editor at large Mike Saunders Printed in the UK by ©Linux Voice Ltd 2014
mike@linuxvoice.com Acorn Web Offset Ltd Circulation Marketing by Intermedia Brand ISSN 2054-3778
Creative director Stacey Black Marketing Ltd, registered office North Quay
stacey@linuxvoice.com Disclaimer We accept no liabiliy for any House, Sutton Harbour, Plymouth PL4 0RA Subscribe: shop.linuxvoice.com
loss of data or damage to your hardware Tel: 01737 852166 subscriptions@linuxvoice.com
www.linuxvoice.com
FEATURE FREE SOFTWARE
OF THE BEST THINGS ABOUT
FREE SOFTWARE
2014
This year will be the best ever for Linux and Free Software. Why?
Mike Saunders has 51 reasons…
38 www.linuxvoice.com
FREE SOFTWARE FEATURE
F
or so long, it looked like Linux While the almighty annihilation of little Linux machines in their pockets.
was on the cusp of causing a Windows never happened, a much And the Raspberry Pi has been a
revolution, of pulling the masses more subtle set of changes took storming success, introducing children
away from Windows and introducing place. Linux is everywhere now – worldwide to open computing.
them to a new world of computing. but not many people know it. GNU/ 2014 has a huge amount in store for
Linux distributions were becoming Linux powers many of the biggest Linux users, and not just in terms of
easier to use by the month, desktop websites in the world, serving up web software – people, communities and
applications were being refined and applications to hundreds of millions of events will also shape the course of the
polished, and PC vendors were starting users. Android dominates the mobile year. So read on for 51 awesome things
to ship Linux with their machines. scene, with countless people carrying to look forward to…
1
FEDORA 21 FIREFOX
Fedora 21 bucks the VERIFIED BUILDS
trend of previous Even if you’re running an
releases by having a open source browser,
longer development you can’t be 100%
cycle than usual certain that the binary
which will hopefully executable doesn’t
provide more time for have an NSA backdoor
new technologies like inserted, possibly via
2
Wayland to settle down. a rogue compiler. Well,
All being well, the distro this is changing: Mozilla
will arrive in August. And is pushing ahead with Recent Fedora releases have been (in)
the lack of a codename is Firefox verified builds, famous for their quirky codenames; it looks
like Fedora 21 will be a lot more serious.
significant: some would which means you’ll
argue that names like be able to prove that
“Beefy Miracle” stopped nothing dodgy has been KDBUS
5
certain users from taking added to the source code Lennart Poettering is at it again. After causing a stir INKSCAPE 0.91
Fedora seriously. before it was compiled. among boot script and sound server developers Hang on a minute –
with systemd and PulseAudio, the German coder is hasn’t Inkscape been
now trying his hand at inter-process communication at 0.48.x for years
FREEBSD 10 GIMP 2.10 (IPC) in the Linux kernel. Right now, applications now? Well, yes, but
we’ve always thought
3
FreeBSD is more Talk about development and background processes can communicate with
this was unfair.
conservative than Linux hell: GEGL, the Generic one another via D-Bus, which Poettering describes Inkscape is an excellent
4
in that it doesn’t get Graphics Library for as “fantastic”. But if it’s so good, why do we need to vector editor already
fancy new features so Gimp, has been in replace it? used in production
quickly, but it’s more development since 2000, For starters, D-Bus is fine for sending short environments, so
6
stable in the long run. yet still isn’t an official messages between programs (eg a desktop volume we’re glad to see the
next release will get
FreeBSD 10 has just part of the program. applet telling the sound server to knock it down a close to the magic
been released, with the GEGL will support notch), but it’s not so good for transporting data, as it 1.0 number. Version
GCC compiler suite being images with higher bit adds latency and complication. Kdbus (Poettering’s 0.91 will include:
replaced by Clang in the depths, along with non- project) is an in-kernel version of D-Bus, designed Cairo rendering for the
base system, Raspberry destructive editing. Parts for shifting large (multi-gigabyte) quantities of data display engine and PNG
export; a new grayscale
Pi support, and a new of it were implemented in with minimum overheads. It’s still very much in display mode; and
bhyve hypervisor. See Gimp 2.6, and we should development, but providing it gets a (usually very rare) heaps of performance
https://wiki.freebsd.org/ see the whole shebang thumbs-up from Linus Torvalds, we might see it in the improvements. It’ll use
WhatsNew/FreeBSD10. rolled into Gimp 2.10. mainline kernel tree by the end of the year. 25% less RAM in some
Poettering is developing Kdbus with long-time cases too, making it
better for older hardware.
kernel hacker Greg Kroah-Hartman and others; follow
its progress here: https://github.com/gregkh/kdbus.
AKADEMY
Free software events are great. There’s place from 6–12 September in Brno,
7
lots of hacking, lots of brainstorming, second city of the Czech Republic, and
Brno has Akademy, and lots of beer. Akademy is the annual a beautiful place at that. New features
good beer and horses – summit for KDE developers: it’s a free will be proposed and discussed, so
what’s not to like? and non-commercial event organised head to http://akademy.kde.org if you
by the community. This year it will take want to take part.
www.linuxvoice.com 39
FEATURE FREE SOFTWARE
10
EDWARD SNOWDEN
DEBIAN 8.0
9
FREEZE
To some he’s a true American patriot, Microsoft, Apple, Google et al are really BANSHEE 3.0
fighting to defend the US constitution doing their best to defend my data? Hopefully we’ll see
It looks like we won’t see against attacks by a spy-crazy How much are these companies version 3.0 of this
Debian 8.0 this year, government. To others he’s a thrice- sharing with governments? awesome music
which isn’t surprising cursed traitor who revealed confidential Linux and Free Software is no player very soon: it’s
given the distro’s long
intelligence information to the rest of panacea, but at least the openness of being ported to GTK 3,
8
gaps between releases.
One of the biggest the world, harming American interests. its source code provides reassurance and will also support
changes will be the In any case, there’s no doubt that that dodgy back-doors added by synchronisation with
switch to a new boot-up Edward Snowden’s leaks have caused a intelligence agencies would be spotted Symbian devices. 37 bug
system: the old init huge debate – not just in the US but quickly. The NSA revelations provide fixes have been made
scripts will be replaced
by systemd or Upstart
around the world. useful ammunition for Linux advocates: since the 2.6 release too.
(as used in Ubuntu). A Whether it makes us safer or not, the we can confidently say “Our software is
debate is taking place sheer amount of spying on their very unlikely to be spying on us,
about the possible boot citizens that governments are doing is because we can read the source code”. ENLIGHTENMENT
systems, and Debian 8.0 shocking. Edward Snowden hasn’t There are more Snowden leaks due in E19
won’t be frozen (closed
for new features) until
come out waving Linux flags and 2014, and they will drive more people to The next release of the
November, so there’s championing open source, but a lot of investigate Linux and Fre Software. world’s fanciest window
lots of time to decide. people are starting to ask: can I really There’s even a Snowden tribute distro: manager will bring a new
trust my software? Can I be sure that www.binaryemotions.com/snowden. compositor and better
Wayland integration.
Lead developer
DIGIKAM 4.0 GNU HACKERS’ Rasterman hopes to
11
Arguably the best open MEETING 2014 “close the feature
12
source photo manager The GNU Hacker’s window sometime in
in existence, Digikam is Meeting is an event to February”, so we’re likely
going from strength to discuss technical, social to see the final release
strength. The 4.0 release and organisational hit the internet some
– due to be released in issues relating to Free time in the summer.
May – brings oodles of Software and the GNU www.enlightenment.org
15
new features thanks to Project. It will take place
the Google Summer of on 15–17 September in
Code. Working with tags Munich at the Technical
EMBEDDED
will be much easier via University, and while it’s
a new hierarchical tags free to attend, you have
LINUX
manager and drag-and- to register, at www.gnu. Edward Snowden’s leaks are CONFERENCE
13
drop capabilities in the org/ghm/2014. encouraging some people to Cars, washing machines,
try Free Software. fridges, doorbells – you
Tags Manager, while Anyone can give image: Laura Poitras / Praxis Films
name it, Linux is in it.
Pick Labels can be used presentations ranging
The development scene
to auto-tag images. from 30–60 minutes, so for embedded Linux
Nepomuk support has if you’ve been working on devices is bustling, so if
been re-implemented, a piece of software you’d SOFTWARE FREEDOM DAY you’ll be in San Jose
after being broken for a like to see in GNU, let the We all try to spread the word about Linux and FOSS, from 29 April – 1 May,
check this event out.
while. www.digikam.org community know. but sometimes it’s difficult, especially over the
http://tinyurl.
14
internet. So every September, Free Software com/4gvlozz
supporters organise real-world events to promote the
benefits and values of FOSS, and everyone is
welcome to get involved. You could set up an
installfest, for instance, where curious Windows or
Mac users bring along their machines and you set
them up with a newbie-friendly Linux distribution.
Alternatively, you could give a presentation
explaining why Free Software is good for society and
encourages sharing. It’s a great way to demonstrate
that our community isn’t just a gaggle of geeks
fiddling with code via the internet – we’re real people
trying to make the world better.
This year’s Software Freedom Day will take place on
2013’s Software Freedom Day saw a huge number of 20 September, so to start your own event or join an
events across the whole globe. existing team, visit www.softwarefreedomday.org.
40 www.linuxvoice.com
FREE SOFTWARE FEATURE
MIR
Few things in the recent history of Linux have been as
16
controversial as Mir. Ubuntu’s replacement for the
X Window System was met with widespread hostility:
why didn’t Canonical go with Wayland, like everyone
else? Was this a symptom of “not invented here”
syndrome, or is Canonical trying to distance itself
from the Linux mainstream?
Various technical reasons for the existence of
Mir were put forward, and Canonical hoped to have
Mir running by default in Ubuntu 14.04. This didn’t
happen, so maybe we’ll see it in Ubuntu 14.10, but
the controversy continues. An Intel developer working
on an open source graphics driver recently removed
support for XMir, a Mir compatibility layer for X
applications. Intel’s reasoning? “We do not condone or
support Canonical in the course of action they have
chosen”. Some Intel developers are working on the
Wayland project, so there’s plenty of politics involved.
Digikam 4.0 will feature much better tag management, and support for Nepomuk.
17
GNOME 3.12
Scheduled for release at the end of files, while the Epiphany web browser
March, and due to land in the major has seen some interface polish.
distros shortly after that, Gnome 3.12 Gnome Software will support a rating
will be largely an incremental rather system along with the ability to launch Say hello to Gedit’s new interface, debuting in Gnome
than a major improvement. That’s fine installed apps, and the Gnome Online 3.12. Like Gnome 3, it might take some getting used to…
by us: plenty of people are still trying to Accounts tool receives support for
get their heads around the Gnome 3 online bookmarking service Pocket. If
interface, so the more fine-tuning the you’re a regular user of Gedit, be
developers do, the better. Overall prepared for a big revamp of the
STEAMOS
performance will be boosted thanks to interface. There’s already a lot of debate It’s going to be a huge
Gnome Shell becoming a single binary about the UI changes, but you’ll be able year for gaming on
19
Linux. Until very
file rather than a bunch of JavaScript to try it for yourself very soon.
recently, PC gaming
was almost entirely the
domain of Windows, with
GCC 4.9 HAIKU OS R1? just a tiny slither of
20
The next version of the We’ve been following the progress to have some competition – and Haiku triple-A titles making
their way to our choice
GCC will include support of Haiku OS, an open source BeOS is starting to provide it.
18
of operating system.
for OpenMP 4.0, along clone, for as long as we can remember. It’s still in the alpha stages of Valve’s decision to use
with Intel’s Silvermont The goal is noble: a lightning-fast, development, but wrinkles are being Linux for its Steam
and Broadwell trimmed-down, multimedia-friendly OS ironed out and more native software is Machines has caused
microarchitectures. built specifically for the desktop (so it arriving all the time. We hope to see the quite a stir, though:
suddenly Microsoft isn’t
Our favourite feature? doesn’t get sidetracked trying to be a first beta release this year, and maybe
involved at all. SteamOS
Coloured warnings and server OS as well). As much as we love the first full one (R1) as well, if we’re isn’t a typical distro and
error messages! Linux on the desktop, it’s always good lucky. www.haiku-os.org won’t cause a mass
influx of Windows users
to Ubuntu or Fedora, but
it will show that Linux is
a great OS for gaming.
www.linuxvoice.com 41
22
FEATURE FREE SOFTWARE
SCRIBUS 1.5 LINUXTAG 2014 CENTOS AND RED HAT
Scribus, the open source Germany’s biggest Linux For years, Red Hat quietly accepted the existence of ROOTLESS X
desktop publishing app, show (it’s been running CentOS, a free rebuild of its Red Hat Enterprise Linux Currently, some parts of
has been at version 1.4.x since 1996) will take (RHEL) product. Linux admins could do testing work the X Window System
run as root, which opens
for over two years now, place from 8–10 May on CentOS builds, and pay Red Hat for commercial
up potential security
21 24
so we’re eagerly awaiting in Berlin. Droidcon, the RHEL support subscriptions later if necessary. The vulnerabilities. Hans de
the 1.5 release. It will “world’s largest Android two projects co-existed pretty well, and now they’re Goede has patched X to
bring tabs for working on developer event”, will going to work together. work with systemd-login
multiple documents, a also be housed under Red Hat is employing a bunch of CentOS and obviate its need for
root privileges entirely.
23
new Preferences dialog, the same roof, so we can developers who will continue to work full-time on
Maybe we’ll see it in
support for more colour expect a feast of Linux- CentOS, but who will also enjoy greater integration distros this year…
palette formats, and a related fun in Germany’s with the RHEL and Fedora communities. It’s a bold
new picture browser. counter-culture capital move from Red Hat, but it makes sense: CentOS users
http://wiki.scribus.net/ www.linuxtag.org/ may not pay money to Red Hat now, but a healthy
canvas/1.5.x_Roadmap 2014/en CentOS community means more potential RHEL
customers in the future.
27
We’re (still!) really excited about Haiku, a streamlined OS
built from the ground-up for desktop use.
25
MAGEIA 4
GOBOLINUX 015 We still can’t agree on
After a five-year hiatus, how to pronounce it,
GoboLinux is back. but this Mandriva spin-
Chances are you’ve
off is doing well, and
never heard of this Richard Stallman constantly reminds
distro, but it’s rather version 4 will deliver a
us not be sidetracked by gadgets and
cool: it has an entirely walled garden ‘app stores’. new welcome screen,
different filesystem software updates, and
26
hierarchy to other GTK 3 ports for most
distros. Instead of
of its drak*/*drake
program files being
scattered across RICHARD STALLMAN configuration tools.
/usr/bin, /usr/lib, /usr/ Love him or loathe him, Richard which described a futuristic world www.mageia.org
share and so forth, Stallman has a habit of getting things where the sharing of books and written
in GoboLinux every right. The founder of the GNU project information is punishable by law. Here
program lives in its own
directory. This makes it
(and Free Software Foundation) has we are, 17 years later, and DRM-laden PARALLELLA
much easier to manage been known to launch into rants about eBooks are being sold by the millions. This dinky credit card-
installations by hand topics that don’t seem immediately Customers are buying materials that sized computer has a
and copy programs to relevant, but a few years down the line, they can’t share, sell or pass on to lot in common with the
other machines. we all end up scratching our heads and their kids without potentially landing Raspberry Pi, but it’s
www.gobolinux.org
thinking, “Hmm, RMS was right”. His themselves in legal trouble. designed for developing
uncompromising stance on freedom Stallman saw this way down the high-performance,
28
makes him hard to deal with at times line, so it will be interesting to see what parallel processing
– but he has a knack of spotting topics he brings up this year. Even if he applications. It comes
problems way down the line. talks about threats to our freedom that with a 16- or 64-core
Way back in 1997 he wrote a parable don’t seem looming right now, you can Epiphany co-processor,
called The Right to Read (www.gnu. bet your bottom dollar/pound/euro that and starts at $99.
org/philosophy/right-to-read.html), they’ll come up in the future. www.parallella.org
42 www.linuxvoice.com
29 30
FREE SOFTWARE FEATURE
OPENSUSE 13.2 XFCE 4.12 HURD 0.6?
We should have a new Xfce picked up a bunch of new users in the previous version and align windows
release of OpenSUSE to the last couple of years, many of whom next to each other (instead of putting Development on GNU’s
31
own kernel has been
play with in July. It’s still left Gnome after the radical Gnome 3 them in a random gap). Thunar, the file stagnant for many years,
early in the development redesign. Development is rather manager, will support showing but the recent release
cycle, but it’s planned conservative in the Xfce camp: the last properties for multiple files of 0.5 could spur a bit
that the installer will be major release arrived in April 2012, and simultaneously, and also show more hacking activity.
simplified, and Plasma- Xfce 4.12 won’t actually move to GTK 3, mounted remote locations in the HURD is a microkernel
that aims to be more
nm should replace as some people expected. Instead it will shortcuts pane. secure and stable than
NetworkManager-kde4. stay with GTK 2, but put the framework microkernels like Linux.
The new installer could in place to move to the newer toolkit at Maybe 0.6 will arrive
make its way into SUSE a later date. this year: www.gnu.org/
Linux Enterprise Server Feature-wise, Xfce 4.12’s window software/hurd/hurd.html
32
12 as well, which should manager (xfwm4) will sport a new
arrive around the middle smart placement mode, which has
of the year. been rewritten to be more clever than
KERNEL 3.14...
Kernel 3.13 has only just been released as we write
this, but plans are already underway for 3.14. The
zRAM filesystem, which creates compressed RAM
filesystems (eg for use as high-performance swap
areas) is now in the official kernel source tree, and
we’ll see improved Intel Broadwell microarchitecture
support. Random number generation should be even
more random and performance of the SquashFS
filesystem has been boosted.
Other candidates for inclusion in 3.14 are
enhancements to power management on Intel chips,
support for dynamic refresh-rate switching in Intel’s
33
DRM driver, and Nvidia Tegra Prime support.
…KERNEL 4.0? LIBREPLANET 2014
While announcing kernel On 22 and 23 March in
Parallella: it’s like the Raspberry Pi, but with a 16/64-core co-processor for parallel
35
processing applications to bump up the power (and the price tag). 3.12, kernel maintainer Cambridge, MA, USA, the
Linus Torvalds said that LibrePlanet conference
he expects 4.0 to follow will assemble activists
KDE 3.19, probably some and developers to
34
There are so many great KDE This means that many current KDE time this year. It won’t be discuss challenges to
applications out there, but if you use apps can become Qt apps, making a big change – just to software freedom. This
a different desktop, they often don’t fit them simpler to install and port to other avoid the “crazy [version] year’s topic government
in especially well with your graphical platforms. A beta release is planned for numbers we had in the and corporate
environment. Typically they expect April, with the final release scheduled 2.x series”. Stability will surveillance. https://
various KDE services to be running and for June, but as always these dates can be a priority. libreplanet.org/2014
depend on lots of KDE-specific libraries, slip. The last major KDE architecture
bumping up RAM consumption. change (from 3.x to 4.x) wasn’t well
KDE Frameworks 5 aims to fix this received at first, so hopefully this time
by moving lots of KDE’s functionality the process will go more smoothly, and
into the Qt libraries – so pure Qt it won’t take a couple more years before
applications can benefit from this too. everyone is happy again.
LibrePlanet 2013 was a great
success, with 150 attendees and
35 talks, workshops and events.
(Photo CC-BY-SA, Free Software Foundation).
www.linuxvoice.com 43
38
FEATURE FREE SOFTWARE
X.ORG SERVER MAILPILE MACBOOK PRO SUPPORT
BTRFS
36 37
Due in July, the next Sick of Google, Microsoft Apple is the antithesis of Free Software in many
major update for the X and governments respects: the company is secretive, makes Btrfs (the B-Tree
Window System could reading your emails? proprietary software, and pushes developers into its filesystem) is going to
include support for Looking for an highly controlled app store. Go to any major Linux be big: it’s jointly
developed by Red Hat,
GLAMOR, an OpenGL- alternative? Mailpile conference, though, and you’ll see lots of MacBooks
39
SUSE, Intel, Oracle and
based acceleration is a self-hosted, ad- running Linux: the hardware itself is well regarded other well-known
library that speeds free and open source for performance, weight and battery life. Kernel 3.13 companies. It’s still
up 2D operations. In email system with brings lots of fixes for Retina MacBook Pros, fixing marked as experimental,
addition, veteran X encryption built in. It’s sound, display and power management issues. If you but the cool features it
boasts (transparent
developer Keith Packard still undergoing heavy like Apple hardware but want to avoid OS X, grab a
compression, online
has reduced the build development, but an distro with the new kernel. resizing and snapshots,
warnings from 1,047 to alpha release is due very partitions spanning
zero. Nice one. soon. www.mailpile.is multiple drives) mean
GUADEC 2014 CRUNCHBANG 12 that it’s getting a lot of
attention. Some of the
This year’s Gnome It’s fast, it’s light, it
major Linux distros
Users and Developers looks slick and it has could move to Btrfs as
Conference takes place Debian underpinnings: the default filesystem
40 41
in Strasbourg, France, CrunchBang is an this year, providing it’s
from 26 July until 1 awesome distro. stable enough.
August. The schedule Version 12 will be based
hasn’t been decided on Debian 8 (Jessie)
just yet, but there will sources, and lead
be talks, presentations, developer Corenominal
hackfests and parties. is looking for new ideas
42
https://wiki.gnome.org/ on the forums: http://
GUADEC/2014 tinyurl.com/qdbkvta
FIREFOX OS
We’re very happy to see more May, should bring: creation of ringtones
competition in the mobile operating from songs in the music app; sharing
system space. Android is great, but ringtones via Bluetooth and other
if the market ends up dominated by protocols; support for NFC payments;
just Android and iOS, things could get application switching via edge gestures;
very stagnant. Firefox OS is currently and remote wiping for security.
targeted at low-end devices, and Keep an eye on https://wiki.mozilla.
enables developers to write ‘native’ web org/B2G/Roadmap to see how the
apps by using APIs that communicate 1.4 release unfolds, and by the time
with the phone’s hardware. you read this, the first Firefox tablet
Right now there are very few devices (the snappily named InFocus New
running Firefox OS, but the range is Tab F1) may be available for aspiring
It’s still early days for Firefox OS, but hopefully it will slowly growing. Version 1.4, due in developers to have a play with.
pump some innovation into the mobile OS market.
43
Explore and rebuild a gigantic
virtual world with Minetest.
MINETEST
Minecraft is one of the most addictive games ever
made – and in fact, it’s unfair to call it a game. It’s a
giant construction engine, a world simulator, and a
way of life. Minetest, an open source clone, is coming
along well although it’s still lacking many features and
only at version 0.4.9 right now. Future releases this
year should see a new map generation system, with
more variation between biomes (landscape types).
www.minetest.net
44 www.linuxvoice.com
45
FREE SOFTWARE FEATURE
44
REACTOS LIBREOFFICE 4.2
MATE 1.8
Creating a fully Windows- The current major release of LibreOffice Additionally, you can export .dot (MS
This fork of Gnome 2
compatible open source arrived at the start of February, so it Word document template) files. Calc
has done better than
operating system is a should be in your distro by the time you now has a random number generator, many expected, with
mammoth task, but read this. We’re always impressed by together with statistics functions for a healthy community
the ReactOS team is the effort that goes into LibreOffice data analysis. In Impress, a new icon is building up around it.
chipping away at it. releases, and 4.2 is no exception: it’s a shown in the Slide Sorter if a slide has a Version 1.8 will add
support for G-Streamer
Version 0.4 will include goody bag of new features. transition or animation effect, while
1.0, panel background
better networking, sound You can now format individual integration with Gnome 3, MATE and rotation, and the ePub
and USB support, and characters with borders in Writer, while Xfce has been improved. Then there’s format in Atril (a fork
48
is due to arrive this year. the spelling-checker pop-up menu now an Expert Config panel in the Options of the Evince document
47
www.reactos.org lets you do change tracking operations. dialog for under-the-hood tweaking. viewer). In addition,
work is underway to add
support for Wayland and
the AccountsService
LLVM/CLANG SAILFISH OS from freedesktop.org.
GCC has been the It’s still a baby and only MATE 1.8 was originally
de-facto standard free available for one phone, planned to be included
in Mint 16, but we’ll have
compiler suite for years, but Sailfish could be a
to wait a bit longer for it
but LLVM/Clang is promising mobile OS in now – it’ll be worth it.
catching up, offering a 2014. Built on a Linux
46
more modular design. kernel with Wayland and
49
Work is underway to Qt providing the interface,
make it compile the Sailfish looks pretty, but it ELEMENTARY OS
Linux kernel, and perhaps will have to work hard to One of the prettiest
we’ll even see a Clang- avoid becoming another distros we’ve ever seen,
compiled distribution Maemo/Meego/Moblin/ Elementary OS is still undergoing heavy development, but Elementary OS’s website
before the year is out… Tizen-like abandonware. it already looks deeply gorgeous. (www.elementaryos.org)
is just as polished as the
software. This isn’t just
yet-another-distro with
some glitz sprinked on
top; it sports its own
applications. Another
beta is due soon.
LINUX
PLUMBER’S
CONFERENCE
Everyone loves talking
about wobbly windows
and desktop apps,
but this conference is
for hackers who work
on the guts of Linux:
50
kernel subsystems,
core libraries and so
forth. It’ll be held from
51
Some assumed that the MATE desktop wouldn’t last – but it’s thriving, with version 1.8 just around the corner. 15–17 October in
Düsseldorf, Germany.
linuxplumbersconf.org
YOU
Sure, it may be a bit cheesy to end with this, seems to be slow and arguments break out,
but it’s true. It’s you, the Linux community, that but providing we stick together, explain the
will make this an awesome year. Every little advantages of Free Software and spread the
thing you do, whether it’s helping a newbie on a word positively, we will succeed in the long run.
website forum, or submitting a bug report for So, a hearty thank you to everyone in the
an app, adds up to make the Linux and Free Linux community – every user, developer,
Software ecosystem even better. There are documenter, designer and tester. Great times
times when it’s frustrating, when progress are to come in 2014!
www.linuxvoice.com 45
INTERVIEW FLORIAN EFFENBERGER
THE
OFFICE
CRUSADER
We approve of projects forking to do a better job
– and one of the best examples is LibreOffice…
F
or our first magazine committee. This is the non-profit
interview, we got some cheap organisation at the heart of
flights and headed out to LibreOffice, the famous fork of
Kaufbeuren, an attractive Swabian OpenOffice.org now dominant in
city an hour’s train ride from Munich. every Linux distribution. We were
This is where we met Florian able to ask Florian about the split,
Effenberger, chairman of the board about arguments over a new name
at The Document Foundation, and and what wheat beer he’d
Alexander Werner from the recommend as a souvenir for our
Foundation’s membership journey home.
The Document Foundation has a for quite a while back then, and just by
board of directors, which includes coincidence, I got into it. And when you
Michael Meeks works. What’s your don’t say no fast enough, you can
job as head of the board? getsucked deeper inside. So I did quite
Florian Effenberger: I’m active in two a job of marketing with them. weren’t many user-friendly Linux
parts. One is lots of Foundation distributions as there are now. It was all
management handling, like trade and What’s the biggest challenge when quite uncommon.
operational tasks, going from tech staff, marketing open source software? That has changed. People accept
insurance, legal stuff, trademarks and Florian: I think the market has you and expect you to be at trade
all that goes with running such an changed quite a lot over the last 10 shows and to have a photographer. We
entity. And the second part, which is the years. When we started, it was basically host our own conferences, also for
reason why I have Alex with me, is the that people were looking at you and professional audiences that had
infrastructure part. So I’m active in asking questions like “Is it free?” and changed a lot over the last years. And
those two different areas right at the “How do you finance yourselves?” so we have the challenges that we have
moment. The board runs the People were suspicious of free to face. Like in the beginning, it was
Foundation’s daily operation to make software. explaining what we are, how we do that,
sure it works, overviewing things and and we weren’t so well structured.
overseeing things, budgeting, and all People must think “What’s the When you run your own conference,
the jobs like that. catch?”, especially with something a when you have a target market like the
big as an office suite! enterprise sector, you need to reach out
Is it right that you did a lot of Florian: Yes, it was always the same and get them involved. The focus has
marketing for OpenOffice? question, like “How do you coordinate not shifted, but has been widened so to
Florian: Indeed. It started about 10 yourselves?”. And it was rather new. speak. So the challenges change over
years ago. I’d been an OpenOffice user Linux on the desktop isn’t extremely time. I see similarities with other
popular today, but back in 2004 there projects, facing the same issues.
46 www.linuxvoice.com
FLORIAN EFFENBERGER INTERVIEW
“When you have a target market like
the enterprise sector, you need to
reach out and get them involved”
Are there any groups that you level is, from what I can see, not so a chunk of work and you really need to
really focus on? Like getting much represented at the moment. We do professional work to set that up. It
LibreOffice into schools or are running a trial in Stuttgart, trying to gives you quite a lot of credibility.
governments? gather some experience here. And Now, instead of questions like “How
Florian: We are focused on everyone, otherwise, there are a couple of events can this be free” you have questions like
because we have a rather wide target we try to attend, but they mostly focus “How do we do a migration?”, and that’s
audience. What actually happens is on the IT target audience. what we always try to tell people, “The
governments are a rather large adopter software is free, you can use it free, you
of free software, so we obviously cover Do larger groups still have some can edit it and all those freedoms, but if
it a lot with them because they use it on prejudices against open source? you want to deploy it on a large scale,
a wide scale. So to give you one Florian: Not so much. Every once in a you need some professional support.”
example, we have a large list of while of course such discussions pop It’s the same as for proprietary
adopters in various countries. The up but they are not really to be taken software, there’s no difference. That’s a
occasional sector on the international seriously. I think nowadays that message that you’ve probably seen in
LibreOffice is an established presence. our press releases recently. We also
And so, especially in the European work on a certification program from
“Back in 2004 there weren’t market, with the creation of the
foundation of the Stiftung [a non-prefit
the TDF side. So by having a good
ecosystem and professional partners,
as many user-friendly Linux foundation], that’s rather a sign of you are able to roll out large migrations
distributions as there are now” trustworthiness, because you don’t just
set up a Stiftung in five days. It really is
and deployments. It’s an important
message at each stage I think, and not
www.linuxvoice.com 47
INTERVIEW FLORIAN EFFENBERGER
LibreOffice has seen a huge increase
in the number of contributors
since the fork from OOo.
so much how good or bad free open, independent project. So we took a message when there are multiple
software is. decision and, looking at the numbers of products doing the same thing.
contributors and the feedback we got, I Florian: Yeah, it’s not that easy to
Have you seen a change in think it was the absolutely right thing to explain the story about what happened
attitude since the NSA and Snowden do and still is the right thing to do [to and why things have happened for
leaks last year? fork from OpenOffice]. If you look at people who aren’t close to the project.
Florian: Yes, I think so. Looking at the today’s market, what I can say from all And of course, for legal reasons, we
press or at personal friends who are the people I know in migrations when a had to come up with a new brand, so
also not so much into IT, they are new software release is due for roll out, we came up with LibreOffice.
thinking twice about where to host their like for the city of Munich, or when the We’re geting good feedback about
data and what to do, and who to give first initial steps to a free office are the brand, especially here in Germany.
their data to. taken, in nearly all cases it’s LibreOffice. People are very supportive of
That makes quite a difference. In So I’d like to not so much talk about LibreOffice; we’ve seen the statement
terms of LibreOffice, I think that it’s a what others do, but rather the good from the city of Munich, which in
message we have been spreading for things that we are doing. October 2012 said that it will migrate to
quite a while. Like, you have open LibreOffice with its next big IT rollout.
format, you have no Windows lock-in, Do you speak to the OpenOffice For us, that’s proof that we are doing
so we’ve giving exactly the same guys? Is anyone else talking about the right thing.
message. Of course, it’s been amplified merging the two projects together?
these days by the concerns that have Florian: I’m not aware of any talk of a Were any other names considered
finally made it to the public. merger. We of course have good apart from LibreOffice?
contacts. They attend mostly the very Florian: Quite a chunk!
Let’s think about the current same trade shows that we attend. We
situation with Apache OpenOffice have good times, but we’re always Can you give us some examples?
and LibreOffice. It seems trying to focus on improving We interviewed Richard Stallman a
uncomfortable to have two projects LibreOffice. What we always say is that couple of years ago and he seems to
doing almost exactly the same our door is always open. Our project is regret using the term Free Software
thing. What’s your take on it? Could really transparent and people can because it gets mixed up with
they merge? LibreOffice seems to be always contribute to it. And that is shareware. He said, if he were
getting much more attention, so working quite well. Speculating about creating the term now, he would use
what do you think will happen? what could happen, or what would have Libre Software or something.
Florian: My take is that back in 2010 happened, is rather hard. Florian: This is reflected in our statute.
we had this hard decision to make: We have this mission statement of the
what should follow. Back then, there Yes, but we just think about the Foundation’s objectives. I don’t know it
was no realistic chance to have effort that’s being duplicated. It word-by-word, but it says we produce
ownership of the OOo project. A truly often makes it hard to spread the free open libre software, so we have all
48 www.linuxvoice.com
FLORIAN EFFENBERGER INTERVIEW
of those three words in our statement.
Of course, we had a hard time coming
up with a names. The problem was
back then that we didn’t know how long
they would last. There was a chance
that we could work with the OpenOffice
brand, and so we didn’t know how the
time we invested would work out.
There was quite a bit of negative
feedback when you first forked.
Florian: Look at OpenOffice.org! We
lived with the OpenOffice.org brand for
10 years and people were aware of that,
and suddenly it had a different name! It
was new – everything is new in the
LibreOffice has thrived since its
beginning, it’s unfamiliar. I think that
fork from OpenOffice under the
was to be expected, and it was only for aegis of The Document Foundation.
a few weeks and then that was over.
Nowadays, it’s a strong brand, quite
recognisable. Whatever name you to simply take the OpenOffice.org brand wanted it to be there on the day we
come up with, there will always be and move forward with that, so despite made the announcement, to prove that
somebody saying that it is stupid or I all the work invested in LibreOffice’s we were serious.
can’t pronounce it, or I don’t like it. But in name we weren’t sure whether we
the end, we took a fair amount of time would keep it, whether we would keep We had a big discussion about the
to come up with the brand, and for TDF that. And as history tells, we stuck with name of our magazine. Half the
we were sure we wanted to keep the LibreOffice, and we’re quite happy. challenge is just making the
name. We needed an entity that was In the beginning, I wasn’t so happy decision. Then once you’ve done
short and even if we could have taken with the LibreOffice name. At least, I that you have something to get
the OpenOffice.org brand, we wanted to recently backed up a load of data and behind, and we think that’s what’s
have a different name for the overall read some comments that people happened with LibreOffice.
entity. So that name was sure to be in made about the choice of name and I Florian: Indeed! Yes, we had a long list
on the long term. For the software, we think it was me saying, “oh it’s OK but with nothing that had a majority. So we
didn’t know whether we would be able I’m not totally happy”, but nowadays I’m had about five or ten candidates that
rather happy with the brand. It really could have worked and in the end we
needs to grow, and you need to get voted, but it was a big decision.
“We’re getting good feedback comfortable with it and familiar.
A lot of people just don’t like
about the LibreOffice brand, Wasn’t LibreOffice a short term change though. We remember
especially here in Germany.” name originally? seeing a while back on Mac
Florian: It wasn’t short term. We Rumours, that Apple had changed
the icon for iTunes for OS X v10 and
there were 600 comments in the
thread. And people were even saying
they would never buy another Apple
product again! It was quite scary.
Florian: Absolutely, it needs to grow. If
you get an agency to come up with a
brand for you, it costs a fortune
because they spend a considerable
amount of time thinking and analysing.
I think they just sit in a room around a
table with a very large list of names, just
like we did. I’m quite happy with our
branding of LibreOffice. That reminds
me: I’ve brought something for you,
because I love LibreOffice! [Florian
We loved Florian’s LibreOffice
produces some LibreOffice stickers]
stickers, but didn’t get a decent
photo. Here’s some beer instead.
Everybody loves stickers!
www.linuxvoice.com 49
FEATURE BITCOIN
What in the name
of Zeus is it?
Bitcoin is a digital currency that became popular in 2013. It’s not
controlled by governments, banks, or anyone. It’s a decentralised
currency designed to free our money from those who would
oppress us. But how does a digital currency work? How can it be
valid if there’s no one to say who has what?
Ben Everard investigates.
50 www.linuxvoice.com
BITCOIN FEATURE
HASHTAG
Hashing – sometimes known as one-way Hashes are used frequently in computer
encryption – is a method for changing security. For example, it’s how passwords
something in one way that can’t be reversed, are stored on Linux systems. The passwords
but can be verified. Take for example a very themselves are never store; instead, their
simple hashing operator: modulo 10. In hashes are. You can see them if you type:
this, you divide something by ten and the sudo cat /etc/shadow
remainder is the hash – for example, 45 Every time you log in, your computer
hashes to 5. hashes the password you type and compares
There are two crucial functions about the result to these stored hashes. If the two
the hash. The first is that it’s easy to verify. hashes match, then it logs you in. The fact
Every time you do it, it’s quick and you get that you can see every hash on the system
Sellers can receive money in Bitcoin without having the same result. The second is that you can’t (if you have superuser privileges) doesn’t
to deal with the currency itself, using services such as reverse it. If someone tells you that the hash make this any less secure because it’s so
BitPay (www.bitpay.com). is 5, it’s impossible to work out that they hard to reverse these hashes. In fact, it’s only
started with 45. really possible if you can guess what the
T
However, modulo 10 is a bad hashing hashes might be (by checking with a list of
here are, roughly speaking, three parts to
algorithm because it’s easy to find something dictionary words, for example).
Bitcoin: the block chain, mining network, and else that hashes to the same value. A good In Bitcoin, hashes are used both to verify
wallets. In order to understand how Bitcoin hash has both of the first two properties, but the integrity of the block chain, and in the
works, you have to understand how each of these make it impossible to predict how the output proof-of-work (see the boxout below). They
works. Make a cup of tea and settle in. will changed from a change in the input. A work in the block chain by proving that none
slight change in the input should result in a of the blocks have been edited since they
The block chain is a list of every single Bitcoin
drastic change in the output. were first mined.
transaction that’s ever taken place. Until a transaction
is on the block chain, it hasn’t happened. It is quite
literally a chain of blocks – each block is a list of new (or ‘mine’) new blocks. These new blocks contain
transactions, and a link back to the previous block. any new transactions that have taken place. In
Anyone can then validate the block chain by following compensation for mining these new blocks, they’re
it all the way back to the very first transaction when rewarded with some Bitcoins. This acts as an
Satoshi Nakamoto created the first Bitcoins. incentive to make sure enough people keep mining to
At this point, you’re probably wondering who’s keep the network working.
responsible for keeping the block chain. The scary
answer is: no one. There is no single organisation or
That brings us to
wallets. This is the part of “The term ‘wallet’ is a bit of
person that holds a definitive copy of the block chain. Bitcoin that regular users
a misnomer, since they don’t
actually store Bitcoins at all.”
Bitcoin is built to be distributed, so there’s no point of see. The term wallet is a bit
failure that could maliciously or accidentally corrupt of a misnomer, since they
the block chain. Instead, the block chain is held don’t actually store
separately by every single computer mining Bitcoins. Bitcoins at all -- Bitcoins are stored only as a record of
transactions in the block chain. The wallets store a
Where there’s silicon, there’s brass private key that authorises the user to add
These miners, then, are both the custodians of the old transactions to the block chain for a given address
transactions, and the ones responsible for making (which is the public key that corresponds to the
sure new transactions are added. Their job is to create private key).
HASHCASH
Hashcash is the proof-of-work system that miners use to comes up with a hash below the set value. The faster you
verify that they have actually mined a block before it can be can generate hashes, the more likely you are to find one that
included in the block chain. The basic function of this is to satisfies this requirement. If you do come across a hash like
make it computationally unfeasible to alter the block chain, this, then you have mined that block and you can transmit it to
because anyone seeking to alter a transaction would have to all the other miners in the network.
recalculate all the proof of works until they had a block chain The rate at which miners are trying different hashes is
longer than the previous one. used to show the current speed of the network or the power
It relies on hashing (see other boxout), specifically the of a particular Bitcoin-mining computer (usually measured in
SHA256 hash function. This takes an input and outputs billions of hashes per second GHs)
a 256-bit number. The inputs to the hash function are the Miners don’t have to worry about their proof-of-work being
block header (which contains a counter) and a hash of all copied because, it includes a hash of all the transactions
the transactions. The task of the miner is to find a value for (in something called a Merkle Tree), and one of these
the counter where the output of the hash function is below a transactions is the miner paying themselves for mining the
certain threshold. This threshold corresponds to the current block. Anyone copying the proof-of-work can’t alter this
difficulty setting, which changes every 2016 blocks. without changing the resulting hash.
The only way to calculate this is with pure computing Note that the hashcash algorithm used in Bitcoin is slightly
power. You have to generate as many hashes as possible with different from the hashcash algorithm used to prevent email
different values for the counter and hope that one of them spam, though they both work in the same general way.
www.linuxvoice.com 51
FEATURE BITCOIN
MAKING A TRANSACTION
When you make a Bitcoin transaction, you transmit it to the Notice that nothing physically leaves your wallet other than
network of miners. However, there has to be some security to this message to the block chain. The amount of Bitcoins in a
ensure that someone else can’t make transactions from your wallet is calculated by seeing all the transactions in the block
wallet without you knowing. chain. This means that anyone can know how much is in any
Bitcoin transactions take place between two (or more) wallet at any one time. It doesn’t necessarily mean they know
wallets. These, as we said before, are simply a public/private who has how much money since it’s not always possible to
key pair and are used to encrypt data. They work in such a way tie a specific wallet to a specific person, or know how many
that any data encrypted with the public key can be read with wallets a person has.
the private key, and vice versa. Once this transaction goes to the miners, it’s added to the
In Bitcoin, you don’t have a pool of money that goes up next block. However, as we’ve seen, the block chain can split
and down like a bank account. Instead, you have a specific (and a malicious miner with a lot of computing power could
set of Bitcoins that can each be chained all the way back to split it deliberately). There is no one point when it’s guaranteed
their original miner. When you make a transaction, you have to always be in the block chain, but the assurance is calculated
to reference the transaction in which you got them (you can by the number of blocks built on top of it. If it’s just one, then
reference more than one). You then have to digitally sign each a lucky attacker may be able to outrace the rest of the mining
referenced transaction. This means that you hash the details network. However, with each subsequent block that’s added to
of the transaction and encrypt them with your private key. the block chain, the amount of work an attacker would have to
Since your public key is tied to your address (and therefore do to reverse the transaction increases.
tied to the referenced transaction), this confirms that you A depth of six blocks is usually considered enough to be
are authorised to make the transaction. The transaction also sure that a transaction is properly added to the block chain.
includes the output address to which they are being sent. At a block rate of one every ten minutes, this is an hour. For
(This is a bit of a simplification. See https://en.bitcoin.it/ high-value transactions, you may wish to wait for more blocks
wiki/Transactions for a more complete explanation.) before considering the money truly transferred.
The previous four paragraphs have given a basic contains a hash of the previous block, and this can’t
overview of how Bitcoins work, and you could quite be changed without altering the current block’s hash
easily go about using or mining Bitcoins using only (which will be included in the next block). Anyone can
this knowledge. However, the chances are that you go and check that none of the transactions have been
wouldn’t trust the changed at any point. If they had, the hashes would
“The beauty of Bitcoin is in currency, since it sounds
suspiciously like it would
no longer match up.
The block chain is a publicly verifiable record of
the cryptographic techniques be easy somehow to every transaction that’s ever taken place. Each time
that protect the users.”
corrupt the system and you perform a transaction, details of that transaction
defraud users. The beauty are propagated to all the miners on the bitcoin
of the currency is in the network with a request to include it in the next block.
cryptographic techniques that protect users. Let’s go For a miner to get paid for mining a block two
back and look at in more detail to see how this works. things have to happen: they have to solve the
A huge part of the security of Bitcoin comes from
hashing, and it’s these hashes that are used to link SATOSHI NAKAMOTO
blocks together in the block chain. Each block
Bitcoin has become a household name, and the currency is
worth billions of pounds, but for all that fame, one thing still
remains secret: the identity of the creator. They’re known
only by the pseudonym Satoshi Nakamoto. It’s not known
for sure if Satoshi is male or female, or even if they’re a
single person or a group.
Satoshi mined many of the early Bitcoins (possibly up
to a million), so at today’s exchange rate, he (or she, or
they) is a very wealthy person. It’s possible that they have
hundreds of millions of pounds worth of Bitcoins, but they
have never spent any of them. Herein lies a problem. Since
there’s a strong suspicion surrounding which addresses are
Satoshi’s, if they ever spend any of their Bitcoins, they’ll
reveal their identity. So far, they’ve preferred to keep their
anonymity rather than cash in; but will this last?
Of course, there’s been wild speculation about who could
have created the currency, and several researchers and
journalists have pointed the finger at various people, but all
have denied it. Perhaps at some point in the future, the lure
of money will be too strong and the mysterious creator will
reveal themselves. We can only wait and see…
Multibit has all the usual wallet functions and can create QR codes to help someone
send you money. These include the receiving wallet address and the number of Bitcoins.
52 www.linuxvoice.com
BITCOIN FEATURE
ANONYMITY
Bitcoin has become the currency of choice for anonymous
transactions online, most famously for illegal shops like
Silk Road. However, it isn’t designed as an anonymous
currency, and in fact doesn’t really fulfil the role particularly
well because of the block chain. This records every single
Bitcoin transaction and allows anyone to view the exact
path that any Bitcoin has ever taken.
The only mitigating factor in the public display of
information is the fact that you can create a Bitcoin wallet
without telling anybody who you are. In this sense, the
wallets are private, but the currency is completely public.
This means that if you get Bitcoins anonymously (for
example, if you mine them, or buy them with cash in an
untraceable way), spend them in an untraceable way (for
example, paying for something that’s not delivered or tied
to you personally in any way), and you don’t link the wallet
to your physical location (for example, only connect it to
the internet through Tor), then the transaction will probably
be anonymous. However, that’s an awful lot that has to
go right. If you slip up in any one of these ares, then the
transaction is probably traceable back to you.
It is possible to make an anonymous transaction
with Bitcoin, but, in most cases it’d be far easier to stay
anonymous with cash. The block chain is a big-data
analyst’s gold mine and will almost certainly be used by law
enforcement more and more in the future.
A typical screen to pay by
hashcash proof of work, and that block has to be would be first to get the next block, so then the bitcoin
Bitcoin. It contains all the
included in the block chain. The first is purely a miners would move over to that because anyone information you need to
technical challenge, but the second is what forces mining in the shorter chain isn’t going to get paid for make the transfer.
them to check everything. If the block contains invalid mining unless it somehow overtakes the longer one,
transactions (for example, if someone is spending which will be increasingly unlikely as the longer one
coins they don’t have), and they do the proof-of-work, gains more and more miners.
when they send the completed block to other miners, These rules ensure that a network of miners who
the other miners will reject it. This means that the are each out to maximise their own profit will keep the
original miner doesn’t get paid, and has wasted his integrity of the currency. A group of malicious miners
time. Therefore they will check every transaction to seeking to somehow undermine the system need to
make sure it’s valid before including it in a block. have more computing power than all the legitimate
miners combined (so they can mine blocks at a faster
Honest self-interest rate and maintain the longest block chain). The
When a miner receives a block from another miner,
they have an incentive to try and find fault with it for
two reasons. Firstly, if they can reject the block, it
means that they are still in with a chance of mining it
themselves. Secondly if they accept a block that other
miners reject as invalid (if they don’t properly check it,
for example), then any mining they do that builds
upon that block will be wasted because it will never
main it into the main block chain.
At the same time they have an incentive to accept
valid blocks, because if they reject a block that
everyone else accepts, then any subsequent blocks
they mine will be rejected by the rest of the miners.
There is a slight issue that two miners could
generate the same block at roughly the same time
and send it out to all the other miners. At this point,
there would effectively be a split in the block chain.
Some miners would work on one, and some on the
other. The rules of Bitcoin say that the longest valid You can buy Bitcoins from exchanges like this one (www.mtgox.com). They don’t all
block chain is the right one. One of the two splits have the same price or reliability, so it may pay to shop around.
www.linuxvoice.com 53
FEATURE BITCOIN
Bitcoin mining network hash rate
25000000
20000000
15000000
Hash rate (giga hashes per second)
10000000
5000000
0
Time from Jan 2013 to Jan 2014
The strength of a
hashcash proof-of-work, then, protects the Bitcoin run them, etc. Realistically, any attack on the block
cryptocurrency is in its
mining power. As you can network through raw computing power. chain would have to perform so much fraud to cover
see, this has increased This is the reason Bitcoin mining has to remain its costs, that Bitcoin would crash in value, and the
dramatically in recent profitable. As it currently stands, the Bitcoin network is attack wouldn’t be worth it.
months. performing at about 15 peta hashes per second and
rising fast (see above). To buy computing power to Fraud prevention
beat this (if you bought the latest mining machines, However, the above only stays true while it’s
although this would be impossible since there isn’t sufficiently profitable to mine bitcoins. Should this
enough of them to do this many hashes), it would change in the future, then miners will take their
cost around £150M (based on good Bitcoin-specific computing power elsewhere (or stop upgrading it).
hardware). That’s just for the hardware to equal the This will then lead to a situation where the network
mining pool at the time of writing. The power of the could be exploited.
mining pool doubled in the last month, and it’s still The profitability of mining Bitcoins is controlled by
increasing quickly. This also doesn’t take into account two factors: the difficulty in mining each block, and
electricity (they use alot), storage, cooling, people to the number of Bitcoins the miner gets for each block.
USING BITCOIN
The crux of a currency, for most people, is how you After creating a wallet, you need to get some specified wallet. You then own the coins and can
use it. For most real-world currencies, this involves coins. For most people, this means buying them transfer them to whoever you wish.
handing over metal discs or pieces of paper, but from an exchange such as www.mtgox.com. Spending coins is far easier than buying them.
there are no such things for Bitcoin. Unfortunately, this isn’t as straightforward as More and more companies are accepting Bitcoins
The first thing you need is a Bitcoin wallet. This buying most goods, since it’s not usually possible to every day. When you go to a checkout, you’ll be
is really just a public/secret key pair that’s used to buy them with a credit card or PayPal. This is given a wallet address to transfer the funds to (this
sign transactions. However, you need somewhere because fraudsters have previously made money by is usually a wallet created just for this transaction
safe to store this because if you lose it, you can buying via these methods, then complaining to the so don’t try to reuse the same address in the
never get the coins back. How safe depends on how card company that they never got the coins, and future). This is often expressed as a QR code. If you
much money you want to store. There are wallets reversing the charge leaving the seller out of have a phone wallet, you can usually transfer the
for almost all computing platforms, including pocket. The credit card companies could easily funds just by taking a picture of this code.
smartphones. Remember that there’s no cost to check the block chain, but in the past they’ve Remember that you don’t send the transaction to
setting up a wallet, so there’s nothing to stop you chosen to side with the purchaser and now none of the receiver, but rather to the mining network. The
from having several. For example, you could store the major exchanges accept card. The result is that person receiving the money then gets the block
some of it on your main computer and some on generally you have to pay by bank transfer. As it chain from the mining network and looks for a
your phone, meaning that you can spend it on the stands, this is probably the biggest thing putting transfer into the appropriate wallet.
go. It’s also possible to get wallets that are hosted most people off buying Bitcoins [It put Ben off The company receiving the funds will usually
online, for example, at blockchain.info. However buying some for this feature, and in the last few days wait until the transaction has reached a depth of six
remember that with online wallets, the host the price of Bitcoins has increased by 50%. Oh well, or more blocks, which could take around an hour.
potentially has access to your Bitcoins. never mind]. Once this is done, you should receive the product.
All Bitcoin wallets work in roughly the same way, When you buy Bitcoins, you’ll be asked to provide Remember that bitcoins are like cash, and there’s
and have all the information you need to send and a wallet address. Once the bank transfer has taken no way of getting them back should the person you
receive Bitcoins, and to see previous transactions. place, the exchange will transfer the coins to the pay not supply you with the product.
54 www.linuxvoice.com
BITCOIN FEATURE
These two things also have to be balanced to account
WHAT IS MONEY?
for rising computing power and the rising market
value of Bitcoins. One of the most common concerns with your economic philosophy. On the positive
The number of Bitcoins awarded per block changes Bitcoins is that they aren’t real money, just side, no one can print excessive amounts of
numbers on a computer. This, in a sense, money leading to excessive inflation (like
at a fixed rate: it started at 50 and halves every
is true, but what actually is money? Once the German government did following World
210,000 blocks (approximately four years) until upon a time it was linked to physical goods, War One). On the negative side, there is no
21 million Bitcoins have been mined, then no more and some of the currency names reflect this one to step in and help stabilise it should
are awarded for mining subsequent blocks. (A British Pound was originally the value things start to go wrong (for example, the
The difficulty is varied every 2,016 blocks. The of a pound of silver). That link between various governments that printed more
currencies and physical goods, though, is money to help ease the cash flow crisis in
network is designed to generate a new block every 10
long since gone. The last major currency to the ‘Credit Crunch’).
minutes on average. This time was picked to be a lose the link was the US Dollar, which was In practical terms, the biggest difference
happy medium between two opposite forces: shorter tied to gold until 1971. Nowadays, currencies between Bitcoin and most other currencies
times would make transactions happen more quickly, don’t have any value other than what people at the moment is the wildly fluctuating
but are more likely to lead to more than one miner place in them, and the varying values people exchange rate. The value of the currency
place in them is what makes exchange rates can double or halve in just a few days.
generating a block at the same time, which leads to
change over time. Proponents say that this is likely to stabilise
wasted resources as the two block chains compete to The only real difference between Bitcoin as the currency become more popular,
become longer. To keep this time period despite the and a national currency is that national and this is probably true, at least to some
hash rate of the network varying wildly, the algorithm currencies are backed by governments, extent. In reality, though, no one knows
looks at the time it took to generate the previous 2,016 whereas Bitcoins aren’t really backed by what will happen in the long run since
anyone other than the miners. Whether or currencies without the backing or a state or
blocks and tries to compensate for this.
not this is a good thing depends entirely on organisation haven’t been tried before.
You may have noticed a slight flaw in the plan. First
we said that the security of the system was
dependent on the amount of computing power it had are more transactions than there is space in the block,
available which was in turn dependent on the they have to decide which ones to put in. Obviously
profitability of mining. Yet then we said that at some the miner will go with the ones that have the highest
point in the future, when 21 million bitcoins have been transaction fees. The other transactions won’t be lost,
mined, there will be no more rewards for mining. they’ll just be rolled forward into future blocks. Higher
This isn’t quite true. There will be no more new transaction fees will result in faster transactions.
bitcoin rewards for mining, but when you carry out a At the moment, most
transaction you can include a transaction fee, which
goes to the miner. At the moment this is rarely done,
Bitcoin transactions have
no transaction charge, but
“When you carry out a
since mining is profitable enough that people do it this isn’t a fundamental transaction you can include a
without this additional incentive, and the transaction
volumes are low enough. However, each block is
feature of the currency
that will stay with it forever.
fee, which goes to the miner.”
limited in size to 1MB (there is currently a debate It remains to be seen
about whether to change this). This means there’s a whether the transaction fees will be less or more than
fundamental limit on the number of transactions in for other payment methods in the future. I really wish
each block. If a miner reaches a situation where there I’d bought some when I started writing this feature!
Bitcoin price on the MtGox exchange
1400
1200
1000
800
Price on Mtgox.com (USD)
600
400
200
0
Time from Jan 2013 to Jan 2014
The dollar value of Bitcoins has increased by almost a factor of 100 over the last year. Some people see this as a
bubble set to burst, others as a sign of the currency coming of age.
www.linuxvoice.com 55
FEATURE CROWDFUNDING
The total amount Linux Voice raised (yellow), and the
income by day (blue). We tracked these blue and yellow
lines hour by hour as the project progressed and learned
to love and hate them in equal measure.
Launch day Amount Raised (left axis) Total Amount Raised (right axis)
£11,647 We took in over £127,638
£11,000 £10,000 in the £120,000
first 24 hours.
£10,000
Cumulative Amount Raised
Raspberry Pi
Daily Amount Raised
£9,000 £100,000
Liz Upton of the
Slashdot
£8,000 Raspberry Pi Foundation
Good work, angry
writes a very kind blog £80,000
£7,000 Slashdotters. Success!
post about us.
Secondary spike in
£6,000
contributions as we
£60,000
£5,000 pass our £90,000 target.
£4,000
£40,000
£3,000
£2,000 £20,000
£1,000
£0 £0
storyso far
11 Nov 2013 16 Nov 2013 21 Nov 2013 26 Nov 2013 01 Dec 2013 06 Dec 2013 11 Dec 2013 16 Dec 2013 21 Dec 2013
Time Inexorably Ticking Away
The
This magazine crowdfunded its way into existence.
Ben Everard tells the story of how it happened.
A
s long as there have been jobs, there have At midday on Monday 11 November 2013,
been people sitting in pubs complaining about linuxvoice.com went live announcing to the world our
them. The Linux Format team had been intention to create a new magazine using Indiegogo to
meeting in The Salamander in Bath to do just that crowdfund the launch. For us to be successful, we
since long before I joined. It was a safe place that needed to raise at least £90,000 before 23 December.
served good ale, and it provided a safe, warm place to If we didn’t hit that amount, then there’d be no
moan over a pint. But there’s only so much moaning magazine and we’d all have to start looking for new
you can do before you have to quit, which, being men jobs in the new year.
of action, is what we did.
But something carried on. We were all used to The floodgates open
making a podcast together, so we continued; or rather, After what seemed like an eternal wait before we went
we started a new one, called Linux Lifestyle. Yes, it’s a live, the subscriptions started coming in. One hour
rubbish name, but the domain was cheap. After one after we went live, the total had reached £1,525. Not
recording, back in the Salamander, we had an bad for an hour, but it still barely registered on the
epiphany: if we could make a podcast together, we progress bar.
could make a magazine together. Not all ideas from There are a lot of ways you can analyse the money
the pub seem so good in the cold light of day, but this coming in. The simplest way is to say that we needed
one did. Only one thing stood in our way: the lack of to raise £90,000 in 43 days, therefore we needed to
money. We needed a plan. get a little over £2,000 each day. Looking at it this way,
56 www.linuxvoice.com
CROWDFUNDING FEATURE
TOP TIPS FOR CROWDFUNDING
If you’ve got a project that you want to start, pushing back against it. For example, the
but not the money to start it, crowdfunding Technology subreddit has an outright ban
can be a great way of getting off the ground. on crowdfunding stories. To get past this
However, it doesn’t work for everyone. Here fatigue, your product has to be exciting.
are our top tips for a successful project: Don’t rely on mainstream media. Maybe
Give people a reason to love your product. you’ll be picked up by newspapers and
If you have a product ready to ship, then television, but it’s more likely that you
it’s enough to be a product that people like, won’t. Have a plan in place to reach your
but when you’re asking people to take a intended audience.
risk, you need them to love the product. Leave no stone unturned when it comes
Understand who the influential people are to publicity, and don’t stop plugging away
in your field and target them. People are at everything.
far more likely to trust them saying nice Videos are far more convincing than text,
things about your product. even when they say the same thing. It
The internet is already starting to tire of conveys a sense of personality that’s easily
crowdfunding, and many social sites are lost in the written word.
United States Sweden Other (35 countries)
Australia France Germany was no ‘OK’ outcome, so it was all or nothing. At first
New Zealand Europe Canada though, my goal was much more modest. I simply
United Kingdom Netherlands
didn’t want to be humiliated. Failing is one thing, but if
we barely raised anything. It would be on the internet
for all the world to see. All my friends and family were
A breakdown of our income by country. Thanks America!
checking the site. If the progress bar never moved,
and stayed firmly in the red, it’d be one very big, very
we’d almost reached our daily target in just one hour. public humiliation.
In fact, if things kept going like that, we’d raise over In truth, I don’t remember much more of that day
£1.5M! Of course, that’s an oversimplification. What if except bouts of fear and happiness. Looking back, I
we look at it another way? All the Linux Lifestyle can see that we sent out press releases and started to
podcast listeners would have just received an update get active on social media, but all I member is a
in their RSS readers telling them what was going on. quickened pulse and an abject fear of public
Pretty soon, that would get buried under newer items. humiliation. It took quite a lot of alcohol to calm me
What if this is now everyone who cares? What if the down enough to sleep that night.
rest of the world is perfectly happy with the status I woke at sunrise the following day. I didn’t even turn
quo? What if there simply isn’t a demand for a new the light on, I just reached for my phone and hit
magazine? What if the rumours are true and the refresh (it still had the crowdfunding page loaded from
magazine industry really is dead? the night before). We’d
For most of the remainder of the campaign, my
mental state fluctuated between euphoria and despair
topped £9,000! 10% of our
way there in just one day, “All I remember is a
as I considered the good and bad possibilities. There and we’d almost hit five quickened pulse and an abject
fear of public humiliation.”
figures! Whatever else
happened, it wouldn’t be a
WHAT IS CROWDFUNDING? humiliation.
In hindsight, it probably should have been obvious
If you’ve picked up this magazine in a newsagent, you may
not realise that we launched it through crowdfunding. at this point that everything would work out, but it
Crowdfunding is a way of raising money for a product or wasn’t. I still struggled with the constant fear that we’d
project by getting people who are interested in the project run out of supporters. It would be another three weeks
to put money towards it. In return, these funders get ‘perks’ until this finally abated and I believed it would happen.
which can be anything from a word of thanks (see our
Founders page) to a copy of the product, to anything else.
In a sense, this is a bit like pre-selling a product before you Getting heard
produce it, but for legal reasons it’s a bit different because Success in crowdfunding comes down to many
there’s a chance that the product will never get made. things. You have to have a product that people love
The two most popular websites for crowdfunding enough to take a chance on. We thought we had this
are Kickstarter (www.kickstarter.com) and Indiegogo
because we’d had so much good feedback working
(www.indiegogo.com). These sites hold thousands of
projects looking for supporters. Some, like the Pebble on our previous magazine, and we had some really
watch, have raised millions of pounds. excellent ways we could make Linux Voice better.
This method of raising money has become particularly However, it doesn’t matter how good the product is if
popular with computer game makers and graphic novel no one hears about it. From day one onwards, we
artists who can pitch their ideas directly to their fans rather
devoted ourselves almost entirely to publicity.
than having to go through publishers, who in turn have to
guess what the audience will and won’t want. The majority of the publicity came from social
media (though we did feature briefly on the Guardian
www.linuxvoice.com 57
FEATURE CROWDFUNDING
mental state continued to oscillate between joy (when
ANDREW SAYS… I realised that in just four days we’d raised almost a
quarter of the total) and despair (when I looked at how
The thing that really hit me was that
much the cashflow was slowing down). By the middle
many contributors were paying, say,
£55 for a UK sub rather than £50. Every of the day, I was spending more and more time in
time it happened it felt as thought the despair as I furiously hit F5 on the Indiegogo page
internet was giving us a silent nod waiting for the next donor. Each time the gap to the
of approval; that there were people next one got a little longer.
out there who didn’t just want the
commercial exchange of getting a great magazine for a
good price, but who wanted us to succeed for some other Breakthrough
reason. Every time my phone went off with an email from Then, in the space of a couple of hours, everything
PayPal telling me that someone had chipped in an extra changed. First, Tim O’Reilly tweeted “Linux Voice: A
pound or two, it felt like we were doing the right thing. new Free Software and Linux magazine that gives
The low point came from a necessary evil: PayPal. On
15 December some international money laundering switch
profits back to the community. Its @indiegogo
triggered at PayPal, which stopped it taking payments, campaign http://bit.ly/17XxdUg” to his 1.75 million
which in turn convinced IndieGogo to shut down the Twitter followers. Two hours later, Linux Voice ended
campaign. We were stuck up a creek without a paddle, up on the front page of Slashdot. Suddenly the cash
and even though it only took a couple of hours to fix the trickle became a cash flood. In the peak hour that
problem, the fact that it happened at all was a huge fail; the
fact that nobody at PayPal or IndieGogo had got in touch to
evening we raised £1,680 – the best hour to date.
let us know what was going on, inexcusable. The feeling of sitting at your computer, pressing F5
We have so many milestones left to come. The first time and watching you get closer and closer to your dream
we sponsor a project, the first articles we release as CC- is like flying. You’ve done the enormous amount of
BY-SA, the first time we see someone else building on our hard work to get airborne, then everything just comes
work, are all still to come, and it’s going to be fantastic to
see how the Linux Voice community grows. I can’t wait.
together and you cruise. You glide along and the
whole world is before you. It feels like anything’s
possible. It’s peaceful, yet produces a surge of
website and The Register). We quickly learned that adrenaline. A giddy, almost child-like excitement takes
each of these works in a slightly different way. Hacker over and your cheeks ache from grinning so hard.
News is a brutal, fast-paced all-or-nothing ride. If your Also like flying, it doesn’t last. We raised £6,399 on
article makes it to the front page (as a few of ours did), Friday, but less than half this on Saturday. What was
you get a big hit of visitors, and a lot of comments worse is that we felt we’d exhausted social media and
that need answering very quickly. Keeping on top of a needed another source of potential new subscribers.
popular comment thread on Hacker News basically Despite being a member of a Linux podcast, I hadn’t
requires constantly typing as fast as you can for as realised just how popular they were. Perhaps there’s
long as it stays popular.
Reddit, on the other hand, also commands a big
GRAHAM SAYS…
following, but it’s spread over a much longer time (at
least it is on /r/linux/). There are also lots of plenty of
Launching a magazine through a
insightful questions, but they don’t all come at once. crowdfunding campaign must be a
Twitter is different because it goes both ways. We little like crowd surfing blindfolded.
could seek out people and people could seek us out. You stand at the edge of the stage,
We never found Facebook worked for us at all. interpreting the sound of the crowd
in one way but not knowing whether
It wasn’t all about
enough people are interested, or even
“The Linux podcasts supported new-fangled social
media though. Philip
listening. It’s not until you throw yourself from the edge that
you have some idea. But even then you don’t know how far
us with an enthusiasm that no Newborough (aka the crowd can take you, or what the landing will be like.
other media had.” Corenominal) the creator Unlike Ben, Mike and Andrew, I had a non-compete
clause in the contract I had with our former employer. As
of the CrunchBang
I couldn’t be involved in the campaign, I had something of
distro, put a banner a different experience to the other three. I had assumed
advert on its website supporting us. I regularly that it would leave me with lots of free time for catching
searched Google to look for new mentions of Linux up on projects I’d neglected for years. In the end, those
Voice and found messages of support on forums weeks of the campaign were probably some of the most
unproductive of my life! I couldn’t concentrate on anything,
across the internet.
or plan anything, or write anything, or play anything. All I
As the first week went on the money kept coming could do was watch the campaign page and bore friends
in, but we got a bit less every day. From over £9,000 and family with theories on how it might work out. They’d
on Monday, it went to £4,436 on Tuesday, £3,775 on always nod, dutifully. However, I genuinely believed in the
Wednesday and £2,959 on Thursday. We expected it idea – a magazine with great content that gives back what
it can to the community. Part of the growing distraction
to dip as the initial buzz wore off, but it was dropping
over those weeks wasn’t doubt, but excitement at the
away fast. If it kept going at this rate, it would die out prospect that Linux Voice might really happen. And it has!
completely by the middle of week two. On Friday, my
58 www.linuxvoice.com
CROWDFUNDING FEATURE
MIKE SAYS…
Talk about a rollercoaster ride... At
the start of the campaign, we thought
we might be mad for even trying
something like this. What if we only
raised £5,000 of our £90,000 target?
Will we become the butt of jokes for
Linux journalists around the world? Will
we all have to start new lives as goat farmers in Tajikistan?
But no, it worked. And it worked spectacularly, because
the Linux and Free Software communities really understood
what we were doing. We weren’t just making yet another
magazine – we wanted to do something different,
away from the constraints of big businesses that didn’t
understand our audience.
Linux Voice has been a very personal project for me,
because it’s exactly the sort of magazine that I’ve always
wanted to create. I’ve been reading computer magazines for
the last 25 years, from the ZX Spectrum through the Amiga
to the PC, and one thing has always struck me about the
Linux community: it is incredibly passionate.
Sometimes there are arguments, and sometimes there The campaign website got over 100,000 views during the campaign, which means one in
are fallings-out. But we’re all on the same journey, trying fifty people that saw the page contributed. Thanks everybody!
to make computing more open, free, exciting and fun, and
a truly great Linux magazine should reflect that. You, the
readers will be a key component of Linux Voice – not just put on a brave face and told them of the slump and
consumers. We’re but a tiny acorn right now and we have how every project hit it, and how people held out for
a lot to do, but thanks to everyone who supported us for when the deadline approached. As the week wore on, I
making this dream a reality.
struggled to believe this myself.
On the 1 December, just £649 came in. Was this it, I
some form of brotherhood of the microphone that I’m wondered? Had we finally run out of people interested
unaware of, but the Linux podcasts supported us with in a new Linux magazine? For hours I sat pressing F5
an enthusiasm that no other media had. We made and nothing would change. Then maybe a digital
guest appearances and were featured many, including subscription, then nothing for hours again. I stopped
the Ubuntu UK Podcast, Linux Outlaws, The Linux alternating between hope and despair and stuck
Action Show Unplugged, The Linux Link Tech Show, almost continuously in despair. This, I became sure,
Hacker Public Radio and TuxJam. was us running out of supporters.
Each time one of these shows aired, we saw a spike Crowdfunding, though, is a fickle mistress, and the
in subscriptions on the site. Without the support of best piece of advice I could give to aspirant crowd
these guys, it would have been a lot harder. Not just funders is to prepare for the unexpected. Two days
because they helped get the word out, but because after this low point, Liz Upton of the Raspberry Pi
hearing other people within the community get Foundation wrote a blog post supporting the project.
excited about the project was a huge psychological This was picked up by Twitter, Hacker News and
support for me. Reddit, and drove support faster than we’d seen so far,
faster than we could have possibly dreamed. It
Bridging the gap peaked at £4,405 in a single hour (almost triple the
In crowdfunding, anything can happen, but we knew previous fastest rate) and at the end of the day, we’d
that most campaigns had a ‘U’ shaped cash flow raised another £11,647. This pulled the total to
graph. That is, they raised quite a bit at the start, and £72,903. We now needed less than £20,000 with 20
quite a bit at the end, but not that much in the middle. days to go.
This middle section is known as the slump. My girlfriend regularly asked me if I thought we’d
By week three we were well and truly in the slump. make it. That night I replied with an unqualified ‘Yes’
Income hovered around £1,500 a day, which was for the first time.
precariously close to the daily average we needed to The rest, as they say, is history. Following the
hit in order to make our target. Of course, the theory endorsement from the guys at Raspberry Pi, the
said that we’d get a massive increase at the end, but money kept coming in. Not at the same rate, but we
would we really? There was no way of knowing. made the final £18,000 in six days, and the total kept
Around this time, when I spoke to people, they’d rising until the campaign ended with £127,603. The
have a pitying expression on their face if the subject of fruit of the campaign is now in your hands, and all of
Linux Voice came up, and I could tell that few of my us at Linux Voice would like to say a hearty ‘thank you’
friends and family thought we’d reach the target at to everyone who supported us. Even those of you who
this stage (though they only admitted it later). I always waited until the last minute and made us sweat.
www.linuxvoice.com 59
FAQ WAYLAND
WAYLAND
The Anglo-Saxon god powering your next generation graphical desktop.
Imagine it’s the 80s. You’re sitting current system works. As long as the
GRAHAM MORRISON in your bedroom prodding away API supports Wayland, the applications
at a Commodore 64, listening to the will support Wayland and automatically
Why does Wayland need two Human League and staring through look and feel awesome.
pages of explanation? thick-rimmed glasses at your 14-inch
For most of us, Wayland is colour television. You’re coding a game Brilliant! So how come it hasn’t
difficult to understand because and working on the graphics. To get the been adopted already?
there’s nothing tangible to click on. best performance, your code is talking It’s not immediately faster than
There’s no ‘About’ box to open or directly to the graphics hardware, the the alternatives, which
configuration panel to play with. But all venerable VIC-II chip. One of VIC’s best disappointed many early adopters. Nor
of these graphical elements can be features was its ability to allow the is Wayland network-transparent, which
displayed on your Linux desktop using programmer to create a simple means it doesn’t include the ability to
Wayland – it’s just that Wayland hides graphical element, perhaps a spaceship serve desktop sessions across a
beneath the surface. The important or a gold miner, called a sprite. All the network in the way that early X11 did.
point is that it’s a big improvement over programmer had to do was tell a sprite The complexity that comes with
the way this was done before, and is what to look like, what colour to be and network transparency is a burden on
currently done now. where to appear. They helped the the current system. That doesn’t mean
In simple terms, Wayland has the programmer forget about the nuts and there won’t be an alternative, such as a
potential to make your desktops talk to bolts of how their computer worked more VNC-like approach to sharing the
your graphics hardware much more and concentrate on the gameplay. image buffer to a remote address. It
efficiently. Developers won’t have to This is what Wayland helps to do for just means that any solution won’t be
work with an arcane system that’s the modern programmer. They can as overbearing. In fact, the Wayland
massively over-engineered and forget about the nuts and bolts of community think that a remote desktop
complicated, while users should see graphics and concentrate on usability. solution using Wayland will be better
performance benefits and more eye But because software stacks are now than VNC on X11 anyway.
candy. It really could revolutionise the several layers deep, Wayland isn’t
Linux desktop. aimed at the application programmer X11 is the system that
most analogous to our 80s games Wayland is going to replace?
That sounds promising. What programmer. More often than not, it will Yes. X11 was designed for a
does Wayland actually do? be toolkits such as Gnome’s GTK or different era of computing – the
KDE’s Qt that need to talk to Wayland, same 1980s of that old Commodore
“More often than not it will and it’s these that need to be updated
to accommodate its requirements.
64. And the key requirement for any
1980s-era enterprise computing
be toolkits such as GTK or Qt Application developers shouldn’t need installation was for remote graphical
that need to talk to Wayland” to change their code, unless they’re
using something specific to the way the
terminals. X11 was designed to work
across a network so that low powered,
60 www.linuxvoice.com
FAQ WAYLAND
cheap terminals could connect to a that means there’s no easy way of by Samuel Csaba Otto Traian: GNU FDL 1.2+ and CC-BY-SA 3.0+; created 2013-08-28; updated 2013-10-30
centralised computing resource with knowing which features you’re going to
GNOME Shell
lots of storage, CPU and RAM. get when your application supports a
Clutter 1.14 W2BGL EGL
The apps ran on the central different version of a plugin to your X11 libwayland-client
glue
code
computing resource and sent installation. Come the revolution, W Nautilus
instructions back on what to be though, you’ll still be able to run X11 GTK + 3.12 W2BGL EGL
glue
displayed to each terminal. You can still tools and applications through a W
libwayland-client code
do this with X11 today. In fact, you are compatibility layer called XWayland. 2 KDE Plasma
W2
3
doing this today: X11 uses the same Qt 5.1 W2BGL
glue
EGL
W
3 libwayland-client code
client and server configuration even Does Wayland do away with 2
3
when everything is running on the the server and client model? EGL
same machine, making the separation No. But the client/server model libwayland-server
W
between the client and server a little used by Wayland makes more libwayland-EGL libEGL-mesa-drivers
EGL libEGL-mesa
libGBM
OpenGLIES
pointless. There are several other big sense. The server is something called
Weston, Mutter, KWin, Clayland,
Enlightenment . . . OpenVG
Mesa 3D
libGLES-mesa
chunks of X11 that have become the Wayland Compositor, and desktops Graphics
Device Drivers:
libOpenVG-mesa
libGL-mesa-DRI
redundant, such as its inclusion of such as E17 or Gnome, going through 1 4 ioctl
some core fonts or big parts of the their respective APIs, are considered the libDRM
rendering API – features that are now clients. This is why you always see
evdev kms drm
part of toolkits like GTK and Qt. Then Wayland described as a ‘protocol’, rather Kernel
there are the four input subsystems. than a way of rendering graphics. It’s
CPU (registers & L1 & L2 & L3 & L4) & main memory
And that network transparency we were the protocol that defines how the clients framebuffer GPU (registers & L1 & L2) & graphic memory
just talking about? It won’t work when speak to the server. A server could be
using modern modern systems with replaced with another server, as long as
Wayland is mostly a protocol because it defines how the
X11 anyway, because of the way they they understood the same protocol. various components in the stack talk to one another
talk to the local graphics hardware. Which is exactly what the people behind [Image Credit: CC-BY-SA 3.0: ScotXW, based on work by
Wayland hope will happen. E17 and en:Kristian Høgsberg published at en:freedesktop.org:
So what’s to stop Wayland Gnome both have their own Wayland- http://wayland.freedesktop.org.
from being just as bad? compatible compositors.
Apart from the simplicity, there’s If Compiz worked with X11,
no legacy code to get in the way Hang on a mo – what’s a why is Wayland any better?
of creating a modern graphical compositor? It simplifies the process. X11 was
subsystem. Just imagine what X11 You might have first heard the the gateway between the app
might be like in another 10 years, and term when desktop effects and the compositing. With Wayland, the
it’s difficult to think of how it might started to become popular. Compiz, for applications talk to the compositor
adapt to tablets and smartphones. example, is perhaps the best-known without having to go through X11.
It’s also capable of using hardware compositing window manager. It adds Wobbly windows with a compositor in
specific backends. This won’t be effects such as wobbly windows, X11 worked, but it was much harder if
necessary for most installations, but desktop shadows and transparency, you wanted to tell the compositor you
there’s a backend for the Raspberry Pi and it does this by compositing the were working with hardware overlays to
that has considerably improved its contents of the various windows under play back video. Wayland’s direct line of
graphical prowess, when compared to its control into a single image that can communication is a much better way to
X11, so perhaps performance might then be used as the desktop. That’s accomplish the same tasks.
improve after all. why when you run Compiz, you have to
replace whatever window manager Is 2014 going to be the year of
If it’s so hopelessly crufty, how you’re currently using. Wayland on the desktop?
has X11 lasted so long? In Wayland, the compositor does the We think so, yes. Gnome 3.12 can
For one simple reason: it works. same job, only without the help of X11 now operate as a Wayland
That’s something that can’t be to turn the final composited image into compositor, bringing native support to
said for a great many other the desktop you see. It’s the server the Gnome desktop. So too can
technologies. It’s stable, despite its process that pulls all the graphical Enlightenment’s compositor after a
complexity, and it’s a well understood components together to create what huge code dump in the middle of
and a well integrated part of the you’d expect to see on the screen. For January. The reference compositor for
system. Thanks to the development of Wayland, that would mean the server Wayland, named Weston, saw plenty of
many other modules that connect to that composes the contents of the updates in January’s 1.4 release, and
X11, it’s a modern and adaptable various client application windows there’s a new Qt 5.2 based desktop
solution. But it’s never going to get before sending them on to the called Hawaii that uses Weston. Even if
simpler nor better adapted to the kind rendering stage. These elements KDE’s Wayland support is slow in
of computing we do now. All those already exist, and are not part of making an appearance, you’ll definitely
extensions and plugins, for example, Wayland. They’re used to get the output be able to migrate to a Wayland-only
lack any kind of version control, and from the compositor to your screen. desktop in the near future.
www.linuxvoice.com 61
SYSADMIN
SYSADMIN
System administration technologies brought to you from the coalface of Linux.
systemd
Don’t fear change
Jonathan Roberts
dropped out of an MA
in Theology to work
with Linux. A Fedora
advocate and systems The init replacement for RHEL 7 and SUSE Enterprise Linux 12.
administrator, we hear
T
his calming tones
whenever we’re stuck he arrival of a new Linux init system
with something hard. has been a long time coming. It was
back in 2006 that Upstart was
This is the first issue of Linux Voice, and introduced to Ubuntu, and around the same
I’m so pleased to be contributing to it time that Fedora and others also started
along with Graham, Andrew, Mike and Ben.
experimenting with new init systems. The
It feels new and exciting, with all four of
reasons then are much the same as the
them having poured so much enthusiasm Most of systemd’s tools feature tab-completed
into the project, it can only work out well. reasons now – sysvinit is old and doesn’t do
sub-commands, which is indicative of the efort
When Graham asked me to write the everything a modern distribution needs it to. that’s gone into making it a pleasure to use.
first two pages of this new sysadmin More specifically:
section, I started looking around for ideas, sysvinit can’t take account of hot-
and I noticed that in the same way Linux pluggable hardware devices and service status to the console and managing
Voice represents a kind of transformation filesystems, such as network mounts or lock files, which were repeated in almost
of a well loved thing, so Linux itself seems USB sticks. every init script.
to be undergoing a similar transformation. sysvinit doesn’t provide sufficient Systemd removes the need for much of
New technologies, like systemd (and its supervision of processes, allowing double the complexity in these init scripts by
many associated subprojects, including
forked processes to become orphaned. handling service status echoes and suchlike
journald and logind), btrfs, cgroups and
sysvinit can’t parallelise boot services itself. This means it can switch complex
kdbus are slowly replacing older
technologies and approaches that many effectively, so it is slow. procedural Bash code for a clear, declarative
people have long assumed to be sysvinit startup scripts are difficult to configuration file. For example, here’s the
synonymous with Linux. write, difficult to debug and can’t easily be configuration for the syslog service on my
Many sysadmins have been ignoring shared between distributions – the Fedora system:
these new technologies, in part because of Sendmail init script is over 1,000 lines long! [Unit]
all the controversies surrounding them, Systemd fixes these problems and Description=System Logging Service
and in part because of inertia. But the introduces a number of new features that [Service]
times, they are a changing. make the case for it even more compelling. EnvironmentFile=-/etc/sysconfig/rsyslog
Rather than explaining in great detail how ExecStart=/sbin/rsyslogd -n $SYSLOGD_OPTIONS
Something better change systemd works or how it fixes these Sockets=syslog.socket
With the announcement of Red Hat
problems (there’s plenty of information on StandardOutput=null
Enterprise Linux 7 Beta, with the emerging
plans in Debian to replace its init system, that in http://0pointer.de/blog/projects/ [Install]
and openSuse having seriously debated systemd.html), we’re going to take a look at WantedBy=multi-user.target
btrfs as its default filesystem, the time a few key features of systemd that might Alias=syslog.service
has come for sysadmins to start taking make sysadmins look forward to systemd, All of the configuration options available in
these technologies seriously, as the next rather than dread having to learn a new tool. these files are extremely well documented
round of major distro releases are (systemd as a whole has some of the best
certainly going to include some Configuration file format docs around) – see man systemd.unit or
combination of them. As mentioned above, in sysvinit systems, man systemd.service for details.
So, a new and exciting magazine and a configuration of services was complex and What’s more, if you had to modify a
new and exciting set of technologies –
error-prone. They were usually configured sysvinit file, you’d have to be careful when
seems like the perfect chance to take a
through a combination of arcane Bash it came to package upgrades etc that your
closer look. Look out for my coverage of
some of these new technologies over the scripts in /etc/init.d and some changes wouldn’t get overwritten. With
next few issues of Linux Voice. environmental settings in /etc/sysconfig or systemd, unit files get packaged into
/etc/defaults. These init scripts often did /usr/lib/systemd/system, but if you want to
awful amounts of work, such as echoing replace the default with your own, you can
62 www.linuxvoice.com
SYSADMIN
put them in /etc/systemd/system and
whatever is there will take precedence over
the defaults.
You can even include other unit
configuration files in yours, so you can easily
extend the default configuration:
include /usr/lib/systemd/system/nfs-secure.service
#extra conf goes here
Resource controls
Why would you want to extend a service
configuration like that? Well, systemd
launches all processes inside their own
cgroup (and all processes spawned from
this end up in the same cgroup – this is also
useful as it stops double forking processes
from orphaning themselves), so you can sysctemctl enables a user to easily inspect what units (services, in systemd speak) are loaded on
take advantage of this to use cgroups to their system and what their current status is.
limit the resources that each process (and
its child processes) can consume. resource-control for further details. There displayed, just as if you were looking at the
Systemd not only makes this possible by are also any number of security settings that contents of /var/log/messages or similar.
the way it spawns processes, but it also can be put in the configuration files like this. This default view gives you some simple
makes it easy by exposing many of the most For example, you can restrict a service from improvements over the traditional
common bits of functionality in accessing a particular device, make techniques, however. Error and higher priority
configuration directives. For instance, you individual directory trees inaccessible or messages are in red, notice and warning are
could limit the amount of CPU a process read-only, create a private /tmp directory for bold, timestamps are in your local timezone.
gets by dropping in a new unit configuration a service or even stop a service, and all its These are fairly cosmetic improvements.
file to /etc/systemd/system and adding: child processes, from accessing the What sets journald apart is that the logs are
[Service] network. In the example below, we’ve kept on disk in a binary format, which means
CpuShares=200
By default, systemd gives all processes
(well, cgroups), an equal share of the “Another aspect of systemd is that it collects all
processor (1024). By setting CpuShares to output from processes that it starts.”
200, you’re restricting this process to about
20% of CPU time. What’s more, this isn’t configured a service to have a private /tmp that the journal entries can be indexed on all
applied just to the parent process but to all directory. See how simple it is: fields, making them quick to search and easy
child processes. So if you have Apache [Service] to filter. For example:
running with many hundreds of spawned PrivateTmp=yes journalctl PRIORITY=7 —since=yesterday
CGI processes, this would restrict all of Will show all messages of debug priority
those processes to about 20% of CPU time. Journal received by the journal since yesterday. If
With the configuration file in place, you’d Another aspect of systemd is that it collects you tried to do this with standard syslog
just need to tell systemd to reload it, with all output from processes it starts – whether messages or the like, you’d have to concoct
systemctl daemon-reload, and then restart that’s through syslog() calls, messages your own grep or awk command, or hook it
the service, with systemctl restart httpd. emitted to STDOUT or STDERR, initial RAM in to a system like Logstash or Splunk.
service, for example. disk or kernel messages. It does this through There are loads of fields on which you can
You can also set memory limits one of its components, journald. To see the filter that come direct from the messages
(MemoryLimit) and IO limits contents of the logs, you can just type themselves, as well as a lot of metadata that
(BlockIOWeight). See man systemd. journalctl as root and you’ll get the results the journal inputs in to each log message
itself, including SELinux context, hostname,
transport etc. To see the full details, you can
read man systemd.journal-fields. Journalctl
even features tab completion of possible
field names, so you can get a quick look too
by typing
journalctl <tab><tab>.
There are many other great features in
systemd that, if you take the time to look
around, will make your life as a sysadmin
The other contender for the next generation of Linux init systems, Upstart, is the Ubuntu’s choice better. We hope this article has at least given
and involved in a hotly contested debate in the Debian project over what they should choose. you the motivation to take a closer look.
www.linuxvoice.com 63
CLOUDADMIN
CLOUDADMIN
Nick Veitch opens your eyes to the technology behind the cloud server revolution
Openstack
The cloud at last
All DevOps is headed to the clouds, but that doesn’t mean abandoning open source platforms.
P
eople used to eye the sky and of course, indirectly many consumers by accident that the pioneers in much of this
nervously and then fix you with a do too, whether it is for simple file storage, computing-as-a-commodity revolution are
slightly menacing stare when you backup of mobile devices or cloud-based an online bookstore rather than one of the
mentioned you had anything to do with music streaming. In fact it is pretty hard to major IT players. Though of course, Amazon
clouds. Fortunately it is now a well-known escape clouds, even if you want to. now is a major IT player.
word bandied about by IT types. Last The good news for open source in all
year, Forbes reported that over half of US So what is cloud computing? this is that the up and coming platform
businesses used cloud services in some The basics behind cloud computing are that of choice with which to build OpenStack.
form or another (www.forbes.com/sites/ it is an elastic resource, a commodity, where The project began life as a collaboration
reuvencohen/2013/04/16/the-cloud-hits- you can consume, on demand, resources between NASA and the hosting company
the-mainstream-more-than-half-of-u-s- such as computing power and storage. As Rackspace. The idea was simply to build a
businesses-now-use-cloud-computing), such it has been highly disruptive – it isn’t suite of open source tools that could provide
the infrastructure to deliver cloud services,
whether that be a private, internal, cloud
“With our OpenStack cloud, we’ve been able to offer (such as the original NASA project on which
OpenStack is based) or a public-facing
physicists the resources they need to analyse and cloud, like the one developed by HP
model data from the Large Hadron Collider.” (www.hpcloud.com).
Why open matters
Openness in the cloud matters just as much
as openness in an operating system. In
fact, a cloud platform performs very much
the same function as an OS – it enables
the user to deploy software to perform
some task. On a desktop, that might be
image editing in Gimp; on a cloud it might
be hosting a global payment platform or
similar. With an open solution, it is at least
theoretically possible to move your workload
from one provider to another.
That may not seem to matter much (and
indeed, it is currently difficult to achieve) but
it will matter more as startups may need
to shift workloads from local hardware to
a more resilient cloud provider, or larger
companies invest in hardware and pull
services out of public clouds. It also provides
a level playing field for innovation – many
companies now contributing to OpenStack
are developing a powerful and rich
ecosystem of possibility. These companies
The OpenStack dashboard can be used to manage every aspect of your cloud deployments, and it’s include huge players in the IT field. The
also possible to control it through an API, for great automation wins. list is quite long and includes names like
64 www.linuxvoice.com
CLOUDADMIN
Cloud anatomy
OpenStack is a suite of software tools Block Storage (Cinder) This type of network topologies there too (Virtual LANs),
designed for specific purposes. Each storage simulates a block-level device, such and indeed virtualise other functionality
workload, and perhaps an entire cloud, as you would find attached to your /mnt (intrusion detection, DNS etc).
may not need all of the components. New directory in Linux. As such it is transparent Identity (Keystone) Managing access
components are also being developed as the to applications accessing it and can be much to cloud services is a key concern.
need for them arises. Here are the current faster than object storage, but it also requires Keystone is a directory mapping users (and
ones (and their OpenStack names!) slightly more overhead in resources. Like software) access to the services deployed.
Compute (Nova) One of the primary ordinary block devices, it needs a filesytem. Authentication can be configured to accept a
requirements of any work you may want to do Image server (Glance) In dynamic clouds variety of methods – passwords, tokens, etc.
in the cloud, the Nova component allocates where nodes might be scaled out at any Dashboard (Horizon) The dashboard or
compute resources (ie processing power to time, it is useful to have a store for images of control panel is just an easy to use interface
run software). Nova is designed to be very particular devices (eg. a backup of a virtual for tweaking the cloud (or your part of it)
efficient at scaling horizontally (across many server or a filesystem). This is a sort of as well as controlling the automation of
nodes, rather than adding more resources to a specialised version of Swift (indeed, Glance some services. It is of course possible to
single node). often uses Swift as its storage medium), but use software tools to access all of this
Object Storage (Swift) Object storage is with extra functionality, such as an API for functionality through the API.
storage that can store and retrieve blobs of querying what images are stored. Metering (Ceilometer) Openstack describes
data. They might be big blobs- a huge video Networking (Neutron) Software-defined this as a telemetry service, but in simpler
file for example, or little blobs, like the Linux networking was first cooked up in 2008, terms it is basically the equivalent of an
Voice payroll. The advantage of this sort and was joined later by Network Functions electricity meter, collecting data on what was
of storage is that it is easily mirrored and Virtualisation. Simply put, in an age where used when and by whom. Although designed
replicated, and may be split easily across complex workloads are being defined in primarily for billing users, it provides auditing
many actual nodes. software, it makes sense to create the information for plenty of other purposes.
There is a very excellent website for OpenStack
at www.openstack.org, and a very useful wiki
at wiki.openstack.org.
Rackspace, HP, IBM, AT&T, Canonical, Dell,
Cisco, SUSE, Intel, VMWare, RedHat, NEC, The Canonical’s Juju GUI view of a deployed OpenStack instance. Other configurations are pos-
Hitachi and more. sible! Visit https://jujucharms.com and search for OpenStack bundles.
Loads of work more benefits to realise for software that has differentiation and confusion about the
In many ways it is not the platform that is so some mechanism for horizontally scaling – services offered by various participants,
interesting as the workloads that are distributed, highly-available applications that and that the business model isn’t clear.
deployed on it. There are inherent run on multiple nodes. In future workloads Uncannily, that is almost exactly what they
advantages to deploying even traditional will be written specifically for cloud use and used to say about Linux…
server solutions on a cloud. If you run a take better advantage of the provided APIs It is true that OpenStack is maybe not
simple LAMP stack on the cloud, it can to dynamically control aspects of their as mature as Amazon’s Web Services, but
automatically take advantages of features deployment. the project is just over three years old, and
that the cloud provides for it – the underlying Not everyone is a fan of OpenStack. there are a ridiculous number of companies
platform can make it more resilient, and Analysts at Gartner have continually committed to driving it forward. If you
vertically scale resources (storage, downplayed the success of the platform, want to play with the clouds of the future,
processing power) if required. There are suggesting that there is a lack of OpenStack is a great place to start.
www.linuxvoice.com 65
FOSSPICKS
FOSSpicks Sparkling gems and new
releases from the world of
Free and Open Source Software
Mike Saunders has spent a decade mining the internet for open
source treasures. Here’s the result of his latest haul…
Connection problem solver
WHY CAN’T I CONNECT 1.6.2
http://wciconnect.sourceforge.net
G
imp, Firefox, Evolution, Your mail client might just throw up
Scribus – all great free a generic “Connection failed” error
software projects, but message, which is about as much
their names say very little about use as a chocolate teapot. Where
what they actually do. That’s not exactly is the connection failing? Is
a criticism we can level at Why the problem with the IMAP server,
Can’t I Connect (WCIC), however, or something else in between
because it does exactly what it says on the net? If you’re massively
on the tin. WCIC attempts to help knowledgeable about the particular
you pinpoint problems when you’re protocol you’re using, you might
connecting to servers across the be able to Telnet into the remote
Never struggle with lame error messages again: WCIC tells you
internet, providing more information machine and work it out from there,
what’s really happening with your connections.
than you might otherwise receive but not everyone can do this.
from your usual applications. WCIC makes things much easier.
Say for instance that you’re trying You tell it to initiate a connection out lots of feedback and detailed
to set up a mail program, and you with a remote machine, and it descriptions of error messages. It
can’t connect to an IMAP server. steps through the process, spitting supports a bunch of protocols out
of the box: MS SQL, MySQL, (S)FTP,
SMTP, IMAP, POP3, IRC, NNTP and
LDAP. Just supply a hostname/
IP address and a port number, and
WCIC will sort out the rest.
If you want to investigate
connection problems with a
different protocol, you can go into
the Advanced menu and look
through the connection process
step-by-step, sending textual data
from a file to see how the remote
server responds. It’s even possible
to set up WCIC as a bridge between
a client and a server, so you can
look at the data that the machines
are exchanging in real time.
WCIC is one of those helpful
Set timeout limits
and fine-tune how tools that we’d love to see included
WCIC interacts with by default in mainstream desktop
remote servers via the distributions - so make it happen,
Preferences pane. distro devs!
66 www.linuxvoice.com
FOSSPICKS
Free-form data organiser
TREESHEETS 26-10-2013
http://strlen.com/treesheets
T
ake a spreadsheet, mix bring it up at another time, hit F1.
in some mind-mapping Essentially, TreeSheets works as a
elements, add a few to-do souped-up spreadsheet, letting you
list and text-editor features, and enter data into cells and move them
what do you get? The result might around. Click on the edge of a cell
sound like a hideous mish-mash of and its border turns into a dotted
programs, but it’s actually a rather line: start typing and new data is
awesome fusion that works really added into a new cell. Hit the Insert
well. TreeSheets’ author describes key (or go to Edit > Insert New Grid)
it as “suitable for any kind of data to add data to a new table – like a
organisation”, such as calendars, spreadsheet inside a spreadsheet.
to-do lists, project management
charts and brainstorming diagrams. Lookin’ good
The key to all this flexibility is You can format these grids in The built-in tutorial is
hierarchy: items can be embedded various ways via Edit > Layout one of the best we’ve can be marked as operations (eg
inside other items.To get it Render Style. With these features ever seen, getting you addition or multiplication) and then
running you just need to grab alone you can come up with novel hands-on with the generate results from neighbouring
the treesheets_linux.tar.gz file ways to present data such as program right from the cells. Once you have everything in
first step.
and extract it – this produces a contacts lists, to-do lists, project place, click the Run button on the
directory called TS. In here, run plans and even algorithms – see toolbar to calculate results. The
./treesheets, a pre-compiled binary. the examples/ folder for inspiration. complex_eval.cts example sheet
This worked without any fuss on But TreeSheets can do a lot demonstrates these features well.
our Xubuntu 13.10 test machine, more. It’s possible to filter content Ultimately, TreeSheets is only
and providing you have GTK 2 and based on edits, eg showing only limited by your imagination. It might
its dependencies installed, you the cells that have been edited in seem like an app without a specific
shouldn’t have any problems. (If the this session. The early phases of purpose at first, but once you’ve
binary doesn’t work, you can still a simple programming system browsed the examples you’ll see
compile from source.) have been included, where cells how the program’s features could
Excellently, TreeSheets is be applied to your own data. We’ve
supplied with an in-depth tutorial
that doesn’t just show you how
“The key to TreeSheets’ flexibility already started using it as a to-do
list manager on steroids, and as the
to do things, but encourages you is hierarchy: items can be programming features get more
to experiment by hand. It’s shown
automatically on the first launch; to
embedded inside other items” fleshed-out, its range of uses will be
nigh-on endless.
How it works: Adding data
1 Create a grid 2 Add a sub-grid 3 Format it
Click on File > New to create a blank 10x10 cell Click Edit > Insert New Grid to create a grid Click on blank space in the outer grid, then
grid. Start typing, and the first cell will expand to fit inside the current one. Type some text, click on the Edit > Layout Render Style > Vertical Layout With
the data that you enter. lower edge, and type again to add a new cell. Line Style to display the items in a tree-like format.
www.linuxvoice.com 67
FOSSPICKS
Graphical disassembler
EMILPRO 3.0
www.emilpro.com
S
ome under-the-hood things to File > Open and locate a binary
are worth understanding, executable on your filesystem. On
even if they’re not especially a Linux box this executable will be
useful on a day-to-day basis. One in the ELF format, but EmilPRO can
of these, if you’re a programmer, also read Windows and Mac OS X
is assembly language. Sure, very executables using its own version
few people write substantial code of Binutils, which it builds during the
in assembly nowadays (apart compilation process.
from embedded device and Looking inside /bin/ls:
driver developers), but it’s worth The interface the code here shows mean, you’re probably not
understanding what goes on after The top-left panel shows a list a subroutine, which interested in looking at assembly
you compile your high-level code. of sections and symbols in the hands control back language – but from inside the
EmilPRO is a GUI disassembler: executable, while the panel to the to the calling code app you can submit more relevant
with the “ret” (return)
it takes binary machine code right refers to the currently selected descriptions to EmilPRO’s website.
instruction.
executables, identifies the chunks symbol. Underneath, on the left, you EmilPRO works well enough,
that are code (instead of data), and have the disassembled code (or a although the interface could do with
shows the human-readable CPU hex dump if it’s a data section), and some polish. The program’s author
instructions contained therein. the right-hand side shows some admits that he’s not an expert with
The README file explains the information about the currently GTK, so if you are, dear LV reader,
dependencies required and how selected instruction. We’re not sure hop over to https://github.com/
to compile the program. Once you how useful this is – after all, if you SimonKagstrom/emilpro/wiki/
have EmilPRO up and running, go don’t know what the instructions TODO to lend a helping hand.
Super-simple cron job creator
EVERY 0.1.0
https://github.com/iarna/App-Every
O
ne of the best things about of tasks that should be executed at
Linux (and most Unix-like specified intervals, and it updates
systems in general) is your crontab accordingly.
the widespread use of plain text Get the latest release like so:
configuration files. Look in /etc, for wget ‘https://raw.github.com/iarna/App-
instance, and you’ll see that almost Every/master/packed/every’ Every shows you its
everything is readable and editable Then make it executable (chmod generated entry before right? You can replace “hour” with
in a standard text editor. Contrast +x every) and copy it into /usr/ adding it to the crontab “minute”, “day”, “week” or “month”,
this to Windows, with its dreaded bin or somewhere else in your – use the --dry-run and even specify a day of the week
registry… Ugh. Let’s not go there. $PATH. Using it is really simple: option to preview the (eg “every thursday”). Additionally,
It’s not a total utopia in Linux let’s say that you want to run /usr/ entry. you can specify units like so:
though: most configuration files bin/myscript.sh every hour. All you every 23 minutes /usr/bin/myscript.sh
are text-based, but the syntax and need to enter is this: When you run Every, you’ll see
formatting in them can vary wildly. every hour /usr/bin/myscript.sh that it spits out a crontab entry,
If you’re a seasoned Linux admin And that’s it – you don’t get much and it also automatically updates
then you can probably write cron more human readable than that, the crontab for your user account
entries in your sleep – but if you (edit it manually with crontab -e).
“Most config files are text-based,
always end up having to consult Every sets up the $PATH and your
the manual page, Every is for you. filesystem location exactly, so you
It’s a small Perl script that lets you
enter human-readable descriptions
but their syntax can vary wildly” can guarantee that the command
will run exactly as intended.
68 www.linuxvoice.com
FOSSPICKS
Log file monitor
BEOBACHTER 1.7.8
http://sourceforge.net/projects/beobachter
K
eeping tabs on log files is Beobachter can view multiple log
just one of the many jobs a files simultaneously; you can save
hard-working sysadmin has your session (so that all your log
to do. The trusty tail command line files are re-opened when you next
tool (with the -f flag) does a decent start the app) via the File menu.
job here, but it’s plain, and doesn’t Where Beobachter really comes
help you to spot critical information to life is with the formatting rules.
when text is whizzing by. A more Under Options > Manage Log
elegant solution is to use a log file Types you can create custom Its default interface is
monitor, and Beobachter (from the rules to apply to specific log files very ugly (it’s written in to be alerted when the word “error”
German “beobachten, to observe) (or groups of log files), so that Java), but you can tell it crops up.
has a few aces up its sleeve. lines are highlighted when they to adopt some elements With the formatting rules feature,
To run Beobachter, grab the .jar contain specified words or regular of your GTK theme in you could set lines that contain
Preferences.
file and enter: expressions. For instance, you the word “error” to have a red
java -jar Beobachter-1.7.8-jar-with- might be watching a log that’s background, so they’re easier to
dependencies.jar updated often, so you don’t have spot. After some tweaking, you
Click File > Open and select time to read every line, but you want can have a full-screen Beobachter
a log file (eg /var/log/syslog). session set up with multiple log files
“Where Beobachter really comes
Beobachter will then show updates being viewed and errors leaping out
to the log file in real time, so as of the screen. Not only does this
soon as anything is added to the
log, you’ll see it in the window.
to life is with the formatting rules” make your life as an admin easier, it
looks pretty l33t too.
Browse inside zip files
FUSE-ZIP 0.4.0
http://code.google.com/p/fuse-zip
M
ost modern file make release to build it resulted in
managers let you browse an error that UINT16_MAX was not
inside compressed defined; we fixed it by adding this to
archives. Gnome and KDE have the top of lib/fileNode.cpp:
services to give seamless access to #define UINT16_MAX 65535
compressed archives, for instance, Once you have it built, run make
but standalone non-Gnome/KDE install as root and you’re ready to
programs can’t use them without go. Mounting a zip file in a directory
pulling in loads of dependencies. is as easy as pie:
fuse-zip fixes this problem by mkdir mytmp In the background
letting you manually mount .zip fuse-zip somefile.zip mytmp terminal we mount equivalents, with plenty of stats to
archives as normal directories, Now you’ll be able to seamlessly mikeos-4.4.zip, add back it up. You can even use it to
without the need for any major browse the contents of somefile. NEWFILE to it, and create new zip files, eg fuse-zip
dependencies. The only thing it zip via the mytmp directory. Any unmount it. And the newfile.zip some-directory. When
foreground terminal
requires is FUSE (Filesystem in edits that you make to files will be you unmount some-directory,
shows it has been
Userspace) which is included by stored back in the .zip file when you newfile.zip will be created.
added to the .zip.
default in many major distributions. unmount the directory, which you Awesome. It all runs like clockwork,
To build fuse-zip, you’ll need at can do like this: so if you’ve been avoiding the
least version 2.7 of libfuse-dev and fusermount -u mytmp heavyweight desktop environments
version 0.11 of libzip-dev. On our fuse-zip’s developer claims that but you still like this feature of their
Xubuntu 13.10 test box, entering it’s faster than the Gnome and KDE file managers, give fuse-zip a go.
www.linuxvoice.com 69
FOSSPICKS
Crazily tiny PC emulator
CABLE3
http://ioccc.org/2013/cable3
L
ook at this snippet of source that’s generated from a single
code and see if you can 4043-byte C source code file. It’s
guess what language it is the obfuscation that keeps the code
*i+=262*o*z(F((*E&15)>9|42[E])),*E&=15)) so small – in human-readable C it’d
i(SP,(w(7),R&&-- be a lot bigger – but regardless of
1[i]&&o?R++,Q&&Q++,M--:0))DX() how the code gets mangled, it’s an
{$,O*=27840;O--; impressive project nonetheless. All
If you’re feeling particularly you need to build it is the SDL
snarky, you might say “It’s Perl, with development libraries, so once you It’s a bit rough around the edges, but squeezing an entire PC
some extra formatting to make it have them installed, just enter emulator into 4k of code is an astonishing achievement.
more readable than a typical Perl make. You can then run the
program”. But no, it’s actually C - emulator by supplying a BIOS CPU, 1MB of RAM, a Hercules
and completely valid C. Each year, image and a floppy disk image at graphics card, a floppy drive and a
the International Obfuscated C the command line; see the runme hard drive controller. So it’s not
Code Contest (www.ioccc.org) script for an example. particularly powerful compared to
asks programmers to submit the Cable3 emulates a mid-1980s- the likes of QEMU and VirtualBox,
most weird, messed-up and era PC, complete with an 80186 but it’s capable of running lots of
preprocessor-abusing code programs such as early versions of
possible, and some of the results
are truly astounding. “Cable3 emulates a mid-1980s-era Lotus 1-2-3 and Flight Simulator. It’s
even possible to coerce Windows
The above snippet is from
Cable3, a fully fledged PC emulator
PC, complete with an 80186 CPU” 3.0 into running – don’t expect
great performance though.
MS Paint-esque graphics editor
PAINT.JAVA 0.9C
https://github.com/HeroesGrave/Paint.JAVA
M
icrosoft Paint is a pretty for photos, rather than on plotting
rubbish image editor, individual dots in images. So if
but if you’ve ever spent you’re designing sprites for video
time in Windows, you’ve probably games or icons for programs and
used it in an emergency. It’s basic, you haven’t found any useful tools
it’s uncomplicated and it has hardly just yet, this could be a big help.
any features – but it’s always there. Although Paint.JAVA is still in
An enhanced version called Paint. beta, it’s already quite usable. To
NET has been in development run it, grab the .jar file, make sure Enabling a temporary
over the past few years, with a you have a JRE (Java Runtime grid helps enormously eraser. A handful of basic effect
similar interface but much more Environment) installed, and enter: when you’re plotting filters are included, and you can
functionality included, and now we java -jar Paint.JAVA.jar individual pixels and enable a grid mode, which helps
have a Java-based clone of it. Don’t expect much from the aligning things. when you’re trying to keep various
Paint.JAVA was borne of interface right now – it’s very bare, elements of a picture aligned.
frustration with existing pixel- and lacking the icon-laden toolbars Paint.JAVA isn’t the prettiest
editing tools. “Pinta is horrible, you would expect to see in an pixel editor out there, but it has all
and Gimp is over-complicated image editor. Fortunately, there’s the basics covered and thanks to
and sucks at pixel art”, says the still plenty of functionality tucked its Java roots it runs pretty much
developer. That’s fair enough: Gimp away in the menus, so click around everywhere. With a few refinements
is designed to be like Photoshop and you’ll find pencil and brush and decent selection of plugins, it’ll
and focus on filters and effects tools, shape creation tools, and an be a great little app one day.
70 www.linuxvoice.com
FOSSPICKS
FOSSPICKS BRAIN RELAXERS
Mascot-happy racing game
SUPERTUXKART 0.8.1
http://supertuxkart.sourceforge.net
S
uperTuxKart has been him by winning races. The level
doing the rounds for of graphical and audio polish now
many years, so if you approaches commercial games,
haven’t played it for a while, especially during the intro, and the
you might remember it as a presentation is pretty slick too.
rough-edged Mario Kart clone
with bits missing and gameplay Still game
flaws. That’s certainly how we With 20 courses and 16 playable
remembered it, until we tried the characters, there’s plenty of variety
latest release. SuperTuxKart has in the game, and many of the
come on in leaps and bounds courses unlock as you progress Yipes! The GNU mascot can’t produce games that rival
over the last couple of years, through the game. The controls are is being beamed up into commercial counterparts in
thanks in part to its acceptance just about perfect now: the karts a sinister spacecraft. terms of polish, but SuperTuxKart
in Google’s Summer of Code react well and don’t slip and slide as Get your racing gloves shows otherwise. It’s fun, it’s
scheme – but also because it has they did in early releases. If you find on and free him… pretty, it’s silly, and racing as Tux
a story mode now. the going tough, though, you can against the FreeBSD daemon
And this story mode is really try a tutorial mode which takes you represents what Free Software is
well done: the GNU mascot through the controls step-by-step. all about: different projects often
(a gnu, unsurprisingly) gets It’s often said that part-time, battling each other, but all with
kidnapped, and your job is to free hobbyist Free Software developers the same target in the end.
Object-hunting fest
E.T. GAME 1.03
https://github.com/mki1967/et-game
O
ld games on Linux never GLX installed, you’ll be able to get it
die – they just need to be built with a single make command.
recompiled for the latest If the build is successful, enter
distros. Providing that the games sh runme to start playing.
are open source, of course. E.T. Your goal is to collect 10
GAME hasn’t changed much randomly placed red crystals that
since its original release in 2003, are scattered around the playing
but today the code is enjoying area. This is trickier than it looks, Use the arrow keys
retirement in a GitHub repo, with some crystals tucked away to look around, and E.T. GAME won’t last you long,
receiving the occasional update inside rooms and crannies, and F and B to move but if you’ve ever fancied doing
to make sure that it works with once you have them all you need forward and back. some 3D programming, the
the latest versions of everything. to find a hidden exit. Nine levels Hold Shift + left or source code is worth exploring
As you can see from the are included – and there’s even an right to sidestep for ideas. It demonstrates how
screenshot, E.T. GAME is totally editor to make your own. instead of turn. to get a simple 3D engine up
retro in appearance – and this and running without pulling in
visual simplicity also means that
it has very few dependencies. “Old games on Linux never die – shedloads of dependencies, so
you can easily modify it to turn
Providing that you have the they just need to be recompiled” it into a first-person shooter or
development headers for X and maze exploration romp.
www.linuxvoice.com 71
SUBSCRIBE
YOUR AD
HERE
Email andrew@linuxvoice.com to advertise here
LISTEN TO THE PODCAST
WWW.LINUXVOICE.COM
72 www.linuxvoice.com
TUTORIALS INTRO
TUTORIALS
Dip your toe into a pool full of Linux knowledge with eight
tutorials lovingly crafted to expand your Linux consciousness.
In this issue…
74 76
Ben Everard
has been busy brewing ‘special’ open source
PGP BrewPi
cider for the Linux Voice launch party. Keep your emails safe from prying Like beer? Like the Raspberry Pi?
eyes using state-of-the art encryption Graham Morrison uses the latter to keep
techniques – with Ben Everard. an eye on the former as it ferments.
T
here seems to be a link between
Linux users and good beer.
Of course, not all Linux users 84 88 92
drink, and not all drinkers use Linux, but
there’s definitely a higher than average
percentage of Linux users who like a
really good pint. Quite naturally, geeks
who like to tinker with their operating
system also like to tinker with their
beer. Graham’s been going high-tech, OwnCloud Ada Lovelace Arch
and you can find out all about how to
Take control of your email, Juliet Kemp tips her hat to Take your first steps with
follow in his footsteps using the BrewPi
file storage and calendars this Victorian genius and with power users’ distro –
kit and a Raspberry Pi to monitor the
– with Mike Saunders. progenitor of programming. with Graham Morrison.
temperature of the brew on page 76.
I’ve been keeping things a little more
low tech, but also experimenting to
find the best brew. As I’m based in PROGRAMMING
Gloucester, It seems appropriate that
I’ve been focusing on cider. It tastes Dynamic web pages Euclid’s algorithm Bash
delicious, but can leave you with a Perhaps the greatest thing We like to think of data The Linux command line is
96 100 102
sore head in the morning. This coming about the web is how easy it encryption as being a useful for many things:
is to quickly create a page to share modern invention, and it is, but the managing files, automating tasks,
month I hope to try out some different
information. However, keeping the mathematical foundations on solving word puzzles. OK, that last
malt combinations as I try to design data in your pages up to date can which it’s built go back for one may not be the most common
my ultimate beer. I’ll let you know how be a real chore, unless you have centuries. Graham Morrison use of the GNU toolset, but it is a
it goes – it should help me judge the the skills to do it automatically. introduces an Algorithm from 3rd useful way of learning to work
results of the Bash regular expressions Ben Everard shows you four century Alexandria that can still with regular expressions.
painless ways to keep information be used to attack modern Ben Everard sets some challenges
competition on page 102!
current. encryption methods. to test your skills.
ben@linuxvoice.com
www.linuxvoice.com 73
TUTORIAL PGP
KEEP MESSAGES
TUTORIAL
SECURE WITH PGP
The Feds (and GCHQ, and the NSA) are snooping on our
BEN EVERARD
communications, but we can fight back with encryption
N
ormal email is one of the least secure forms
of communication available – less secure
even than post cards. These mails can
typically be read by anyone on the same network as
you, anyone at the ISP, anyone at your mail provider,
anyone at the recipient’s ISP and anyone on the same
network as the recipient, as well as anyone with
access to the various networks between the two ISPs.
If you use SSL or TLS to connect to your inbox, then
it improves things a little, but it’s still vulnerable as
soon as it leaves your mail provider. The colour and message in the top-right corner are
PGP (Pretty Good Privacy) is a program designed to a random security code so you can distinguish real
remove these weaknesses. It uses the normal email Mailvelope messages from spoofs.
system, but adds a layer of encryption to protect them
in transit. These days, PGP is usually used to refer to key encryption comes into play. Everyone who uses
the OpenPGP format for these encrypted messages, PGP first creates a public/secret key pair. The public
rather than the PGP program specifically. key is made public while the secret key is known only
The OpenPGP format uses two different types to the user. However, anything encrypted with the
of encryption: symmetric key and public key. In public key can be decrypted only with the secret key
symmetric key encryption the same key (basically and visa versa.
just a binary string that’s used as a password) is used
to encrypt and decrypt the message. In public key Public and private keys
encryption, two different keys are used (one to encrypt The solution is to encrypt the key for the message
and one to decrypt). The phrase ‘private key’ can refer with the recipient’s public key. When they receive
to either the key in symmetric encryption, or the secret the message, they can then decrypt the key for the
key in public key encryption. To avoid this ambiguity, message, and then decrypt the message itself. This
we won’t use the phrase in this article, but you may is a bit convoluted, but it’s much less processor-
come across it in software. intensive than encrypting the whole message using
When encrypting a message with an OpenPGP- public key encryption.
compatible program, the software generates a You can use OpenPGP in most mail clients, but
random symmetric key and encrypts the text. This we’ll look at doing it in webmail. Since OpenPGP is
ciphertext forms the bulk of the message. purely a text format, you could generate the encrypted
The problem is that the recipient of the message message elsewhere and copy and paste it into your
has to know the key, but it can’t be included in the email. That’s exactly what we’ll do, but instead of copy
message otherwise anyone who intercepts the and paste, we’ll use a browser extension to convert
message will be able to read it. This is where public the plaintext to encrypted ciphertext.
Mailvelope (www.mailvelope.com) works with
Chrome/Chromium and Firefox, and it comes pre-
USING OTHER MAIL CLIENTS
configured to work with some of the most popular
We’ve described the process for working mentioned in the main text, you should be webmail providers (Gmail, Yahoo, Outlook.com
with Mailvelope, but the process is almost able to transfer keys between these pieces and GMX). Installing it is no more challenging than
identical for all OpenPGP-compliant of software so you can access the same mail downloading the extension from its Releases section
software. You shouldn’t have any problems account through different programs.
following along using Thunderbird or Mailpile is a mail client designed to bring
(https://github.com/toberndo/mailvelope/releases)
Evolution, or even AGP and K9 for Android or PGP to the masses by making it easier and opening the file with the appropriate web browser.
Cyanogenmod. to set up OpenPGP encryption, even for The first step is to generate a public/secret key pair.
Regardless of the software, you’ll still new users. The project raised just over In Chrome/Chromium, you can get to this by clicking
have to go through the same process of $163,000 in crowdfunding and is currently in on the padlock icon that should have appeared to the
generating and exchanging keys before development, and you can track its progress
you can communicate with someone. As at www.mailpile.is.
right of the address bar. In Firefox, this options menu
is a little more hidden. First, you’ll need to go to view
74 www.linuxvoice.com
TUTORIAL PGP
DIGITAL SIGNING
OpenPGP encryption ensures that only the intended
recipient can read the message; however, it doesn’t
guarantee that they receive the message, or prove who sent
the message. Encryption can’t help with the first of these,
but there is something you can do about the latter measure.
In many OpenPGP mail clients (and the gpg command
line tool), you can add a digital signature to a clear-text
message. It does this by leaving the message in plain text,
but also encrypting a hash of the message with your secret
key. This encrypted hash is known as a digital signature.
Since it’s encrypted with your secret key, it can be
decrypted with your public key. Any recipient that knows
your public key can then decrypt this hash and check it
against the message. If they match, the recipient knows
that it really came from you.
> Toolbars > Add-on bar. This will make the Add-on or http://pgp.mit.edu. Of course, it is possible that You can send encrypted
bar appear at the bottom of the screen, and then you some attacker could take control of one or more of messages to several
should find the padlock icon on the right-hand side of these key servers and put fake keys in them. Webs people at once, and
this. This icon will bring up a menu, and you’ll need to of trust have a decentralised method of verifying Mailvelope encrypts it for
each of them.
select Options (see the image, left). keys. It’s done by people digitally signing the keys of
In the Options screen, you can create a new public/ people they’ve met and exchanged keys with. If you
secret (private) key pair by selecting Generate Keys. need to communicate with someone, you can then
Once you’ve done this, you can go to the Display Keys tap into this web of trust and see who trusts them.
screen to see it. This screen will show all the keys Perhaps someone you trust also trusts them. Perhaps
that Mailvelope knows, whether they’re other people’s someone you trust trusts someone who trusts
public keys or your own public/secret key pairs. them. If this chain is short enough, then you can be
Before you can receive emails, you have to send confident that you can trust the person. Unfortunately,
your key to the people you want to communicate with. Mailvelope doesn’t currently support webs of trust.
The key file can be exported from the Display Keys
screen (you can also export your public/private key Keep it secret, keep it safe
pair here and import them into another mail program). As is so often the case, the decision on which way to
Getting the public key to the recipient can be a distribute your key comes down to security versus
challenge. The best way to do this is to physically convenience. If you’re concerned, you could always
transport the key, as you can be completely sure that follow up with another method such as a phone call to
they got it correctly. The easiest way is just to email confirm the key. Once someone has sent you their key,
them the keyfile. However, it’s possible for some you just need to load it into Mailvelope using the
malicious attacker to intercept this message and Import Keys screen in the Options.
change the keyfile. Getting set up with keys is the hardest (or at least,
There are two other options: key servers and webs most inconvenient) part of using any OpenPGP-based
of trust. Key servers are databases of keys that you communication. Once you’ve done this, it’s easy. With
can add your keys to, and retrieve other people’s keys the Mailvelope extension running, just use your mail
from. For example, try http://keyserver.pgp.com provider’s web page as normal (if your mail provider
isn’t already on the Mailvelope watch list, you’ll need to
add it in the Options). When you get to the compose
page, you’ll see a floating icon of a pen and paper.
Click on this and it will open a new window to let you
enter the text for the message. Once you’ve written
the message, click on the padlock, and add one or
more people to the list that it’s encrypted
for, then Transfer to put the ciphertext into the email.
If you receive an encrypted message, Mailvelope
will display a decrypt icon; click on this to enter the
passphrase you entered when you generated the key.
This password gives you some security even if an
attacker gets access to your machine.
You can use gpg to create signed documents from the Provided you exchange keys securely, and keep
command line. Just run gpg --clear-sign <text-file> to your keys safe, OpenPGP provides security that is
generate a file containing the plain text and a signature. thought to be unbreakable with current technology.
www.linuxvoice.com 75
TUTORIAL BREWPI
BREW PERFECT BEER WITH
TUTORIAL
HELP FROM THE RASPBERRY PI
We love beer, we love the Raspberry Pi and we love the Arduino
GRAHAM MORRISON
– so we’re bringing them together for one awesome project.
B
eer is lovely. But when you’re making it at
7 STEPS TO BEER home, the biggest challenge (after discovering
• Brewing a way to boil vast quantities of water) is always
• Cooling finding somewhere to leave your brew to ferment. It’s
• Fermenting this stage of beer-making magic that turns what’s
• Priming known as wort into beer, creating alcohol and oodles
• Bottling of flavour. And for this stage to work well, you ideally
• Ageing need to be able to manage the temperature of the
• Drinking environment your beer is sitting in. In the UK, many
amateur brewers resort to using an ‘airing cupboard’,
normally situated next to the hot water tank and used
for drying clothes. This isn’t a bad place, because it’s The various bits of the BrewPi give little indication that
warmish – many beer kits like to ferment at around they can be put together to create something awesome.
20 degree centigrade – and the temperature doesn’t
fluctuate massively. But it still fluctuates, and it may has its creator, Elco Jacobs, built an incredibly
GENERAL LINUX
even prove too warm. Many yeasts, especially for ale, effective system for fermenting beer, he’s created an
prefer things a little cooler (18–20 degrees, ideally, but extremely helpful community of BrewPi enthusiasts,
this depends on the beer). And lifting 25 litres of wort an online shop and an assembly system for easy
HARDWARE into a first-floor cupboard could break your back, and access to all of the bits and pieces you’ll need.
you’ve got a hygiene nightmare if it falls over, or falls
through the flimsy shelf its sitting on. What you’ll need
BrewPi is the answer to this conundrum. It’s a While you will need a fair bit of kit, it needn’t cost very
brilliant project that brings together a love of Linux, a much. The fridge or freezer is the biggest
little hardware hacking and plenty of beer into one consideration, as well as somewhere to put it. We
DIFFICULTY
fermenting barrel of hoppy goodness. It’s essentially a asked the internet, and Mark Einon in Wales very
device that controls the environment surrounding the generously obliged with a freezer he was going to give
DISCLAIMER fermenting bucket of beer, enabling you to make to the local freecycle initiative (thanks Mark!) Almost
perfect beer every time, regardless of climate and any fridge or freezer will do, as long as it’s working,
The following tutorial
mixes liquid, electricity house heating cycles. Many people use an old fridge and you should be able to find someone willing to let
and DIY modifications, or freezer as the surrounding container and connect an old model go for very little. You need enough space
all of which can create the BrewPi to a cooling and heating mechanism to within the freezer to stand your fermenting bin, and as
a lethal cocktail of
enable its clever algorithms to create the perfect our freezer’s shelves were made from coolant pipes,
danger. Don’t make any
modifications yourself environment for your beer. The BrewPi itself is a we had to bend these back before there was enough
unless you’re certain mixture of hardware, software and initiative. Not only room. Fortunately, the pipes were easily pushed back.
they’re safe, and get a We then slotted in an old wooden shelf to stand the
qualified electrician to
check any modifications fermenting bucket on, as they can be very heavy when
you do make. full of 25 litres of brewing beer.
If the fridge or freezer has an inside light, this can be
coerced into another essential task – heating up the
inside environment. If not, you’ll need some other kind
of heating mechanism. Some people use a reptile mat
wrapped around the fermenting bin, but we plumped
for a 60W waterproof greenhouse heating bar, which
cost us £15 new on eBay, and slotted nicely into the
bottom of the freezer with plenty of room. You will
also need both a Raspberry Pi, complete with a > 2GB
SD card, and either an Arduino Duo or an Arduino
This shows the rear of the LCD connecting to the Arduino Leonardo microcontroller. If you’re anything like us,
and the shield, with the OneWire connector above. you’ve got an old Duo tucked away in a drawer
76 www.linuxvoice.com
BREWPI TUTORIAL
somewhere and a Raspberry Pi going spare. And
despite the name of the project, there’s no specific
reason for requiring a Raspberry Pi – any Linux device
with a USB port capable of running the Apache web
server and some Python scripts should be up to the
job. You might want to try a NAS, for example, if you’re
running one already. But the Pi is well suited to being
tucked away in the garage, and it’s relatively cheap, so
it’s still a great option. Most of the hard work is done
by the Arduino, as this interfaces with the various
sensors and relays and runs the complex controlling
algorithms that adjust the temperatures within your
freezer. Your brew will even keep brewing if the Pi
crashes, which is handy if there’s a power failure and
your Pi develops a read/write error. The Pi is really just
logging and serving up the data for the web portal.
Unless you’re an expert who’s happy building
circuits, you’ll also need the BrewPi kit (brewpi.com).
This includes everything you need to turn your
Arduino into a sensor-wielding beer factory. It includes the process first, and then experiment a little with an The BrewPi isn’t an easier
the shield, a PCB that slots onto the two compatible old circuit board and some wire. You’ll then be set for way of making beer. It’s
Arduino form factors, along with the LCD, the sensors, the main event. an easier way to make it
the actuators (more details later if none of this makes The shield is the bit that attaches to the Arduino, perfect.
sense) and the other fiddly bits that may otherwise and it’s probably the most complex part of the whole
take an afternoon to source. It’s even possible to buy assembly, so let’s get this out of the way first. The
the whole thing pre-constructed, but we think that’s main instructions can be found at www.brewpi.com/
missing half the fun, especially when the build itself brewpi-soldering-guide, but we’re going to cover the
isn’t that difficult. broad detail of the process, along with any particular
We’d also highly recommend buying the case kits. notes we make along the way. The official instructions
These lasered bits of plastic encase both your are made up of photos, and while they’re great if you
Raspberry Pi and your Arduino to create a sleek, know what you’re doing, we want to make the project
professional solution that looks great sitting atop your as accessible as possible by making fewer
freezer. They also stop bits getting bashed about or assumptions about the builder than the official site.
falling off. Expect to pay around £70 for the shield and
case kits together. You’ll also need a miscellany of Forging the shield
common tools to put the whole thing together; a First, lay out all the components on a table top,
soldering iron and solder, maybe a solder sucker, grouping them together so you can check they’re all
some tweezers, a range of differently sized there. This also makes it easier to install. Now start by
screwdrivers and a steady hand. being brave – you’ve got to snap the shield apart into
Did we just say soldering iron? Yes! You’ll need to four separate boards. It’s a little like breaking bonfire
solder the various components on to the Arduino toffee. The large board that breaks off (labelled with
shield. But it’s straightforward, and this should make www.brewpi.com) connects directly to the Arduino.
an ideal first project if you’ve not done any soldering Then there’s a long strip embedding seven columns of
before. All the components are large and there’s no three holes, a medium-sized rectangle of a board with
fiddly soldering required. Try watching a couple of a surface mounted integrated circuit, and a tiny
YouTube soldering videos to familiarise yourself with rectangle that will host the rotary encoder.
Break off the broken tabs remaining on the boards
with a pair of pliers or a small pair of cable cutters so
that the edges are as smooth as possible. Some of
the pin arrays – the ones with the two collars of black
plastic – are designed to fit on to your Arduino board
so that it can connect to the holes on the shield. There
are five of them, and you should find there’s one for
every header on the Arduino. These need to be
connected to the Arduino first, before being soldered
into the shield – this locks their orientation and
connection. The longer pin goes into the Arduino,
while the shorter piece goes into the shield. As we
The Raspberry Pi can also fit on top of the BrewPi case, were using an ancient Arduino Uno, there were fewer
in a separate box or au naturel. Cases are good. power headers on the circuit board that pins allocated,
www.linuxvoice.com 77
TUTORIAL BREWPI
Next is what’s known as the OneWire distribution
board (the only board remaining). Sometimes it’s
written as ‘1-Wire’, and it’s a standard protocol for
communicating with devices from Dallas
Semiconductor (such as the temperature sensors we
need for our BrewPi), using a single connector, hence
its name. This needs seven of the three-pin green
connectors – two shaped at right angles for the edge
connectors, and the other five directly pointing up (you
can see this illustrated on the board itself now you
know what to look for, and that’s the side they need to
be connected to). Official instructions suggest starting
with the two outer connectors, as these are oriented
outwards lengthways. The other five all face upwards
with their pins on the left when you’re looking at the
text on the board. The green ‘AT-AT’ connectors (for
Red or blue LEDs on the but the eight-pin array still fitted over the power pins that is what they look like, not an official designation)
shield indicate whether the and the 10-pin header still fitted across the IO pins then plug into these and the two end connectors.
BrewPi is currently heating without getting in the way of everything coming Now it’s the turn of the rainbow-coloured ribbon
or cooling your brew.
together. Don’t forget there’s also smaller six-pin cable, which we need to turn into something a little
rectangular connector. Fortunately, the shield only fits more civilised to enable it to connect to the ports
one way. Start your soldering at the corners to make we’ve been soldering. If you’ve ever made your own
sure all the pins stay aligned. IDE cable for an ancient PC, this is very similar. The
Now solder the single green connector onto the black plastic connectors that attach themselves to the
ACT1–ACT 4 shield holes, with the component ribbon cable have teeth that penetrate the insulation
attached to the side with the website URL. Connect a on the outside of the wire to make a connection
three-pin green connector to one side, and one of the without soldering anything. Just make sure the
PRO TIP
two-pin connectors to the other (they all offer ports at triangles on the connector align with the black wire in
Soldering tips; heat up
the destination first, right angles to the board, and have the same the flat cable. Push the cable through until it just
dab the solder onto the connector form factor as the eight-pin one you’ve just protrudes from the other side, and taking the advice of
joint, make sure it flows connected). Ours wobbled slightly while fitting them, the official instructions again, place the smaller edge
into the joint naturally
and try not to bridge any so it’s best to solder one of the middle pins first and on a table and use something flat to put considerable
connections. If you do, wiggle the connector into alignment, before soldering pressure onto the connector. It should just about
heat and remove using a any remaining pins. Flip the shield over and solder one come together, and in so doing, connect the pins to
solder sucker.
of the 10-pin block connectors to the header labelled the cable. When this seems secure, fold the long end
“To the LCD backpack”, and make sure you’ve got the of the cable up and over the back of the connector
gap in the right place (facing the edge). before sliding the remaining black connector to hold
That’s all that needs to be done to the main board! the cable together. This needs to be done on both
Congratulations. Now might be a good time for a cup sides of the ribbon cable, and both connectors need to
of tea before moving on to the LCD backpack itself. point the same way so that the cable won’t twist. That
last bit can be a little mind bending as you try to work
Glowing electronic display
The LCD board is the one with the small integrated
circuit already on it. The circular speaker fits into the
middle with the upwards side on the same side as the
chip, and after soldering, you need to cut the
protruding pins from the other side. Another 10-pin
header comes next, with the gap facing the integrated
circuit. Flip this small board over (to the side without
any components), and fit the 16-pin header into the
holes. Solder from the other side.
The tiny board for the rotary encoder is up next. The
official instructions mention that the biggest two pins
on the encoder need to be squeezed slightly to fit into
the holes. We didn’t need to do this, but we did need to
use a fair amount of strength to get the encoder into
position. Make sure the side with the handle is the one
with the circle on the board, and solder the joints from
the other side. A washer, a nut and then the handle We had to bend one of the shelves in our freezer to make
can be slipped over the encoder when you’ve finished. enough room for the fermenting bin.
78 www.linuxvoice.com
BREWPI TUTORIAL
THE BREWPI SURVIVAL KIT
The flat packed The LCD, which fits
Raspberry Pi and into the hole in one
Arduino shield cases. of the case panels.
Shield parts are
mostly soldered
Temperature sensors are
onto the shield,
used to measure the beer
but our kits had a
temperature, the freezer
few bits left over.
temperature and the
outside temperature.
The shield itself.
out which way to put the connector on so that the enough to solder the lone pin alongside the others.
black cables stay in the same place and the connector Solder these pins on the top surface (the same side as
is pointing in the same direction after you’ve twisted the LCD itself), and you can now attach the LCD to the
the cable back over the connector. You can now female header.
connect both of the boards with the correctly sized The final stage of shield forging is to take the
connector together with the cable, and we felt slightly sensors and strip the insulation off the end of the
more optimistic after testing the continuity of the wires – a couple of millimeters will do. Each cable has
connections to make sure we’d pushed through the three ‘cores’, and each core needs to be screwed into
connectors to the ribbon cable with enough pressure. a three headed ‘AT-AT’ green connector, so that when
For the other ribbon cable, pull off the ends where these plug into the OneWire board, red is at the top
they’ve been cut and wiggle this into the underside of (marked 5V – this is important), and yellow at the
the rotary controller board. Pin 4 should always be red. bottom. The official instructions note that the colour
Then solder the pins to the board, The other end of order of the yellow and green wires has changed, so
this cable goes to the LCD board, parallel to the it’s worth making doubly sure if you’re reading this in
rainbow ribbon cable, and connected to the same the distant future, as the sensors might not be able to
side. Make sure pin 4 lines up and solder this as well. take 5V going in the wrong cable. To make the ends of
The next stage is the LCD, and you first need to the wires easier to insert into the tiny screw holes, and
break off 16 pins for the LCD itself. The official guide to make them more resilient, it’s worth dabbing them
has a great tip, where you connect the whole header in a little molten solder.
to the female header on the other board and use this
as a guide for snapping the 40-pin header at the right Porter, Stout, IPA – and the case
place with your hands. This didn’t quite work for us, as You now have a choice. You can either keep the
we broke the header one pin short, but it was easy OneWire connector close to the rest of your BrewPi
hardware, or place it closer to where the sensors are
going to be. This might be useful if you wanted to
position the OneWire board within the fridge, for
example, but we decided to go with the official
instructions and wire up a short three-core cable
(maybe 20cm), with AT-AT connectors at either end, to
connect the OneWire board to the BrewPi. We used an
old power cable with earth for easy access to three
cores with insulation attached. This cable eventually
loops outside the case from the main board to the
OneWire connector.
The cases are all made from various bits of lasered
plastic, and it’s never clear exactly what goes where.
To make the sensors inside the fridge easily removeable, It’s like a BrewPi 3D jigsaw puzzle. The Raspberry Pi
use a connector like this within a container. case is a good place to start, as this is emblazoned
www.linuxvoice.com 79
TUTORIAL BREWPI
audio connectors, the opposite just an HDMI
connector. Lengthways, theres a micro USB at one
end and USB and Ethernet at the other. It’s also a good
idea to push out any of the small bits of plastic that
are used to create airflow through the case, as the Pi
can be prone to overheating, but we couldn’t remove
some of these pieces as they weren’t separated
enough from the borders of the plastic. This may have
been why two extra end pieces, with all the bits
removed, were hidden away in one of the part bags.
It all goes together easily enough when you’ve
worked out up and down and where each side fits. Be
careful with the side containing the HDMI connector,
as it’s not immediately obvious when it aligns and you
may not notice it’s reversed until the end. When you’ve
got everything held together, you’ve got to now use
the long screws, two at each long end, to go through a
washer, then into the case, and then through a nut you
hold in the small vertical gap before tightening the
You can check your sensor with the Raspberry Pi logo flanked by some hops, and whole thing up. It’s fiddly and frustrating, so we’d
devices are working by it’s also obvious which way the pieces should go when suggest focusing on the beer.
enabling the ‘Read values’ you attempt to fit your Pi into the case. The feet of all
option before refreshing the cases are half-circles, which is another good way Construction time again
the device list.
of orienting yourself with the 13 or more pieces used This leaves you with significantly fewer bits to worry
to construct each of the cases. about for the other case, which is going to contain our
As we we’re using an early Pi, lacking holes on the BrewPi shield. Now, for some reason, our case is a
PCB, there’s no way of mounting the board inside the hybrid of an earlier revision with a few differences
case. The official instructions show a couple of between both the earlier version and the 2.0 cases, so
spacers and screws mounting the Pi to the lower case there’s no point telling you how to put the case
panel. Our case design didn’t have a hole even if we together. In fact, the 3.0 case was announced in
did want to connect the Pi. But thanks to the various January, and is smaller again. We were able to make it
prominent ports and connectors on the Pi, it was held up as we went along because it’s much easier than
firmly in place regardless. One side has the video and building the shield, and mostly common sense. There
POWERING THE BREWPI AND UPDATING THE FIRMWARE
Before we move on to software, you need to give two.To update Raspbian, type: Select your Arduino from the drop-down menu, then
some consideration to how you’re going to power sudo apt-get update select the downloaded hex file. Make sure ‘No’ is
both the Raspberry Pi and the Arduino. In theory, sudo apt-get upgrade answered for both the ‘Restore Old Settings After
you could power the Arduino from the Raspberry Programming’ and ‘Restore Installed Devices After
To update the firmware, type:
Pi’s USB, using only a single hub or adaptor. We Programming’ options and click on the ‘Program’
sudo apt-get install rpi-update
tried this with as many milliamps as we could button. You’ll see the output of what’s happening
muster, but the LCD on the Arduino still dimmed sudo rpi-update in the black box below, but with a bit of luck, the
when we did anything. Rather than take any risks We now need to grab the latest installation tools. BrewPi will beep a couple of times and a few
with our beer, we decided to power both separately. To do that, just enter the following and leave all the minutes later, you’ll have a programmed BrewPi.
As we all know, the Raspberry Pi is very susceptible answers at their default values:
to irregularities in power, so it’s best not to take any git clone https://github.com/BrewPi/brewpi-tools.
risks – use a high amperage USB hub or adaptor for git ~/brewpi-tools
the PI, and an appropriate adaptor for the Arduino. sudo ~/brewpi-tools/install.sh
It’s now time to test whether your soldering After this has completed, reboot your Pi. You
skills have been good enough, and to stretch a few will now be able to point a web browser on your
of those Linux skills too! The first step is to get LAN to the IP address of your BrewPi. Don’t (yet)
a working Raspberry Pi configuration, complete get distracted by the blinking lights, as they’re not
with your chosen method of network connection. doing anything meaningful. Instead, you need to
This has been documented many times, so we upload the BrewPi firmware to the Arduino before
won’t go into the details – plus, downloading and anything can happen. First download the firmware
installing NOOBS onto your Raspberry Pi makes file itself (here’s the link: http://dl.brewpi.com/
the whole process easier than ever. Just make brewpi-avr/stable), and make sure you get the
sure the Raspbian installation and the firmware is correct file. The file depends on your Arduino type
up to date, because there are some known issues and revision – ours is an Arduino Uno Rev A, for
with Raspberry Pi stability, especially with older instance. To upload this to your BrewPi, click on When you update the firmware of the BrewPi,
versions. And stability is key when you’re asking a the ‘Maintenance Panel’ button on the right of the the output console keeps you updated on
Raspberry Pi to control temperatures for a week or web interface, then click on ‘Reprogram Arduino’. progress. It only takes a couple of minutes.
80 www.linuxvoice.com
BREWPI TUTORIAL
are three different kinds of bolt – two of identical
length but slightly different widths, which you’ll find
out when you try to squeeze a larger one into the
smaller holes, but you might notice the other way
around, so it’s still worth laying everything out before
you start, Similarly, there are two different kinds of nut,
although on first glance they all look identical, and the
case building consists of two separate small phases
– connecting the Arduino to the case followed by the
LCD panel we built into the shield earlier. The grey
threadless spacers are used to distance the LCD from
the edge of the case, while the threaded white spacers
are used for the Arduino. The position of the holes
through the Arduino PCB mean that it can only be
The BrewPi is brilliant at
fitted onto the case one way – with the power and of these panels have a thin layer of plastic that can be
controlling temperature.
USB connector along the rear edge. removed, along with a few squares for the joints that
Here’s the sensor output
As we mentioned earlier, you also have the choice may not have fallen out with the laser cutting. after we put a bin of 50°C
of whether to mount the OneWire board to the top Eight of the remaining screws now pull the case water into the fridge and
panel or mount this inside your freezer cabinet so that together, in the same way that they did for the asked the BrewPi to take
the sensors plug directly into this within the freezer. As Raspberry Pi case. The official instructions suggest the temperature down to
we opted to mount it to the case, and you need to use using a magnet to hold the nut in place, but we we 21°C.
the provided small plastic panel (with OneWire found it easier to push the bolt in until it reaches the
embossed onto its top surface, along with numbers gap for the nut, then ease the nut into place using the
for each input). Two of the narrow bolts go through nut to make sure it doesn’t go too far and drop inside
the PCB, through the small plastic panel, through the the case (which is going to happen with the last one
case, through a washer and finally onto a nut to make anyway – stay calm and think of beer). A quick tip if
this happen. one does fall in, you can play an amusing game with
After connecting the Arduino to the case and yourself and attempt to bounce the nut back out of
making a decision about the OneWire connection, we the same hole - it’s not that difficult but looks a little PRO TIP
now need to put everything together like a simple 3D deranged. Sensible people will loosen the bolts at one Although not essential,
jigsaw puzzle. The half-circle plastic nodules are the end to separate the box enough, which is also a good a cheap multimeter
feet, and to get ours together, we first fitted the rear way of taking the top of the case without removing can make testing much
easier – especially if it
panel. This is the one with the holes for power, USB any of the bolts. And don’t forget the washers on the makes a sound when the
and the controller connectors, and after you’ve placed outside. They’re needed to make the bolt fit. two contacts connect.
it over the Arduino ports, you can hold it in by plugging This is called testing for
continuity, and it’s a great
in the green ‘AT-AT’ connectors to the outside of the Loose fit way to make sure dodgy
case. They fit in pairs with the exception of the single But we’d suggest maybe loosely taping the case soldering is working.
three-pin connection on one edge. The two side together for now, until you’ve been able to test out
panels then slid into the rear panel, followed by the top your BrewPi with the software to ensure that
and finally the LCD, which slid onto those to all of the everything works. That way you don’t get doubly
other panels to make the front. Don’t forget that many frustrated by something not working and having to go
through the whole unscrewing process again. You
now need to connect the two SSR blocks to the
outputs on the shield, making sure you get the
positive cable going to the positive input and the
negative cable going t the negative input on the SSR.
These solid state relays perform a simple job, turning
the power going through the other two points either
on or off. This is used by the BrewPi to automatically
turn on refrigeration or heating. Some BrewPiers have
reverse engineered their refrigeration units and
heaters to splice these connections into the most
efficient place. We cut open the power cables to both
the freezer and the heater, took out and cut the
negative wire, and used this on other side of the power
output on both SSRs. The power output was on the
top of our SSRs, while the control inputs were in the
bottom. Make sure you get this correct and that your
Our first brew started at 20 degrees and lowed to 18 after wiring is safe, because you could easily create a
48 hours, to create the best temperature for the beer. hazard at this step. You should also consider the
www.linuxvoice.com 81
TUTORIAL BREWPI
The algorithm that checked sensor was working by plugging each in turn
controls the BrewPi is and refreshing the device list to make sure a
complex, but you can even temperature value was being read. We also identified
fine tune this from the each sensor by heating or cooling the sensor and
Maintenance panel if you wrote down which one was which.
so desire. You need two sensors for the BrewPi to work
properly. One measures the ambient temperature
within your fridge or freezer, while the other measures
the temperature within the beer. For the beer
measurement, it’s recommended you use a
‘thermowell’ to keep the sensor separate from your
beer. You also need to solve the problem of getting the
sensor cables into the fridge or freezer cavity. Some
users piggyback their wires onto any wires they can
already find going into fridge. Our approach was to
butcher an Ethernet cable – there are more than
location of the SSRs, as they’re usually exposed and enough cores within one of these for 2 of the sensors
obviously shouldn’t go anywhere near liquid. – and drill a tight-fitting hole for both this cable and
Back on the BrewPi shield, one output to the SSR the power cable for the heating unit, into the side of
triggers a red LED while the other triggers a blue LED, the freezer. This has worked with no problems so far,
so it’s worth getting them correctly connected as you and not affected the insulation of the freezer.
can then see when your device is heating or cooling.
These connections are on the backside of the shield, Brewing your first beer
not on the OneWire connector – that’s just used for With sensors in place and the software running on
the sensors at the moment, although there’s talk of your BrewPi, you’re ready to brew. Despite the slightly
adding a hydrometer reader to measure the alcohol intimidating appearance of the web interface, it’s very
content, which is something we’d love to see. straightforward to use. Click on the ‘fermenting’ link
Now stop. It’s time to admire your work. The tough just below the BrewPi logo and you’ll be given the
bit is over with, as the BrewPi is now built, waiting only option of starting a new brew. You can do this to log
for a little Linux magic to bring it life. And you know all the details of each brew, as well as clear the data for
those holes in the top of the BrewPi case? And the the start of a new fermentation cycle. The main
weird semi circle feet on the Raspberry Pi case? They display area is taken up by a graph showing the
fit together! Your Raspberry Pi should sit snugly to the changes in beer temperature (green) and freezer
top of the case like the Boeing 747 of brewing. temperature (blue), as well as the temperature outside
the fridge, although this isn’t used by its algorithms.
Configuring devices At the bottom, along the timeline, blue and red blocks
The very final step (we promise!), is to tell your BrewPi show when the cooling and heating was engaged.
exactly what you’ve got connected, and we found it There are three modes for fermenting your brew;
easier to start with a blank canvas. Click on ‘Device Beer Constant, Fridge Constant and Beer Profile. Beer
Configuration’ button from the Maintenance panel Constant simply keeps the beer at a specific
and you’ll see a list of devices your BrewPi thinks are temperature, which you dial into the large number bar
connected. The devices are the switches to control at the bottom of the screen. Expanding on this, the
the heating and cooling, plus the two or three sensors Beer Profile setting enables you to set a desired beer
you’ve got connected. If any devices appear in the temperature for each day. This is useful if you want to
Installed Devices list, set their function (a drop-down try a slightly warmer environment at the beginning
list on the right of each entry) to ‘None’ and click Apply. and end of the fermenting cycle. When either of these
This will move them from the ‘Installed Devices’ box to beer profiles are active, the LCD display shows the
the ‘Detected Devices’ box, from where we can now absolute temperature as well as the temperature for
add them as we need to. Enable ‘Read Values’ and the profile. This is the target temperature for the
click on Refresh Devices. Click on the ‘Refresh Device algorithm, and you’ll find the BrewPi will cool or heat to
List’ button and enable the ‘Read Values’ check box. nudge the temperature closer to the desired value.
This will list connected devices along with a number The Fridge Constant setting does what it says,
to indicate what the switch or sensor is reading. You keeping the temperature of the fridge at a specific
can easily detect and check your sensors are value. This might be useful for the couple of days after
functioning in this way. OneWire works with unique you’ve bottled your beer, or put it in a cask, as you
identifiers embedded within each device, so the device usually have a couple of days of secondary
ID is unique for each sensor, not for the BrewPi fermentation. But it could be equally useful for cooling
configuration. That means if you identify which sensor your final product for the final, essential step of
you’re going to use within your fermenting bin, you brewing beer – keeping your home-brew ready to
can plus this into any of the OneWire connectors. We drink at a perfect temperature, all year round.
82 www.linuxvoice.com
BREWING YOUR OWN BEER:
A BRIEF ENCOUNTER
The world of homebrew will feel familiar – it’s full of people who
obsess over details and argue endlessly about packages.
H
omebrew forums across
the internet are full of
enthusiasts arguing over
every detail of the brewing
process. And we mean every
detail. Fermentation temperature
is a dark art of its own, as is the
amount of priming sugar to use
– we’ve seen simpler algorithms
explain Bézier curves in OpenGL!
As with Linux, all this data and
debate can be totally
overwhelming to the beginner. But
again like Linux, it’s worth
struggling through to the other Just like open source software, you can create your own recipe or you can
side. Just think of the beer. stand on the shoulders of giants. Image credit http://superflex.net
We also see no shame in
starting small. Beer kits are perfect Sanitiser pressure barrel) with Vaseline, as
for this. They can be a little pricey, Everything that comes into this helps to keep them airtight.
but they’ll take the pain out of your contact with your developmental After you’ve whetted your
first brew. To get started, you’ll beer has to be free of any appetite with a beer kit or two, it’s
need some simple pieces of kit. harmful bacteria. Bacteria and time to move up to replacing the
Here’s what we recommend: wild yeast kill beer over the period kit with your own. There are
it is stored, leading to feelings thousands of years of experience
A 25-litre fermentation bin similar to a hard drive failure. on the subject, and to be honest,
This doesn’t need to be absolutely we’ve only just started. But a good
airtight, as the brewing process will A syphon and hydrometer. place to look for your first brew is a
create C02, which sits on the top to The syphon is to transfer your recipe that is itself open source.
create an airlock. We drilled a hole beer from the fermentation bin to
in the top to encase one of our the pressure barrel or bottles, Free Beer
BrewPi sensors within its own well. while the hydrometer is to This is exactly what is offered at
calculate how much alcohol is in FreeBeer.org, a tested and refined
A similar sized pressure barrel your brew. You must measure recipe for making excellent beer
The pressure part is important for the gravity at the beginning and that’s been released CC-BY-SA.
the secondary fermentation the end of the process for this to The ingredients list five different
preocess, because it’s what work – taking a measurement at types of malt, Guaraná beans for
carbonates your beer and keeps the end isn’t enough. added spice and energy and
your beer fresh. We’d recommend London ale yeast. This is followed
a pressure valve with a connector The biggest threats to your by step-by-step instructions that
for a C02 canister. These are beer are sanitisation, as we’ve will take your beer from mash to
relatively cheap, and they’re used already mentioned, and wort to fermentation to beer in as
to create a C02 buffer when the temperature fluctuation, which is little as three weeks, all in the
pressure gets too low to push the solved with the BrewPi. Another name of Free Beer. If you do get
beer out effectively. If you don’t tip we’ve found helpful is to cover around to making some, and you
want to use a pressure barrel, you all threads (such as those for the have a bottle left over, you know
can use bottles with caps. tap, the top and the valve on the where to send them.
www.linuxvoice.com
TUTORIAL OWNCLOUD 6
OWNCLOUD 6:
TUTORIAL
RUN YOUR OWN CLOUD
Love having your data in the cloud? Scared that the NSA and
MIKE SAUNDERS GHQC are tapping it all? Then it’s time to set up your own server!
W
e’re not big fans of buzzwords at Linux then it’s wise to be cautious, especially in the wake of
WHY DO THIS? Voice. We don’t leverage synergies, we the Snowden revelations and US constitution-burning,
• Share and sync files, don’t harness data silos, and we most NSA-spying shenanigans.
contacts and calendars
across all your devices certainly don’t streamline our paradigms. At first, the
• Collaborate on shared term “cloud computing” came under this umbrella of Do it yourself
ODF documents with linguistic silliness, because it basically meant “doing One way around this is to host your own cloud
multiple users stuff on someone else’s computers”, like many people services. It sounds like a contradiction in terms: isn’t
• Keep your data safe have already been doing for years. But over time the the point of “cloud computing” that you offload all the
from the prying eyes of
big businesses term has become widely accepted, so we’ll grudgingly work to someone else? Well, yes, but by hosting your
use it. Bah humbug! own cloud you can still have some of the benefits,
Now, there are many providers of cloud-like services such as sharing data and providing collaboration
on the net. DropBox, for instance, provides data services across multiple machines and users. You
storage and file sharing, while Google’s ever-growing control the hardware and software, and determine
range of services includes document collaboration who accesses your data, but you still have the
(Google Drive) and calendars. Many of these third- convenience of cloud-like facilities.
party services are packed with features and are easy Arguably the best open source cloud package at
to use, but they all have one problem in common: they the moment is ownCloud, which reached version
all have access to your data. If your files consist of 6 in December. It’s loaded with useful features for
nothing more than lolcat pictures, and your calendar file storage, file sharing, calendars and document
is simply used to plan your pub visits, you’re probably collaboration, all accessible through a web browser,
not concerned about this. But if you’re storing so here we’ll show you how to set it up and explore the
sensitive information – such as business plans – goodies contained therein.
1 GET IT INSTALLED
You can install ownCloud on wide range of distros, some extras for generating thumbnail images of files
and if you’re just playing around to learn the software, and speeding up PHP scripts. Once these packages
it doesn’t matter if you’re using a rapidly changing, are installed, Apache should be started automatically
cutting-edge distro – Arch Linux, for example. If you’re – you can check that Apache is running by accessing
planning to use ownCloud for real work, however, the IP address of the Apache server in your browser
we recommend using a highly stable and long-term (or going to http://127.0.0.1 if you’ve installed it on
supported distro such as Debian or CentOS – we’ll be your local machine).
using Debian 7.3 in this tutorial.
OwnCloud is written in PHP and can use a variety Tarball time
of web servers and databases. For simplicity’s sake, Next, grab the .tar.bz2 file of the latest ownCloud
we’ll be using the well-known Apache web server here, release from www.owncloud.org. At the time of
along with SQLite to store metadata for the files. This writing, this was owncloud-6.0.0a.tar.bz2, but by the
is perfectly fine for a typical setup; if you end up really time you read this a newer version may be available. If
hammering your ownCloud server, though, you may so, just replace the version number accordingly in the
want to switch to a more lightweight web server (such command below. Extract the archive into your web
as Nginx) and a full-on database such as MySQL for server’s document directory, eg:
extra performance. cd /var/www/
To get the dependencies on Debian 7.3, use the tar xfv /path/to/owncloud-6.0.0a.tar.bz2
following command: A bare installation takes up 155MB. We’re almost
apt-get install apache2 php5 libapache2-mod-php5 php5-sqlite ready to start using ownCloud now, but beforehand
php5-common php5-gd php-xml-parser php5-intl php5-mcrypt we have to make a few tweaks. First, we need
php5-curl ntp curl php5-imagick php-apc to create a “data” directory inside the ownCloud
Along with Apache, PHP and SQLite, this also adds installation, and make it (along with the “apps” and
84 www.linuxvoice.com
OWNCLOUD 6 TUTORIAL
“config” directories and the .htaccess file) writeable by
the web server, which uses the “www-data” account
in Debian:
mkdir owncloud/data
cd owncloud
chown -R www-data:www-data data apps config .htaccess
Note that some other distros use different user
accounts to “www-data” for Apache, such as “http” or
“apache”. To find this out, run ps aux and look for the
apache2/httpd processes, and then the username in
the first column from the output.
Now we need to add some extra options to the
Apache configuration file, which in Debian is
/etc/apache2/apache2.conf. If you’re using Apache
2.2 (the default in Debian 7.3) then add this to the
bottom of the file:
<Directory /var/www/owncloud>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
If all has gone smoothly
Order allow,deny a2enmod rewrite
with the Apache setup,
allow from all service apache2 restart you’ll see this screen
</Directory> (For distros using systemd, try systemctl restart when you first browse to
If you’ve installed ownCloud in a different directory, httpd.service to restart Apache.) the server. Now the fun
change the path in the first line. And for Apache 2.4 That’s it – all the command line preparation is begins…
systems, you’ll need to change the “allow from all” done now. Access the server in your web browser
line to read “Require all granted” instead. Once you’ve (eg http://127.0.0.1/owncloud/ if it’s installed on your
made the changes, enable URL rewriting and restart local machine) and you should see the ownCloud
Apache with the following commands: login screen, as per the screenshot above.
2 SET IT UP
The first thing you’ll need to do is create an admin A good way to understand the relationship between
username and password. ownCloud will do some the different features is to click on the “photos”
background work, setting up its database, and you’ll directory and then the up arrow, and upload a random
be dropped into the main screen. A pop-up will point image from your collection. If you now go click the
you to a selection of desktop and mobile apps you Pictures icon on the left, you’ll see your newly
can use to access your ownCloud installation. If you uploaded image, albeit presented in a much more
have a smartphone, it’s worth trying these out. attractive manner than in the normal file manager.
NAVIGATING OWNCLOUD 6
Create User menu
Click New to create a Click here to change
new folder or text file, settings or log out.
or the up arrow button
to upload a file from File options
your computer into the Hover the mouse over
current directory. a folder or file, and
you’ll be presented
with extra options
to rename, share or
Features download. Click the X
These icons switch button to delete.
between the different
features provided by Browse
ownCloud, such as the Click on folders to
document editor and open them, and on
contacts list. files to preview them.
www.linuxvoice.com 85
TUTORIAL OWNCLOUD 6
While you’re here, click on Activity on the left and you’ll
see a list of changes to your files. If you go back into What’s new in ownCloud 6?
the Files view and delete your image (via the X button),
you’ll see a “Deleted files” button appear in the If you’ve been running ownCloud for a while, and
top-right, from which you can restore files to their you’re still using version 5, it’s well worth upgrading
to the latest release. Major new features include:
original locations.
ownCloud Documents Edit rich text documents
Performance tuning with other users. It’s not as featureful as Google
Drive just yet, but it’s a major boost for ownCloud
Periodically, ownCloud needs to execute some
and takes it way beyond just storage and
background jobs to manage its database and keep
calendars. The back end uses ODF, the same file
things running smoothly. By default this background format used by Open/LibreOffice, so you can easily
job is run every time you load a page in ownCloud, but export your documents for local editing.
this impacts performance – it’s much better to do it
User avatars User accounts can now be
via a Cron job. In Debian, run crontab -u www-data -e accompanied by pictures. While this isn’t a
as root, and then add this line to the bottom of the file: massive productivity boost, seeing images and not
*/15 * * * * php -f /var/www/owncloud/cron.php just names makes the interface nicer to work with.
This runs ownCloud’s cron.php script every 15 Activities A new view shows you recent activity in
minutes. If your distro runs Apache under a different your account, such as changes to files.
username, change it in the crontab command, and
Better conflict handling Previous ownCloud
alter the path for owncloud/cron.php if you installed releases were a bit rubbish if you tried to upload a
it in a different directory. Back in the ownCloud web file that already existed, but you can now choose to
interface, click the admin username (top-right), Admin, replace or rename a file when you’re uploading.
and scroll down to the Cron section. Make sure the
Cron option is ticked (instead of AJAX or Webcron).
By default, ownCloud’s upload limit is set to 513MB /etc/php5/apache2/php.ini, changing these lines:
(and potentially made even smaller by PHP’s settings), upload_max_filesize
which isn’t very useful if you plan to use it for backups post_max_size
and video files. To fix this, go to the “File handling” sec- output_buffering
tion of the Admin page in ownCloud, and update the For the first two, set them to “8G”, and for the last
number to something more flexible (eg 8GB). You’ll one use “8192”. Restart Apache (as described earlier)
also need to change PHP’s settings as well – so edit and you’ll be able to upload much larger files.
3 AND EXPLORE IT!
It’s not a good idea to use the administrator account in the address area and enter:
for day-to-day work, so click on the Admin button in webdav://127.0.0.1/owncloud/remote.php/webdav
the top-right and then Users from the menu. Here After logging in with your ownCloud username
you can type in a login name and password, and click and password, you’ll be able to browse your files and
the Create button to add the user to the database. upload new ones by dropping them into the window.
If needed, you can also limit the amount of storage To share files with the outside world, hover over
space allocated to the account. a file and click the Share button. You can either
So, click Admin > Log Out, and then log in with share the item with another user on the ownCloud
your normal user account. You’re now ready to start installation, or generate a link (optionally password
exploring ownCloud’s features in depth. You already protected) to give to anyone on the internet.
have a bit of experience with the Files view: it acts as
a simple file manager, and is a good way to organise
your files so that you can access them from any
machine on your network via a web browser.
But wouldn’t it be better if you could access
ownCloud data in a proper desktop file manager?
Well, that’s possible thanks to ownCloud’s WebDAV
support. In Gnome 3’s Nautilus file manager, click
Files > Connect To Server and enter the following:
dav://127.0.0.1/owncloud/remote.php/webdav
Replace the IP address if necessary, and if you’ve
enabled SSL support (as per the boxout), change
“dav” to “davs” here. Xfce users can browse ownCloud We’re logged in as “admin”, and our changes are marked
shares in Thunar by clicking Go > Open Location and with light green. User “mike” is also logged in, and has
using the above address, while in KDE’s Dolphin, click selected some text marked with pink. Collaboration ahoy!
86 www.linuxvoice.com
OWNCLOUD 6 TUTORIAL
OwnCloud’s calendar is simple, but useful: you can
switch between day, week and month views, and click How to enable secure (SSL) connections
on an empty space to add an event. It’s possible to
set these events as all-dayers and make them repeat If you plan to access your ownCloud order allow,deny
across multiple days. Under the Advanced button installation from the outside world, Allow from all
you’ll want to enable SSL connections </Directory>
you’ll find options for adding extra information such
to encrypt your data as it travels across </VirtualHost>
as a location, category and description.
the internet. Here’s how. If you’re not testing ownCloud on
If one calendar doesn’t suffice for your work, click First, make sure that you have your local machine, replace 127.0.0.1
the cog (settings) icon in the top-right, just beneath OpenSSL installed (apt-get install in the first line with the IP address of
your username. Here you can add extra calendars and openssl) and enabled in Apache the ownCloud server (you can discover
also customise your time zone and time format. As (a2enmod ssl). Then create a self- this by running the ifconfig command
with the Files view, you can also access your calendar signed SSL certificate as follows: on the server). And, of course, change
from external apps: in the same settings panel, mkdir /etc/apache2/ssl the paths to the ownCloud installation
scroll down to the bottom where you’ll see a URLs openssl req -new -x509 -days 365 -nodes where necessary. Restart Apache
section. This provides you with CalDAV addresses -out /etc/apache2/ssl/owncloud.pem and access ownCloud via HTTPS, eg
that you can use with CalDAV-compatible apps such -keyout /etc/apache2/ssl/owncloud.key https://127.0.0.1/owncloud/.
as Kontact and Evolution. Many mobile apps also Now create /etc/apache2/conf.d/
support CalDAV, so you can keep your ownCloud owncloud.conf with the following
calendar up to date when you’re on the road. contents:
In the Contacts view you can add entries and group <VirtualHost 127.0.0.1:443>
them together. The cog button here also provides SSLEngine on
some useful features – for instance, a CardDAV URL SSLCertificateFile /etc/apache2/ssl/
that you can input into external contact management owncloud.pem
apps (click the globe icon). It’s also possible to export SSLCertificateKeyFile /etc/apache2/ssl/
your contacts list in .vcf format. owncloud.key
DocumentRoot /var/www
Documents <Directory owncloud> You can tell your browser to accept the
And here we come to the final big feature of AllowOverride All self-signed SSL certificate – it’s safe.
ownCloud: document collaboration. This was
introduced in version 6 (see the boxout, left), and while
it’s not especially useful for complicated documents created one user account). Then, in a different web
at the moment, it does a decent job for basic rich-text browser (so that you can have multiple sessions
editing jobs. When you click the Documents view, going), log into your ownCloud installation as that
you’ll see that a sample has already been provided for other user and go to the Documents view. You can
playing around with – example.odt. now edit the document in both browser windows,
Click on it and you’ll see a minimalist word seeing the changes that each user makes.
processor-esque interface, letting you add basic OwnCloud Documents is still in its infancy, but it
formatting to the text. But the most interesting part already provides a great escape from Google Drive for
of this is the collaboration: start editing the text, and many jobs, and it will just keep on getting better and
you’ll see a coloured bar appear on the left-hand side, better. If you love Google Drive’s convenience but hate
next to the paragraph that you modified. You’ll notice the thought of being spied on, why not give it a go?
that the colour of the bar matches the outline for your
user icon on the right.
Click on Share in the top-left, and enter the name Mike Saunders uses ROT13 encryption everywhere for
maximum security. Abg ernyyl – ebg26 vf zhpu fnsre!
of another user (or the administrator, if you’ve only
ownCloud on the Raspberry Pi?
Yes, it’s possible. And no, the power-efficient ownCloud server better to move this directory off the
performance isn’t great. If you’ve that you can plug into your network SD card and onto an external drive.
overclocked your Pi, you’re using somewhere and then forget about. You can do this in the initial part of
SQLite and you’ve set up the Cron Because current versions of ownCloud configuration: when you
job as described in the main text, Rasbian are based on Debian 7.x, access the web interface for the
your ownCloud installation will be you will be able to follow this tutorial first time to create an administrator
fine for light usage, but you’ll have without major alterations. One thing username and password, click
to accept some sluggishness here you may want to change, however, Advanced underneath and you’ll be
and there. Of course, there are is the location of the ownCloud able to assign the data directory to
advantages to installing on a Pi: you data directory. If you’ll be using a different location. Just make sure
end up with a silent, tiny and very ownCloud for storing large files, it’s that it’s writable by Apache.
www.linuxvoice.com 87
TUTORIAL ADA LOVELACE
ADA LOVELACE AND THE
TUTORIAL
ANALYTICAL ENGINE
Use the Linux Voice time machine to take a trip to Victorian
JULIET KEMP
England, and visit one of the pioneers of the computer age.
B
ack in the 19th century, if you wanted to do The Notes, importantly, contained the first
complicated mathematical calculations you computer algorithm — a series of steps of operations
had to do them by hand. To speed things up, to solve a particular (in this case mathematical)
you could buy printed tables of specific calculations problem. This is what any computer program does,
such as logarithms — but as these too were and is what makes Ada the first computer
calculated by hand, they were full of errors. programmer, even if she was never able to run her
Enter Charles Babbage, mathematician, program on a real machine.
philosopher, engineer and inventor, who in the early
1820s designed a Difference Engine to do these Installing the Analytical Engine
calculations automatically. The Difference Engine Although no physical Analytical Engine exists (the
could only add up, so it wasn’t a general-purpose Science Museum in London has a working replica of
‘computer’. It also never existed in Babbage’s time, the Difference engine), Fourmilab Switzerland have an
although part of a prototype was constructed. emulator available. It runs on Java, so all you need to
Babbage fell out with his engineer and ran out of run it is a JDK. Download the emulator object code
funding, so construction stalled around 1833 and was from www.fourmilab.ch/babbage/contents.html,
finally abandoned in 1842. unzip it, and type java aes card.ae from that directory
Meanwhile, in 1834 Babbage began to design a to run the card file card.ae.
more complex machine called the Analytical Engine. The emulator is the best guess, based on Babbage’s
This would be able to add, subtract, multiply, and drawings and papers over the years, of how the
divide, and it is the Analytical Engine that can be Engine would have worked. You can also use it as an
considered as the first general-purpose computer. Or applet, for which you’ll have to download and compile
could, if it had ever existed: Babbage built a few pieces the source code, but we couldn’t easily get this to
Ada Lovelace was of prototype, and carried on refining the design until compile. The applet gives a more visual interface.
the daughter of Lady his death in 1871, but never found funding for the full
Annabella Byron, who thing. But despite its lack of concrete existence, other Basic operations and a first program
was deeply interested in mathematicians were interested in it, including Louis The Analytical Engine consisted of the Mill (where
mathematics, and Lord
Menebrae, and Ada Lovelace, who was already processing was done) and the Store (where numbers
Byron. What would she
have thought of the person corresponding with Babbage. and intermediate results were held). The Store had
who’s produced Engine 1,000 registers (a far bigger memory than the first
code that draws a cat? Augusta Ada King, Countess of Lovelace ‘real’ computers had), and the Mill could take in two
Lovelace had had extensive mathematical training as numbers, conduct an operation on them, and output a
a child. She first met Babbage in 1833, aged 17, and single number. The Engine would also run a printing
corresponded with him on mathematics and logic. device for output, to avoid errors in transcription. It
Around 1841 Luigi Menabrae wrote a ‘Sketch’ of the would be operated by punch cards, as were used in
Analytical Engine, describing its operation and how Jacquard looms to weave complex patterns.
one might use it for a calculation. Lovelace was To use the emulator, then, we type in punch-card-
asked to translate it into English; not only did she type instructions to be run one at a time. For ease, you
do that, but at Babbage’s request she added her can put any number of cards into a single text file.
own extensive Notes, which went much further There are three types of punch cards:
than Menabrae had. Operation Cards Tell the Mill to add/subtract/
Lovelace probably saw more in the Analytical multiply/divide, and can also move the chain of cards
Engine than Babbage himself had. She forwards or backwards (like a jump or loop
suggests, for example that it might act upon instruction).
‘other things beside number’, and that it might be Number Cards Supply numbers to the Store as
possible to compose music by representing it in necessary.
terms of the Engine’s notation and operations. This Variable cards Transfer values between the Mill and
jump from a mathematical engine to one that could the Store.
act on symbols of any sort was visionary and well For engineering reasons Babbage intended these to
ahead of her time. have three separate hoppers, but in the emulator they
88 www.linuxvoice.com
TUTORIAL ADA LOVELACE
go in a single stream. (This is also how Menabrea and The Analytical Engine
Lovelace expressed their example programs.) The emulator running a test
emulator ‘cards’ also allow some flexibility in format. card (in the Vim window),
Numbers aren’t right-justified and there’s no need for which subtracts 38888
leading zeros, as there would be in a real punch card. from 0.
A number card looks like this:
N001 3
This sets column 1 in the Store (which has 0–999
columns) to the value 3.
The Mill has two Ingress Axes and an Egress Axis
(plus two auxiliary axes for division, which we’ll look at
shortly). Once an operation is selected, the Mill will
keep doing that until another is selected. The
Operations cards are +, -, x or *, and / or the divison
sign, which all do what you’d expect.
Finally, the Variable Cards transfer things in and out this zeros the Store column after transfer. This card
of the Mill: also includes a comment line. Comments begin with a
L Transfer from Store to Mill Ingress Axis, leaving space or a dot in column 1 of the card.
Store column intact. To do more operations, you need to replace both
Z Transfer from Store to Mill Ingress Axis, zeroing values on the Ingress Axes – they are discarded after
Store column. their use in a computation. Each time two arguments
S Transfer from Mill Egress Axis to Store column. go in, the current calcuation is applied.
The letter is followed by a number specifying the Store
column. Menabrae and simultaneous equations
A program on the Analytical Engine consists of a Menabrae in his Sketch described an algorithm to
chain of cards; each text line in an emulator file is a solve a pair of simultaneous equations. He divided the
single card. You submit a card chain to the Attendant, process of solving the equations into a series of
who will check it for errors and ‘requests for actions’ individual operations, and tabulated them as
(such as inserting manually generated loops and Analytical Engine operations. This is handily arranged
subroutines). The chain of cards is then mounted on so that all the multiplications happen, then the
the Engine and processed. subtractions, then the divisions, minimising the
Let’s give it a go! Since The Analytical Engine number of Operations cards.
doesn’t lend itself to Hello World, we’ll add 2 and 2. Let’s translate this into Analytical Engine code. See
Save this as card1.ae: the LV website for the whole thing; I’ll look at the
N000 2 structure and a couple of operations here. Here are
N001 2 our sample equations:
+ 2x + y = 7
L000 3x - y = 8
L001 First, we put all the numbers (2, 1, 7; 3, -1, 8) into the
S002 Store. Then, following Menabrae’s calculations, cards
P 1–6 do all the multiplying and store the results. Cards
This code puts 2 in column 0 of the Store, 2 in 7–9 are subtractions. Then cards 10 and 11 generate
column 1 of the Store, sets the operation to add, and print the results. (I’ve described each operation as
transfers column 1 and then column 2 to the Ingress a ‘card’, as Lovelace does, although in the terms of the
Axes (whereupon the operation will be applied), then emulator, each line is a card.)
the result back to the Store in column 2. P prints the Card 10 - gives x value
result of the last operation to standard output. Run it /
with java aes card1.ae to see what happens. L013
In fact, you could miss out the second line, and L012
transfer the value from Store column 0 twice, and it S015’
will automatically be transferred into both Ingress P
Axes. So this will work fine: Card 11 - gives y value
N000 2 L014
+ L012
. About to put values into Mill S016’
L000 P
L000 If you’re debugging, it’s useful to print at every step.
S001 Division is a little more complicated than other
P operations. The format is roughly the same, but
Replacing the first L000 with Z000 won’t work, as dividing uses the Primed Egress Output. Specifically,
www.linuxvoice.com 89
TUTORIAL ADA LOVELACE
Ada Lovelace’s equation However, Ada Lovelace refers to them as B1, B3, etc. I
for deriving the Bernoulli will refer to them here by the modern numbers (so
numbers. subtract one if you’re comparing with the Notes
directly). There are many ways to derive them, but the
equation that Lovelace uses is shown, left. Note that
the very last Bernoulli number has no accompanying
A-equation. What we’re trying to calculate.
The important point is that from A2 onwards, each
following A-value takes the preceding one and
multiplies by another two terms. This makes it
possible to construct an iterative process to calculate
each succeeding term.
Onwards then to the code! Following Lovelace’s
the remainder from the operation goes on the regular diagram, we will put in an already-calculated version
Egress Output, and the quotient (which is usually what of B2, B4, and B6, and will calculate B8, so n is 4. As
you want) goes on the Primed Egress Output. You get Lovelace was keen to point out, in a ‘real’ calcuation
at this by using an apostrophe. (Very large numbers the Engine itself would have already calculated these
can also use the Primed Ingress Axis.) Run this with values on a previous round of the program, so they’re
java aes simeqcard.ae and you should get two stored in a later register. The first section of the code,
numbers output: 3 (the x value) and 1 (the y value). then, sets up our numbers. Register 3 holds our n, and
The dividing shown works fine if you have integer registers 21–23 the first 3 Bernoulli numbers,
results or only need integer precision. But what if you multiplied by 10,000 (to allow for later dividing, as
want a greater precision? The Analytical Engine uses discussed above).
fixed point arithmetic: like a slide rule, it calculates only Cards 1-6 calculate -1/2 x (2n - 1)/(2n + 1). The last three are
in whole numbers, and it is the programmer’s the most interesting:
responsibility to keep track of decimal places. So there Card 4: (2n - 1) / (2n + 1)
is a “step up” and a “step down” operation, which shifts /
the decimal point either to the right (stepping up x L004
times, or multiplying by 10x) or to the left (stepping <5
down, or dividing by 10x). We just need to change the L005
last two cards: S011’
Card 10 - gives x value Card 5: 1/2 * (2n - 1) / (2n + 1) Y
/ L011
L013 L002
<5 S011’
L012 Card 6: -1/2 * (2n - 1) / (2n + 1) Y
S015’ -
P L013
Card 11 - gives y value L011
L014 S013
<5 In Card 4, we step the first value up 5 places before
L012 dividing, to avoid a rounding error. In Card 5, we take
S016’ the value stored in the previous step and overwrite it,
P since it won’t be needed again. In Card 6, we take
We must put the decimal point back in to the output advantage of the fact that any unused register reads
ourselves, by manually dividing by 100,000 (105). 0, to get a minus number by subtracting register 11
from zero. Effectively this switches the sign of the
Ada and the Bernoulli numbers value in step 5, but we store this result in register 13.
The most interesting part of Ada Lovelace’s notes on Card 7 subtracts one from n. This isn’t used in the
the Menabrae paper describes how to calculate the code as it stands, but it is a notional counter to keep
Bernoulli numbers (a set of numbers of deep interest track of whether we need to do another round of
to theoretical mathematicians) using the Engine. Her calcuation. If we were calculating B2 (so n = 1), then
diagram of the process is too complicated to card 7 would give the result 0, and we would be done.
reproduce here, but can be seen (with the rest of the Otherwise, it should add 1 to n and go round again.
Notes) at www.fourmilab.ch/babbage/sketch.html. It Lovelace presupposed that the Analytical Engine
can, however, be translated into code for the Analytical would have a way of detecting a specific result and
Engine emulator. Download the full code from the LV acting accordingly. (The emulator provides an
website; here we’ll look at the structure and ideas. alternation card to do exactly this.)
The non-zero Bernoulli numbers are usually referred Steps 8–10 produce (2n / 2) * B2 (the latter being
to by modern mathematicians as B2, B4, B6, etc. stored already). Card 11 adds the value from the first
90 www.linuxvoice.com
TUTORIAL ADA LOVELACE
stage (A0), and card 12 again checks whether we’re L001
finished yet. L007
The intriguing part is the next stage, cards 13–23. S007
This is the section that could be repeated almost Card 19: (2n - 2) / 4 Y
exactly for any stage of the process, however many /
numbers you wanted to calculate. What you need to L006
calculate each time is: <5
2n . (2n - 1) . (2n - 2) ... / 2 . 3 . 4 ... L007
This is equivalent to S009’
2n / 2 . (2n - 1)/3 . (2n - 2)/4 ... Card 20: (2n / 2) * (2n - 1)/3 * (2n - 2)/4 Y
The first time we go through the loop, when *
calculating A3, we can forget about 2n / 2 as we L009
already calculated that on card 9, and saved it in L011
location 011. So we work out 2n - 1 (card 13) and 2 + >5
1 (card 14), divide them and save the result (card 15; S011
note again that we step up 5 decimal places), and Card 21: B(4) * [Card 20]
then multiply it with A0 and save this new value in L022
location 11. We then repeat the exercise, with cards L011
17-20, with (2n - 2) / 4, multiply it with the previous >5
result, and overwrite location 011 again. So, once S012
again, our A-value is stored in location 11. Card 22: A0 + B2A2 + B4A4 Y
In card 21, we multiply with our pre-saved value for +
B4, then add the whole sequence up and save it in L012
location 13. Card 23 once again checks for 0. L013
At this point, all we need to do is to run cards 13–23 S013
all over again. Because we saved 2n - 2 as our ‘new’ There’s only one new thing to notice, which is that in
2n, in location 6, applying cards 13–16 produces the cards 20 and 21 we have to step our result from the
result (2n - 4)/ 5, just as we want. And the same again multiplication back down by five decimal places, as
for cards 17-20, with (2n - 5) / 6 multiplied in this time. we’re multiplying two stepped-up values together.
The only change is that in card 21, we have to grab B6 The final step is 24, in which we add our saved
from its location rather than B4. Then we add it all value from step 23 to a zero register, to give our
together again. In the code, these second-time-around calculated Bernoulli number. In actual fact, we should
cards are labelled 13B-23B. be subtracting this from zero to get the sign of the
Card 13: 2n - 1 Y number correct, but Lovelace explicitly chose to ignore
L006 this. Once the result is output, remember that you’ll
L001 also need to manually put in the decimal point, five
S006 places to the left. So our result is -0.03341.
Card 14: 2 + 1 Y This is not far off the ‘official’ -0.033333333. Try
+ altering the accuracy of our calculations (remember
L002 also to alter the accuracy of the stored Bernoulli
L001 numbers) to improve the accuracy of the result.
S007 The Analytical Engine emulator also supports
Card 15: (2n - 1) / (2 + 1) looping code, using conditional and unconditional
/ cycle (backing) cards, and straightforward backing/
L006 advancing cards; and an if/then clause with the
<5 alternation card. See the website for more details, and
L007 have a go at rewriting the provided code to loop over
S008’ one Bernoulli number at a time, up to a given n,
Card 16: (2n / 2) * ((2n - 1) / 3) Y generating the result and storing it for the next loop
* around. Remember that you’ll need to calculate A0,
L011 A2, and B2 separately, as here (cards 1–12), before
L008 you can get into the real ‘loop’ part. As the emulator is
S011 Turing-complete you can also, as Lovelace suggested,
Card 17: 2n - 2 Y produce anything you can translate into Engine-
- operations; or, as we now think of it, assembly
L006 language. In theory you could even write a compiler in
L001 Engine code…
S006
Juliet Kemp is a scary polymath, and is the author of
Card 18: 3 + 1 Y
O’Reilly’s Linux System Administration Recipes.
+
www.linuxvoice.com 91
TUTORIAL ARCH
ARCH LINUX: BUILD A
TUTORIAL
POWERFUL, FLEXIBLE SYSTEM
Install the rolling release distro of the moment and you’ll never
GRAHAM MORRISON
have to wait for a package upgrade again.
I
nstalling Arch is the Linux equivalent of base getting your hands dirty with an operating system can
jumping. You organise yourself. Surround yourself be a revelation. Not only will you learn a great deal
with everything you need, stick the installation about how Linux works and what holds the whole
media on to a USB stick and jump. You never know thing together, you’ll get a system you understand
how an installation is going to go until you try it, and it from the inside-out, and one that can be instantly
will always involve a bit of ad-hoc hacking, Googling upgraded to all the latest packages. You may also
and troubleshooting. But that’s the fun of it, and that’s learn something about yourself in the process. And
what makes Arch different. despite its reputation, it’s not that difficult.
With Arch, you’re on your own. In a world where If you’re a complete beginner, you may need to hold
where technology is taking your personal on to your hat, because installing Arch is an
responsibility and giving it to the cloud, or to an uncompromising adventure in core tools and
internet search filter or the device manufacturers, functions. It’s a jump into the unknown.
DIFFICULTY
1 CREATE THE INSTALL MEDIA
We’ll start with the ISO, which you can either find on
our cover DVD or download from your local Arch
mirror (see https://www.archlinux.org/download). If
you’re going to install Arch onto a machine with a
DVD/CD drive, you could simply burn the ISO to a
blank CD, but we’re going to write the ISO file to a USB
thumb drive as this saves wasting a disc. You’ll only
need a 1GB thumb drive but this process will remove
all data from the device, so make sure there’s nothing
on there you want to keep first.
There are many ways of transferring an ISO image Whenever a new USB device is connected, your system
to a USB drive, although copying the ISO onto the logs become a hive of activity
filesystem isn’t one of them. Normally, our preferred
method is to use the graphical tool UnetBootin, which include the characters ’sd’. What you need to look for
is available for nearly all distributions, including those is the letter that comes after ‘sd’, as this is the device
two alien environments, OS X and Windows. Sadly, node of the USB stick after it’s connected to your
Unetbootin won’t work with Arch unless you manually system, and we need this device name for the next
edit the syslinux.cfg file afterwards, as this is command, which is going to write the Arch ISO image
overwritten in the transfer process. This leaves you to to the USB stick. Also be aware that this device node
the mercy of dd, a crude command that copies the can change, if you come back to this process after
raw data from one device to another. It works, but adding or removing another USB device. Here’s the dd
there’s no sanity checking of the output device you command for writing the ISO:
choose, so you have to make sure you’re writing to sudo dd bs=4M if=/path/to/arch.iso of=/dev/sdx
your USB stick. If you get this wrong, you’ll copy the Replace the x in sdx with the letter for your device
raw bits and bytes of the Arch ISO to another storage and press return. You should see the activity LED on
device on your system, overwriting any data that your USB stick start to flicker as data is written. If not,
might have been there before. press Ctrl+C immediately to stop the process and
Here’s our system for getting the correct device: double-check everything (such as whether your USB
sudo tail -f /var/log/syslog | grep sad stick has an activity LED). After the process has
Clear your terminal window buffer completed, which should only take a few moments on
Plug in your USB drive and watch the output a modern machine, type sync to make sure the write
You’ll see several lines appear as your system buffers are flushed, and remove the stick. It’s now
negotiates with the new USB device and, all output will ready to be used to install Arch.
92 www.linuxvoice.com
ARCH TUTORIAL
2 FIRST BOOT
Before you plug the USB stick into the machine on We used GParted to create
which you’re going to install Arch, make sure you a GPT partition scheme
know which hard drive you’re going to use. If your and a 200MB EFI partition
machine has several drives, make a note of the (type ef00, labelled ‘EFI”).
But it might be easier to
capacity and model of the drive you want to use, and
stick with old-school MBR
make sure you don’t have an identical drive. If you’re
and Grub.
going to use a partition on a drive, or use up free
space, we’d recommend using GParted from a live CD
to set up your partitions first, or at least resize other
partitions to leave enough space.
Along with a 200MB EFI partition for GUID, you’ll
need at least a root partition and a small swap
partition. It may also help to have a separate home
partition, as this makes upgrades to the root
filesystem easier to handle. Most machines will boot interface by typing ip link. It’s usually the second
off the USB drive by selecting the custom boot menu device listed, because you should ignore the first one
from your machine’s boot flash screen. It’s usually called lo (this is a system loopback device). Our PC’s
done by pressing the F12 key. This will present you network device is called enp7s0, which you’ll need to
with a list of connected drives, and you should be able replace in the commands below. To get it working, we PRO TIP
to select the USB device from there. If all goes well, a stop the non-functioning DHCP service, bring up the In this tutorial we’ve
moment later you’ll see the Arch boot menu and you Ethernet interface, manually assign this to a valid IP chosen EFI booting and
need to select the first option, ‘Arch Linux archiso’. address on our network and add the router as a the GUID partitioning
scheme, as this is likely to
default gateway. If you know your router’s IP address, be compatible with most
Networking you can normally connect to its web interface to hardware available now,
Your first mission is to get to the internet. We’d check which IP ranges are suitable for your machine, and more future proof
than MBR partitioning.
recommend installing the system using a wired and use its IP address as the router IP address. Here
connection if at all possible. With the system up and are the three commands to do what we just explained
running, it’s then much easier to configure your – replace IP addresses to suit your own network.
wireless device, but if you need to configure wireless ip link set enp7s0 up
now, check out the excellent Arch Beginners’ Guide. ip addr add 192.168.1.2/24 dev enp7s0
With a bit of luck wired internet should be working ip route add default via 192.168.1.1
already, because Arch runs the dhcpd daemon at The final step is to type nano /etc/resolv.conf and
startup, which in turn attempts to get an IP address add the line nameserver 8.8.8.8 to add one of
from whatever router your kernel-configured network Google’s nameservers to the mix. This will convert the
interface can find. Try typing ping linuxvoice.com to alphanumeric URLs we normally use to the IP
see if any packets are returned. If this doesn’t work addressees used by the network, and you should now
– and it didn’t for us – first get the name of your find that pinging a domain name works.
3 FORMATTING
You should now have a fair idea at how Arch does that they can be absolutely sure they won’t get the
things. It basically leaves you to do your own research wrong drive and overwrite their 500-hour Skyrim save
and make your own decisions while creating the most position on Windows 7.
common-sense environment it can. We’re going to
assume you’ve already partitioned the drive, so the Choose your filesystem
first step is to make sure you know which drive to You should now format the partition. The safest and PRO TIP
target. The best command to achieve this is fdisk -l. most sensible filesystem to use is ext4, and you can Arch’s own docs are
absolutely excellent.
This lists all your drives, their partitions and the format your chosen partition by typing mkfs.ext4 / They’re also very
filesystems they’re using, alongside their device dev/sdx2 – again, replace x2 with your own partition. comprehensive, so don’t
nodes. Unless you’ve got two identical drives, you You should do this for your home partition too, and allow them to put you off.
should be able to work out which one to use without you will also want to format and define your swap
too much difficulty. And if you haven’t formatted your partition. The command to do this is mkswap /dev/
new partitions yet, they should stick out like a sore sdx3. You can turn this on with swapon followed by
thumb. If you’re only using a single drive, you’ll have the device node. If you created an EFI partition
even fewer problems. We do know people who yourself, rather than another OS doing this, you can
disconnect all other drives whilst installing Linux so format it with the command mkfs.fat -F32 /dev/sdx.
www.linuxvoice.com 93
TUTORIAL ARCH
Our automatically be left with all the packages you need. However, unlike
generated fstab file didn’t with other distributions, that doesn’t mean it’s actually
need any further edits usable for anything yet. Following the Arch Beginners’
Guide, we’ll next create the fstab file, as this tells the
distribution where to find its dependent filesystems. In
the old days, we’d use labels to represent partitions,
but labels can be changed or duplicated and break an
fstab file, so we now use UUIDs. These are basically
hashes derived from partition data, so Arch should
never get confused unless something changes with
Now mount the partitions by typing: the partition scheme. The correct file with the correct
mount /dev/sdx2/ /mnt mount points and UUIDs can be generated
mount /dev/sdx3 /mnt/home automatically by typing:
With GUID and an EFI system (rather than using the genfstab -U -p /mnt >> /mnt/etc/fstab
old BIOS), you’ll also need to mount the EFI partition: You can see that this file is created in your new root
mount /dev/sdx1 /mnt/boot filesystem, and as the file was generated
If you’re not using a separate home partition, type automatically, you should check it’s not complete
mkdir /mnt/home to create a home folder in the root insanity (try cat /mnt/etc/fstab). It will show your
partition. These are the fragile beginnings of your Arch mounted filesystem along with the EFI partition we
installation. We’re going to make more of an impact mounted on /boot – this should be formatted and
with the next command: listed as vfat, as per our formatting command earlier.
pacstrap -i /mnt base With all that set up, we’re now going to teleport
This command installs a basic Arch system to your ourselves into the new Arch system using ‘chroot’ with
drive. We leave the installer at its default settings so it the following command:
can grab and install all the default packages, and you’ll arch-chroot /mnt /usr/bin/bash
4 POST-CONFIG
How does it look inside your new Arch installation?
Not that different than from the USB stick, except for
now you’re executing code from your hard drive.
There’s obviously lots we can do here, but we’re
mostly interested in getting the system up and
running as quickly as possible. It’s worth giving your
machine a hostname, which can be done with a
command like echo linuxvoice > /etc/hostname.
PRO TIP Networking too should be solved in exactly the same
Despite updates being way we got networking working earlier. If DHCP
easy to apply on the worked, just type systemctl enable dhcpcd.service to
command line, it’s always make the required link to get it running at boot.
worth checking that
nothing requires your
intervention before you Enable network profiles We had to create a static networking configuration file
do the upgrade. The best An alternative to this generic solution, which didn’t and remove the DHCP service to get networking working.
way we’ve found to stay
in touch is to peruse work for us, is to enable network profiles, such as the
Arch’s Twitter account: ones mainstream distributions use to quickly switch systemct | grep dhcp when you next boot. If you want
@archlinux. between network settings. First copy the /etc/netctl/ netctl to automatically bring up a connection for your
examples/ethernet-dhcp file to /etc/netctl/ directory, interface, whether you’ve configured it for a static or
open your new file with Nano and change the device dynamic connection, type the following, but replace
from eth0 to whatever your machine uses (take a look enp7s0 with the name of your device:
at the output from ip link), then enable the connection systemctl enable netctl-auto@enp7s0.service
for your next boot with netctl enable ethernet-dhcp. If Before leaving the chroot environment, set a
you want to do the same with a static IP address, use password by typing passwd, then exit and reboot.
the static Ethernet example configuration. But for this, We’ve now got to the state where we’ve got enough
you have to make sure DHCP isn’t running when the installed and configured that we can finally breathe
system starts. To remove it, and any other service you some native life into our distribution. But before we
no longer require, the command is systemctl disable can reboot, we need to install a bootloader. If you’ve
dhcpcd.service. Arch now uses systemd, which is already got Linux installed, or you’re sharing an
why this syntax may look unfamiliar. You can check installation with Windows, you’ll need to be careful.
the service isn’t started automatically by typing Installing a bootloader over a part of the disk used by
94 www.linuxvoice.com
ARCH TUTORIAL
another operating system will stop that other install to run the simple setup procedure. It will fail if
operating system from booting. If you’ve dedicated a an EFI-compatible partition can’t be found, or isn’t
new single drive to Arch, which is what we’d mounted. If that happens, you should install Grub.
recommend, you can install the bootloader onto this The only other step to getting gummiboot to work
drive only – whether that’s old-school MBR or newer is to create a simple configuration file called /boot/
GUID. This way, you won’t break anything; your drive loader/entries/arch.conf. It should contain the
will boot if it’s the first boot device, and it will boot if following information:
you use your system’s BIOS boot menu and select an title Arch Linux
alternative drive. If you want to add your Arch linux /vmlinuz-linux
installation to another Grub installation, you’ll need to initrd /initramfs-linux.img
boot into that system and re-generate the options root=/dev/sda2 rw
configuration – many distributions, such as Ubuntu, Replace the sda2 part with the device node for your
can do this with a minimal of effort. root partition and your new system should work. If it
doesn’t (and we don’t want to be negative, but this is
Install a bootloader Arch we’re talking about), the great thing about the
As we’re using a modern system with EFI and GUID Arch USB installer is that you can easily use it to
partitioning, we’re going to install a simple EFI troubleshoot your installation using the skills you’ve
bootloader rather than the more commonly used already learnt. Just reboot from the USB stick, mount
Grub. If you are using older partition, however, Grub the drive and chroot into your new Arch installation.
can be installed with the following two command Many serious problems can be solved this way, and
after changing sdx to your device: it’s much quicker than using a live CD. Remember this
PRO TIP
pacman -S grub as you type exit to quit the chroot environment and
Pacman is Arch’s package
grub-install --target=i386-pc --recheck /dev/sdx reboot to restart your machine, because if your new manager, and is relatively
For EFI systems, type pacman -S gummiboot to Arch installation doesn’t appear, you’ll need to boot straightforward to use. -S
install the EFI bootloader package, and gummiboot again from the USB stick and check the configuration, will search for and install
packages; -Ss will search
for package names and
5 BUILD YOUR OWN HOME their descriptions; -R will
remove them and -Syu
will perform a system
upgrade.
You now need to log in as root, and you should check With X running, it’s now time to install a graphical
that networking is working. If not, you need to go environment. Obviously this is a contentious issue, but
through the same steps we went through with the here’s the basic procedure. KDE, for example, can be
USB installer. installed by typing:
At its most basic level, Arch is now installed and pacman -S kde-meta
ready for you to sculpt into your perfect distribution. Meta packages encapsulate other package
There are many ways to do this – you may even want collections, so you can fine-tune your installation. A
to remain on the command line, but we’re going to basic KDE installation can be accomplished by
assume you’ll want a graphical environment and your grabbing the kde-base package, for example.
hardware working. Xorg, the graphical display server, kde-meta on the other hand downloads over 700MB
can be installed with the following command: of data and installs over 2GB from 558 packages. It
pacman -S xorg-server xorg-server-utils xorg-xinit xterm mesa takes a while. For Gnome, gnome-shell contains the
As long as you’re happy using open source drivers basics, gnome has the desktop environment and the
for your graphics hardware, this is all you need for a applications, while gnome-extra contains all the tools.
working X session. Many of the open source drivers The final steps to Arch nirvana are to create a new
are good enough for desktop work, and only lack 3D user with useradd -m graham, give them a password
performance. A simple test to make sure all this auto with passwd graham and then to launch the KDE/
configuration is going to work is to type startx to bring Gnome login manager by typing kdm or gdm. You’ll
up the most basic of X sessions. Unfortunately for us, get a fully functional login and desktop. But as you’ll
it didn’t work and we got a ‘no screens found’ error. soon discover, this is only the end of the very
This is probably because our screen is rubbish and beginning. With Arch, you’ve only just got started.
isn’t communicating its capabilities back to the
graphics hardware. The solution is to create your own
X.org config file. We’re using Nvidia hardware and are
happy to use Nvidia’s proprietary drivers. The drivers
for any modern Nvidia GPU can be installed by simply
This being Arch, you don’t
typing pacman -S nvidia, and rebooting your system.
have to install KDE. But
Nvidia’s drivers are also better at detecting displays, when was the last time
so it might be worth trying startx again to see if you saw a gratuitous
anything has changed. You can quit the X screenshot of the desktop
environment by exiting all of the terminal sessions. cube looking so good?
www.linuxvoice.com 95
CODING PYTHON
PYTHON: BUILD
TUTORIAL
DYNAMIC WEB PAGES
Keep your websites up to date by harnessing
BEN EVERARD
live data piped from Python’s web services.
H
TML is one of the greatest developments in
WHY DO THIS? computing. It’s so simple, anyone with a text
• Keep your websites up editor can knock up a simple web page with
to date with the latest
information text, pictures, and links to other sites. This simplicity
• Pull data from across gives the web the potential to grow to encompass
the web and feed it into almost the whole of humanity. However, its original
your programs developers intended it for content that doesn’t change
• Discover the powerful very often. Every change to a page of HTML needs the
combination of Python
and Tornado file to be modified and resaved, which is fine for some
purposes; but sometimes you need something a little
more dynamic. In this tutorial we’re going to look at
four different methods for including constantly A good text editor will highlight different parts of the
changing content in your website. code, so you can see what part does what.
Since we’ve got a lovely new magazine, we’re going
to create a lovely new website to help us keep track of <tr>
everything that’s going on. The skeleton code for this <td>Data1</td>
website is: <td>Data2</td>
<html> </tr>
<head> <tr>
<title>All About Linux Voice</title> <td>Data3</td>
</head> <td>Data4</td>
<body> </tr>
<h1>All About Linux Voice</h1> </table>
<table> If you haven’t come across HTML before, everything
is kept between pairs of angular bracketed tags that
describe what the content is. For example, <h1>
Useful Tornado template marks the start of heading 1 (the biggest heading),
and </h1> tells the browser that we’ve finished the
Tornado templates are based on Python, but they
have their own simple language. Here are a few of heading. The <table></table> tags describe a table,
the most useful commands: <tr></tr> describe a table row, and <td></td> describe
a table cell. The skeleton code can be found on the
{% set var_x = a_value %} Sets local variable var_x
to the value a_value. coverdisc or at linuxvoice.com as lv-skeleton.html.
In this skeleton, Data1 to 4 are the places we’ll put
{% if condition_1 %} … {% elif condition_2 %} … {%
four different pieces of dynamic content.
else %} … {% end %} An if statement. elif and else
are optional. As a British magazine, the most important thing to
us is obviously the weather, and this changes a lot. If
{% while condition_1 %} … {% end %} A normal
we kept looking out of the window, and updating our
while loop.
website every time the weather changed, we’d have
{% import a_module %} Import the Python module
no time to make tea, let alone a magazine. Fortunately,
a_module.
though, we don’t have to. The first, and easiest,
{% include a_template %} Copy the contents of
method of including dynamic content we’ll look at is
a_template to this point in the file.
an iframe. These enable you to embed other websites
There are full details of the template syntax at inside yours. In this case, we’ll embed a weather
www.tornadoweb.org/en/stable/template.html.
forecast. You can put in any website, though it’s best
In general, it’s best to do as much of the processing
to do it with one designed for the purpose, otherwise
as possible in the web server, and use the template
just to display the data. You can use the included it’s unlikely to look good. For our purposes,
commands to create various components that you openweathermap.com provides exactly what we
can combine in different ways on different pages. need. The website http://api.openweathermap.org/
data/2.5/weather?q=Bath,uk&mode=html is a
96 www.linuxvoice.com
PYTHON CODING
compact forecast for the beautiful city of Bath,
designed for embedding.
In the skeleton, you can change Data1 to the
following:
<h2>The Weather In Bath</h2>
<iframe src=”http://api.openweathermap.org/data/2.5/
weather?q=Bath,uk&mode=html” scrolling=”no”
seamless=”seamless”></iframe>
This will embed the weather forecast in our website.
The scrolling value tells the browser that we don’t
want a scroll bar on the iframe, and seamless tells it
that it should be integrated into our page seamlessly.
Not all browsers recognise these, so it will appear
slightly different on different platforms.
Keepin’ Tweetin’
Iframes are the most basic way to grab data and
You can create Twitter
serve it in a web page. For simple things like weather we used was:
widgets to show anyone’s
forecasts they work great, but sometimes they’re a bit <a class=”twitter-timeline” href=”https://twitter.com/ tweets, but if they post
lacking. Some data providers provide ‘widgets’ that LinuxVoice” data-widget-id=”419158898222698496”>Tweets something inappropriate,
you can put in your page. These are generally small by @LinuxVoice</a><script>!function(d,s,id){var js,fjs=d. it will be displayed on your
chunks of HTML, usually with some JavaScript to getElementsByTagName(s)[0],p=/^http:/.test(d. site as well.
grab data and display it in a useful way. For our Linux location)?’http’:’https’;if(!d.getElementById(id)){js=d.
Voice website, we’ll add a widget that grabs the Linux createElement(s);js.id=id;js.src=p+”://platform.twitter.com/
Voice Twitter feed. widgets.js”;fjs.parentNode.insertBefore(js,fjs);}}
You can create Twitter widgets for any Twitter (document,”script”,”twitter-wjs”);</script>
account. On the Twitter web page, just go to the cog Of course, you can create your own.
menu icon, then Settings > Widgets > Create New. By Don’t worry about trying to understand this script
default it’ll set it to the currently logged-in account, but (unless you’re a JavaScript masochist) as it’s
you can change this to whatever you like. We also computer generated and not meant to be human
changed ours to have a height of 300. Once you’ve readable. Save the file and refresh your web browser
entered the details and hit Create, the appropriate and you should now have the weather and the latest
code will be displayed below the preview. You just news from Twitter all without having to handle any of
need to copy and paste it in place of Data2. The code it yourself. There are a few options on the Create
Widget Twitter page to help you control the look and
feel of this datastream, so see which settings work
Make it more dynamic best with your page.
Server-side processing is great for keeping a site Get more control
updated, but it has one fatal flaw: it only updates The problem with the two previous methods is that
the information every time the website is loaded. they pull everything from the other website, so as well
Sometimes you need to keep a page’s information as the data you get the
fresh even if the user leaves it loaded.
The simplest solution is simply to tell the browser
other site’s formatting too.
Sometimes this isn’t a
“You may find that you want
to keep refreshing the page. This is incredibly simple
– just add the following tag inside the <head>
problem and the simplicity more control over how the
</head> tags of the template:
is worth it. Other times you
may find that you want
content is displayed”
<meta http-equiv=”refresh” content=”60” >
The content value is the number of seconds after more control over how the
loading you want it to refresh. content is displayed, or even the ability to process it
This method is a little crude, but it will work. A before putting it on the screen. Another risk in putting
more advanced technique is to keep a connection content from other places on your website is that they
open between the browser and the server and could maliciously alter your page using JavaScript. It’s
continue to send data between them. There are ways unlikely that either Twitter or OpenWeatherMap would
of doing this using HTTP, but a better solution is to do this deliberately, but if hackers managed to break
use websockets. These require both code on the into the main system, they could use this to attack all
server and JavaScript running in the browser in order
the web pages that pull data from there.
to work properly, and they’re a bit beyond the scope
Therefore, it’s better if you don’t just put other
of this tutorial, but you can find out how to use them
on the Tornado website at www.tornadoweb.org/en/ people’s content directly into your site, but process the
stable/websocket.html. data and produce HTML that uses the raw data. For
this we’re going to use Python.
www.linuxvoice.com 97
CODING PYTHON
application.listen(8888)
tornado.ioloop.IOLoop.instance().start()
We won’t go into everything that’s going on here
(you can learn more about Tornado from the excellent
documentation at www.tornadoweb.org/en/stable),
but simply put, this starts a web server on port 8888 of
localhost. It has a class called MainHandler, which is
used every time someone visits the root of this web
server (ie r”/” in the above code). The method get of
this class is called every time someone sends a GET
HTTP request to this address, and it renders the
template lv.html. (Make sure the HTML file you created
before is called lv.html). As long as you save this in the
same directory as lv.html, you can run it from a
terminal in the same directory with:
python webserver-start.py
If there’s a problem with
The Tornado module contains a web browser that Once that’s running, you can point a web browser to
the template, the site
won’t load. You’ll get lets you modify templates by passing more http://localhost:8888 and it’ll display the same page
Python errors, but they information to them. To start with, you’ll need to make as before. The difference is that it’s now a Tornado
aren’t usually very helpful. sure you have the appropriate Python modules template, which has more power than regular HTML,
installed. We’ll be using Tornado and Feedparser (as and you can pass it data from the Tornado server.
well as some modules from the Python standard
library). These are available through the PIP (Python A Yen a Mark a Buck or a Pound
Install Python) package manager for Python, but it’ll As Linux Voice does a lot of business in the USA,
be easier to keep them up to date if you install them changes in the exchange rate between the Dollar and
through your distro’s package manager. On Debian- the Pound make a difference to our income. Keeping
based systems you can do this with: tabs on this is important, so the next bit of data we
sudo apt-get install python-tornado python-feedparser pull in will be the latest exchange rate.
Once this is done, you just need a simple Python www.openexchangerates.org operates a service
program to serve the website. We’ve called this code that enables you to grab the latest exchange rate data
webserver-start.py and it’s on the DVD and website. (you’ll need to register for an API key before you can
import tornado.ioloop use it though). There are various levels, but the free
import tornado.web one is suitable for our needs, and you can sign up for
class MainHandler(tornado.web.RequestHandler): it here: https://openexchangerates.org/signup/free.
def get(self): The data comes in JSON (JavaScript Object
self.render(“lv.html”) Notation) format. While this was designed for
application = tornado.web.Application([ JavaScript, it also works really well with Python.
(r”/”, MainHandler),]) There are a couple of Python modules that help us
if __name__ == “__main__”: get and access the data: urllib2 and json. The code to
grab and access the data is:
import urllib2
Data sources import json
def getRate() :
There are loads of places you can get The BBC (among others) publishes an url = “https://openexchangerates.org/api/latest.
information for dynamic websites. RSS feed of the latest news. It also
json?app_id=YOUR_API_KEY”
OpenWeatherMaps provide JSON- has a few APIs to help you access
req = urllib2.Request(url)
encoded weather data for forecasts as information about what’s happening.
well as current weather. Twitter also Reddit can be browsed through JSON. response=urllib2.urlopen(req)
has an API that’s easy to use through a For an example, take a look at return json.loads(response.read().decode(“UTF-8”))
module such as python-twitter www.reddit.com/r/linux/hot.json. [‘rates’][‘GBP’]
(http://code.google.com/p/python- For more information see This piece of code needs to go into the webserver-
twitter). www.reddit.com/dev/api. start.py file between import tornado.web and class
In addition to the ones we’ve looked StopForumSpam hosts a database of MainHandler. Change YOUR_API_KEY to the one you
at here, these are some more that you known spammer IPs that you can use got when you signed up for the service.
may find useful: to vet visitors, though there are some urllib grabs and opens the resource, then the json
Facebook Graphs API restrictions on use. Take a look at module converts it into a Python dictionary. This has
(https://developers.facebook.com/ www.stopforumspam.com/usage
the key rates, which is another dictionary, and the key
docs/graph-api) These are just a few examples;
GBP returns the Dollars–Pounds exchange rate. You
IPInfoDB (http://ipinfodb.com/ip_ there is a huge range of data sources
location_api_json.php) enables you to available. Many offer free access, but then need to pass the latest data across to the
check the location of an IP address. some are only for paying customers. template by changing the line self.render(“lv.html”) to:
self.render(“lv.html”, rate = getRate())
98 www.linuxvoice.com
PYTHON CODING
You’ll find a comprehensive list of useful data sources at
www.programmableweb.com.
We focused on simplicity
This created the global variable rate that you can lv_feed = feedparser.parse(‘http://www.linuxvoice.com/feed/’) so it’s not pretty to look at,
access in the HTML template with {{ rate }}. Change self.render(“lv.html”, feed = lv_feed, rate = getRate()) but there are plenty of CSS
Data3 to: You don’t need to use urllib2 to get the document with and HTML tricks to sort
that out.
<h2>The Exchange Rate</h2> RSS, as the feedparser module handles everything.
One dollar is {{rate}} pounds On our page, we want to loop through every entry in
After you make any changes to either the webserver the RSS file and display the post title as a link to the
code or the template, they won’t take effect until you post on linuxvoice.com. In the template, you can
restart the web server (a simple Ctrl+C to stop it, then include Python code inside {% %} brackets.
re-running python websever.py does this). You can Indentation doesn’t work; instead, blocks of code are
then refresh the website in the browser. If everything’s ended using {% end %}. This is done with the following
worked correctly, you should see the exchange rate code (in place of Data4):
displayed. You can use this method to put whatever <h2> The latest news from RSS:</h2>
you want into the web page. This could be things <ul>
you’ve just pulled from a database, or information {% for entry in feed.entries %}
about the computer that you’re running on as well as <li>
data grabbed from other sources. <a href=”{{entry.link}}”>{{ escape(entry.title) }} </a>
</li>
Going Loopy {% end %}
Tornado templates can do far more than just display </ul>
the values that are passed to them. They can also The final version of webserver.py is on the website
include bits of Python code that can manipulate the and DVD as webserver-final.py.
data. The final piece of our datastream will <ul></ul> creates an unordered (ie bullet pointed)
demonstrate this. We’ll pull in the latest posts from list, and <li></li> tag items in the list.
the Linux Voice website using RSS and the feedparser This for loop repeats every line between it and the
module. This works a bit like the json module in that it end, including the HTML lines. This will then create a
pulls in data and converts it into a Python dictionary. new list item for every item in feed.entries. The
However, unlike in the previous example, this time we’ll escape() function just adds escape characters to the
pass the entire dictionary to the template and process text before passing them across so they display
it there. You’ll need to add the line correctly in the browser.
import feedparser As you can see, any data that you can access with
To the start of webserver.py, then change the get Python, you can display on a website. Tornado
method of MainHandler to: templates give you complete control over how these
are displayed. If you’re already running a website with
Apache, it isn’t easy to incorporate this last technique
XML into it, though you could do something similar with
PHP or even JavaScript. If you’re using Nginx as a
We’ve looked at JSON, HTML and RSS for data
sources, but they’re not the only options. XML is also web server, you could set it up to reverse-proxy a
a common format for data on the web, though it can Tornado server for some pages while retaining the
be a little more complex than the others. It’s often speed of Nginx for simpler pages.
done using ElementTree. As the name suggests, this
converts the XML into a tree from which you can
then extract the information you need. Ben Everard is the co-author of Learning Python With
Raspberry Pi – coming soon to an Amazon near you.
www.linuxvoice.com 99
CODING EUCLID
EUCLID’S ALGORITHM:
TUTORIAL
RECURSION AND PYTHON
Learn a wonderfully simple algorithm that teaches as
GRAHAM MORRISON
much about Python as it does about mathematics.
W
e’re about to go back to the year 300 BC. A longwinded – you could easily see that the solution
WHY DO THIS? time when much of the world looked like was going to be 10 in the previous example, for
• You’ll learn ancient the cover of the Led Zepplin album Houses instance, but it always works regardless of how big
wisdom about numbers
and their factors. of the Holy. This is the time of Euclid; mathematician, the numbers are you choose. The next question we
• This is a great way Greek geek and founder of all things geometrical. should be asking is, why? The solution is to do with
to see how Python The problem that Euclid’s algorithm solves is easy common divisors, the group of numbers that can be
deals with Boolean enough to understand: what is the largest common equally divided into both of our values. The common
operations.
divisor of two integers? Take the numbers 100 and 80, divisor of a (assuming a is largest number in the pair),
• While at the same
time, see the danger of for example: what’s the largest number that divides is also a common divisor of a - b (assuming b is the
putting everything into into both? You can make some assumptions about second number). In the first line of our previous
one line. what that number might look like – it’s going to be calculation, that’s the number 10 (60-50). 10 has its
even and less that 40, obviously, and maybe more own set of devisors – 1,2, 5 and 10, and this process
than 20 – but to get any closer is going to require a of subtraction doesn’t change the set of common
brute-force approach. Does 25 work? No. 30? Nope. divisors. This makes sense because when you
Looks like it might be 20 then, as this divides into both subtract the difference you are subtracting a number
and it doesn’t look like there can be a higher number. that shares the common divisors of both numbers.
How about if the two numbers were 50 and 60? It’s It might help if you think about this in terms of
not obvious what the common divisor might be for reversing the calculations with addition:
these two, which introduces more guesswork. Or 10 + 10 = 20
what if the numbers were 123456 and 654321? 20 shares the common divisors of 10, because we’ve
just doubled it.
Adding and subtracting 20 + 10 = 30
For all the non-Euclids, the most basic algorithm may Each addition sharing the same common factor that
simply halve the smallest number and then start we started with, until…
counting down, checking whether the new number 50 + 10 = 60
divides into both. It will work OK for small values, but We now have our original two values, and you can see
it’s obviously a computationally expensive approach where the common divisors came into the equation
that will become unrealistic very quickly. There has to and how the reversal of this reveals them.
be a better way, and that’s where Euclid comes in. The next job is to put this idea into code, and you
Euclid discovered that if you compare the smaller should be able to see that we’re on the verge of
number with the difference between the smaller and replacing our numbers with variables anyway, so we
the larger number, 50 just need to add some logic. We’re going to use
“We’re going to use Python,
compared to 10 in our Python for this example, as it’s installed on virtually
second example, and then everything – from the Raspberry Pi to Apple’s OS X
for this, as it’s installed on carried on doing the same and your Linux distribution. If you’ve not used the
virtually everything”
comparisons, smaller Python interpreter before, just type python on the
compared against the command line and make sure you follow our syntax
remainder of the previous and indentation exactly. Here’s the Python code:
subtraction, until you could continue no further, the def euclid(a, b):
previous remainder is the largest common divisor. For return b and euclid(b, a%b) or a
the numbers 50 and 60, here’s what happens: Woah! Those two lines of code do what we’ve just
60 - 50 = 10 spent 700 words trying to explain!
50 - 10 = 40 If this is your first foray into Python, we’ll try to take
40 - 10 = 30 it as slowly as we can, starting off with what we’ve
30 - 10 = 20 just created. def euclid(a, b): defines a function called
20 - 10 = 10 euclid that takes two arguments: a and b. These
10 - 10 = 0 values are the same two values we were using before
So the largest common divisor between the numbers in our explanation. If you’ve just typed this into Python,
50 and 60 is 10. Try it for yourself. It may get a little you can type euclid(100,140) to execute the function.
100 www.linuxvoice.com
EUCLID CODING
euclid(100,140) 13 - 5 = 8
The interpreter will spit out the answer, which in this 8-5=3
case is 20. Now let’s look at what the function is doing, But when will this recursion stop? When will the
one word or character at a time. return is how function stop calling itself and start returning values
functions are halted when retuning results from an back up the chain? That’s where the final or a comes
evaluation. If this line were return 1234, the output into play, and it’s an evaluation connected to the earlier
from the function would always be 1234. But that and statement. In most programming languages, an
doesn’t include any evaluating, which in our example, is or evaluation will only return true if one or the other of
done with the remainder of the line. The next character the arguments is true – so (1 or 0) would equal true,
is b, our second number, followed by the word and. but (0 or 0) would be false. In Python, you get better
value from the same statement because it returns the
Boolean operators first value if it’s false and the second value if its not.
In programming terms, and is a Boolean operator. Here’s another quick example from the interpreter:
With most other programming languages, for an >>> def ortest(a,b):
evaluation to be true both sides of a Boolean and need ... return a or b
to be non-zero. (1 and 1) is true, for example, whereas ...
(0 and 1) is false, and those languages would typically >>> ortest(1,2)
return a 1 for true and a 0 for false. Python is slightly 1
different in the way it handles return values because it >>> ortest(0,2)
packs more features into a single operation. If the first 2
value is non-zero, it will return the second value from If the evaluation of the recursively embedded
the evaluation. If it’s false, it will return the first. Here’s function returns zero, the and evaluates the value of a
a simple function definition and the output from the against the value of b, effectively returning the next to
interpreter to show you what we mean: last value for b before the final evaluation returned 0.
>>> def andtest(a,b): That’s exactly the same result we got when we first
... return a and b worked out Euclid’s algorithm manually, but it’s quite
... difficult to imagine. To make things clearer, here’s
>>> andtest(1,2) some pseudo code for what happens when we call
2 the function with the values of 60 and 50, showing
>>> andltest(0,2) each recursive step on a line with a number and the
0 values Python is calculating. When a value is finally
This facility gives you the same output you get from returned, we change the line number with the returned
other languages – if both values are non-zero, you’ll value inserted into the evaluation so you can see
get a non-zero value returned, which is effectively the what’s happening and how we step back through
same as (1 and 1) = true. If either the first or the recursion to the final number:
second values are zero, these will be returned, a = 60 b = 50
effectively making (3 and 0) = false. 1: 60 and euclid(50, 10) or 60
But you get more because you get the value of the 2: 50 and euclid(10, 40) or 50
second number for free, and this is how our code is 3: 40 and euclid(10, 30) or 40
working. But there’s another trick immediately 4: 30 and euclid(10, 20) or 30
afterwards – recursion: 5: 20 and euclid(10, 10) or 20
euclid(b, a%b) or a 6: 10 and euclid(10, 0) or 10 (RETURNS 10 )
The second argument to the first and evaluation 5: 20 and 10 or 20 (RETURNS 10)
calls the function again from within itself. That’s the 4: 30 and 10 or 30 (RETURNS 10)
recursion part. The arguments for this second call of 3: 40 and 10 or 40 (RETURNS 10)
the function are the second value itself and the 2: 50 and 10 or 50 (RETURNS 10)
remainder of a division between the first and second 1: 60 and 10 or 60 (RETURNS 10)
number. This remainder of a division, otherwise You can test the logic of that comparison yourself
known as a modulo operation, is a different method to without the recursive element:
the one we outlined earlier. It’s the same theory, only >>> def eval(a,b,c):
made more efficient. This is because equal divisions ... return a and b or c
of the lower number into the higher number – such as ...
5 into 28 – help us to fast forward a few steps without >>> eval(20,10,20)
losing the common divisor. 28%5=3, which is because 10
28 divided by 5 = 5, with a remainder of 3. You get the The end result is the product of thousands of years
same result as the remainder from the subtractions of thought – a concise algorithm that performs a
we were doing earlier, only without all the effort: useful operation, all on a single line, while at the same
28 - 5 = 23 time teaching a little about how Python maximises
23 - 5 = 18 functionality with its Boolean operations (and also
18 - 5 = 13 makes itself quite difficult to read in the process).
www.linuxvoice.com 101
CODING GREP GAMES
SOLVE WORD
TUTORIAL
PUZZLES WITH BASH
The humble command line interface is amazingly powerful,
BEN EVERARD
for both real work and playing games.
I
t’s no secret that Bash, the shell on most Linux only match words of exactly four characters:
WHY DO THIS? systems, is an incredibly powerful tool, however egrep “^[aedh]{4}$” /usr/share/dict/words
• Get to grips with egrep it’s one that many Linux users don’t take the time This is a bit better, but there are still some with
and extended regular
expressions to fully learn. A lot of tutorials focus on boring but repeated characters. To solve this we’re going to pipe
• Never get stuck on word practical uses like managing log files, but it doesn’t the output into a second instance of egrep, like this:
puzzles again have to be this way. Bash can be fun. egrep “^[aedh]{4}$” /usr/share/dict/words | egrep -v “(.).*\1”
• Search through all the Here at Linux Voice, we want to give this tool some If you run this, you’ll find that it only returns one line,
text files on your system love, so we’re inaugurating the Grep Games. This is an the anagram of aedh. The second egrep has the -v
with ease
event where you use Bash together with grep to solve flag, which means that it works in reverse; that is, it
the sort of word puzzles you find in glossy magazines. only outputs lines that don’t match the pattern. The
Here’s an example: what is aedh an anagram of? To pattern (.).*\1 matches any line with a repeated
solve this, you’re going to need a list of English words. character in it because (.) matches any character, .*
This comes as standard on most Linuxes, and can matches any string of any length (including nothing)
usually be found at /usr/share/dict/words or /usr/ and \1 is a back reference to the first character. For
dict/words. If it’s not there, check for a words or more details on this, see backreferences in the boxout
wordlist package in your package manager. Failing on Grep and regular expressions.
that, you can grab it from the DVD or linuxvoice.com. Sometimes an anagram will contain a repeated
In this article, we’ll use /usr/share/dict/words, but you letter, and that would be missed by the above. Take,
should change this if your words file is elsewhere. for example, eeeddh. The previous method won’t
We’ll use egrep (like grep but uses extended regular work, so instead we need to match different letters
expressions, which have a cleaner syntax than plain different numbers of times. The code for this is:
regular explessions) to find the right words. If you egrep “^[edh]{6}$” /usr/share/dict/words | egrep “*^[^e]*(e[^e]*)
haven’t come across this tool before, take a look at the {3}[^e]*$” | egrep “^[^d]*(d[^d]*){2}[^d]*$” | egrep -v “([^ed]).*\1]*”
boxout on grep and regular expressions, right. Here the second and third egreps both work in the
You can find any word that contains just the letters same way. They make sure that a particular letter is
aedh with this line: repeated exactly a certain number of times. [^e]
egrep “^[aedh]*$” /usr/share/dict/words matches any character except e, so the second egrep
The ^ matches the start of the line, $ the end of the matches any string that starts at a new line, has any
line and [aedh]* matches any string of the letters character other than a letter ‘e’ zero or more times
aedh. However, these aren’t all anagrams. Any followed by three occurrences of the bracketed
anagram must be exactly four letters long, so let’s expression (which contains e once and any string of
other characters), then anything that isn’t an e zero or
more times followed by an end of line.
The final egrep makes sure that nothing other than
f e and d are repeated.
I’ll have a vowel please Carol
t e
This solves complete anagrams, but that’s not always
what you want to do. In the UK there’s a quiz show
i
called Countdown, in which the contestants have to
make the longest word they can out of a given
sequence of nine letters.
You can solve this in a similar manner to the above
p d
problem, but by using ranges for the number of
characters rather than an absolute number. Take a
look at this example for the letters a,e,e,f,d,m,t,t,i
Word wheels: a egrep “^[aefdmti]{1,9}$” /usr/share/dict/words | egrep
challenging mental puzzle “*^[^e]*(e[^e]*){0,2}[^e]*$” | egrep “^[^t]*(t[^t]*){0,2}[^t]*$” | egrep
or a simple command? -v “([^et]).*\1]*”
102 www.linuxvoice.com
GREP GAMES CODING
However, this doesn’t quite solve our problem. We
don’t want all the words that match, just the longest
one. To get this, we need to go beyond a single line
and create a script.
#!/bin/bash
longestLength=0
longestWord=””
while read word
do
if (( ${#word} > longestLength ))
then
longestLength=${#word}
longestWord=$word
fi
www.regex101.com is
done into words, you start with a word, then each rung of
an online tool to help
echo $longestWord the ladder you change a single letter from the word
you understand regular
This code reads each line from standard in (while above until you end up with a final word. expressions. Unfortunately
read line) and checks its length against the previous There are two separate parts to look at. The first it uses regular expressions
longest word. At the end, it echos (prints) the longest part is finding all the words that can follow a particular from PHP, Python and
word its found. To include this with the previous egrep word. The second part is finding out if a particular JavaScript, which are
commands, just use: word can precede the final word. slightly different from
egrep “^[aefdmnti]{1,9}$” /usr/share/dict/words | egrep Let’s try the ladder: egrep.
“*^[^e]*(e[^e]*){0,2}[^e]*$” | egrep “^[^t]*(t[^t]*){0,2}[^t]*$” | egrep live
-v “([^et]).*\1]*” | bash longest.sh ----
Where longest.sh is the filename of the above ----
script (it’s on the website and DVD). ----
Another puzzle similar to Countdown is the word raft
wheel. This is where there’s a series of letters on the To solve this you have to come up with three words.
outside of a circle and one in the middle. You then #!/bin/bash
have to find as many words as possible that contain for x in $(egrep “^liv.$|^li.e$|^l.ve$|^.ive$” /usr/share/dict/words)
the letter in the middle and two or more of the letters do
on the outside. The example puzzle on the facing query=’^.’${x:1:3}’$|^’${x:0:1}’.’${x:2:2}’$|^’${x:0:2}’.’${x:3:1}’$|
page can be solved with: ^’${x:0:3}’.$’
egrep “^[fedpt]*i[fedpt]*$” re/dict/words | egrep -v “(.).*\1” | for y in $(egrep $query /usr/share/dict/words)
egrep “.{3,}” do
Word ladders are a bit different to the puzzles we’ve query2=’^.’${y:1:3}’$|^’${y:0:1}’.’${y:2:2}’$|^’${y:0:2}’.’${y:
looked at so far. Instead of arranging various letters 3:1}’$|^’${y:0:3}’.$’
Grep and regular expressions
Grep is a popular tool for finding particular line and $ matches the end of the line, so ^abc starts and finishes with a letter a. ^a.+a$
pieces of text. As well as solving word games, matches any line that starts with abc, abc$ matches any line that starts and ends with an
it’s also useful in finding particular messages matches any line that ends with abc and ^abc$ a and has at least one character in between.
in log files and other ‘real’ work. egrep is like matches any line that contains just abc. The You can also specify a range of the number of
grep, but it uses extended regular expressions “.” character matches any character, so ^a.c$ matches you want by using {}. For example,
rather than ordinary regular expressions. will match abc, adc, aac, but not ac. This is ^a{2,3}$ will match the lines aa and aaa, but
These have a cleaner syntax, so it’s these that known as backreferencing. nothing else. You can bracket parts of regular
we’ll use here. You can also match groups of characters, expressions as well. This is useful because it
The basic usage is: eg ^[ab] will match any line that starts with a allows you to refer to particular matches. \1
egrep <pattern> <file> or b, while ^[^ab] will match any line that starts matches whatever the first bracketed
This will output every line in the file that with any character other than a or b. ^[a-z] will expression matched, \2 matches what the
matches <pattern>. It can also be used in a match any line starting with a lower-case second matched and so on. For example, (.).\1
pipe like this: letter. There are also a few special options will match any two characters that are the
cat <file> | egrep <pattern> here such as [[:space:]], which matches any same separated by a character, such as bob,
This just prints every line that cat outputs that whitespace (space, tab, etc) and [[:lower:]] did, aaa, but not abc.
matches <pattern>. which matches any lower-case letter. The final part of extended regular
The trick with egrep is in mastering You can match characters more than once. expressions that we’ll look at is |. This allows
extended regular expressions. * matches zero or more times, + one or more you to match against more than one pattern.
A letter just matches itself, so for example, time, and ? zero or one time. So, ^a*$ matches For example, ^ab|^bc will match anything that
abc will match any line that contains the string a line that contains a number of a’s but no starts with either ab or bc, but not ac or
abc anywhere in it. ^ matches the start of the other characters. ^a.*a$ matches a line that anything else. ^(ab|bc) does the same thing.
www.linuxvoice.com 103
CODING GREP GAMES
for z in $(egrep $query2 /usr/share/dict/words | egrep
“^raf.$|^ra.t$|^r.ft$|^.aft$”)
do
if [ $x != $y ] && [ $x != $z ] && [ $x !=
“live” ] && [ $x != “raft” ] && [ $y != $z ] && [ $y != “live” ] && [ $y
!= “raft” ] && [ $z != “live” ] && [ $z != “raft” ]; then
echo “live”
echo $x
echo $y
echo $z
echo “raft”
echo “---”
fi
done
done Many programs have some form of regexes built in. Here,
done gvim is finding all USB messages for user ben in the syslog.
This code performs three for loops, one for each of
the missing words. The first for loop runs on every hello, my name is ben
word that matches the regular expression “^liv.$|^li. because h=1, e=2, l=3, o=4, m=5, y=6, n=7, a=8, i=9,
e$|^l.ve$|^.ive$” this is effectively four different b=a.
regular expressions separated by |. Together, it will Now take a look at the following:
return any word that matches any one of these 123452 672 8298a2 bc 9889dbeb9c
sub-expressions. The main clue here are repeated letters which you
Inside this for loop it runs the line can match using back references. You could try to
query=’^.’${x:1:3}’$|^’${x:0:1}’.’${x:2:2}’$|^’${x:0:2}’.’${x:3:1}’$|^’$ build a script to match the whole lot in one go, but it’s
{x:0:3}’.$’ far easier and quicker to pick on part with quite a few
This just builds up a regular expression equivalent repeated characters and just match that. Once you’ve
to the first one but for every word returned. x is the got that, it should be quite trivial to finish it off. We
variable holding the word, and ${x:1:3} (for example) decided to work with the final two words. A script to
returns characters 1 through 3 of the word held in solve them is:
variable x (the first character is 0). The second for loop #!/bin/bash
works in exactly the same way as the first. list2=$(egrep “(.)(.)\2\1.(.).\3\1.” /usr/share/dict/words)
The final for loop is a bit different because it not for word1 in $(egrep “^.{2}$” /usr/share/dict/words)
only has to match the word above it, but the word do
below it as well. For this reason it runs two egreps on for word2 in $list2
the words: one to match the words above, and the do
second to match the words below. The if statement echo $word1” “$word2 | egrep “^(.)(.)
simply removes any solutions that repeat words. [[:space:]](.)(.)\4\3.\1.\1\3\2$”
done
Playing GCHQ done
Substitution ciphers are easy-to-break encryption The first loop goes through every two letter word
systems where you take each letter of the alphabet while the second one loops through every word that
and represent it with a different symbol. The point of matches the particular pattern of backreferences.
egrep will highlight the the puzzle is to work out what letters the symbols The guts of the code is the line:
particular part of each line represent. As an example, the cipher: echo $word1” “$word2 | egrep “^(.)(.)[[:space:]](.)
that matches the regular 12334, 56 7852 90 a27 (.)\4\3.\1.\1\3\2$”
expression. could correspond to: It checks every pair of words generated by the two
wloops for a particular pattern of back references
which correspond to repeated characters in the
ciphertext.
This method could be expanded to match three or
more words, though it will slow down significantly
with each new word.
Once you’ve got some of the letters, you should be
able to come up with patterns based on the letters
you know to find the other words.
Ben Everard is the co-author of Learning Python with
Raspberry Pi, soon to be published by Wiley. He’s also pretty
good at turning foraged fruit into alcohol.
104 www.linuxvoice.com
GREP GAMES CODING
Challenges
Test your skills by writing scripts to solve the following word puzzles
Anagrams Countdown Encryption
ainpprss tnxpamies 1 2134 567894550 518824 1a4 a546b4
abeprrrsy dimtescat 1234 34 5641 127 879300309
bbceirssu hofanescp 123 456 4 378936 8708a8034b
Word wheel
i p m c a f
t r i e t e
s a m
a n g d b s
o l i
Word ladder
band brag wire
---- ---- ----
---- ---- ----
---- ---- ----
meat plan pant
Find words, win clothing!
The final challenge is something different, one we lhzniphoto To be eligible, your program must be licensed
haven’t covered so far: a word search. To make rlightovqx under an OSI-approved licence compatible with the
matters a little easier, there are only horizontal yelsocketn GPL v2 or v3. We recommend using GPLv3.
words, and none of them are backwards. The fbicycleow All entries must be sent to ben@linuxvoice.com
challenge is to write a Bash script that can go in ykerolbuha by 31 March, and the winner will be announced in
the following pipe: To make things interesting, there will be two issue 3 (and on linuxvoice.com). You don’t have to
cat wordsearch.txt | bash yourscript.sh prizes, one for the smallest (in terms of characters have bought a magazine to enter (details will be
and output all of the three- or more letter words in the Bash script), and one for the one that runs posted to the website) so feel free to pass details
from the words list (/usr/share/dict/words or fastest (completes execution with all the words of the competition
usr/dict/words) that are in the file. found in the shortest time). The words must be on others.
The word search is (on the DVD and website as found with a form of GNU grep (egrep, pgrep, etc.) In the event of
wordsearch.txt): matching a regular expression. a tie, the solution
zfghellohb There are few differences between versions of that was sent in
binarytwno Bash on different Linuxes, so we’ll be testing on a first will win. In
thisenthat fresh install of Debian Unstable. This is only likely all matters, the
dfjunglwmr to matter if you’re relying on particularly new or editor’s decision
scoffeeqwj exotic features. will be final.
www.linuxvoice.com 105
MASTERCLASS VIM
GET TO KNOW VIM MASTERCLASS
Essential Linux tools explained – this month, say hello to
BEN EVERARD the Vim text editor and some advanced features in Firefox
AN INTRODUCTION TO VIM
Whatever Unix system you’re using, it will probably have Vim – let’s learn this essential editor.
V
im, which is a hugely flexible text editor for
Linux, is “Vi Improved”. It carries a legacy that
JOHN LANE
can be traced back to the 1970s, when Vi was
born as the ‘visual mode’ for the Unix line editor, Ex (Ex
itself was the eXtended version of the editor, Ed). The
most jarring part of that legacy for new users is that
PRO TIP Vim has two main operating modes.
“:help vim-modes” helps Command Mode is where you interact with Vim to
to explain Vim’s operating
modes
move around, alter, save and exit; pretty much
everything you can think of except the one thing you
might want to do: type text into it. That’s what the
Vim benefits from many online learning resources, like
other mode (Insert Mode) is for. Sadly, many people
this interactive tutorial (www.openvim.com).
take the time to learn one command at this point: :q,
the quit command, so they can go off and find
another editor. But Linux Voice readers are a hardy Mode. For basic navigation, you use the hjkl keys to
bunch, so we’re staying with it… move left, down, up and right within the file or there
are commands that navigate words, sentences,
Getting around paragraphs and pages.
Another surviving part of its legacy is its quirky use of Commands are case-sensitive so j and J do
PRO TIP
the h, j, k and l keys to move around the file. This can different things. Most commands are one or two
Most linux distros alias
“vi” to “vim” be traced back to Vi’s creator using a terminal that keystrokes and the first you’ll want to learn is i, which
didn’t have separate cursor arrow keys but used these enters Insert Mode. Once in Insert Mode, anything
keys instead. Vim supports the normal arrow keys as typed will be entered into the file until you press the
well, but it’s worth learning to use those letter keys Escape key, which returns you to command mode.
because they’re there directly underneath your Insert Mode is meant for short bursts of text entry –
fingertips and it’ll make you much quicker once you’ve you’re meant to place the cursor, enter Insert Mode,
trained your muscle memory. For die-hards, the arrow type some text and Escape back to Command Mode.
Vim’s Command Mode keys can be turned off. New users might try to enter Insert Mode and then
offers heaps of powerful Quirks aside, let’s get into Vim: work as if they are using a simpler text editor such as
commands to manipulate vim myfile Notepad, but to do so misses the point and power of
files. Like we mentioned, you’ll find yourself in Command Command Mode.
The next characteristic of Vim to understand is its
ability to repeat commands. Any keystroke command
given may be preceded with a number and that
command will be repeated that many times. For
example. enter 5h to move left five characters. Using
repeats like this with the navigation commands can
help you move around your file very quickly.
Moving around is fine, but command mode also
offers many ways to make modifications to your file.
Begin with the basic (i)nsert, (r)eplace and e(x)tract.
Some commands, like (c)hange and (d)elete, are
106 www.linuxvoice.com
VIM MASTERCLASS
followed by a mandatory operator specifying what to buffers using :ls and navigate between them with :b.
operate on – these operators are the same as the Split windows is a feature of Vim that enables you to
navigation commands, so 3dw deletes three words, view the file being edited in multiple places, or even
5x deletes five characters. view multiple different files. To split the window, enter Do you want to
A more sophisticated way to modify files is to use :sp for a horizontal split or :vs for a vertical one. This
know more?
Ex commands. These hark back to the days before Vi will display the current buffer twice. Append a
when people used teletypes and didn’t even have a filename to instead load another file into the split The Vim Tips Wiki
monitor in front of them. Ex commands are typed at a window. If two windows display the same buffer, http://vim.wikia.
prompt and perform modifications to the file being changes made in one will be reflected in the other. com/wiki/Vim_
edited. You enter an Ex command from Vim’s Window control commands are initiated with Ctrl+W. Tips_Wiki
command mode by first entering a colon (:) and then Moving between windows involves using Ctrl+W Open Vim Tutorial
the command. Ex commands take the form followed by a movement key, for example Ctrl+W k http://openvim.
:[range] command [args] moves to the window above. com
where the range and arguments are optional. The The other way to organise multiple files is to use ViEmu cheat
range defines the line, or lines, to perform the tabs. You can have multiple tabs, each displaying sheet and tutorial
command on, and can be specified using line multiple windows and, remember, each of those www.viemu.com
numbers, marks or special symbols: a full stop windows can display content from any buffer. Tab Vim website at
character represents the current line and $ represents commands begin with :tab. www.vim.org
the last line. % is equivalent to 1,$. You can create
marks to represent lines of your choice: to define a Pimp your Vim
mark, a, at your current position in a file, enter ma and One of the big features of Vim is that it is heavily
you can then refer to that line as a. You can also use customisable. You can view and change settings with
simple expressions like +3 to refer to the line three the :set command. To see all settings:
ahead of the current line, or $-10 to refer to the :set all
tenth-before-last line. Probably the most commonly And to enable a setting, for example:
used ex-command is to perform a global search and :set number
replace: :s/%/foo/bar/g replaces all occurrences of will display line numbers. Prefix the setting name with
foo with bar. foo is a regular expression. no to disable it:
Vi has commands to cut or copy and paste text but :set nonumber
it calls the copy action Yank instead. The commands To apply your setting preferences when starting
are (d)elete, (y)ank and (p)aste. Deleting and yanking Vim, you can store them in a file called ~/.vimrc. This
place the affected text into a general purpose buffer file can do more than just settings, though: by writing
(which is not the desktop’s clipboard). You can also Vimscripts, you can create new functionality or modify
use a named buffer by prefixing a command with ” existing features.
and a character (which names the buffer). A good place to start customising is by key
“a3dw mapping. Any Command-Mode key sequence can be
“byy mapped to a key:
will delete three words into buffer a and yank the :map - dd
whole line into buffer b. will cause Vim to delete the current line (that’s the dd
command) whenever you press -. Beware, however,
Buffers, windows and tabs mapping single keys will remap the main commands
When Vim loads a file, it reads it into a buffer, which is (there are no free single characters). To help avoid this
the in-memory copy of the file that is altered as you you can use modifiers:
edit it. The original file is only modified when you write :map <c-d> dd
the buffer back to disk. You use the :w command to will map Ctrl+d to perform dd, which deletes the
do this. Vim can have many files open at the same current line. You can also map multiple characters but
time, each being held in its own buffer. You can list all you’ll need to type them quickly to get their effect:
:map ,d dd
A coder’s paradise
You can control whether tabs are hard or soft
(implemented with spaces, often preferable these
days). You can set up automatic indentation and code
folding (hiding function bodies). The = command will
indent the current selection. :fold will fold any selected
block; zo opens a fold and zc closes it.
Finally, this tour would be incomplete without
mentioning Gvim, which wraps Vim in a GUI window
and exposes some of its commands through a
There are lots of ways to organise multiple files in Vim. traditional menu interface.
www.linuxvoice.com 107
IN DEPTH FIREFOX
AN INTRODUCTION TO FIREFOX
Get more out of the flagship free software project’s hidden features.
I
f statistics are to be believed, the Mozilla Firefox such as universities, governments and businesses.
web browser enjoys around a 20% share of the Each ESR release is supported for one year, however it
browser market, lagging behind Google’s Chrome only receives high-risk/impact security fixes or major
browser, with its more polished look and feel. But stability fixes.
Firefox offers more power-user features through its
ability to be tweaked and customised. A quick tour
The name Firefox (which is another name for the Central to the Firefox experience is what Mozilla calls
red panda) was chosen after earlier names, including the Awesome Bar, a combined URL and search box.
Phoenix and Firebird were dropped due to trademark You start typing what you want and the Awesome Bar
disputes. More on that later… displays possible matches from your browsing history,
Mozilla releases Firefox versions at four stages in bookmarked sites and open tabs. When a page is
its lifecycle. Known as channels, they are: displayed, its URL is prefixed with its ‘favicon’, the small
Firefox Nightly, a developer-focussed release aimed icon used by some websites to give a brand identity to
at “extremely technical” early adopters. It’s updated the URL. If you connect to a secure site, the identity
every night and contains the latest changes. information can be revealed by clicking on the favicon.
Firefox Aurora is a pre-beta release every morning Bookmarking is quick and easy, thanks to the
for technical early adopters. one-click bookmark feature accessed via the star icon
Firefox Beta is a weekly beta release aimed at at the end of the Awesome Bar. Click once to create a
non-technical early adopters. bookmark, click again to edit or remove one.
Firefox Final is the official public release version An extension to bookmarking is Quick Search. Say
intended for everyday, mainstream users. It is released you frequently look up content on Wikipedia; if you
on a six-week schedule. browse to that site, right-click in its search bar and
Functional changes and enhancements move select Add A Keyword For This Search, you’ll then be
through the four channels, being initially available in able to search it directly by entering wikipedia
the nightly build and moving through Aurora and Beta my-search-term in the Awesome Bar.
before eventually making it into a new public release. Firefox was one of the first browsers to offer the
The release schedule is maintained on the Mozilla now-common tabbed browsing model. It extends the
Wiki (http://bit.ly/ffrelcal). concept by enabling the user to pin certain tabs,
In addition to the four main channels there’s meaning that they become permanent fixtures on the
another version, called Firefox Extended Support user interface where they space-efficiently display
Release, which is intended for large organisations only the site’s favicon on the left-hand end of the tab
Our favourite add-ons
There are thousands of add-ons available through
http://addons.mozilla.org and everyone will have
their own favourites. Here are some of ours.
Pentadactyl aims to make more efficient and
keyboard accessible by bringing Vim-like
keybindings and Ex-like commands to Firefox with
a neat, minimalist GUI. This is a must-have add-on
for Vim lovers http://bit.ly/ffpentadactyl.
Lightbeam uses interactive visualisations to show
you the first and third-party sites you interact with
on the web.
AdBlock Plus enables you to filter out unwanted
parts of websites that you visit, such as noisy ad.
Abduction lets you easily select an area of a web
page with your mouse and save it as an image.
Firebug is a web development tool that you can
Firefox’s releases are use in addition to, or instead of, the integrated
fed through four release developer toolbox.
channels
108 www.linuxvoice.com
FIREFOX IN DEPTH
stored within a profile that you’ll find under your home
Web developer tools directory in a path similar to
/home/your_user_name/.mozilla/firefox/k9uvtyeq.default/
Web developers have another good reason to use The exact path contains a random string that
Firefox. Its integrated Toolbox for web developers, serves two purposes: it makes the profile directory
accessible via the Tools > Web Developer menu, has unique and obfuscates it to reduce of the risk of
improved over time, obviating the need for
malware locating it on platforms where that kind of
extensions such as Firebug. You can inspect
thing is an issue. Most users will have one profile but
elements and even make changes to HTML and CSS
on the page that you are viewing – full details at it is possible to have many and you may find this
http://bit.ly/ffwebtoolbox. useful if you are experimenting with extensions or
settings. To find the profile directory that Firefox is
using, you can browse to URL:about:support and
click the Open Directory button, which is next to the
Profile Directory label.
Settings are stored in your profile in a plain-text file
called prefs.js. You can look at this file in any text
editor but changes are
best made using the
application. There are
“Firefox was one of the first
Firefox’s Toolbox is great for web developers.
many more settings than browsers to offer the tabbed
you can access via the
Preferences dialog – you
browsing model.”
bar. They don’t have a close button, thus avoiding instead enter about:config
accidental closure, and they glow blue when the page into the URL bar, whcih will bring up a huge range of
updates. Links on pinned tabs are opened in a new preferences to tweak (if you accept the risk of
tab so that the pinned tab doesn’t change (although potentially breaking things, of course!).
beware, if you browse elsewhere while viewing a To set an option, search for it and click the value to
pinned tab, it changes the pinned tab!). change it. For an example, search for ‘animatefade’
and change its value from the default false to true, to
Manage your tabs get some fun eye candy.
Tab addicts will like tab groups, (also known as a
panorama). This is a great feature that you’ll want to Privacy and security
use if you often end up with more tabs than will fit on The awesomeness of the Awesome Bar, and other
the tab bar, or if you want to organise tabs by task. To things, require Firefox to collect data about your
create tab groups, enter Ctrl+Shift+E or click the small browsing habits. But you have control over this. One
PRO TIP
icon at the right-hand end of the tab bar. This will way is to use Private Browsing, which enables you to Start with Firefox from
the command line with
display your tabs as thumbnails that you can drag browse the internet without saving any information firefox -P to manage
around and collect into groups. You select a tab to about which sites and pages you visit. It doesn’t make profiles.
display by clicking its thumbnail, which returns to the you anonymous on the internet, however. The
main display with that tab open and the tab bar only keystroke Ctrl+Shift+P starts private browsing in a
showing tabs from the same group. new window (a small mask icon to the left of the tab
Firefox is a feature-rich application but we can bar identifies it as being private). Firefox won’t track
extend, bend and manipulate it to customise the browser, search, download and web-form histories,
browsing experience. This is made possible by its cookies, or temporary internet files (any files you
extendable architecture and by tweaking its internal specifically download or bookmarks you make will be
settings. Everything you do to customise Firefox is kept). You close the window to stop Private Browsing.
Firefox can tell the sites that you visit that you do
not want to be tracked, however it doesn’t do this by
default so you should go to Preferences > Privacy to
select this option. There is, however, no requirement
that web sites honour this setting. An extension called
Lightbeam can reveal the sites that are tracking you
online. Privacy is a balancing act: read the Mozilla
page at http://bit.ly/ffprivacy to get the current
Firefox privacy policy.
John Lane is a technology consultant with a penchant for
Linux. His Firefox has a penguin theme.
The panorama: ideal for users who like lots of tabs.
www.linuxvoice.com 109
FOUNDERS PAGES
THANK YOU!
Linux Voice would like to say a huge thanks to everyone who
made this magazine possible. If you bought the Founder perk
during our IndieGogo campaign, your name should be somewhere
on these pages. You’re awesome!
The open source magazine that gives back to the Free Software community
Adam Hawton, Adrian Busolini, Rodrigues, Bryan Andrew Butler, Moroz, Derek Smit, Dick Bain aka
Ahmad A. J. Fallatah, Alan Bård Aase, C. Victor Pollard, towy71, Don Brown, Don Newell,
Shuttleworth, Alan Underwood, Callum Scott, Campbell Barton, Drakonas, Dustin Sysko, Ed
Alberto Goldoni, Alberto Mardegan, Carl Ryan Davies, Carla Sella, McDonagh, Ed Vipas, Einar
Aleksey Shumanev, Alessandro Catherine Morrison, Ceśar Petersen, Eion MacDonald,
Franzì, Alex Bishop, Alex Thomas, Fernández Rodríguez, Charles Emanuele Rogledi, Emil Hemdal,
Alexander Orr, Alf Orseni, Allen Forbes, Charles Kerr, Charles Lees, Emmanuel Rialland, Eoghann
Antonio Dawson, Alphonsos ChaseFox, Chris Bishop, Chris Walker, Eric Crampton, Ernie
Pangas, Andrea Gallo, Andreas Bland-Ward, Chris Chapman, Chris Hutschemaekers, Espen Klein
Zweili, Andrei Sebastian Cîmpean, Dell, Chris Ellis, Chris Lee, Chris Nilsen, Fay Henderson, Francesco
Andrew Allen, Andrew Bowden, Sharpe, Chris Tipney, Christian Cervellera (Ciscoski), Frank Bell,
Andrew Grant, Andrew Howe, Christiansen, Christian Dannie Frank Bonner, Frank Fegert, Frank
Andrew Perkins, Andrew Walker, Storgaard, Christian Lange, Jung, Frank Thomas-Hockey ,
Andrew William Hearn, Andrew Christof Kluß, Christoph Stenglein, Franz-Robert van Vugt, Fredrik
Wilson, Andrew Wozniak, Andrew Christopher Brandon, Christopher Fyksen Lund, Fusion Ticket
Yeomans, Andy Baker, Andy Sandles, chris_debian, Claes Solutions, Félim Whiteley, Gareth
Church, Andy Vickers, Anna Smith, Bergman, Clive Bull, Clive Rixson, Thomas, Gary Walker, Gary Wilson,
Antti Aspinen, António M P Colin Haynes, Colin Marshall, Colin Geoffrey Robertson, George
Mendes, Areski Belaid, Arturo S. Hamilton, Colin White, Connie Angelopoulos, George Tripp, Gio
Fernandez Montoro, Arturo New, Craig Allen, Craig Ewers, Ciampa, Giovanni Moretti, Giovanni
Hoffstadt Urrutia, Asavar Tzeth, Craig Waites, Cryptable (able to Panozzo, Glen Coulthard, Glenn
Ashley Manly, Ashley Seabrook, use crypto), Curtis Adkins, Cyryl Holmer, GLITTAH, Gordon O’Brien
Astiak Ahmed, Austin Prior, Axel Płotnicki-Chudyk, Dafydd Young, (MSQ Partners Ltd), Graham Cobb,
Sommerfeldt, Barry Hughes, Barry Dale Malony, damo, Daniel Alan Greg Wellington, Gwilym Kuiper,
Polley, Bart Van Melckebeke, Miller, Daniel Egger, Daniel Harlea, Géza Piros, H. de Wind, Hans-
Beardy Jesse, Becky Newborough, Daniel Llewellyn, Daniel Parraz, Georg Eßer, Hoyt Duff, Hugo
Ben Bryant, Ben Oliver, Bill B. Daniel Venema, Darryl Weaver, Gonçalves [vyanix], Iain
[SuperEngineer], Bill Quinn, BitFolk, Dave Cross, Dave Harris (G0CER), Cuthbertson, Ian Fox, Ian
Bjarni Petersen, Bjorn_G, Björn Dave Kelly, Dave Lewis, David Harcombe, Ian Hatton, Ian Lowry,
Wijers, Blaise Alleyne, Blake ‘Peanut’ Peter, David Anderson, Ian Patterson, Ian Price, Igal Alkon,
Johnson, Bob Moss, Boele Ruurd David Baxter, David Herel, David J. Immo Zadezensky, Intech Fusion,
Kuipers, Brian Klump, Brian Meier, David Lewis, David Mugnai, Iván Tomé, Jack (jfk) Knight, Jacob
McLaughlin, Bruce Beardall, Bruno David W. Lee, David Waters, Denis Kiers, Jacopo M. Colucci, James
www.linuxvoice.com
FOUNDERS PAGES
Beal, James Derrick, James Evans, aka CaptainMark, Mark Wolf, Foulkes, Remy van Elst, Renzo
James Seymour, Jan Henkins, Jan Martin Buhr, Martin Cooper, Martin Massari, Rich KD0RG,, Rich
Kudrik, Yann Chx, Jason Daborn, D Turner, Martin Watts (The White), Wareham, Richard C. Dawson,
Jason Duke, Jason King, Jason María García Miranda, Mass Richard Delaney, Richard Lee Buff,
Pollitt, Javier A. Ochoa M, Jean Dosage, Matt Bynum, Matt Richard Waterman, Ricky Spanish,
Azzopardi, Jean Visconte, Morgan, Matt Tei, Matthew Cronen, Rob Gilijamse, Rob Probin, Rob
Jean-Michel Lavarenne, Jeffrey Matthew Hudson, Matthew L. Shearer, Robert Cook, Robert
Honig, Jens Klün, Jens Skovgaard Weber, Matthew Mellor, Matthew Gravsjö, Robert J. Collins, Robert
Jensen, Jens Weise, Jeppe Stevenson, Matthew Tunstall, Longstaff, Robert M. Albrecht,
Nielsen, Jeremie Gobeil, Jeremy Matti Lammi, Mattias Ohlsson, Robert Meineke, Robert Mundal
DeBlois, Jeremy Roe, Jeremy Maurice George, Max Dowkes, Max Axelsen, Roger J A Duthie, Roger
Schrock, Jeroen Franssen, Jesús Eaves, Max L, Maxim Andersson, McNally, Ross Brunson (LPI),
Alonso Fernández, Jiggy Kakkad, Michael Ashe, Michael Coyne, Rouven Hernier, Ruben Manukyan,
Joel Jorgensen, Johan Bergman, Michael Noyce, Michael O’Neill, Rui Gouveia, Rusty Ramser, Ruud
John, John and Anne Everard, Michael O’Sullivan, Michael P. Schellekens, Ryan Hartlage, Sadie
John Craick, John de Mattos, John Burton, Michael P. Fumicello, Simpson, Sam Kirby, Sami Flew,
Dean, John Fraser Williams, John Michael Rimicans, Michael Rose, Saqib Razaq, Sarapis, Sava
Gilbert, John Harrold, John Michael V. Gioia, Michael Slijepčević, Scott Buffington, Scott
Holbrook, John Hunter, John Whitmore, Micke Eklund, Mika Fishman, Scott Meikle, Scott
Mertz, John Neese Jr, John Uren, Impola, Mike Ball, Mike Bishop, Newlon, Seumas Mackinnon,
Johnbuoy, Jolyon T Hallel, Jon Mike Bright, Mike Hingley, Mike Shaun Walker, Shelby Cruver,
“The Nice Guy” Spriggs, Jon O’Day, Mike Sander, Mike Wort, Shiela Everard, Sigg3.net, Simon
Gibbins, Jon Peder Horn Opsahl, Mikkel Kristiansen, Milos Gajdos, Bell, Simon Given, Simon Handy,
Jon Ware, Jon Wilks, Jonatan Bijl, MintyfreshPenguin, Mårten Behm, Simon Quinton, Simon Spice,
Jonathan Brown, Jonathan Nathan Barnes, Neil Grogan, Neil Spencer Hunley, Stacy D. Uden,
Monahan, Jonny McCullagh, Joona Mark Simmons, Nick Crawford, Starfinger, Starfire Information
Lehtomäki, Jorge Fábregas, Jorma Nick Fox, Nick Heppleston, Nick Technologies, LLC, Stefan Beller,
Turkenburg, Joseph VanPelt, Josh Prescott, Nicola Mazbar, Nicolai Steinar Wenaas, Stephen Kirkby,
McKenzie, Joshua Mills, José Abruzzese, Nigel Green, Nigel Stephen Lang, Stephen Piggott,
Venceslau, Jouni Kvist, Juanjo Metheringham, Nigel Small, Nikos Stephen Riddett, Steve Bickle,
Marin, Julian Beach, Jørn Roussos, Norman Lorrain, Steve Perry, Steve Taylor, Steve
Ølmheim, Keith Pawson, Kenneth Ole-Morten Duesund, Ortega, Oskar Tremayne, Steve van Rossum,
Geisshirt, Kev Quirk, Kevie Hannesson, Owain Clarke, Owen Steven Bianchi, Steven Le Flohic,
(TuxJam), Kevin “Velkro” Watret, Savill, ozten, Pat McClung, Pat Stewart Robertson, Stuart Ward,
Kevin B. O’Brien, Kevin Colyer, Riehecky, Patrick A. TenHoopen, Svend Gundestrup, Svenning
Kevin R Soulsby, Kevin Ramsay, Patrick Guido Arminio, Patrick Andersson, Svetlozar Argirov, T.
Kevin Safford, @kimondo, Kristian Latour, Patrik Jeppsson, Paul Tonetti (licht_t), Tadeusz Cantwell,
Tizzard, Kristof Van Eyken, Kyle A. Dann, Paul Holman, Paul Keeton, Tanel Mae, Teodor Gambal,
Matheny, Lachlan Rhodes, Larry Paul Smedley, Paul Walker, Paul Terence S. J. Sambo, Terry Dooher,
Bain, Lars Hagström, Laurence Weeden, Paul Whelan, Paul The Sunlay Corporation,
Cable, LDWatson, Lee Moffitt, Lee Whittaker, Paul Williams (heiowge), thelovebug, Thierry Nicola,
Stone, Lee Trager, Leo Leibovici, Paw Hermansen, Per-Erik Thomas Blood, Tim Abell, Tim
Louis Bohm, Luis Gonzalo Fierro, Westerberg, Pete Crilly, Pete Elliot, Tim Foxcroft, Tim Hamilton,
Luis Viant, Lukas ‘Spydon’ Martin, Peter Bradley, Peter Carl, Tim O’Connell, Tim Speetjens, Tod
Klingsbo, Lukas Ahrenberg, Lukas Peter Hultqvist, Peter Jan Huls, Davis, Tom da pud, Tom Lange,
Mutschmann-Sanchez, Lynn Peter Knowles, Peter Malaise, Tom Larard, Tom Parrott, Tomasz
Griffin, Lynn Root, madwoollything, Peter Vachuska, Phil Robinson, Muras, Tommi Laukkanen,
Magne Djupvik, Manpreet S. Phil The Sheep, Philip Davidson, tommybobbins, Ton Sonneveldt,
Shinhmar, Manuel A Ortega Jr, Philip Whitaker, Philippe Le Toquin, Tony Hughes, Tony Wood, Tryggvi
Marco Trevisan, Marek, Marius Phillip Horger, Pi Supply UK, Björgvinsson, Tyson Moore,
Pfeifer, Mark Baker, Mark Cohen, Przemysław Kamiński, Raf Van Venomenus, Wayne Rooney,
Mark Craig, Mark Diamond, Mark Opdorp, Ralph Corderoy, Randall yajupadu, Yeu Sian Lee, Yury
Holmes, Mark Niski, Mark Skinner Crook, Rasmus Wriedt Larsen, Ray Vidineev, Zoë Williams
www.linuxvoice.com
DVDPAGES
Distros, videos, applications, games, podcasts and more…
DVD 001
A NUGGET OF PUREST GREEN
Welcome to the very first DVD from You’ll also find some exclusive releases. So our plan is to have
Linux Voice! This is a dual-layer Linux Voice videos that we’ve made a killer disc three or four times a
8GB disc, so you get twice as much specially for this disc, showing year, gathering together the best
data as in normal DVDs, and we’ve some of the programs covered in distro releases, and rolling in much
packed it with the best from the the magazine. If you find them more as well. Oh, and if you’re
Linux and Free Software world. useful, let us know and we’ll make reading the digital version of Linux
Along with big-name distros, we’ve even more of them! Voice, you can grab the DVD ISO
also included the latest FreeBSD We won’t be having a DVD image from our website at
release for those who want to on every issue of Linux Voice, www.linuxvoice.com
expand their skillset into other because some months are very Mike Saunders, Disc Editor
Unix flavours. quiet for distro and software mike@linuxvoice.com
Desktop polish
Linux Mint 16 “Petra”
The latest and greatest from the world’s most talked-about distro.
T
here seems to be no stopping Linux releases). System requirements are:
Mint. It has evolved from a simple 512MB RAM
fork of Ubuntu into a major project, 5GB hard drive space
with a bustling community and well-received That will get you by, although we
releases. Mint takes the best of Ubuntu and recommend a minimum of 1GB RAM for
Debian, mixes in its own software and adds smooth running. To install Linux Mint, just
a hugely polished interface on top. It’s easy boot your PC from the Linux Voice DVD – ie
to install, easy to use and easy to love – and start your PC with the disc in the drive. (On
it’s suitable for both new and experienced some older PCs, you may need to change
Linux users alike. the boot order in your BIOS so that the DVD
On this issue’s Linux Voice DVD you’ll find drive boots first, so consult your PC
the new release of Linux Mint, codenamed documentation or your local Google.) Installing Mint to your hard drive only takes a
“Petra”. It’s the 32-bit version with the Choose “Start Linux Mint” from the boot few clicks, and you can keep Windows if you
Cinnamon 2.0 interface (which has gone menu; if you have any problems booting, want a dual-boot system.
through a lot of refinement since earlier restart and choose the Compatibility Mode
option. When you reach the desktop, you
can explore the software in Live mode, or
double-click the installer icon on the desktop
to install Mint to your hard drive. If you’re a
new Linux user, chances are that your PC
already has Windows installed – in this
case, you can shrink the Windows section of
your drive and install Linux Mint alongside it.
Then, when you start your PC, you can
choose between Linux and Windows.
Mint is one of the most user-friendly
distros around, but if you need any help, visit
It’s pretty, fast, easy to use and it has loads of www.linuxmint.com/documentation.php
apps – Mint is one of our favourite Linux distros. for a great user guide.
112 www.linuxvoice.com
DVDPAGES
Developers’ paradise
Fedora 20
Cutting-edge software with a lovely Gnome 3 desktop.
W
e weren’t all big fans of Gnome 3 graphics mode” option.) System
when it arrived: major features requirements are:
had been removed from the 2.x 1GB RAM
series of the desktop, and the new interface 10GB hard drive space
design was hard to understand. That was We recommend a minimum 1.5GHz 32-bit
years ago, though, and Gnome 3 has come or 64-bit processor. While Gnome is the If you hated earlier versions of Gnome 3, it’s
on in leaps and bounds. Arguably the best default desktop environment, if you’re on a worth giving the desktop another chance.
showcase of Gnome 3 has been Fedora, and low-spec machine you can install and switch
from the LVDVD you can install the new to a lighter desktop such as Xfce. Fedora, or you can install it alongside an
release of this popular desktop distro. Anyway, once Fedora has booted from the existing Linux or Windows installation, giving
Fedora 20 is bootable directly from the DVD, you’ll be given the option to either use you a boot menu when you start your PC.
disc, so start your PC with the disc in your the distro in live mode or install it to your Fedora has one of the most active
drive and choose it from the boot menu. (If hard drive. If you choose the latter, you’ll be communities of any Linux distro, so if you
you encounter graphics problems when given options for how you want to partition need any help or support, you’ll be able to
starting up, reboot and choose the “basic your hard drive: you can devote it entirely to find help at www.fedoraproject.org.
Strap here strap here
Other distros
Arch, FreeBSD, SystemRescueCD
A
longside the two big desktop distros Then there’s FreeBSD 10, supplied in two
in the shape of Fedora and Mint, we formats for writing to a USB key or CD-R.
have some extras worth exploring. If The README.TXT file explains how to do
you’re looking for a power-user distro that’s the former, and we’ve also included the
constantly up to date, try Arch. This has a fantastic FreeBSD Handbook that explains
rolling release model, where instead of all aspects of the OS (extract book. SystemRescueCD can be a godsend for fixing
getting a bunch of new software every six html-split.tar.bz2 and open index.html in broken machines – it’s well worth keeping
months or a year, you get the latest your browser). around on an old USB key.
packages when the Arch team releases Finally we have SystemRescueCD, a
them. We’ve provided an ISO image of the useful little distro that can get your PC out of comes with various other recovery tools. On
latest installer – try our tutorial on page 92 tough times. You can use it to fix filesystem the LVDVD you’ll find an image that you can
to discover how best to install it. problems (both Linux and Windows), and it write to a USB key or a CD-R.
And there’s more!
Videos, podcasts, software, oh my!
There’s much more on the DVD as well: we’ve years now, and every two weeks we gather
made five videos exploring some of the round microphones to chew over the big
software covered in the magazine, so you can, issues in Linux and Free Software. Expect a
for instance, see the awesome new document lot of opinions, a lot of rants, and a lot of off-
collaboration feature in OwnCloud 6 without topicness as well.
installing it. These videos are in Ogg Theora/ And then we have new software releases,
Vorbis (.ogv) format, and will play directly in FOSSpicks, games, the latest GCC and kernel
Firefox – so there’s no need to install extra source code (if you love to keep your base
media players or codecs. system bang up-to-date) and more LInux
Then we have the latest Linux Voice essentials. Enjoy exploring the DVD, and stay
podcasts. If you’ve never heard them before, tuned for another bursting-at-the-seams disc Our pub podcasts are especially popular –
we’ve been recording podcasts for several in a few issues’ time! here we are at The White Hart in Calne.
www.linuxvoice.com 113
/DEV/RANDOM/
/dev/random/
Final thoughts, musings and reflections
Nick Veitch
was the original editor
of Linux Format, a
role he played until he
got bored and went
Pinboard and Star
to work at Canonical
Wars 3D poster.
instead. Splitter!
Raspberry Pi with 2.8” LCD,
PiHub with 2x32GB thumb
drives & 2TB external drive.
Used as web dev server,
I
running Raspbian.
had intended to write a sort of profit/loss
account of open source for recent history
– some small way of seeing where the big
wins were for free software and where things
could be better. But before I put fingers to
keyboard, something happened to change that.
I came across something called Kafka, which
is a cunning message filtering server – services Lenovo ThinkPad T400,
publish messages to it, and listeners can filter docked and connected Lenovo ThinkPad X61s, used
to dual monitors. Runs for Arduino prototyping. It’s
on various tags or topics to receive a stream of CrunchBang Waldorf an oldie but a goodie. Runs
relevant messages (https://kafka.apache.org). (Debian Wheezy). CrunchBang Waldorf.
It is the sort of glue service that drives social
media newsfeeds, or possibly anti-social media
too if you wanted it to.
Kafka is cunning, but that isn’t why it stopped
My Linux setup Philip Newborough
me writing my profit and loss story. The startling
thing about Kafka isn’t that it’s good software,
but where it came from. Any guesses? Google?
Some group of ambitious hackers? No, the Kafka The creator of Crunchbang Linux show us his den.
project was founded and is maintained by that
bastion of free software, LinkedIn. What version of Linux are you What was the first Linux setup
Why is this useful piece of technology open using at the moment? you ever used?
sourced under the Apache 2.0 licence? Because Debian Wheezy, in the form of SUSE 6.3 in 1999, it was a PITA to
people at LinkedIn recognised that it’s a great CrunchBang Waldorf – I love the set up, but also a lot of fun.
way to get better code. That by allowing liberal stability that Debian affords me.
usage and community review, they end up with What Free Software/open source
better software to do the things they do. If other What desktop do you use? can’t you live without?
people also end up with better software, that’s We’re guessing OpenBox, as Tough question, I rely on so much. I
all to the good, and in fact helps test, refine and that’s what desktop Crunchbang uses automate/script a lot of tasks, so
make the service the best available. by default. Bash, GNU Coreutils and OpenSSH would
So, it sort of makes the whole profit and loss It depends – are we talking virtual or have to figure in the equation.
idea a bit redundant. I don’t think anyone would physical? Virtually, I use OpenBox,
claim that LinkedIn’s dev team is comprised of yes. Physically, I use a Lenovo ThinkPad What do other people love but
starry-eyed idealists who sing the GNU song X220 as my daily driver, but switch to you can’t get on with?
every morning before settling in to code under my Lenovo ThinkPad T400 when I’m in I have no idea!
wall-sized portraits of RMS (but, you know, if you my cave.
are reading, LinkedIn people, do tell. Send pics),
which only makes it even more obvious that
open source just simply makes sense. Follow us on Twitter @linuxvoice!
114 www.linuxvoice.com
Supernova remnant Cassiopeia A
Data from Chandra X-Ray: NASA/CXC/SAO/D.Patnaude et al.
Contour mapped with Luminance-HDR 2.4.0