Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
UBUNTU
14.04
RESPINS
The worlds biggest
distro has spawned
a new breed find
your favourite!
RASPBERRY PI GAMES
ROBOTICS STEAM OS
Make a start on Install it now and level
your cyborg army up your Linux gaming
WELCOME
W
here would we be without Ubuntu? Even if you dont
No later than nine months agree with the direction its taken in recent years, theres
2
after first publication, we will very little doubt in my mind that Linux would be much,
relicense all of our content under much worse off had Mark Shuttleworth not decided to spend
the Creative Commons CC-BY-SA a proportion of his Thawte windfall going to space creating the
licence, so that old content can Ubuntu Foundation. It transformed public expectation of what Linux
still be useful, and can live on even was and could be, making it easy to install and making Ubuntu
after the magazine has come off as close to a standard for commercial and hardware vendors as
the shelves. possible. This has had a positive effect on all Linux distributions.
Anyone can build on the good work of both the Debian and
Were a small company, so Ubuntu teams to create their own distributions, and its this
3
we dont have a board of initiative and diversity that were celebrating in issue 4. Each
directors or a bunch of Ubuntu derivative has a unique reason for being different, and SUBSCRIBE
shareholders in the City of London
to keep happy. The only people
the success or failure of these derivatives depends entirely on
how effective those distributions are at communicating and ON PAGE 60
that matter to us are the readers implementing their ideas. I cant think of a more democratic
(you again). system for success, and it only happens with Free Software.
Graham Morrison
THE LINUX VOICE TEAM Editor, Linux Voice
Editor Graham Morrison
graham@linuxvoice.com
Deputy editor Andrew Gregory
andrew@linuxvoice.com Whats hot in LV#004
Technical editor Ben Everard
ben@linuxvoice.com
Editor at large Mike Saunders
mike@linuxvoice.com
Games editor Liam Dawe
liam@linuxvoice.com
Creative director Stacey Black
stacey@linuxvoice.com
Malign puppetmaster Nick Veitch
nick@linuxvoice.com
Editorial contributors:
ANDREW GREGORY BEN EVERARD MIKE SAUNDERS
Mark Crutch, Josette Garcia, Juliet
Kemp, John Lane, Vincent Mealing, Code Club is having a very real Its wonderful to be able to Ben is very much keeping the
Simon Phipps, Jonathan Roberts, and positive effect on how IT is welcome Chris Brown to Linux spirit of Colin Pillinger alive with
Mayank Sharma, Valentine Sinitsyn taught to children in the UK. This Voice, and he kicks off with an his own Mars Rover project made
makes me happy. p30 ace guide to processes. p64 from an ice cream carton! p78
www.linuxvoice.com 3
CONTENTS
July LV004
Beauty is truth, truth beauty. That is all ye need to know.
18
SUBSCRIBE
ON PAGE 60
UBUNTU
14.04 REGULARS
06 News
RESPINS
In the wake of Heartbleed,
OpenSSL forks. DONT PANIC!
08 Distrohopper
Whats going to be on your
Linux box in 2015.
10 Gaming
The latest AAA-grade titles
are coming your way!
64 Core technologies
Linux Voice welcomes a
new writer: Dr Chris Brown.
68 FOSSpicks
Only the hottest free software
makes it into these pages.
110 Masterclass
Media players of the graphical
and command line avour.
34
STEAMOS 38
FAQ LLVM/Clang: the 26 KANO 114 My Linux desktop
We peek into the control room
How Valve is shaking future of compiling Make computers as of gamingonlinux.com.
up the world of games. code on Linux. easy as Lego.
4 www.linuxvoice.com
REVIEWS
TUTORIALS
76 78
84 86
90 94 FPGAs: Build
98
www.linuxvoice.com 5
ANALYSIS
NEWSANALYSIS
The Linux Voice view on whats going on in the world of Free Software.
Opinion
Simon Phipps OpenSSL in other projects. Theres been exist with a proprietary solution. Engaging
is president of the speculation why. An obvious explanation is would need permission and bureaucracy,
Open Source Initiative
that the cryptographic complexity of the and many contributors would just say no.
and a board member
of the Open Rights code meant that non-specialists were not
Group and of Open effective as community participants, but US Should I make donations?
Source for America. government open source specialist David A So whats the right way to react? Fork the
Wheeler has speculated that the unusual code? No, thats been done, and probably
licensing arrangement for OpenSSL a just increases the problem by removing
custom open source licence with non-GPL- potential expert participants from the
compatible copyleft effects and potentially OpenSSL pool. Re-implement it? Thats been
W
eve had a while for the shock of challenging advertising clauses also tried as well. Even with various forks and
the Heartbleed announcement to discouraged community involvement. re-implementations, OpenSSL remains
sink in and theres a lot to Exploit detection turned off: What can a widely used, because the problem is
consider. While the first impressions might small community do to spot uninitialised complex and the experts are few. Those new
be about the serious, exploitable bug and the memory and buffer over-run errors? String projects are unlikely to surpass in a few
repercussions of its abuse, the incident handling libraries today often include months what OpenSSL has largely
casts light on both the value and risks of detection at compile-time or even run-time succeeded at doing over a decade. Donate
open source. All programmers make for such errors, and the OpenBSD code used money? While cash donations to a project
mistakes, so theres no huge surprise that it by OpenSSL for this purpose is no exception. can be a short-term fix, in the long term it is
happened in OpenSSL. But why did it go But according to Theo de Raadt, leader of unlikely to help unless it leads to more
undetected for so long? There are several the OpenSSH project, these detection developers both writing and testing the
contributing factors. capabilities had been turned off at compile code. The best fix would be for the
Its hard to spot error in complex code: time in the OpenSSL build for performance companies most dependent on OpenSSL to
First, the OpenSSL code is huge, years old reasons long ago and had never been turned hire experts and pay them to join the
and implements a set of algorithms that on again, despite the performance issues community and work on the code.
need specialist cryptographic knowledge to being addressed in the code. This, after all, is the key to open source. Its
understand them. Reading someone elses not about free stuff; rather, open source
code in this context is difficult, dull and time Would proprietary be better? delivers the liberties that enable developers
consuming. Thats not a recipe for scrutiny Doing this with proprietary code would be with differing motivations and origins to
even with a large paid team. unlikely to make things better. Hiding a collaborate on a codebase without needing
Community too small: There is no large, development team behind NDAs and to ask permission from anyone other than
paid team. The whole community corporate secrecy, having their priorities each other, and even then only out of social
developing and maintaining OpenSSL was driven by unseen managers and keeping effectiveness. Throwing money at an open
no larger than 11 people before Heartbleed, code invisible to potential users all source project doesnt automatically make
with only one of them working full-time on constitute an anti-pattern for security anything better; that takes people with
the code. Despite being widely deployed, the software. In addition, the ability of open actual skills.
community did not receive regular source to bring all the best hands to the Heartbleed has shown us that open
participation from developers using problem once its identified would simply not source is no guarantee of invulnerability.
Fortunately, the crisis has highlighted a set
of needs that are being met in a way no
Throwing money at an open source project doesnt other approach would have allowed. Looking
automatically make anything better. past the crisis, its possible Heartbleed is
actually making things become better, faster.
6 www.linuxvoice.com
ANALYSIS
Canonical puts Ubuntu for Band releases album as a Its ofcial: Edward
4 Android project in limbo 5 Linux kernel module 6 Snowden is a Linux user
Ubuntu maker Canonical is This is charmingly silly. Many people suspected
ambitious with its plans to have the Netcat, a Seattle-based band that this all along, but now it has been
Unity interface everywhere: on phones, explores the intersection between confirmed that leaker extraordinaire
tablets, TVs and desktops. One part of technology, complexity and free Edward Snowden used Linux in his data
this convergence strategy has been improvisation has just kicked out a new gathering antics. Specifically, he used
kicked into the long grass though: album. But listening to it is a challenge: the Tails distribution, a highly paranoid
Ubuntu on Android. This was supposed you have to build a custom kernel flavour of Linux that routes all of its
to provide a regular Android experience module that creates a /dev/netcat internet traffic through Tor and stores
on your mobile devices, but when you device node that you can then pipe into everything in RAM (thereby leaving no
plugged them into a TV or monitor, an audio player. But be warned: if you trace of activity on a computers hard
youd get the full Unity experience. decide to go this far, youll need several drive). We still dont know if he prefers
Canonical has said it isnt dead, but gigabytes of memory to build it. See: Vim over Emacs though. Tails site:
theyll focus on Ubuntu phones for now. http://tinyurl.com/netcatmod https://tails.boum.org
www.linuxvoice.com 7
DISTROHOPPER
DISTROHOPPER
Weve tapped GCHQs communications to find out whats going on in distro land.
KaOS
A simple and elegant KDE.
K
aOS is about providing a simple,
clean KDE experience. In order to
achieve this, the developers have
slimmed the repositories to just over 2,000
packages. This is a minuscule number by
most distros standards, but it provides
everything most people will need.
By reducing the amount of software
available, KaOS creates a consistent
environment containing only what the
distros creators think are the best
applications for each task. In some cases it
enables you to deviate your environment
from pure Qt, so Firefox and LibreOffice are
available (though not installed by default).
The KDE interface is quite different from
the standard, and the focus seems to be on
keeping things simple. The developers have We cant think of a less appropriate name than KaOS for such a refined KDE experience.
managed to build a unique and slick desktop
without getting sucked into the pitfall of little difficult for new users to get to know full-time, as there just isnt enough software
adding too many graphical effects a trap the system. It is, however, a minor gripe on for us. Its not aimed at us though its
thats all too common on KDE distros. Our an otherwise excellent interface. intended to be a lean distribution, and thats
only criticism of the user interface is the lack Ultimately, we enjoyed experimenting with what it is, as well as being probably the
of tooltips on the menu. This may make it a KaOS, but we would struggle to use it best-looking KDE distro weve used.
Deepin
Deepin is more than just a great software centre.
T
he English-speaking Linux world has of the screen, a little like the way that
been a little slow to cotton on to the Android settings slide down from the top.
fact that Deepin has been a fantastic The biggest let-down for this reviewer was
distro for a few years now (its Chinese). It the Launcher (similar to Gnomes Dash). It
was among the first to feature a software spread the application icons out too thinly The slide-out settings and browser home page
centre for finding, reviewing, and installing and made it take too long to find what we are both great, innovative features.
software. The Deepin Software Centre has were looking for. Additionally, we wouldnt
always been one of our favourite apps in this recommend Deepin for lower-powered setup for easily selecting to search in Google
area, and the newest version is no exception. machines, as the performance is just a little or Bing for websites, videos, places, etc.
Deepin has its own desktop environment on the slow side. Deepin deserves more praise than it gets
built on web technologies, and it looks great. We really liked the attention to detail in for producing some cracking pieces of
The best feature for us was the settings some areas. For example, the home screen software. If it could just sort out that pesky
menu. This slides out of the left-hand edge of the web browser (Chrome) has a nice launcher, it would be a top distro.
8 www.linuxvoice.com
DISTROHOPPER
Makulu
A quirky distro for quirky people.
M
akulu comes with a number of
different desktops, including the
most recent release of Mate. All
of them are heavily themed with cartoon-y
icons and earthy colours, which give the
distro a pleasant, informal feel. Underneath
all this, Makulu is built on Debian, so there is
of course all the usual underlying Debian
software (plus a host of other repositories
including the ones from Mint, SolydXK,
Opera, Skype, various Google projects, Mate
and its own ones). In other words, theres
loads of the latest software available. Makulu means chief in Zulu a fact that helps explain the distros styling.
On launching Makulu, the first thing we
noticed was the office suite: Kingsoft. You thing about Kingsoft is that it has an are also notifications for most popular social
may not have heard of this, but its been interface similar to MS Offices ribbons. This networks.
around for a while (though the Linux version is a little controversial, but it could help Makulu isnt as polished as some distros,
is new. In fact, its still considered in Alpha). newer Windows refugees feel at home. For a and its strong personality will put some
Its not open source, but it is free (no cost) Linux user, a far more serious criticism of people off, as will the inclusion of non-free
for the basic version. The most noticeable this office suite (other than the fact that its (as in speech) and social media software.
closed source) is that it doesnt However, the developers have made some
support ODF files. bold choices, and thats refreshing to see. If
The Makulu developers have The web browser is Chrome, youre bored with mainstream distros and
www.linuxvoice.com 9
GAMING ON LINUX
GAMING ON LINUX
The tastiest brain candy to relax those tired neurons
B
ig news space fans!
Star Conflict, a free-to- The action
takes place in
play spaceship combat
Sector 1337 of
MMO has officially launched its
the galaxy
Linux version as promised. This
is one of our first major free-to-
play titles thats been released
Liam Dawe is our Games Editor and
the founder of gamingonlinux.com, from outside Valve.
the home of Tux gaming on the web. The graphics are simply
fantastic, which is surprising
W
ine enables us Linux users for a free game. It also doesnt
to run Windows shove anything into your
applications under Linux
face about paying for in-app
without the need for a Windows
licence. It sounds great, but it does purchases its all perfectly The game starts you off This is the first Linux game
come with its own set of drawbacks, optional, which is again very slowly to not overwhelm you from Star Gem Inc, and we
such as poor performance in certain surprising. You can buy extra with a few tutorials showing hope it will only be the start for
games; and some games may refuse credits for ships and paint jobs you basic flight and combat, them. See you in space!
to work without a lot of tinkering.
or buy downloadable content which it makes really painless http://store.steampowered.
A problem has arisen now that
Linux is gaining a foot-hold in the (DLC) packs from Steam. for you. com/app/212070/
gaming market: Wine Ports,
developers who bundle their game
with a copy of Wine and call it a day. I
know what youre thinking: Thats not
a Linux port!, and you are right. It
seems some developers are trying to
Counter Strike: Global Offensive
short-cut their way onto Linux like The next-generation of what was originally just a mod.
they do on Mac OS X.
D
Sometimes bottling Wine along o you see yourself as a
with a Windows game can be
counter-terrorism hero?
acceptable, if, for example the source
code to an older title has been lost; Or do you see yourself
we can live with that. This situation is as an evil terrorist? Well now
good because of two things: it gives youll get the opportunity, as
us a game we wouldnt otherwise get, Counter Strike Global Offensive
and it counts as a Linux sale to the
is coming to Linux. The news
developers to show them interest for
futures titles to be ported. comes as a result of the Reddit
The problem is when developers Ask Me Anything that Gabe
The AK-47 remains
look to cut corners and shoehorn a Newell (the owner of Valve and a favourite among
Linux version out the door without Steam) did recently. There is no
looking into porting it natively. This
discerning terrorists.
ETA, but Gabe assured us that
can be a problem, as these developers
could see poor sales due to using it is coming. With Valves
Wine and Linux users being wise to notorious Valve Time it could shooter boasting improved Game where you swap guns
that fact, the developers can then still be a while before it comes graphics, new game modes, on each kill. The last weapon is
easily claim Linux doesnt sell. to our beloved platform, so we support for weapon a knife, which doesnt make it
So I ask you dear readers, how do
just have to be patient for a customisation and a lot more. easy, but it does make it
you feel about Wine Ports? Let us
know on the Linux Voice forum. little while longer. One of the best parts of interesting
http://forums.linuxvoice.com CS:GO is a next-generation CS:GO is the frantic and http://store.steampowered.
police vs terrorists first-person fun new mode called Gun com/app/730/
10 www.linuxvoice.com
GAMING ON LINUX
L
uftrausers is an arcade-style aerial
combat game with some over-the-
top action from the well-respected
developer Vlambeer.
The game features over 125
combinations of weapons, bodies, and
propulsion systems offering you a lot of
customisation to keep you coming back Beatbuddy: Tale of the Guardians
for more. It also opens up different ways Your ears are in for a real treat with Beatbuddy:
to play each level as you try different Tale of the Guardians. The game is an
combinations to beat it, you can unlock exploration/puzzle game that involves music in
different colour-sets to play the game in to everything you do, with fantastic results. The
levels are all hand-painted giving it that extra
keep you interested. loving touch, and it really is a beautiful-looking
The game wont bring your PC to a game. Stop the evil Prince Maestro from
crawl either, so it should work on some stealing all the music!
older computers. As it uses so little in teh http://store.steampowered.com/app/231040
way of system resources, you only need a Luftrausers simplistic graphics and frantic
graphics card that has OpenGL 2.1, which gameplay remind us of 80s arcade machines.
is quite old now.
Luftrausers is a great timewaster for the and more. It lacks the glitz of a modern
armchair general to sit back comfortably FPS, but its full of charm.
with a game-pad in hand and annihilate http://store.steampowered.com/
some enemy planes, submarines, ships app/233150/
Unvanquished Xonotic
You might want to keep one eye to the The direct successor of the Nexuiz
Unreal Engine 4
Epic Games has unleashed hell on Linux as it
ceiling in this one. rst-person shooter project. has announced that Unreal Engine 4.1+ will
support Linux ofcially. Unreal Engine is an
extremely popular engine with big-name
developers, so this is some of the best news
we have had since Steam on Linux. Epic is
offering the engine at a low price with source
code access too.
www.unrealengine.com/blog/41-update-
preview
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
KERNEL HACKING
I picked up my first issue of Linux Andrew says: Youll be pleased
Voice [LV002] and was happily to learn that we have at least two
reading through it when I came more tutorials in the pipeline from
upon Dr Sinitsyns article on Dr Sinitsyn, on programming USB
kernel modules. What a wonderful devices and using PyParted. Theres
piece; clear, concise but still not much documentation for PyParted
comprehensive. out there at the moment, so were
Please, please give us more going to release that one as CC-BY-
articles like this it was a SA as soon as weve published it, to
wonderful gateway into the most enable more people to bask in his
fascinating part of the Linux awesomeness. And to everyone who
experience: the ability to tinker missed the kernel tutorial, weve just
with the kernel. put it up on www.LinuxVoice.com for Our introduction to kernel hacking took a scary subject and made
Pedro Pinto your perusal. it accessible, as you can see over at www.linuxformat.com.
12 www.linuxvoice.com
MAIL
www.linuxvoice.com 13
MAIL
FEATURE REQUESTS
Greetings from Down Under!
Well don on avoiding the
patronising Point here; click
here; to save the file, go to File,
then click on Save mentality that
you see elsewhere. I certainly
dont want to sit down to read a
magazine only to be told things An army of killer robots await,
that I could have worked out powered by Linux and Raspberry Pi.
for myself, as I consider myself
to have at least half a brain. I brilliant, but I want more give us
managed to install Linux didnt robots, give us supercomputers
I, and that was before Mandrake just keep it coming!
came along and made it easy, and
before Ubuntu came along and Andrew says: Thanks Sarah just
made everything work. The comet for you theres a Mars rover-style
hunting tutorial in LV003 was bobotics tutorial on page 78.
The Palace of
Westminster,
where the
Chanel No5 in
the executive
washrooms
never stops
flowing.
14
MAIL
GAMES
However, sometimes the display
doesnt refresh properly and needs Linux has finally
to be forced. May I offer a vote of thanks for come of age as a
Ive done a lot of HTML with your games coverage. Those of us gaming platform.
jEdit, of which this is an example: who remember SuperTux as the Praise be!
http://oklanature.com/ highlight of gaming on Linux are
docentnews/DNL-201403.html revelling in the number of quality
Andrew Shead games on Linux today.
Dave Evans, Pontypridd
Mike says: And this is the real reason
free software is so good: we can Graham says: Youre right there.
choose what we like, and use what we Were hoping that the Steam box in
want to create what we want. Jedit is particular will tempt people away from
still ugly as sin, mind. Windows and into the fold.
www.linuxvoice.com 15
LUGS ON TOUR
LUGS ON TOUR
SAPO Codebits
Josette Garcia has been in Portugal. Its a tough life sometimes
F
or the seventh time I went a 3D scanner (yes, a 3D scanner,
to sunny Portugal to attend the one thing that 3D printers are
SAPO Codebits. I am always missing).
surprised by the creativity of the The core of Codebits is a 48-hour
organizers. So what was in store for competition; people assemble
attendees this year? in groups and hack together an
There were 64 talks overall, and original idea in just 48 hours;
while there were talks on very throughout the event, these groups
diverse subjects, one could find are interviewed by the jury, which
unofficial tracks of 46 talks on selects the best projects for the final
one subject (gaming, security, stage presentation on the last day.
hardware, etc); there were also two This year the winning project
panels: one on game development was an open source Knee Lock
and another one on Portuguese for polio patients so that they can
For three days, 24 hours
Makers, at the end of which the walk safely without the typical Codebits; these included a three-
a day, 900 geeks were
organisers announced the first metallic gears that were once used; immersed in dozens of hour CTF security competition,
Portuguese Maker Faire, to be held the project was even featured on activities in the MEO a very funny geek quiz show, a
in September. Wired (www.wired.co.uk/news/ Arena in Lisbon. zip-line crossing the venue, and
archive/2014-04/25/codebits- even a competition of Nuclear Chili
Babbage rides again! nelo); the project used a lot of things made with Bhut Jolokia, which is
Among the speakers were Christian that were present at the event: 3D one of hottest chili peppers in the
Heilmann (Mozilla Foundation) and printers, Arduinos, gyroscopes, world (rated at more than 1 million
John Graham-Cumming (who is etc. Other projects delved into Scoville heat units, roughly 400
currently involved in a project to the realms of biosignals, VOIP times hotter than Tabasco sauce).
build Charles Babbages Analytical solutions, stock markets, automatic All of this put together, along with
Engine see plan28.org), along localisation for product managers, ~1,000 free meals every lunch and
with talks on building robots, a multiplayer version of the 2048 dinner and snacks and beverages
cryptocurrencies, web design, 5G, game and, of course, a version of available around the clock make
creating an OS, etc. There were also Flappy Bird hacked together with a Codebits an extraordinary event.
two sessions of Lightning Talks, Kinect that had the players jumping The website: https://codebits.eu
from freelancing to building arcade up and down in real life! The event calendar:
machines, via subjects as diverse There were also about a dozen https://codebits.eu/s/calendar
as Tor, pair programming, and even satellite activities at this years Some videos of the event https://
codebits.eu/s/page/videos.
16 www.linuxvoice.com
LUGS NEWS
Lincolnshire LUG
Dave Rice has news of a new user group.
L
incolnshire LUG is a new, away to reach, were left without a
virtual, online, user group LUG to call their own.
Lincolnshires
and is probably the first of After a year or two, Dave Rice and geographical spread
its type! Iain Baker, members of the original makes an online LUG
Lincolnshire is the second largest LincsLUG had a thought that a sensible option.
county in the UK covering nearly because of the distances involved
7,000 square km, with over 1 million it might be worth a try re-launching being the website, it will, hopefully,
inhabitants. It has a wide variety of the LincsLUG but as an online entity, become a source of information for
people living there; from farmers enabling Linux users in all parts of home users and businesses to find
to large agricultural industry, the county to get together using the information about Linux and how it
metropolitan areas to tiny hamlets internet to discuss their favourite OS can help them as well as find a
and, of course, its the home of the and the issues surrounding it. support network they can access at
Royal Air Force. With such a diverse no cost.
economy the county can benefit Here there and everywhere Lincolnshire is a beneficiary of
in so many ways with a larger The new LincsLUG website is the the rural broadband initiative the
understanding of Free and Open focal point of the group and is in the whole county should have super
Source Software. process of being put together using fast broadband by 2016, and many
The LincsLUG was initially set tools that encourage online local businesses are becoming
up many years ago to cater for the cooperation and enabling users to more reliant on the internet as
needs of the countys Linux users. communicate and have meetings. a means of doing business. So
It struggled, however, to become a We currently have a forum and an getting more Linux users will help
widely used asset mainly because integrated Facebook page. There is keep business costs down and
its members were all located large an aspiration to have an embedded productivity up. With a successful
distances from each other and real IRC channel and collaborative tools LUG as an advocate to business
meetings were difficult to organise. to enable common file storage and and providing a support network
Unfortunately, the LUG fell into dis- remote desktop help and support. Lincolnshire may well become a
use and membership faded. Linux We still aim to have real huge user of FOSS systems.
users in the City of Lincoln itself set meetings, but they will be less If you live in Lincolnshire, or just
up the superb Lincoln LUG, which frequent and hopefully in want to help us in our endeavours
is going strong; but the rest of the conjunction with existing LUGs in please visit http://lincslug.org.uk
county, where Lincoln is too far the area. With the central point and join us.
OpenSUSEConf 2014
Free Software makes it to Kings Landing.
A
pril marked the latest things; Technology development,
OpenSUSE conference, held and the much under-appreciated
on the glittering shores of Community and Project thread.
the Adriatic at at the campus of the This included a look at how
University of Dubrovnik in Croatia. OpenSUSE can market itself more
Free Software can be a lonely effectively; so well venture our
furrow to plough, so its essential for opinion here and say: more SUSE
projects to meet up regularly. beer please!
OpenSUSEConf 2014 comprised
four tracks: Business, which Video stars
concerened itslf mostly with The conference included 50
implementation of OpenStack and sessions, so even if you were there
OpenSUSE on ARM (we saw a you probably missed something
sneak preview of this at FOSDEM but youve not missed out, thanks
earlier in the year); End User, to the OpenSUSE YouTube channel,
with sessions covering the Jolla where you can see videos of the Once home to a medieval trading republic to rival Venice,
smartphone OS, among other event talks. Dubrovnik is now best known as a filming location in a TV show.
www.linuxvoice.com 17
FEATURE UBUNTU 14.04 RESPINS
UBUNTU
14.04 RESPINS
Love Ubuntu, but hate feature X? Mayank Sharma shows you
over a dozen different spins that make Ubuntu enjoyable again.
E
veryone has their favourite Ubuntu feature the distros installer, which is one of the best tools
they dislike. Privacy-conscious users loathe for the job, and Canonical is also responsible for
the Lenses feature. Desktop users get unleashing ideas, such as the Software Centre
irritated with the window controls on the wrong and Ubuntu One, that have helped change the
side of the window and the overlay scrollbars. And perception of Linux as a desktop OS.
Gnome 2 users cant bring themselves to forgive As the distro unveils its next Long Term Support
the distro for ruining their usability with the Unity release, we introduce you to some of the distros
desktop and the lack of customisation options. that have stood on the shoulder of giants, remixing
But for every feature thats rubbed users the the best of Ubuntu with the much wider open
wrong way, Ubuntu has contributed several useful source community to create several refreshing new
ones thatve benefitted the community. Theres flavours of what Linux can be.
18 www.linuxvoice.com
UBUNTU 14.04 RESPINS FEATURE
Ultimate Edition
Do you want one with everything?
The aptly-named Ultimate Edition distro is Avidemux video editor and Blender for 3D
loaded with tons of Free and proprietary modelling. For package management, the
software. The latest version is based on distro bundles the Ubuntu Software Centre
Ubuntu 14.04 and uses the Mate desktop along with the Synaptic package manager.
with custom theme, icons and pointers.
The distro has multiple apps for Script customisation
accomplishing the same task. In some The most unusual aspect of the distro is its
cases, the multiple applications cater to collection of custom scripts for performing
users with different experience level certain desktop-oriented tasks. The scripts
for example, theres Google Chrome for can all be accessed from the right-click
regular desktops and Elinks for advanced context-menu, and you can use them to
users. Users with ninja-level skills can use quickly shuttle files to another pre-defined
ImageMagick instead of firing up Gimp location, convert images to different
to tweak images. Theres also LibreOffice, formats, mount ISO images, search for files
Blender, multiple screen recorders, VLC in the current folder, and browse the current The latest version of Ultimate Edition is built
media player, XBMC media centre, the folder as the root user. from a debootstrapped Ubuntu 14.04 release.
PinguyOS
PeppermintOS
If you have dumped offline apps and and the featherweight Guayadeque PinguyOS is different from the which combines features of
can work with the current staple music player for MP3s. others in many ways. For both the modern and the
of online apps, PeppermintOS is a Another lightweight app is the starters, it tags its six-monthly traditional application menu.
wonderful alternative to ChromeOS. Mirage image viewer. The distro also
releases based on the current PinguyOS also includes Ubuntu
Its fast and is equipped with the includes several online tools such as
necessary tools to get the job done. Editor by pixlr.com and a bunch of Ubuntu release as Beta releases. Tweak and the Gnome Tweak
The current stable version is games. Theres also PeppermintOSs Only PinguyOS releases based tool to help you configure many
based on Ubuntu 13.04 but the home-brewed app called Ice, which on an Ubuntu LTS are different aspects of the desktop.
next version, Peppermint Five with is a simple app that can turn web considered stable.
be based on Ubuntu 14.04. We sites into web apps and roll them
base each version of Peppermint into the menu.
PinguyOS is designed to Game management
on the April release of Ubuntu. For package management the appeal to users who are new to Gamers will enjoy the inclusion
While we dont follow a strict distro relies on Mints Software Linux. The developer has of the Steam client, PlayOnLinux
release schedule, new versions of Manager. Weaver and his team modified the default Gnome front-end for Wine and the DJL
Peppermint can usually be expected prefer the interface and user installation with some game manager, with which you
each May or June, explains experience of Mints software
extensions. Thanks to these you can download and install several
PeppermintOSs lead-developer manager as compared with
Kendall Weaver. Ubuntus. Weaver would also can place icons and folders on free, freeware and shareware
The distro uses the Chromium consider Lubuntus software centre the desktop, and can minimise games. The distro also includes
web browser equipped to handle if it werent for the ratings, reviews, windows. The distro has also several proprietary applications,
Flash content. Multimedia duties are and ease of categorisation of Mints swapped Gnomes Activities such as Dropbox, Skype and
handled by Gnome MPlayer for video software manager.
Overview with the GnoMenu, TeamViewer.
www.linuxvoice.com 19
FEATURE UBUNTU 14.04 RESPINS
20 www.linuxvoice.com
UBUNTU 14.04 RESPINS FEATURE
Zorin OS
LinuxLite Zorin OS isnt the first distro the best desktop operating
LinuxLite is designed for people to run Steam. LinuxLite is one of thats aimed at easing Windows system for Linux newcomers,
who are new to Linux, and is ideal the few distros that includes a Help users into a Linux distro. with emphasis on Windows
for under-powered machines. The Manual complete with an illustrated
Lindows and Linspire are users making the switch to
distro is intuitive to use and is installation and post-installation
based on Ubuntu LTS releases. To user guide. probably the best-known Linux, explains Zorins lead-
acclimatise users, LinuxLite runs a While the distro uses the examples of distros that have developer Artyom Zorin.
heavily modified version of the XFCE Synaptic Package Manager, it also tried (and failed) to put a familiar Zorin OS is based on the
desktop environment. includes menu entries to quickly face on top of a Linux distro. latest Ubuntu release. The idea,
Despite its name, LinuxLite ships install frequently used apps and
But Zorin OS, with its Gnome Artyom explains, is to build
with lots of software including packages. You can, for example,
Thunderbird, Gimp and Firefox with install individual pieces of software desktop modified to resemble on the greatest that Linux has
the Flash plugin and in the Games such as the Deluge torrent client, Windows 7, does an admirable to offer and package it into a
menu you get links to buy Humble the Steam client and VirtualBox, as job of lowering the learning system that anyone can use
Bundle games, along with an entry well as bundles such as the games curve for new users. Zorin OS without learning anything new
that displays essential information pack, IA-32 libs, multimedia codecs
was built with the goal of being thanks to its familiar interface.
about the hardware requirements and more.
ElementaryOS
But of course!
If you think Linux distros cant be pretty, many free desktops are highly customised
check our ElementaryOS. The distro uses setups. Another example he highlights is
custom icons, custom themes and custom that of the Granite library that hosts
apps to produce a beautiful Gnome-based commonly used complex widgets that
desktop. The distro includes apps like the hadnt made their way into GTK, like the
Shotwell photo manager, Empathy IM, TabBar, search bar, popovers, etc. This
Totem movie player, and Gparted and quite ensured consistency across apps and
a few custom apps including the Scratch centralised the development of UI elements.
text editor and the Geary mail app.
The first Elementary app was its file Dedication to beauty
browser, which was created because we Elementarys Gala window manager is built
simply werent happy with the interface and on LibMutter, which offers the developers ElementaryOS will appeal to new as well as
features provided by the available browsers, more control and better performance than regular Linux desktop users.
explains the distros lead developer Daniel Compiz. They wrote the stylish top panel
For. The same story played out for our they wanted to be in the same ecosystem GTK+ apps, which is why we dont ship
Music player, Calendar, and the prototype as the Ubuntu app indicators without using apps like LibreOffice, Firefox, Thunderbird,
mail app we started work on before Yorba Unity. In short says For, we end up writing etc. Package management is handled by
came out with Geary. apps because were just not happy with the Ubuntus Software Centre. The distro uses
According to For, the customisation also quality or architecture of existing solutions. Ubuntus repos, but also has a PPA of its
extends behind the scenes. The project One surprising element in the distro is own for providing updates for the custom
created a service called Contractor because the use of the Midori web browser instead apps, as well as for apps and libraries that
the team wanted the apps to be of a more mainstream browser like Firefox the developers think are important. In
interconnected and extendable without or Chromium. We have a strict dedication contrast with Ubuntu, we continue to make
requiring developers to know which other to providing a consistent, native experience both bugfix and feature releases of apps
apps were installed on a system, since so in elementary, explains For. We only ship throughout the life cycle of the OS release.
www.linuxvoice.com 21
FEATURE UBUNTU 14.04 RESPINS
Centrych
Get the best of both worlds.
Heres a distro that lets you run KDE apps The distro uses the Xfce desktop
but has the footprint of an Xfce distro. environment with two distinct profiles. The
Centrych OS lets you run both Qt and GTK default profile has the look of KDE along
apps but without the usual bloat that with the Oxygen theme, while the other
accompanies these libraries. provides the GTK look of Xubuntu together
Explaining his motivation for labouring with the Greybird theme.
on the distro, Centrychs developer Jack Centrych has also swapped out the
Radigan says: I felt that there was an unmet default Xfce menu with the Whisker menu.
need for an easy-to-use, single desktop Radigan also hopes that the distro appeals
designed to support applications written to XP users whod rather not toss their
for either the Gnome/GTK and KDE/Qt hardware investment after Microsoft halts
environments. KDE can support both, but security support. With Centrych you can use popular KDE and
its a much more complex environment Gnome apps on machines that cant power the
and I wanted to provide a simpler, more KDE and Gnome full desktop environments.
accessible alternative. Both profiles give you access to the best of
Im targeting a mindset rather than any Qt and GTK apps. Theres the Clementine He also provides updates for the nearly
specific audience, says Radigan. Theres music player and Kopete IM along with 300 packages that have been modified for
quite a few capable productivity applications Gimp, Gnome System Monitor, VLC media Centrych. For everything else, he relies on
today, some written for Gnome, some for player, LibreOffice and Firefox. For package updates from upstream Ubuntu.
KDE. Those who prefer using the best from management you get both Synaptic and the Radigan is currently working on the
both worlds should give Centrych a try. Ubuntu Software Centre. next version based on the Ubuntu 14.04
Radigan started the project with the The distro is based on the Ubuntu 12.04 LTS release. This release is about refining
intention of creating a lightweight GTK- LTS release, but Radigan makes sure that whats currently in place, since its only been
based distro that could run a few Qt apps users get the latest versions of certain high- about a half year since the first release
without running into dependency issues. profile apps such as Gimp or LibreOffice. came out.
Zentyal
Bodhi Zentyal has all the components management tools. Zentyal
If you like to build your distro by the Enlightenment desktop you need to run a gateway goes the extra mile to help you
hand, but dont want to go the environment, which manages to be server, an office server and a configure the different servers
extreme of Arch or Gentoo, then both responsive and beautiful at
communication server. Its got and services without mucking
Bodhi Linux is for you. It ships with the same time. According to Bodhis
a small number of apps, and you Jeff Hoogland, Enlightenment has the Apache web server, about with configuration files.
can add more using the distros resource usage that is comparable OpenLDAP directory server, Bind Once the distro is installed,
web-based software installation tool to LXDE/Openbox while being far DNS server, Jabbered2 IM it will start a configuration
called AppCenter. Using the tool you easier to customise By building Server, Zarafa groupware, wizard to help you setup the
can also download packages on any on top of Ubuntu LTS releases
Asterisk VoIP and DansGuardian server. From here you can install
machine and then bring them over Bodhi allows users to have a rock
to Bodhi for installation. solid base operating system that for content-control individual server packages, or
Bodhi uses the current Ubuntu doesnt need a reinstall or a massive management and a lot more. modules in Zentyals parlance,
LTS release as a base and adds upgrade every six months. You can monitor and control or select predefined groups
the various components of the such as Gateway, Infrastructure,
server using the distros custom Office, and Communications.
22 www.linuxvoice.com
UBUNTU 14.04 RESPINS FEATURE
Ubuntu Gnome
The Gnome 3-based spin is the latest
addition to the Ubuntu stable of official
derivatives. It includes popular apps such as
LibreOffice, Evolution, Shotwell, Rhythmbox
and Totem. However, instead of shipping
Gnomes default Epiphany web browser
(now rechristened simply as Web) Ubuntu
Gnome includes Firefox. The distro is also
missing some other Gnome tools like the
Boxes virtualisation app. To help you
Over the years Xubuntu has become the go-to distro for Gnome 3 and Unity refugees.
customise its Gnome desktop, the distro
includes the Gnome Tweak Tool app.
Ubuntu Gnome 14.04 is the first LTS Calligra Office suite and instead ships the which can play most popular formats
release for the project and will be supported more popular LibreOffice. including MP3s, AVIs and MP4s.
for three years as opposed to the five years The latest release, Kubuntu 14.04, is The developers of Lubuntu have created a
for Kubuntu. This latest release will ship with based on KDE 4.13. One of the many lightweight version of the Ubuntu Software
Gnome 3.10, which was released back in improvements in this release is that the Centre called the Lubuntu Software Centre.
September. If youre interested in the latest Additional Drivers app has been replaced The tool also has an Expert mode for
Gnome 3.12 release, you can upgrade to it with the all new Driver Manager, which installing individual libraries. Lubuntu 14.04
using the Ubuntu Gnome teams PPA. enables you to install and select the will be the distros first Long Term Support
drivers you want to use. The built-in release and will be supported for three years.
Kubuntu recommendation software will notify you
This is the oldest and one of the most when better drivers are available for your Xubuntu
popular spins of Ubuntu, offering the KDE hardware, including proprietary ones. Another spin thats designed for relatively
desktop. The distro includes KDE apps older hardware is the Xfce-based Xubuntu.
including Kmail, K3b, Amarok and Dragon Lubuntu The 14.04 release of Xubuntu uses the Xfce
Player in Kubuntu as well as ther popular If you want Ubuntu goodness on an projects latest desktop manager, Xfdesktop
apps such as Firefox. It skips the KDE office under-powered computer, theres Lubuntu, 4.11. This release will use the Mugshot user
which is based on the LXDE desktop account profile editor and the Light-locker
environment. The distro also replaces screen lock instead of Xscreensaver.
heavyweight apps with lighter alternatives. The distro will also switch to the Whisker
This is why Lubuntu includes AbiWord and menu launcher. Not surprisingly, Xubuntu
Gnumeric instead of LibreOffice. doesnt include a full-fledged office suite, but
Lubuntu ships with some GTK apps such rather the AbiWord word processor and
as the Evince document viewer, Archive Gnumeric spreadsheet. Surprisingly though
Manager and mtPaint image editor along it includes Gimp and other popular apps
with featherweight apps that go with its such as Firefox, Thunderbird, Pidgin and
LXDE desktop, such as the Leafpad text Transmission. There are some lesser known
editor and PCManFM file manager. apps as well, such as the gmusicbrowser
Lubuntu also has the Sylpheed email jukebox, Parole media player, and Ristretto
Lubuntu is the lightest official Ubuntu spin that client as well as the Firefox web browser. Its image viewer. The distro uses the Ubuntu
performs well on older hardware. also got Audacious and Gnome MPlayer, Software Centre for package management.
www.linuxvoice.com 23
FEATURE UBUNTU 14.04 RESPINS
Netrunner
The drop-in Ubuntu replacement.
Dont let its name fool you. Although the
distro has tools to consume online
information, Netrunner can be used
productively offline as well. In fact, the
distribution does a pretty nice job of
bundling the new online apps that run within
a web browser and need a connection to the
internet along with traditional offline apps
for regular heavy-duty desktop tasks.
Netrunner is based on KDE, but that
doesnt mean its just another Ubuntu-based
distro that has bolted KDE in the place of
Unity. Unlike Kubuntu, which ships with
more or less a stock KDE release, Netrunner
has exploited the desktops customisability
to the hilt and ships with a much more
attractive and functional environment.
The developers put in considerable effort
to chip away the rough edges of the default
KDE environment and make the desktop
appealing to new users. The Netrunner
desktop follows the standard desktop
metaphor with a few refinements. Instead of
switching to a revolutionary new desktop, The distro has all the usual sources for dispensing help and also publishes an online magazine
Netrunner has introduced subtle
refinements to the existing elements. volume), an analog clock and the media 2GB of free space that you can use to store
The distro uses a modified version of the player, which can playback any media even data, pictures, contacts, calendars, and
Homerun launcher, known as the Homerun when hidden. You can bring up the side stream music via its Android app.
Kicker. Unlike the full-screen Homerun panel with a pre-defined gesture. Netrunner Netrunners Webaccounts app helps you
launcher, Homerun Kicker resembles a also includes the Easystroke tool, with which integrate Runners-ID to the respective native
traditional launcher menu and is designed to you can define your own custom actions KDE app. In addition to Runners-ID, you can
be operated by the mouse, keyboard and and gestures to activate them. also use the Webaccounts app to connect to
even touch. Along with the traditional and pull in data from other online services
cascading popup menus, Homerun Kicker Full-service distro such as Facebook, Google, and OwnCloud.
also includes a sidebar strip where you can You can use Netrunner straight out of the If you need to flesh out the default
pin your favourite apps. Theres also a box. The distro is chock full of apps, both software in Netrunner, you can do so using
search box that mines several different Free Software and proprietary. Theres its three package managers. Experienced
sources of data. Skype, Dropbox, Thunderbird for email, and users can use the old school Synaptic
Another useful feature is the side panel. the Firefox web browser is equipped with Package Manager and new users can use
This is a normal Plasma Panel that includes plugins to play Flash, Java as well as the Muon Discover or the web-based JackNJoe
the Veromix widget (to control sound AdBlockPlus and DownloadHelper add-ons. service to install packages.
The distro also ships with codecs to play
all sorts of audio and video content and A magazine about Linux!
includes the Clementine music player as Help on the distro is dispensed via online
well as VLC. Along with the LibreOffice suite forum boards on its website, which also
theres also Calligra Flow. Netrunner also includes quite a few demonstration videos
includes the Wine compatibility software for and screencasts. The developers behind the
running Windows apps, and the Wine Tricks distro also publish an online magazine called
utility, which can download and install Netrunner-Mag.
several popular proprietary apps. For the The Netrunner distro is perhaps one of the
gamers out there, Netrunner includes the most underappreciated ones, lying at the
Steam installer. #59 on Distrowatch.com. All things
One of the best cloud-oriented features of considered, Netrunner is a polished KDE
Netrunner ships with a beautiful rendition of the distro is the integration of its Runners-ID offering and offers one of the smoothest
the KDE desktop. cloud storage service. The service offers user experiences.
24 www.linuxvoice.com
UBUNTU 14.04 RESPINS FEATURE
UberStudent
Trisquel UberStudent uses the Xfce Open Library. Another category
A typical Ubuntu installation LXDE desktop. The distro is based desktop and includes a is Personal Finances, which
has several proprietary bits and on the Ubuntu 12.04 LTS release. It wonderfully curated points to the online Mint
blobs, mostly to support the latest uses Gnome 3.4.2 and runs in the
combination of hosted apps and Personal Financial Manager app
hardware particularly graphics fallback mode to offer the traditional
cards. Not surprisingly, the Free desktop experience. online ones. For example, the and also helps you keep costs in
Software Foundation has guidelines Trisquel has all the apps that Books menu points to the only check by pointing to websites
that define a free distro. There are youll find in other distros, such installed app, which is the that let you buy used books, rent
a couple of distros that adhere to as Evolution, Pidgin, Gwibber, FBReader ebook reader. The new ones, and even search for
those strict guidelines at the cost Transmission, LibreOffice, Gimp, etc.
other entries in the menu are to deals on Air fares. The distro
of usability. Trisquel, however, is a The one oddity is the web browser:
wonderful exception. Trisquel ships with Abrowser, which various online resources where also has a handful of games and
Trisquel is available in several is the unbranded version of the you can find ebooks, such as other general-purpose utilities.
editions. The main release is a Firefox web browser. The developers
700MB installable CD, which uses have also modified the browser to
the Gnome desktop. Theres also fetch add-ons from Trisquels own
a 500MB mini edition designed for repository instead of Mozillas, which
older hardware, which uses the houses some non-free add-ons.
Emmabunts
The kitchen sink flavour.
Emmabunts was designed to ship with make the distro suitable for young users
reconditioned computers assembled by wholl also enjoy the plethora of educational
humanitarian organisations from donated apps and games, including the OOo4Kids
pieces of hardware, and owes its name to office suite for children.
the French Emmas charitable movement.
However, itll fit snugly on any desktop. All about choice
The current version of the distro is based The distro also does a nice job of educating
on Xubuntu 12.04.4. Since many of the its users about the proprietary components
intended users of the distro wouldnt have before installing them. Emmabunts
access to the internet, the distro is bundles the proprietary apps but doesnt
overflowing with apps. Emmabunts install them by default. The Cairo Dock is
includes virtually every popular open source one of the highlights of the distro, according Emmabunts can easily install proprietary
app and also includes all sorts of proprietary to its lead developer Patrick. The distro ships software without a connection to the internet.
codecs and apps. No wonder then that it is with three variants of the dock and you can
available as a huge 3.3GB ISO image. switch between them from within the distro on Xubuntu 14.04. Once the new version is
In addition to regular desktop apps such itself. The default Simple version is out, the previous release will get updates
as LibreOffice, Gimp, VLC media player, designed for new Linux users, a Kids every six months until April 2017.
OpenShot video editor, RecordMyDesktop version is meant for children and a Full Xfce desktop and the Cairo-Dock make
screencasting app, there are apps for power version for experienced Linux users. the desktop very approachable to a far wider
users such as BootRepair and VirtualBox as According to Patrick, the team will userbase than its intended audience a bit
well as Wine, WineTricks and PlayOnLinux. maintain the current version, Emmabunts 2, like the way every Ubuntu spinoff in this
The distros two web browsers, Firefox and for another year with release updates every feature has taken the fantastic features of
Chromium, ship with lots of plugins to block three months. During that year we will Ubuntu to a wider audence than Ubuntu
ads and prevent phishing attacks. This helps stabilise Emmabunts 3, which will be based could have reached on its own.
www.linuxvoice.com 25
FEATURE KANO TO ENABLE?
TO ENABLE?
What is the Kano project, and how does it enhance what
the Raspberry Pi is already doing? Les Pounder finds out.
T
he Raspberry Pi has been with us for over two educational environment and enable children to learn
years, and in this time there have been many more about computing.
projects created using this board. Projects However Kano approaches this issue in a different
such as Pi Supply, MotorPiTX and PiGlow have aided manner by creating an intuitive computer lab in a
many hackers in their quest to build something new box, that is built around the Raspberry Pi. The design
with their Pi. And herein lies an issue that resides at and production of the Kano products, such as the
the heart of the Raspberry Pi Foundation. The original accessories, step by step book and stylised packaging
goal of the Raspberry Pi has stood the project out
and the Foundation itself,
was to create a low-cost
Kano creates an intuitive in a sea of many
derivatives but the Kano
educational tool enabling computer lab in a box, that is project has also
children around the world
to learn computer
built around the Raspberry Pi. polarised the Raspberry
Pi community, with
science, programming some seeing the project
and electronics. Its success in this goal is steadily as riding on the success of the Raspberry Pi, while
being realised by an ever-growing education team, and others are looking forward to using the kit in their next
at the start of April 2014, the Foundation updated its project. Read on and decide for yourself
website and included a series of tutorials, written for
absolute beginners to follow. This update was also History of the project
supported by a series of training sessions, called Just over a year and a half ago Alex Klein was
Picademy, for 24 teachers from across the UK. These completing his graduate studies in computer science
sessions sought to spread the concept of using the Pi at Cambridge University and working as a writer for
in education via a carefully curated lesson plan. Newsweek and The Daily Beast in the US. During this
The Kano team have a similar goal to the Raspberry time he ran into Eben Upton. Eben and Alex got to
Pi Foundation: they wish to use the Pi in an know each other bit and they discussed how
26 www.linuxvoice.com
KANO TO ENABLE? FEATURE
Democratisation
Were living in a time where a small Linux board is model, something which is inherently intuitive for On the last weekend of
cheaper than a textbook, you can get internet children to follow. In the book, Kano covers simple July 2014, 16,000 people in
anywhere and you can learn almost anything for free steps and projects such as how to connect your 87 countries will open up
online and yet I look around to my younger siblings Raspberry Pi, how to run your first script and how to an end-to-end, Raspberry
Pi-powered kit, with a
and friends and realise that we have no idea what is watch a video from YouTube. The book uses a simple
Debian Linux brain and
going on inside our devices and these devices control vocabulary to ensure that any level of reader could
dozens of projects to get
almost every aspect of our lives, Alex later told us follow the steps. them started right away.
about his early inspiration.
Alexs older cousin Saul introduced him to Yonatan Testing the project
Raz-Fridman, who would become another Kano The Kano project began to make kits, comprising the
co-founder. They picked up some Raspberry Pis, and book as well as the SD card with custom Kano OS,
wanted to see how a real life kid would use the kit so keyboard and all the cables to connect a Pi to a
they went to Alexs little cousin Micah and asked monitor. Once they were in a position to beta test they
What do you want to build with this? to which he took early prototype kits to schools around the UK.
replied A Computer. Alex and Yonatan tried to do that Their goal was not to teach a lesson, but to see if their
with him, but it was really quite difficult and Micah kit was intuitive enough for children to learn via
was quickly flummoxed. Alex and Yonatan asked discovery. Alex and his team would walk in and say to
themselves about what could be done about this, and the kids In the next hour you are going to build a
Micah replied Make this as simple to use as Lego. computer, make games and make music. And guess
That led the project to start writing a step by step what? I wont need to teach you how to do it, you are
book similar to those used when building a Lego going to do it by yourself using these kits
After the first workshop using these early
prototypes, it was clear that it was a success and that
children enjoyed using the kit. Alex happily recalls
receiving feedback from one of the children A child
named Khalid who was nine years old said to Alex and
the Kano team Adults believe that we are incapable
because we are young, but today we made a
computer so that makes us Super Children.
Kano believe that this kind of learning will help
children to find a way to make open source and
hardware hacking feel to them, not like a chore, but
like a game. Alex went on to say: We felt that it
should be like crossing a Commodore 64 with a
Nintendo 64 with the benefits that each brings.
From here Kano worked with industrial designers to
create the physical aspects of the kit, like the speaker
and modular case. Alex goes on to say We had what
we thought was a pretty sexy piece of kit, and we then
took it to Kickstarter to help fund our growth. We
wanted to make around 1,000 kits, which would cost
Alex Klein, computer scientist and Kano founder, proudly us 95 to make. So we wanted to crowdfund the
wields the Kanos speaker module. investment necessary to build this many kits.
www.linuxvoice.com 27
FEATURE KANO TO ENABLE?
Alex says of the responsibility to bring something new, fun and truly
Kano OS interface: pedagogically sound to market.
We basically put a Kanos operating system is based on the rock-solid
little extra polish and base of the Raspbian teams hard work. Pretty much
usability in a sort of everything that you can do with Raspbian, you can do
Ubuntu style fashion using Kano. Alex was keen to tell us more about the
on an already user interface.
excellent stack,
Raspbian.
Kano OS
From a user perspective the interface is different to
Raspbian. We have a beautiful apps layer with apps
that are very much catered to beginners, but they are
also a lot of fun to use. Kano also comes with a suite
of user-friendly tools to make your first project a little
bit more simple. The simplicity enables you to focus
more on the code rather than the application.
Kano is also the first project to integrate a visual
programming language with Minecraft, using the
Minecraft API to enable the use of Python to create
new content in the Minecraft world. The process is
similar to the functionality of Scratch, where you drag
code blocks to build your program. These blocks are
On 19 November 2013 the Kano team had a launch then translated in to Python or JavaScript which is
party with friends and family. Alex talks about then output via the Minecraft API to the Minecraft
launching the Kickstarter During the party we decided world. Alex explains So with this you are getting this
to press the button on our Kickstarter campaign and really cool side-by-side view of what you are coding,
something wonderful happened. The demand was be it a building or a volcano, and you can see the code
fantastic: we wanted $100,000 and we managed to that made it possible.
raise that in 19 hours. After 30 days we raised $1.5M But Kano is not just a shiny new interface and some
including support from Steve Wozniak, co-founder of simple applications: the back-end of Kano OS has
The Kano kit has 21 unique
components, all of which Apple, and Yancey Strickler, the co-founder of other improvements, Alex explains Behind the scenes
are either designed top-to- Kickstarter. Alex then goes on to say At this stage we weve really increased the speed of Kano with a 50%
bottom or reskinned. were blown away, but knew that we had a increase in speed for the browser, GTK, Linpack and in
the overall boot time, compared to stock Raspbian.
Kano also simplifies the configuration across the
operating system, from Wi-Fi, to the desktop manager,
to keyboard and audio configuration. These
simplifications are welcome to new users who just
want to experiment with the platform or are unfamiliar
with a Linux distribution.
Open source
These improvements are not exclusive to Kano, as the
team intend to share their work with the community.
As Alex explained about the teams plans, We are an
open source software company and our
improvements will be pushed upstream to the Debian
kernel. Well also share our projects and educational
content back upstream.
The team have already opened most of their GitHub
repositories, and the full OS source is readily viewable
in the image. During the course of our conversations
with Alex it came across very clearly that Alex and his
team are giving back to the Raspberry Pi community
despite what some have said.
Alex explained, Were giving back with apps a
beautiful desktop manager, intuitive system settings,
a smart package system, etc that significantly
develop the platform, as well as games and projects
that are accessible and awesome.
28 www.linuxvoice.com
KANO TO ENABLE? FEATURE
www.linuxvoice.com 29
FEATURE CODE CLUB
mid!Gdivnw|
avklnoavhiejbnv
n!@+inowhvqo;j
`][owpe_
icoeqwj%ioejoias&#
`][owpe_
icoeqwj%ioe
mid!Gdivnw|
`][owpe_
nowhvqo;jbmnlknio
GENERATION
icoeqwj%ioe
icoeqwj%ioe
lmno;alajkb
mid!Gdivnw|
Nine-year-olds`][owpe_
are getting theavklnoavhiejbnvn!@+inowhv
chance
k `][o mid!Gd
to learn programming and they love qo;jbmnlknio;~k
it. But for everyone to get a chance,
icoeqwj%ioe lmno;alajkb
more volunteers are needed, finds mid!Gdivnw|
kb avklnoavhiejbnv`][o
Richard Smedley. `][owpe_
icoeqwj%ioe
pe_ I mid!Gdivnw|
lmno;alajkb
f youre reading this magazine, then you most more than a decade, but with a much more limited
oe
probably know the value of code, of people being audience. Campaigners such as Clare Sutcliffe and
`][owpe_
able to code, and perhaps most importantly of Linda Sandvik, who came up with an idea for giving
understanding that coding is a creative activity, every child between the ages of nine and 11 the
icoeqwj%ioe
bringing frustration and joy, and the chance to fail opportunity to learn coding: Code Club.
safely. Now, imagine every child getting the chance to The essence of Code Club is an after school club (in
find that out at a young age. school, or another safe environment like a library), for
Coding in schools nine and ten year-olds,
became a hot topic a
couple of years ago,
Imagine every child getting with a volunteer
programmer using
famously with Google the chance to find out about the freely-licensed teaching
chairman Eric Schmidt
giving the 2011 value of code at a young age. materials.
Code Club is an
MacTaggart lecture at organisation thats in the
the Edinburgh Television Festival, where he said: I right place at the right time, and its rapid growth has
was flabbergasted to learn that today computer been in large part due to word-of-mouth advertising of
science isnt even taught as standard in UK schools. how well kids take to its lessons. Theyre designed to
Your IT curriculum focuses on teaching how to use draw children in, and get them being creative, learning
software, but gives no insight into how its made. That the coding side by osmosis as they have fun.
is just throwing away your great computing heritage. To check this theory we asked a ten-year-old Code
This gave a valuable boost to campaigners in the Club participant what she liked so much about it. She
tech industry whod been saying the same thing for told us: Its fun. You get to make games, like Flappy
30 www.linuxvoice.com
CODE CLUB FEATURE
v
j MIT Scratch
k
Scratch is a deceptively simple visual both of new FOSS projects, and new FOSS
programming language and multimedia coders. How many learners will go on to
authoring tool developed at the MIT Media become Free Software programmers is not
b
Lab. Platform neutral, and GNU GPL licenced, really the point (although some undoubtedly
it enables learners to mix chunks of code will); rather, Scratch immerses young people
before theyve really learned what theyre into a community where sharing (and
w|
doing, giving instant results. Colourful re-mixing) code is seen as natural, and is
graphic sprites and amusing sound effects a great antidote to more than a decade of
add to the fun. schools teaching PowerPoint and Excel.
_
Yet this is no dumbed-down language:
building on Squeak/Smalltalk roots, its a
o;~k
fully-featured and powerful language, and as
e
children go through projects, experimenting,
they start to pick up code in a similar way
to an earlier generation did by typing in
Soho Parish School and volunteer Simon Wharton, who
program listings from 8-bit micro mags.
started one of the first Code Clubs.
As well as all of the open source Code
lajkb
Club projects, the Scratch website hosts
Bird. You get to learn lots of new stuff. Theres lots of over 5,000,000 projects. Any young learner
stuff to explore and its fairly easy, because anyone can click a button in the Scratch interface Right from the first lesson, kids are
can start it. She actually used the phrase its fun to upload their project and CC-license it using event-driven, Object-Oriented
making Scratch perhaps the largest creator programming.
several times, so were happy to take Code Club at its
divnw|
word on this point.
owpe_
schools by its second anniversary this spring but its and adding some exciting JavaScript stuff in. We are
matched by its ambition for the future. One of Code also writing lots more Python projects! Laura Kirsop,
Clubs missions is to get Code Clubs into 25% of Code Clubs Managing Director told Linux Voice.
primary schools by the end of 2015, which is a huge Materials should also get a rejig to allow less linear
target, says Sam Milsom, Code Clubs General progression, so children can join more easily mid-way
wj%ioe
Manager. The demand is there, with 700 schools through term, and, Milsom tells us, volunteers can
signed on that are still waiting for a volunteer. In pick and choose what to teach. In fact, volunteers are
response to this, Code Club has accelerated the already generating great material of their own, from
release of all of its teaching materials under a Creative those bringing in Arduinos and MakeyMakey boards
Commons licence: which will allow teachers to use (with the celebrated banana keyboard www.youtube.
them themselves; it will allow parents to use them to com/watch?v=rfQqh7iCcOU), to more unplugged
teach their kids at home, and so on. exercises. One volunteer developed a coding role-
Terms 1 and 2 use Scratch to teach the basics of playing game, Sam Milsom tells us, where for one
programming. Term 3 teaches the basics of web lesson the children didnt even sit at a computer. He
development using HTML, CSS, and a little JavaScript. developed an RPG and theyd speak out and act out
Term 4 teaches Python. As we go to press, the the programming language. And he said it was
possible content of term 5 and 6 is still under incredible, because it got them to think about it in a
discussion, as Code Club is in the process of different way, rather than just following instructions,
and typing things in, they were really enacting it.
Milsom adds: Our first two terms of Scratch were
sort of crowd-sourced, and our third and fourth terms
we had one person working on them. Obviously we
use GitHub to host all of our projects, so the
community do contribute, and were hoping now that
weve opened up our projects that will happen a lot
more. Not just in terms of updates, but suggestions,
and a lot of the community create their own projects,
so again the opening of the projects will allow this to
happen a lot more.
Volunteer effort
Weve got an abundance of schools wanting Code
Code Club Pro trains teachers for the new IT curriculum Clubs, Milsom tells us. The problem is finding
but still keeps much of the fun that after-school Code volunteers to go into the schools. Were hoping to get
Clubs have put into the subject. students from Manchester Metropolitan University
www.linuxvoice.com 31
FEATURE CODE CLUB
32 www.linuxvoice.com
CODE CLUB FEATURE
Volunteering
Before becoming Code Clubs General Manager, Sam
Milsom was its Volunteer Support Officer. He tells us:
Weve got such an amazing volunteer community, we use
Google Group forums, and have meet-ups, and some of the
projects that the volunteers come up with off their own bat
are incredible.
Go to CodeClub.org.uk and click on Start a Club and
then the Volunteers start here button, and youll find all
the information you need, as well as hearing about the
experiences of other volunteers. To work with children in
the United Kingdom, you need an Enhanced DBS (formerly
known as a CRB) check, and youll need insurance to go
in to schools. Code Club makes it easy to get these for
free by linking up with STEMNETs STEM Ambassadors
Programme, and encouraging you to sign up through
your local STEMNET office. STEM Ambassadors is a
volunteering programme for STEM (science, technology,
engineering and maths) professionals and enthusiasts.
After registering, you get a two-hour induction session on
working effectively and safely with young people. After a
few weeks your DBS check should be complete, and while
If coding is the new Latin,
youre waiting, as well as taking the time to read through Many of the core concepts are already being taught,
Code Clubs teaching materials, you can look on the Code
then no wonder London
adds Deen: Algorithms instructions are taught in Mayor Boris Johnson is
Club website for a local school wishing to start a Code Club.
English. Sequencing, basic logic and reasoning are getting behind it.
taught already. Code Club Pros materials are about:
Really trying to demystify the language and context
experience of seeing Code Clubs in action, that it of the new curriculum. Teachers are non-specialists,
teaches them that its okay [to fail]. but good at teaching, and coding is no more difficult
The latest offshoot of Code Club is Code Club Pro, than music, which non-specialist primary school
sending trained volunteers to teach groups of teachers regularly tackle.
teachers how to deliver the new curriculum. As we Code Club Pros materials aim to demystify
near Septembers arrival of the new IT curriculum into language and core concepts, showing that the
schools, demand for CPD (Continual Professional computer language gives expression to ideas. We
Development training) in schools is likely to be want to help inspire the ideas, and to get teachers
immense. We asked Code Club Pros Sophie Deen enthusiastic about the changes to curriculum. The
about this: Were just scratching the surface of materials should be online by the time you read this; if
understanding that demand, Deen told us. Were youd like to volunteer to train the teachers, the
present in schools and hear back directly from process is a little more involved than volunteering to
teachers [who dont] understand coding or knowing run a Code Club, as outlined in the box above. Theres
how to get there. an online test, a Skype
Deen wants to show teachers that its not just about
code, but that computational thinking can be used to
interview, then a days
training. We have Code Clubs teaching materials
enrich the way children think and learn in a cross- amazing trainers, says have been translated into eight
curricular way, covering core skills. In the first two
months of Code Club Pros existence, with no publicity,
Deen: Clever, good
communicators and languages, and there are six
850 schools signed up. We know from teachers that well-motivated. more on the way on GitHub.
when it [officially] launches therell be a huge demand.
Your turn
Have you always wanted to do your bit with passing
on your enthusiasm for coding to the next generation,
but been perhaps a little scared of facing a
classrooom of demanding and unruly children? Code
Clubs structure, with a teacher present at all times to
work with the children, takes away this fear and gives
you, dear reader, the perfect chance to spread some
programming joy. The great materials mean that even
if you are more of a system administrator than a
coder, you can still teach just read one lesson
ahead, and youll be fine.
Code Clubs quirky robotic graphics are an external You are wanted. You are needed. Step up to the
reflection of a friendly, easy-to-access service. task and youll be appreciated, too.
www.linuxvoice.com 33
FEATURE STEAMOS
AND THE
DEMOCRATISATION
OF GAMING Discover how Valve singlehandedly changed the future
history of games on Linux.
V
alve is a video games company with some One to become its proxy for home entertainment, and
serious history. It created genre-defining its changing attitudes to core technologies such as
games with its Half-Life series. It built a DirectX and .Net have left many developers looking to
cutting-edge games engine used by its own titles, and broaden their asset pools and experience.
then went on to dominate digital games distribution And then theres the emergence of independent
with Steam, long before Apple thought about walled development studios, many of which are now
gardens and app stores. accustomed to developing for consoles, tablets,
But none of this history has been played out on smartphones and PCs using cross-platforms tools
Linux: until relatively recently, Valve was entirely and APIs. For them, Windows is just another platform.
wedded to Microsoft Windows, the master system of
PC gaming. This was due to several factors; Windows Next-gen gaming
had been able to maintain a position it held since The next generation of gaming consoles have also
the end of the DOS gaming era, thanks to its DirectX helped shift priorities. The PlayStation 3, for example,
games API. Almost was notorious for its use
two decades of intense
competition between
Valves future, and potentially of proprietary
technology, forcing
the accelerated graphics the future of PC gaming itself, developers to learn
hardware manufacturers
had dropped prices and
is now dependent on Linux. techniques specific to a
single (complex)
boosted performance, platform, rather than the
and the Windows drivers for them worked well. cross-platform approach taken by most studios. Now
Windows was actually a pretty good gaming platform. that both the Xbox One and the PlayStation 4 are
But all that has changed with Windows 8, at least based on what are essentially standard PC
for Valve. Gabe Newell, Valves co-founder and components, the only differentiators are their
managing director, has said that Windows 8 is a operating system and development environments
catastrophe, which is somewhat ironic considering (and performance, of course). On the one hand you
that he worked for Microsoft for 13 years before Valve, have the PlayStation 4 running an operating system
and was, according to one interview, the producer on based on FreeBSD and using all kinds of open source
the first three releases of Windows. But users are also tools, and on the other youve got Microsoft with its
reconsidering their commitment to Microsofts latest incarnation of DirectX. The result is that it
operating system in the face of both user-interface makes sense for most games development, for most
and community challenges. Microsoft wants the Xbox games studios, to be cross-platform, enabling studios
34 www.linuxvoice.com
STEAMOS FEATURE
www.linuxvoice.com 35
FEATURE STEAMOS
36 www.linuxvoice.com
STEAMOS FEATURE
Installing SteamOS
It might be a moving target, but if youve got the luxury of a dedicated games
machine, its worth installing SteamOS onto a spare partition.
Wed recommend grabbing the ISO version of partitions. Change Use As to Ext4, the Mount point
SteamOS. This is a 4GB file that can be downloaded to / and enable the boot flag for your root partition.
from http://repo.steampowered.com/download/ Click on Done Setting Up The Partition to go back
SteamOSDVD.iso. You then have the choice of either to the list and make sure only those partitions youre
burning the ISO to a DVD, if your Steam PC is capable going to use are marked with a K and an f or F. This
of booting from one, or transferring the contents is important, because the installer could change a
of the ISO to a suitably large USB stick. The latter drive you want to keep. When youre happy, click on
doesnt require any ISO conversion, such as with the Finish Partitioning And Write Changes To Disk.
UNetbootin tool, and the data can be written directly The base system will now be installed according
to the USB stick. The simplest method is sudo dd to your wishes, and youll get the chance to install
bs=1M if=/path/to/dvd.iso of=/dev/sdX, but you the Debian desktop environment and the standard
need to make sure that /dev/sdX is definitely your system utilities before the installer finishes, which
USB stick, as if you get this wrong, all your data will wed recommend for greater post-install flexibility.
be overwritten. Wed suggest checking your system After one more
logs after inserting the device to make sure you get
the correct device name. Before rebooting, wed also
question your system
will be rebooted, and
Youll get the chance to install
recommend creating the SteamOS partition on your with a bit if luck, youll the Debian desktop environment
drives with a tool like GParted, as its easier than doing
the same thing through the SteamOS installer.
soon be presented with
the SteamOS Grub
and standard system utilities.
After rebooting, press the hotkey to open your bootloader menu, from
system boot menu (usually F12). If you want which youll be able to select SteamOS.
SteamOS to be bootable from UEFI, make sure you SteamOS should launch automatically, and on your
boot into UEFI for your chosen boot method. If you first boot youll first need to choose a language, agree
want old-school BIOS booting, dont select a UEFI boot to a EULA, change the screen configuration and your
mode. Either way, the same SteamOS boot menu will time zone. You can now use your Steam account
then appear. Choose Expert Install from this menu, details to log in and as with any other Steam client,
unless you want to give SteamOS complete control youll have to enter an activation code sent do your
over your system. Then select a language, a location email address first. After the activation, youll find
and a keymap. A few moment later, youll see the yourself in SteamOS proper, complete with New Age
Partition Disks window. On our system, SteamOS had background music and motes of OpenGL particles.
arbitrarily selected and suggested repartitioning our While waiting for the official Steam controller, wed
first drive, which is bad. Click on Go Back and select recommend using Microsofts Xbox 360 controller or
the Partitioner again to remove any default choices. Logitechs F310, as these work without any need to
Youll then be able to double-click on your preferred reconfigure the buttons.
www.linuxvoice.com 37
FAQ LLVM/CLANG
LLVM/CLANG
Watch out GCC theres a new compiler suite in town, and it wants your crown.
38 www.linuxvoice.com
LLVM/CLANG FAQ
www.linuxvoice.com 39
INTERVIEW PIMORONI
PIRATE
MONKEY
ROBOT
NINJA:
PIMORONI
Fancy launching your own maker revolution?
You could could do worse than follow the
example of one of its most successful offspring.
P
erhaps William Blake was based Pimoroni epitomises this new
right. There may yet be a New community and maker attitude. Paul is
Jerusalem built in the shadow the designer who won the competition
of his Dark Satanic Mills. to create the (now famous) Raspberry
In the north of England, the cities of Pi logo, and he made the original laser
Sheeld, Manchester and Liverpool
are hosts to a new kind of industrial
cuttings for the 100,000-selling Pibow
case at his local hackspace. Jonathan
The ancient Greeks had
revolution, and its one where any is a software engineer and startup absolutely no concept of
one of us can create anything. Its a
revolution for makers and tinkerers
veteran. Hes unfazed by PCB design,
wave soldering machines and arrays
graphic design. When they
and its built on the success of of laser cutters. were making their alphabet
the Arduino micro-controller, the We met them to discuss their
they just didnt think about
branding at all.
Raspberry Pi, and of course, Linux. beginnings, their remarkable growth
Co-founded by Paul Beech and and whats next for the company in the
Jonathan Williamson, Sheeld- heart of the Maker Belt.
Did you guys know each other came out. It was part of their... But they knew about Bucky
before you got together to balls [the shape of the C60
create Pimoroni? Had you discussed Their competition! Buckminsterfullerene molecule]
doing something like this before? PB: Exactly. I saw the BBC article PB: Absolutely. Aristotle probably
Paul Beech: Wed done some startup and I was following the project after that worked it out and then thought Nah, no
stuff before, but weve kind of levelled up because I thought, Yeah, this is gonna practical application. So, that was
to one another havent we? to change everything. And then they around August or September the year
Jonathan Williamson: Yeah, wed had the logo competition and it was one before it came out.
known each other for about eight years of those things where I was so inspired,
probably. I said This is going to be so huge, it There were a load of delays
PB: I think we got to know each other needs a kick-ass logo. It took me about and it came out about nine
when we were doing startupy things an afternoon. months after we all expected it to.
and doing our first freelance things, PB: Yep, there was all the getting it to
starting our own first business together, An afternoon! manufacture, which they blogged
all that kind of thing. Weve crossed PB: Yeah, well, it was an brilliantly, and people were frustrated
paths many times and got on together inspiration, because I believed in it, so about it, but actually getting that level of
when working and hanging out. the berry popped out of something I detail from the process was really great
thought was good. The most important as well. Thats another thing that made
Did the Pibow and the design thing was dropping the Pi concept. The us think Yeah, great project. They
for the Raspberry Pi logo come ancient Greeks had absolutely no would tell you exactly where things
about at around the same time? concept of graphic design. When they went wrong and why, which is very cool.
PB: No, the Raspberry Pi logo was were making their alphabet, they just But, anyway, it got released and people
created a few months before the Pi didnt think about branding at all. started getting it in their hands. There
40 www.linuxvoice.com
PIMORONI INTERVIEW
was conjecture when the cases were problem is that the perspex has terrible in Sheffield have got a laser cutter, and I
coming out, they were functional, pretty tolerances, so if youre relying on those knew them a little bit, so I kind of walked
boring. And there was one case that I kind of jointed connections, theyre through the door and went Hey, can I
think Adafruit made, which slotted either going to be too tight or too loose use your laser cutter?
together, but I got one and bits of it and youll very rarely get something
broke off and it wasnt quite there. I bang on. Do you get people coming
mean, there were good reasons for it JW: And the perspex is quite brittle in around to you now saying Hey,
but it just like Oh, this isnt right. So then single sheets. can I use your laser cutter??
I said, OK, Im gonna make a case. PB: So for laser cutting, I went to Fab JW: Yeah, a fair bit! And we try to let
The Adafruit case was nice because it Lab in Manchester [this place looks them if we can.
wasnt injection molded, so its brilliant www.fablabmanchester.org]
something you can make yourself on a and kind of bounced off there with We probably shouldnt put that
laser cutter. And Adafruit is very open trying to get in and use the laser cutter. in the interview!
with its designs. Theyll let you Its a very good place and they have PB: Its something wed like to do more
download that kind of thing and let you various kinds of open policies on what of but its trying to make it so that its
do it yourself if you want. The main you can come and do, and how you use easy for them and easy for us.
the laser cutters. And if you use them JW: Like scheduling it and having a
on Fridays and Saturdays, theyll offer window where we say just come in and
Getting that level of detail you feedback on your design. They
make it open for people to learn. It was
use the laser cutter. Generally its fine,
but sometimes were in a massive
from the Raspberry Pi launch trying to get onto the laser cutter and crunch and we just cant deal with
process was really great. get a bit of help getting started that was
hard. At the same time, Access Space
anything else at that moment.
PB: We do want to have a bit more of a
www.linuxvoice.com 41
INTERVIEW PIMORONI
hackspace vibe, but well just see how it Were you always going to use So you were still serious with
pans out with the new place. So I bolts to hold the case together? one another at that early stage.
ordered a stack of swatches of perspex PB: I dont think we were going to do Thats good! I think thats very telling.
and it came in a portfolio of all the anything to be honest. We were just JW: Yeah, we were both quite serious
different colours, and I didnt think buying small things and putting them and nerdy about stuff.
anything of it. Then John was around together and saying Yeah, that looks PB: We used to read everything on the
the flat one day, saw it, and he knew all better than it did last time. It made internet twice a day, all of it, and wed
the colours from the top to the bottom sense with the layers. Because theyre know what we like, we know what
and said Ah, that ones quite nice. not at right angles to each other, youre works and what doesnt, and try to
JW: That was my entire contribution. not going to dovetail them or join them, match it as much as possible.
PB: Then it was about 10 hours over a and that was the problem with the JW: We both have quite well-formed
couple of weeks, Access Space other cases. It wasnt the first thing to opinions on what we like and dont like.
be layered, but it was PB: Which sometimes means we dont
42 www.linuxvoice.com
PIMORONI INTERVIEW
PB: But someone can do better than us that you can slot together into the
probably. So we learned from open model automatically. You have to do a
source stuff, seeing how it was done. bit of finickying, but its there.
John has spent probably the last eight
months to a year just basically hacking So, as youve spent the last
away, making mistakes and then eight months or so learning the
making it better, and then improving it machines and the electronics, does
and working out the other really that mean were about to get a great
esoteric things that made it better. new product?
JW: There might be some things in the
But the scale that youre working works! Were working on the final retail
at now, seems a world away from version of Picade at the moment.
messing with a stack of coloured Basically, the main reason were doing
perspex. How do you go from Arduino that is because were doing a mini and a
and temperature sensors to selling maxi double product.
100,000 units? PB: Were delivering the last 50 odd
PB: Youve just got to learn quickly. units now, waiting on the last batch of
JW: Were lucky the Pibow gave us the LCD monitors. They go out the door,
money to buy equipment. then weve got some software stuff to
do. Just support our users how we said
But how do you go from Arduino we would. Obviously getting the
and temperature sensors to the hardware out there and then updating
scale your operating at at the the software is kind of accepted now.
Jonathan: When I was a kid I used to get
moment? So, yeah, weve just been heads-down
told off for staying on the computer until
2AM writing Assembler on our 386. JW: Laser cutters are just a really good getting the hardware fixed.
introduction. Theyre a relatively safe
industrial machine thats not very You were the first Kickstarter
to an Arduino or a Pi and start playing expensive either. So learning on lasers project in the UK [with the
around with that in software, and its was great. Once wed done that, then Picade a desktop Raspberry Pi
amazing. It makes it a lot more like things like the wave solder seemed a lot arcade machine], so it must have
software than traditional analogue less scary. You know, its just a series of been quite a new concept for most
electronics. So we got into it from the robots, or its just a big heater and a people buy now, take delivery
easy angle, and then weve spent the load of molten metal. Thats not too bad when its ready. How have your
last nine months to a year really now. We know what to do when things backers been?
learning it properly. set on fire. Weve got fire extinguishers. PB: Theyve been really really
Thats all fine. So taking the first step exceptionally patient. Because we were
We know what to do when meant that the next step seemed a lot
less scary.
looking at grumblings and thats when
we failed to update them and keep them
things set on fire. Weve got We forget how daunting it was. That in the loop. So that was totally our fault.
www.linuxvoice.com 43
Email andrew@linuxvoice.com to advertise here
INTRO REVIEWS
REVIEWS
The latest software and hardware for your Linux box, reviewed
and rated by the most experienced writers in the business
Andrew Gregory
Has been given a box running Ye Olde Vista
from 2006. Elementary OS, we need you now.
T
heres an uneasy meeting of
cultures when Free Software Acer C720 Chromebook Ubuntu 14.04
and money intersect. At Linux Google, thanks very much for this smart, Pretty used to be Ubutus killer feature.
Voice, we plan to give some of out light laptop. But please, can you stop Now its a smooth interface, a reliable
profits back to deserving projects. following me now? core, heaps of software and a silly name.
Personally, Id like it if one of those was
the Electronic Frontier Foundation, as I
think thats a body that really 49 50
understands the issues presented by
the changing tech landscape.
Then there are companies like
Canonical. The work of organisations
such as Debian is there for all to take
and build on, and thats exactly what
Ubutu does. If it makes some money
out of doing this, great.
Ubuntu/Debian is the best analogue
to Kano/Raspberry Pi that Ican come
TBS Matrix BitScope BS10
up with. To some, Kano is piggybacking On the plus side, this ARM box makes a Generate waveforms, monitor the data
on the work of a charitable foundation, great platform for a DIY smart TV. On the coming out of your devices and intensify
packaging it nicely and selling itself as downside, you need Windows to use it the hardware hacking fun.
somethign thats going to revolutionise
computing (forgetting the fact that the
revolution is happenning already, with BOOKS AND GROUP TEST
or without tasteful orange websites).
The deeper you get into Linux, the more time youll
But its more helpful to see Kano as a
find yourself at a terminal emulator. If youre just
partner. Just as some grumbled when using your PC for Facebook and Twitter, you wont
Ubuntu made Debian easy to install care, but for everyone else, a good terminal is
(how dare they!) and put a nice Gnome essential, so weve tested a handful of the best
interface on it (the temerity!), the Kano and found something there for everyone. What
caught our eye in this issues book reviews was The
project is packaging the Raspberry Pi.
Snowden Files. Snowden, by his illegal/patriotic/
Its taking Linux out there into the wider heroic/treasonous actions, has given us all cause to
world, and as such is helping to spread think about our security. For that, he deserves a slap
the message. Greed is good. on the back; or maybe something more vigorous
andrew@linuxvoice.com
www.linuxvoice.com 45
REVIEWS ACER CHROMEBOOK C720
N
ot many of us would have thought that a
DATA laptop with little more than a web browser
Web
would be useful. How can you build things?
http://www.acer.co.uk Or edit anything other than text? Or put together a
Developer magazine, or play games?
Acer However, portable computing has become more
Price divergent than we could ever have imagined when
199
we wanted our netbooks to do everything. Were now
productive with smartphones and tablets, despite
neither being capable of running a virtual machine
SUNSPIDER 1.0.2 nor a compiler, and the typical Chromebook is an
BENCHMARKS extension of that idea. Its a low-powered laptop that
boots quickly into Googles Chrome OS, a Linux-based
C720 with Chrome OS: operating system thats basically nothing more than
411.4ms the Chrome browser running in fullscreen mode.
Firefox/Ubuntu LTS: Theres no support for applications other than the
315ms
Intel 2.4GHz i5 (4258U):
web-based ones you can download through Chrome.
168.2ms Theres no command line, and theres very little scope
for customisation. Theres a USB 2 port and a USB 3 port, plus an SDCARD
What you do get is online and offline access reader but theres only 10GB of usable local storage.
to Googles carefully crafted suite of productivity
applications; word processing, spreadsheets and scenarios. There is a small task manager bar at the
presentation creation alongside YouTube, Maps, Keep bottom of the screen, and a launch menu on the right
and anything else you install through Googles web for the Google apps and other apps you may install.
store. It all works extremely well, and the lack of the Configuration is through Chromes settings panel,
usual clutter that comes with an operating system which is augmented for Chrome OS with options to
helps to keep you focused that is, until you install change the background image, network management,
Command & Conquer. Theres very little to be said and touchpad control both for sensitivity and for
about Chrome OS, which is a good thing for certain reverse (labelled Australian!) scroll settings, which is a
mode were ashamed to admit we now prefer.
Chronos
Acers C720 is better than the average Chromebook. It
has a 1.4GHz Intel Celeron CPU descended from the
current Haswell range, which is a massive step up
from the ARM CPUs used by many chromebooks. Its
a processor that has far more in common with the
CPUs found on more general-use laptops and
desktops, even if you cant take advantage of its
particulars from Chrome OS. It does, however, help
Chrome OS feel extremely slick. Wireless internet
resumes within seconds of lifting the lid, and it deals
with complex websites, WebGL, HD Adobe Flash and
HTML playback with ease.
Theres very little local storage around 9GB to
play with, but Google obviously wants you to use its
own cloud product and Chrome OS plugs directly
into your Drive account, as well as offering a deal
on 100GB cloud storage for 2 years. Googles video
conferencing app, Hangouts, is a good example of
whatever hardware acceleration Chrome OS must
Acers Chromebook is surprisingly light, yet despite that it feels like it could withstand be leveraging, as we had our best experience on the
the bumps and knocks of travelling to a thousand geek conferences. C720 after trying many devices, from the Nexus 5 and
46 www.linuxvoice.com
ACER CHROMEBOOK C720 REVIEWS
Running Ubuntu
What many Linux users really want to know is how the laptop limitation was storage and RAM, but its still an impressive
performs if you install a different avour of Linux into it. We feat and genuinely useful for running small or server-oriented
installed Ubuntu 14.04 with relative ease, but this was mainly distributions. Battery performance under Ubuntu was about
thanks to ChrUbuntu, a series of scripts that automatically the same as Chrome OS, but there were a few hiccups that
handle the re-partitioning and downloading of the required would probably ummox a lot of users. The touchpad stopped
packages. All you need to do is go through the slightly working with a kernel upgrade, for example, and we couldnt
convoluted procedure of entering developer mode and making get Wi-Fi to resume from suspend or the USB 3 port to work
sure that every command you type looks sensible. without a little script tinkering.
The main problem with running Ubuntu rather than Chrome
OS is that a default installation requires around 4.5GB of
space, leaving you with only a few precious GB for your own
data if you keep Chrome OS installed alongside which
wed recommend. Ubuntu ran brilliantly on the C720, and
running a full-fat Linux distribution on the Chromebook felt
very liberating. Overall performance, for a 1.4GHz CPU, was
fantastic. We even installed Steam to play a few games, and
the 3D acceleration in the CPU was more than adequate
for many of the less demanding games in our collection.
Unfortunately, its the 2GB of RAM thats the biggest limitation.
Theres theoretically a 4GB version of the same laptop, but
weve not been able to nd UK stock, but that would make life
a lot easier for other distributions.
Thanks to a VT-x enabled CPU, we even had VirtualBox up Ubuntu runs brilliantly on the Chromebook it was
and running with a couple of Linux distributions. The biggest possible to run OpenGL Steam games and VirtualBox.
Nexus 10 to quad-core 16GB desktops and laptops. larger unit, even if it does invoke the use of a small
We also had almost two weeks standby time and a plastic wedge. We did like the keyboard, however, and
typical battery life of 78 hours, depending again on the Chrome OS specific keys backwards, forwards,
whether we launched Command & Conquer. task switching, and refresh made us miss their
We were disappointed by the screen, as this hasnt inclusion on many post-Windows 98 keyboards.
moved with the times. It could be argued that a You can work and
1366x768 resolution on a 11.6 screen is acceptable type very effectively
when all youre doing is running a full-screen browser,
but were growing increasingly used to the high DPIs
from the Acer and
we were able to write
The C720 Chromebook makes
found in phones and tablets. It also lacks punch many words for this an extremely good low-cost
when compared with IPS displays and has a woeful
range of viewing angles. The screen, along with the
very issue from its
keyboard. Its also
travelling companion.
gun-grey plastic case design helps to make the C720 light enough (1.3kg)
feel rather more utilitarian than it should. We also wish and small enough (19mm thick) to throw into almost
there were more options for storage. We understand any bag, and as long as you can offer some kind of
that the tiny SSD is there to keep costs down and networking connectivity, its the perfect travelling
perhaps to limit its use outside of Chrome OS, but companion for people who need to do some work.
wed like the option of adding more. Watching a film or We like the C720 a lot, mainly because of its price,
managing anything more than a few albums is going portability and relative power. At just less than 200 in
to be impossible without a great data connection. the UK, it could be the perfect laptop to give to family
Fortunately, while weve not tried it ourselves, it looks or friends who arent too confident with computers,
relatively straightforward to replace the SSD with a where you know the limited options of Chrome OS
are going to be all theyll ever need. But it also makes
an extremely good low-cost travelling companion,
especially if you put another Linux distro onto it. If you
can find a compatible SSD, it makes a great machine
for hacking about on and for throwing into a rucksack
for LUG meetings or hacker sessions.
www.linuxvoice.com 47
REVIEWS UBUNTU 14.04
Ubuntu 14.04
Unity and kernel tweaks make up for what is otherwise a fairly
low-key release, says Mike Saunders.
C
anonical has its fingers in many pies at the
DATA moment. Go over to www.ubuntu.com, for
Web
instance, and the first thing youre greeted with
www.ubuntu.com is a big the cloud platform of choice message,
Developer accompanied by some blurb about OpenStack. Hover
Canonical Ltd over the Download link and the first options are Cloud
Price and Server almost as if the desktop is an
Free to download
afterthought. On the other hand, Canonical is still
pushing Unity, its mega-convergence interface that
will (eventually) run on your desktop, phone and TV.
Ubuntu 14.04 is an LTS (Long Term Support)
release, which means it will receive five years of
updates and is designed for use in large enterprises
where even the smallest changes can cause massive LibreOffice 4.2 sports a new start screen thats more
disruption. So dont expect world-shaking new attractive and useful than in previous releases.
features here: theres no Mir or Unity 7, and by and
large the distro is a bunch of small (but useful) speaking of menus: if you utterly hated the global
updates rather than anything revolutionary. menu bar, whereby all windows showed their menu
For starters, its built on kernel 3.13 with support for entries in the top-left of the screen, Mac OS style, you
TRIM. This boosts performance on machines with can now disable this and revert to a traditional format
solid state drives, and given that these are becoming via Appearance > Behaviour > Show The Menus.
more common, its a welcome improvement. If your Its still a bit unusual: menus are displayed in the
machine has Nvidia Optimus graphics, you can now programs titlebar, and you have to hover over the
switch between the high-power Nvidia chip and Intels titlebar before you can see them. You can still click
battery friendly alternative although youll need to and drag anywhere on the titlebar (even when the
restart X for the changes to take effect. menu is displayed) to move a window. When you
resize a window in Ubuntu 14.04, its contents are
GUI fiddlings updated automatically theres no yellow box like in
Interface-wise, much work has been done on Unity to previous releases.
Global menu haters rejoice:
its now possible to have make it more usable with HiDPI displays, such as Unity has taken a lot of flack over the years, but
menus back in individual those on the Retina MacBook Pro and Chromebook Canonical has persisted with tweaks and fixes in
applications (albeit in their Pixel. Menus and launchers now scale better without every release, and its now at the point where were
title bars). looking teensy-tiny on super high-res displays. And pretty happy using it. Software-wise, Ubuntu 14.04
ships with LibreOffice 4.2.3, Firefox 29 and
Thunderbird 24. Rhythmbox remains the default
music player, while Totem is used to play videos. If
youre looking at this LTS release on a server, youll find
Apache 2.4.7, MySQL/MariaDB 5.5.37, PostgreSQL
9.3.4 and PHP 5.5.9. And for programmers theres
GCC 4.8.2, Clang 3.4, Python 3.4 and Perl 5.18.2.
Theres nothing that screams install me in Ubuntu
14.04, but its worthy of an LTS release, and Canonical
hasnt tried to rush ahead with anything that isnt
ready. Its easy to ask for more in a new distro version,
but when a company has to support it for five years, it
makes sense to take a more conservative approach.
48 www.linuxvoice.com
TBS MATRIX REVIEWS
TBS Matrix
A little Linux machine for building smart TVs Ben Everard unglues himself from
The Jeremy Kyle show long enough to take a look .
T
he Matrix is designed as a little ARM computer
to run Tvheadend, the TV streaming server for
Linux. It comes with a minimalist version of
Linux, pre-loaded with the drivers for several of TBSs
DVB receivers, as well as the software to use them
(Tvheadend and XBMC). In theory, this means it
should be really easy to create your own Linux-
powered smart TV, and record all the shows you want.
The Matrix is well designed for this purpose. The
quad-core Freescale i.MX6 processor with 2GB of
RAM provides enough horsepower to decode the
video streams in Tvheadend and display them in
XBMC. Theres 16GB of internal storage so theres
space to record a limited amount of TV even without
external storage, but if you want to expand it, there are
plenty of options including a SATA port and a mini
PCIe. To get the video out, theres an HDMI port, and
for audio there are 3.5mm jack and optical ports.
www.linuxvoice.com 49
REVIEWS BITSCOPE 10
BitScope 10
Its an oscilloscope & analyser in a tiny case with Linux and Raspberry Pi
support, and its completely taken over Graham Morrisons life.
W
hats an oscilloscope? Its a way of
DATA measuring small variations in voltage.
Web
Youve probably seen them in their CRT lab
bitscope.com coat incarnations, plotting sine waves or the
Developer harmonics in the words from an alien overlord. Theyre
BitScope Designs almost essential for anything other than the most
Price basic of electronic tinkering, because they enable you
160 (approx.)
to monitor changes over time, unlike a voltmeter for
example, which simply shows the voltage.
Whats an Analyser? Its similar to a scope, but its
designed for capturing multiple digital signals at once
so that you can see the relationship between them.
Theyre useful for reverse-engineering the output
from old chips or decoding digital protocols from the
signals themselves.
If youre any kind of electronics tinkerer or hobbyist,
connecting chips to an Arduino or playing with I2C
on a Raspberry Pi, oscilloscopes and analysers are
essential for troubleshooting. But more importantly,
theyre a lot of fun. Its a little fiddly to use if youve got large hands, but you
can also attach standard probes or a differential add-on
Lights, action for a more professional solution.
BitScopes BS10 is both an oscilloscope and an
analyser. Its relatively cheap, and thats because the right of these are digital input pins for the logic
instead of the screen and controls of standalone units, analyser, and to the right of these the waveform
you get a block of exposed copper pins held within a generator output. There are lots of separate ground
tough extruded aluminium case and software for the pins for each input, plus 3V and 5V outputs and
functionality. The BS10 is tiny 67x64x17 mm general-purpose pins.
fitting neatly within its own handy carrying case that A USB port on the rear powers the device when
also contains the small clipped wires you use to connected to your Linux box. No drivers are required,
connect the pins to the things you want to measure. as the device is driven by the FTDI support built into
The Bitscope feels
The 26 pins provide a huge range of facilities, with almost any Linux kernel, but youll need to install one
like a large toolbox of
functionality. Here its their assignments helpfully labelled on the underside of the applications from the comprehensive software
probing the inner poetry of the unit. There are two inputs for the dual-channel suite to be able to start using the unit.
of the output from an 8-bit digital oscilloscope, labelled A and B and marked Its the job of the software to handle the functionality
SID chip. by removable green and yellow plastic jumpers. To that youd expect from the controls and screen of a
more expensive unit, and the principal application is
called DSO. We installed the Deb package on Mint
with a single click, but there are no real dependencies,
so you should have no issues with a different distro.
RPM and (32-bit binary) downloads are available, and
we also tried the Raspberry Pi ARM package, which
worked flawlessly. BitScope has blogged about the
amount of effort its put into optimising the Raspberry
Pi version, and its easy to see why. Connecting the
BS10 to a Raspberry Pi makes for a convenient
package that will work exceptionally well in an
educational setting, especially if youre programming
the Pi to send signals being monitored by the
BitScope. You could even add a low-cost touchscreen
to create a DIY hardware oscilloscope.
DSO is an overwhelming application, not helped by
a lack of hardware-specific documentation. Its the
50 www.linuxvoice.com
BITSCOPE 10 REVIEWS
software thats used for all of BitsScopes hardware, area, but the eight input channels were more than
and it suffers a little from trying to do too much. It can adequate at showing what was happening across
display a single-scope channel, dual channels, the many pins at once, and with these inputs reportedly
logic input and a mixed combination of all of them, working at 40 million samples per second, they should
alongside a waveform generator and a spectrum/ be able to decode even complex protocols, especially
phase plot of the analogue inputs. on older or off-the-shelf components. You can cross-
The challenge is to enable and manage these trigger the digital inputs from the analogue input
features, and it all starts in the top-left. Without a (and vice versa) and use a trigger mask to look for a
trigger, the hardware doesnt generate data. A trigger specific state or digital value, all of which helps make
is what captures and recognises a cycle or a frame best use of the limited buffer space within the DC10.
from an input waveform, enabling you to monitor From an educational perspective, theres a lot
the input in real time (if youve got repeat enabled), or more to the analyser
saved as a single cycle on the display. From there you
can accurately measure the inputs, either manually
mode, as it enables
you to see what your
The BS10 packs so many
with the cursor or automatically, and adjust the software is actually features into its small case, its
timeframes/voltages for capture and scaling. If youve
used an oscilloscope before, this will all be familiar
physically doing
and how devices
difcult to know where to begin.
territory, as too will be the units and terms used communicate. This
throughout. But for a beginner, using DSO for the first isnt easy to accomplish with other methods, and
time will leave you feeling a little like how you must can also lead into all kinds of engineering and design
feel having read through this paragraph. territory not easily covered by software alone. And
while there are many, many other features we havent
Sine your name mentioned, perhaps the API is the most significant, as
We can only hope youll persevere, because theres an it enables you to access many of the same functions
incredible amount of power here. Far more than even within DSO only through your own Python/C/C++
on a cheap hardware oscilloscope. The 100MHz code, which could have all kinds of uses for your own
bandwidth of the BS10 is enough to for real-time projects, tutorials and even installations.
repetitive capture, and you can adjust scales Oscilloscopes and logic analysers have always
separately for both channels, as well as trigger inputs been expensive and are usually considered luxury
from the other channel. You can adjust code and items by most hackers. But they make the impossible
parameters as youre monitoring the signal, and we possible, and theyre a lot of fun. The BS10 packs so
were able to play with all kinds of cross-modulated many features into its small case, its difficult to know
audio signals and voltages in ways you just cant where to begin. It has great Linux support, works well
without dedicated hardware. We did have some on a Raspberry Pi, and can take you from Arduino
difficulty mastering the triggers, but the waveform tinkerer to an electronics and engineering wizard. Just
output which includes sine, square and triangle dont rely on the (non-existent) BS10 manual.
waveforms is a good way of testing your setup
against differences in external hardware. LINUX VOICE VERDICT
The other major mode in DSO is the logic analyser,
Fantastic value for such a powerful
used for displaying binary data captured on the digital and versatile device, suitable for so
inputs. We attached ours to a PCB connected to a many different users.
SID chip and used DSO to monitor the various bits of
control data going into the chips. This is a complex
www.linuxvoice.com 51
REVIEWS BOOKS
G
iven how much people love poking The code samples are well commented,
around with the Raspberry Pi and there are appendices for the ASCII
hardware, its surprising that there character set and Linux kernel system calls.
arent more books on low-level programming In all its a solid read, tackling a notoriously
for the dinky device. Indeed, books on difficult subject with confidence and making
assembly language for any platform are hard the reader feel like he/she is making good
to come by. This 260 page tome is available progress through each chapter. Wed just
as both a paperback and a Kindle edition, like to see more practical code samples,
the latter of which can be read via a web especially early on when tricky concepts are
browser at http://read.amazon.com. being introduced.
Raspberry Pi Assembly Language
introduces ARM assembly language pretty
well, although it dives straight into the
details fairly quickly: you learn about binary LINUX VOICE VERDICT
arithmetic before youve even printed a line Author Bruce Smith
of text on the screen. We tend to prefer a Publisher BSB
ISBN 978-1492135289
more hands-on approach where you learn
Price 14.99 (print), 5.97 (Kindle)
things by doing, and not just reading. Still,
Great value, and thorny topics are explained
the chapters are well written and dense, and well. Could do with more code snippets though.
cover using libc, disassembling C programs, Mikes head explodes with potential when
and working with the GPIO pins. theres more than 640k of base memory.
Understanding Computation
Graham Morrison found this book ideal for understanding his own code.
T
his book isnt ideal for morning and computers, by example. It really does
reading before youve had a coffee make you think about how you approach
or two. Nor is it perfect for a mid- your own projects what statements and
afternoon browse, when your lunch is having expressions are really doing. Theres a lot
maximum effect on your glucose levels. Its a about finite states and Turing machines, at
book to be read while youre wide awake and one point building compute units out of
engaged, because it doesnt hold back. Conways Game of Life. But this is all theory.
Within the first 20 pages, youre dealing Theres nothing youll immediately be able to
with the semantics of expressions and take away and use, and if you want to apply
trying to get your head around the Ruby what youve learnt to your own projects,
code used to illustrate most of the ideas, youll find their foundations broken, forcing
and thats after youve read a page about the yourself to start from scratch.
meaning of meaning.
52 www.linuxvoice.com
REVIEWS BOOKS
N
ate Silver earned his reputation
as a forecaster by correctly
predicting the results of the
2012 US presidential election for every
state in the US. In this book, he looks
at how people make predictions and Other books
forecasts. Its a guide to help regular about using
Get it, read it,
people understand the perils and pitfalls of the Raspberry
then laugh at the
trusting the forecasters. Pi are also
certainty of so-
The reader learns why some TV available.
called experts in
weather forecasts are less accurate than the news. Raspberry Pi A Quick Start Guide
the raw forecast data the TV stations This is the second edition, and as things have
base their forecasts on, and how to tell if to predict the future, and investigates changed so much, and the Pi has become so
an economic forecast is accurate. whether those forecasts have been successful, wed imaging there are plenty of
new things to write about. This is still a book
In an age where everyone seems to be successful, and why.
aimed at the complete beginner, however, so
trying to collect big data, and analyses it for well let you know whether it succeeds.
traits about us, the world and everything LINUX VOICE VERDICT
else, understanding the difference between Author Nate Silver
signal and noise, and how they affect our PublisherPenguin
ability to correctly understand the world ISBN 978-0-141-97565-8
Price 8.99
(and therefore predict what will happen),
Esential reading for anyone who has ever
is now more important than ever. This wondered about why we trust experts.
book is important because it coolly looks The only
at a number of areas where data is used things weve
ever disliked
about this
series are the
Ben Everard wonders if James Garner will star in the TV series. Head First JavaScript Programming
There have been a few misses, but mostly,
F
OReillys Head First books are brilliant. They
ew people actually know that much make technical subjects fun and immediate in
about him. When he appeared in a visual web 2.0 way that may be getting a
the news most frequently, he had little tiresome, but not quite yet. JavaScript is
risen to fame so quickly that reporters the perfect subject matter for this style too.
struggled to find details of who he was or
what he did. At the same time, information
about his whereabouts and travels was
often kept guarded. Edward Snowden
Luke Harding obviously has access still faces a life of
to some of the people involved in the uncertainty.
reporting of the case, and The Snowden
Files details exactly what happened as written and engaging. In many places it Java whod
Edward Snowden went from high-school reads like a spy story, which in a slightly have thought
dropout to NSA contractor to the biggest unusual way, it is. it would still
whistleblower in history to man-on-the-run. be kicking
around ?
It is, perhaps, a bit mis-named because LINUX VOICE VERDICT
the main focus of the book is not the files Author Luke Harding Java 8 Pocket Guide
he acquired from the NSA, but the man Publisher Faber & Faber If our Android coding tutorial has got you
himself. ISBN 978-1-78335-035-3 wondering about Java again, then this small
Price 12.99 reference book contains quick access to
The book paints a picture of Snowden
thats broadly in line with how Snowden We found the book mesmerising, and were details like naming conventions, types,
sure most people interested in the events statement and blocks. Its perfect if youve
has been portrayed in most unbiased will do too. used Java in the past, or use another OOP
media, so dont expect to find any language and need a quick reference.
shocking details, but the story is well
www.linuxvoice.com 53
GROUP TEST TERMINAL EMULATORS
TERMINAL
EMULATORS
GROUP TEST
Marco Fioretti opened more shells than you want to know
to help you discover what terminal emulator is right for you.
T
URL www.eterm.org erminal emulators are because they are like baby
Version 0.9.6 rectangles on a screen that gestures: whatever you want, be it a
Licence BSD let users communicate with document on your drive or a movie
The original emulator of the local computer, or a remote one, from the internet, you point your
the Enlightenment window much like in a generic chat session: finger at it, just like you did to get
manager: is it still up to you type some commands as text, toys when you were a toddler.
the task? The obvious problem is that
and the computer answers by
54 www.linuxvoice.com
TERMINAL EMULATORS GROUP TEST
D
ue to the criteria with which they were
chosen, none of the emulators
considered for this Group Test should
give you any trouble. Unless you use some
little-known distribution, you should easily find
binary packages with the software manager of
your GNU/Linux system. In any case, here are
a pair of issues that are worth mentioning.
The first is that, while emulators are small
programs, they may consume much more
disk space than you expected, especially if you
install them as packages. Konsole, for
example, will bring with itself most of KDE,
even if you had no plan to ever use any other
part of that desktop. Guake and Terminator
may do the same with parts of Gnome.
Eterm and Terminology are both products of
Konsole, Terminator and Terminology can shuffle terminals in more ways than youll ever need. the Enlightenment window manager
community. They have the same problem as
B
y now, you know that terminal right-click in any sub-window and select the other three their dependency on
emulators enable interaction with New, to open a new terminal exactly over Enlightenment libraries and other
computers more or less like the already existing one. Moving from one components. However, they will generally
written speech. As it happens in other terminal of the same sub-window to consume less memory, and much less space,
realms of life, it is often necessary to carry another is easy to do but hard to spot. than their competitors.
on, or at least keep open, several When you create more terminals in one A final word of advice: depending on your
conversations in parallel. Four of our sub-window, the emulator activates a very disto, you may find that some minor feature of
emulators make it very easy to do so. The small terminal switcher in its upper-right an emulator doesnt work as documented
exception is Eterm, at least in the version corner: the default colour scheme of (sound effects, background configuration and
tested on Fedora 20. Guake has tabs, like Terminator makes it hard to see, but you similar) if you run it under a different window
Konsole, but with fewer settings. can just click there to move from terminal manager or desktop environment than that for
The tabs in Konsole work very much like to terminal. which it was primarily designed.
those of Firefox and other web browsers. Terminator is so flexible from this point
You can right-click on the name of each of view that if you find yourself using all its
tab to close it, rename it or move it to a functions together it probably means
separate window. We also like the youre working too much. First, there are
possibility to automatically assign a both tabs and multiple levels of vertical or
different colour to each new tab. horizontal window splitting. Second, there
A dedicated panel in the Konsole is another feature that is even cooler, even
configuration interface (Settings > if many people will find no use for it. The
Configure > TabBar) lets you hide the Tab coloured rectangle in the left-hand corner
Bar, put it on top or bottom of the window of the Terminator status bar opens a
and place in it dedicated buttons to add or menu in which you can define groups of The software managers of all the main Linux
close tabs. Our preferred function of that terminals, so that everything you type in distros include all the terminal tested here.
panel, however, is the one that sets where one of them is broadcast to all the others.
all new tabs should appear, that is, at the VERDICT
end of the bar, or next to the currently VERDICT Eterm
Guake
active tab. Eterm Konsole
Guake Terminator
Terminology can split its own window Konsole Terminology
Terminator
and each sub-window both vertically and Terminology
horizontally. In addition to that, you can
www.linuxvoice.com 55
GROUP TEST TERMINAL EMULATORS
A
large part of what we think of as settings of your distribution, as well as the
F
or us, a good terminal must have at the user interface of a terminal configuration file of your shell, to make
least these characteristics: emulator is actually the result of everything look and work just as you like:
configurable keybindings for all the its interaction with other, more or less prompts, history, escape sequences, audio
main operations, ways to define custom independent programs; specifically the or visual alarm bells are just the main
commands, and support for automation. The individual commands that we run inside it. examples of what we mean. Keep this in
latter feature consists of being able to No matter how you tweak the emulator mind, when thinking to how to use each of
memorise and load, automatically or on user itself, you may have to adjust the locale these programs.
demand, complex combinations of many
terminals, each with its own settings.
Konsole and Terminator do practically Eterm
everything we just mentioned, through Eterm was conceived as the Enlightened redesigned for 2014, and we mean this as
assorted plugins and support for user-defined terminal emulator for the X Window a compliment. You can customise every
profiles. A profile is a set of configuration System. It seems well suited both for detail of how Eterm looks and works, and
parameters for a single terminal, which is expert users who want a lean and mean tune its memory consumption with
given a name (eg root profile or web server terminal, and for beginners looking for command line switches. If you have the
profile) so that it can be loaded automatically, something fast, but with an unusual (shall patience, that is: we hope were wrong, but
when the emulator is launched, or on demand. we say vintage?) look and feel. Working the default looks and strain on the eyes of
The point of profiles is to make your in Eterm feels like running an Xterm (the Eterm doesnt seem to encourage
terminal emulator do as much housekeeping main Unix terminal emulator of the 80s) newbies, which is a shame.
as possible for you, by running predefined
commands every time you load them. Lets
assume that you always need to have three
terminals open at all times: one for checking
email, one for working remotely on your web
server and one to execute all other commands
and generic scripts at the prompt. You can
Eterm has a pleasant
define an email profile that, all by itself, before vintage look, and enough
you even see the window, starts the Mutt visual parameters to set
email client; a web one, which automatically that it takes time to find
connects via SSH to your server; and a generic the best combination.
profile for everything else. Each profile may
also load a completely different configuration.
Konsole and Terminator can also split their Guake
window in any combination of sub-windows. The other emulators of this Group Test all Guake sits in your system dock and
Terminator makes it quite easy to save these aim to make long terminal sessions as appears (or disappears) in a flash
layouts, with different profiles for each efficient and comfortable as possible. whenever you press the F12 key. By
terminal. All its keybindings can be Guake, instead, is a drop-down terminal default, due to this design choice, Guake is
reconfigured, or individually disabled. for Gnome, designed to be invisible, configured to Stay on Top, but you can
The other emulators have fewer features, except when you need a prompt quickly, disable this behaviour in the General tab of
but still enough that it is impossible to mention but just for a few minutes. Thats probably its Properties window. A KDE version of
them all. Eterm has search and run boxes, plus why you can set the height of the Guake the same emulator is available at
many scrolling options. Terminology provides window, but not its width. Once started, http://yakuake.kde.org.
configurable helpers applications to open
all kinds of files, showing them inline if
possible. Besides tabs, in Guake you can easily
set the default interpreter for your terminals to
bash, nologin and several versions of Python.
VERDICT
Eterm
Guake
Konsole Setting an image background
Terminator
Terminology in all the tabs of Guake is a
snap. Whether its worth it is
another question
56 www.linuxvoice.com
TERMINAL EMULATORS GROUP TEST
Konsole
Its an obvious thing to say, but were going
to say it anyway: Konsole works and feels
just like the rest of KDE. If you have the
However, even if Konsole were the only
KDE component youll ever launch in your
computer, it would still work and present
Flexibility
time and patience to try all its options, and itself in the most discreet way possible. Bend them to your will!
configure them to your taste, you will find Clean menus, bookmarks, readable fonts
T
yourself with a nice, very powerful and still out of the box Konsole has many erminal emulators can do lots of
unobtrusive tool. features you will like. things that you may not expect of
them, or be used in environments
different from your everyday GNU/Linux
distribution. By definition, this is a sector in
which one is forced to compare apples with
oranges, so please dont take the
corresponding rating too seriously.
The default looks, fonts and
other setting of Konsole may Eterm is at its best inside the Enlightenment
seem dull, but they are well window manager. Its auto mode, for example,
thought-out and dont get in gets the images to use for scrollbars directly
the way. from Enlightenment, and lets the Window
manager draw them. At the same time, if you
compile and install Escreen code yourself (see
Terminator the Eterm man page for details), Eterm will get
The Terminator home page greets visitors arrange terminals inside Terminator are something that is trickier to achieve in its
with the half pompous, half cryptic slogan the most flexible of the bunch. And if you competitors: an interface between the
The robot future of terminals. After just a stop liking a layout, you can just drag and emulator itself and the screen program, to
few hours of usage, you see why for drop each sub-window as you please. The manage multiple (local or remote) terminal
yourself. Technically speaking, this Group Broadcast feature does look a bit sessions via Eterm buttons and menus.
program is a tool to host multiple Gnome like those totally unrealistic Hollywood Being part of Enlightenment can take Eterm
terminals in one window, as efficiently as mockups of computer interfaces, but to places that may be much more difficult to
possible. The ways in which you can nobodys forcing you to use it. reach for the other emulators. Enlightenment
is much more popular for embedded Linux
applications than the environments for which
the other terminals were designed (with the
possible exception of Konsole, if used inside
Plasma Active systems). Of course, what we
just said for Eterm also applies to Terminology,
Besides organising terminals
in tabs and sub-windows, which besides X11 also works in Wayland and
Terminator makes it easy to in the basic Linux framebuffer. Other features
control whole groups of them, of Terminology that, in certain scenarios, may
in broadcast mode. be useful to both beginners and power users
are its ability to display the content of links
inline and to smoothly reflow text when the
Terminology window is resized.
Terminology can use video clips as usual ones, but also quite efficient and Other users prefer the Konsole functions to
background, has a themable visual bell interesting. Besides looks, you get print the content of the window as it was
(the window flash when it wants to tell you splittable tabs and selection of rectangular before the execution of the last command, or
something), and it can display some blocks of texts (a godsend for bug to save it in plain text or HTML format.
graphics formats inline. reporting and text processing). Email Speaking of flexibility, here is one last thing
Every minute spent using this terminal addresses, URLs and file paths are you may like to know: in KDE, and likely in
reminds you that there is a whole desktop detected automatically, so copying and other environments as well, you can tell any
environment pretty different from the pasting them anywhere is a snap. independent window to become a tab of
another window. This makes it possible to run
all your favourite terminals (each with its own
tabs, sub-windows, etc) in just one window.
VERDICT
Eterm
No menus, no buttons, Guake
nothing in sight: Terminology Konsole
Terminator
couldnt look more spartan, Terminology
but its snappy control panel is
just one click away.
www.linuxvoice.com 57
GROUP TEST TERMINAL EMULATORS
Looks
Which of these applications is the tallest man in Liliput?
A
ll the emulators we tested can only for your Eterm instances, an image
have graphic, more or less as big as your desktop, but different
transparent backgrounds. Now, from the wallpaper. The result, as the
if we didnt think that looks matter, we Eterm man page puts it, is especially
wouldnt have devoted a big box to keen if you open several Eterms with
them, so do yourself a favour and dont the same viewport.
waste much time with fancy
backgrounds. Back in the 90s, when Why be boring?
KDE and GNOME were born, such The Terminology mantra is Why
backgrounds were cool, maybe even Should Terminals be boring? In our
necessary, to prove that Linux was not opinion, the configuration panels of Testing fonts, backgrounds and themes in Terminology is
necessarily dull. Today, they just make Terminology are the best-looking of the so easy and fun that you may forget to do any work.
text harder to read. group. Setting fonts and font sizes, a
The Eterm defaults are the worst critical feature, is easy and fun, even if Terminator, even the thickness of the
from this point of view. Every new there are many options. Terminology border between terminals in the same
Eterm pops up with a different also has a cursor that flashes along as window is configurable.
background image, which often seems you type, but it manages to do it Guake has all the important visual
chosen just to assault your eyes. without being irritating. configuration options, and it offers the
Besides, the Eterm menus only give There is not much to say about the ability to make scrolling happen either
three choices of font size (normal, other competitors, but dont take that when text output has filled the screen,
smaller, bigger) and too many choices as a critique. The graphical or only when you hit some key (which is
for brightness, contrast and gamma. configuration interfaces of Terminator the default).
Luckily, you can force Eterm to always and Konsole seem to us the best
look exactly as you want with compromise between ease of use and VERDICT
command line switches. number of options. Both emulators let Eterm
Guake
That said, if you do like image you zoom in or out, that is, set different Konsole
Terminator
backgrounds for text, try the Eterm font size in each tab or sub-window, by Terminology
viewport mode: it sets as background, just pressing Ctrl+ or Ctrl-. In
Documentation
What should I know, and where can I find it?
D
ocumentation is a tricky issue, man page. At the opposite end of the
as far as terminal emulators are scale we have Konsole: in addition to a
concerned. Thats why it handy Whats this? function, one click
deserves its own section in these in its Help menu opens the Konsole
pages. The issue we are talking about is section of the KDE handbook. There
related to the very nature of terminal youll find almost everything you need The Konsole handbook, reachable through the help menu,
emulators. The right choice of terminal to know about this terminal in simple is clear and complete.
make a big difference in how productive language, including an introduction to
you can be. However, by definition, any how to make scripts interact with reading, sources of documentation for
program of this kind is just like a Konsole via Dbus. Eterm are its FAQ and Technical
connector to the tools that hold the real Terminator only has two man pages: Reference at www.eterm.org. The latter
power: shells and other command one for the configuration options (man document is the only one that explains
interpreters. In other words, how much terminator_config) and one for the how to configure settings such as
you can do with an emulator depends command line switches. The interface, escape sequences.
first and foremost from how familiar however, is simple enough that this is
you are with those other programs. seldom a problem. VERDICT
This said, lets look at what the A click on the question mark in the Eterm
Guake
programs of this group test offer when bar of an Eterm window opens the man Konsole
Terminator
it comes to documentation. Guake page of this terminal, in another Eterm Terminology
seems to have nothing but a very terse window. Other useful, if not mandatory
58 www.linuxvoice.com
TERMINAL EMULATORS GROUP TEST
OUR VERDICT
Terminator
I
f you use the command line old computers, where every CPU
just to launch an occasional cycle counts. In all other cases, it Terminator: easy configuration interface, endless possibilities.
script a few times a week, has little that you cant find in the
practically any terminal emulator
would do. As a matter of fact, you
others, in a more usable package.
Terminology is perfect for people
1st Terminator
Licence GPLv2 Version 0.97
should probably attach that script who want many terminals but get
to an icon or menu entry of your bored by always looking at the http://gnometerminator.blogspot.com/p/introduction.html
desktop, rather than firing up a same stuff: its configuration panel Terminator is fast, full of features, has the most flexible layouts
terminal just to type its name. makes experimenting with colours, and is easy to configure. It also looks good without any fiddling.
In all other cases, which on Linux fonts and graphic styles so easy
means basically always, if you that it may kill your productivity. 2nd Konsole
want to fully exploit the power of Konsole (as youd expect from a Licence GPLv2 and GFDL Version 4.12.4
this operating system things are KDE application) demands some
much different. work to make it behave just as http://konsole.kde.org/
Having several terminals youd like, but it is powerful and well The official KDE terminal, perfectly integrated with that desktop,
but great even on its own. Not flashy, but solid and complete.
regularly open, each for one pre-configured enough that most www.enlightenment.org
If you need power, but cant do without an original look and feel,
different task (eg system people will be happy with it by just
Terminology makes it easy to get just what you want.
monitoring, file searches, web opening more tabs.
server administration) is not Terminator is not a fashion icon,
something that only top-notch IT but is good looking, at least as fast 4th Eterm
professionals must do its for as the others (on medium-powered Licence BSD Version 0.9.6
everyone. Thats where a terminal computers, at least) and, above all,
www.eterm.org
emulator that can bundle, flexible! If the terminal emulator of
Not needed in Enlightenment, now that we have Terminology,
preconfigure and run all those your dreams, the one that would but its still powerful and fast.
shells, makes a big difference. make you work happy, looks like a
If you are in the occasional patchwork quilt, be assured that
script category, go for Guake: Terminator can look like that, with
5th Guake
besides being made to order for relatively little effort. This, plus Licence GPLv2+ Version 0.4.4
that use case, it looks good and still custom commands and other www.guake.org
has tabs and other useful features. things we already mentioned, make Guake came last simply because it is more specialised than the
Eterm may be the best option of Terminator the winner of this others, but is a great tool all the same.
when you need lots of terminals on Group Test
www.linuxvoice.com 59
SUBSCRIBE
SUBSCRIBE shop.linuxvoice.com
Introducing Linux Voice,
the magazine that:
Gives 50% of its profits
back to Free Software
Licenses its content
CC-BY-SA within 9 months
Payment is in Pounds Sterling. 12-month subscribers will receive 12 issues of Linux Voice a year. 7-month
subscribers will receive 7 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.
64 www.linuxvoice.com
NEXT MONTH
NEXT MONTH IN
HACK
only by science and
match students
but then along came
John Kemeny and
Thomas Kurtzs
THE WEB
masterpiece: BASIC.
Pibrella
Program a simple
ashing board to
obey your command,
then use your skills
to ash up rude
messages on
Blackpools famed
Illuminations.
Nethack
www.linuxvoice.com
CLOUDADMIN
CLOUDADMIN
System administration technologies brought to you from the coalface of Linux.
Jonathan Roberts
dropped out of an MA
Logs
in Theology to work
with Linux. A Fedora
Get started with your distros built-in log management tools.
advocate and systems
A
administrator, we hear
fter three months looking at exciting The request itself.
his calming tones
whenever were stuck new technologies, this issue I want The status code (the result of the request).
with something hard. to step back and look at something How many bytes were returned to the
far less glamorous: logging. Often an clients.
Ive said it before and Ill say it again: as a afterthought to developers and system It only takes a little bit of imagination to
system administrator, all I want is a quiet administrators alike, collecting, monitoring see how storing all this information can be
life. I want to be able to walk out of work,
and using logs is one of the best things you useful. You can map IP addresses to
on call, and know that Im not going to be
can do for your infrastructure. Lets start geographic location, letting you know where
woken in the night. Unfortunately, thats
just not going to happen. Accidents with the basics what are logs and why in the world your sites visitors are coming
happen and hardware fails. Its a fact of should you care? from; you can see which web pages are
life, and a perfectly quiet life is not Logs are how non-interactive components most popular; you can even see if any pages
realistic. If not a quiet life, then, we ought of your system communicate with you, the experience more errors than others and at
at least to aim for an anxiety free life. user. Each time an action takes place a note what times those errors occur.
Although it passed me by at the time, I will get written to a le (the log) somewhere Other logs on your system can help you
now see that 31 March was World Backup on your hard drive. Most logs contain one keep things secure, too. For instance, on
Day a friendly reminder that we should entry per line in the le. In the case of a web Red Hat-based systems, you can look in the
all be backing up our stuff. As a system server, for example, an entry will probably be /var/log/secure le and see a record of who
administrator, just knowing that youre
in the Common Log Format: logged in and when. You will also be able to
backing up all your important data,
192.168.79.2 - - [27/Apr/2014:13:55:36 +0000] GET see failed login attempts, commands
checking that the backups are actually
running and that you can restore them in /lv.html HTTP/1.1 200 2326 executed with sudo and more besides. In the
case of disaster, will go a long way to Here, you see: event of a security incident, your logs can be
reducing your anxiety. In an age of The IP address of the user who visited the an invaluable source of information to help
conguration management, Amazon Web website. you understand how it happened, what
Services and the like, you should go one (Two empty elds not logged in this damage was done, and how to stop it
step further: you ought to know that you example, represented by dashes). happening again in the future.
can quickly, accurately and automatically The date time and timezone when the Now you know what logs are and why you
rebuild every single one of your systems. server nished dealing with the request. should care about them, lets look at how you
Destroy to rebuild
Ideally, this means taking advantage of all
that redundancy youve built in to your
platform. Running a web farm behind a
load balancer? When you release new
software, dont just push it out to the
existing servers; build new servers and
destroy the old ones. Running a database
cluster and doing an OS upgrade? Dont
just do a yum update and reboot; rebuild
the server, restore your data and destroy
the old one.
Having done this a thousand times,
knowing that you can rebuild your systems
and restore critical data to them will cut
out so much anxiety from your life as a
system administrator.
RSyslog comes with a comprehensive set of documentation if you install the rsyslog-doc package.
Youll nd it installed in /usr/share/doc/rsyslog-docs/.
62 www.linuxvoice.com
CLOUDADMIN
RSyslog
In syslog-based systems, each message
gets categorised with a facility and a priority.
The facility describes which subsystem
generated the messages, and can be one of
auth, authpriv, cron, daemon, kern, lpr, mail,
news, syslog, user, uucp, and local0 through /var/log/messages is overwhelming at rst, but it contains a treasure trove of information. Next
local7. The local07 facilities are used for time youre trying to gure out why something doesnt work, make /var/log your rst stop.
custom applications and reserved for the
user to specify. written (backup scripts etc), then you can $ModLoad imudp
The priority describes whether the use the logger command. Use is simple: $UDPServerRun 514
message is just informational or whether it logger -p local2.info Database backup started. ...
relates to one of various error states. This will send your dened message to $template web,/var/log/remote/%fromhost%/%year
Available priorities are debug, info, notice, syslog with the facility local2 and priority %/%month%/%day%/error.log
warning, err, crit, alert, and emerg. info. You can then congure where such ...
The syslog daemon your computer is messages end up by adding a new entry to local7.error ?web
running will be congured to store the /etc/rsyslog.conf le. This snippet instructs RSyslog to load the
messages of different facility and priority Whats great about using logger is that imudp module, which lets it receive logs via
combinations in different locations. On a you dont have to worry about formatting the UDP protocol, and instructs it to listen on
Red Hat-based system, you can see what your message: logger will automatically port 514. Below that, we dene a template
the default conguration is like by looking in append date, host and user information to for the output le name. In this example,
/etc/rsyslog.conf. For now, just skip to the your messages. weve included a number of properties that
#### RULES #### section. Try playing with this to see if you can will get expanded by RSyslog on receipt of
Here, you can see lines dening where generate a message in /var/log/messages messages to create the full path to the log
different messages go. To explain the on most systems, if you run logger le. Finally, we lter all local7 facility error
syntax, look at this example: without the -p option, youll nd your messages to go to this template (the ?
*.info /var/log/messages message in /var/log/messages due to a line indicates that a template is being used in
On the left is a lter to match log similar to the following in /etc/rsyslog.conf: the action).
messages: in this example, messages of *.info;mail.none;authpriv.none;cron.none Remotely storing logs like this isnt just
any facility with the priority info will be /var/log/messages convenient, it can help improve security, too.
matched. On the right is the action that is, In the event of a breach, you have a second
what should happen to the message. In this Logrotate set of logs kept elsewhere. If the attacker
example, the matched messages will be As great as syslog is, if you ever nd yourself wants to cover their tracks, they now have to
sent to the le /var/log/messages (note that managing a cluster of more than two break into a further server if theyre to get at
most log messages will be stored in the servers, youll quickly nd yourself getting all copies of the logs.
/var/log directory by default its always a annoyed with logging in to many different
good place to start when looking for a log). servers just to get a picture of whats What next?
If you want to, you can use this le to happening across your entire cluster. That was a brief introduction to logging in
redirect certain log messages to different Thankfully, RSyslog provides the means Linux and rsyslog in particular. Theres much
les. Be sure to restart the rsyslog daemon by which you can centralise your logs. For more you can do with logs, however, and
after you make changes. Remember that example: next months issue well introduce you to
many application might dene their own *.* @192.168.79.10 Logstash. This open source tool can be
logging arrangements, so you could nd, for Putting this line in your RSyslog taught how to parse your logs, after which it
example, that your web server has its own conguration le will instruct RSyslog to will index them, make it easy for you to
log conguration in /etc/httpd/conf/httpd. forward messages of all facilities and generate pretty graphs and extract useful
conf or in individual virtual host denitions. priorities to the machine at 192.168.79.10. information from all those text les all
Keep this in mind if you cant nd the log le Pretty simple, and you can lter messages in without having to touch grep and with
youre looking for. exactly the same way as shown for local lightning speed.
If you want to interact with the syslog logging, too. Setting up the receiving server Until then, run back to your desk and sort
implementation from shell scripts youve isnt much more difcult: out your logging youll thank us!
www.linuxvoice.com 63
CORETECHNOLOGY
CORE
A veteran Unix and Linux
enthusiast, Chris Brown has
written and delivered open
source training from New Delhi
to San Francisco, though not on
TECHNOLOGY
the same day. Dive under the skin of your Linux system to find out what really makes it tick.
Processes
All the worlds a Unix filesystem/and all the processes merely players
Y
oure undoubtedly aware that information it carries. Take a look at the is only one way to actually do it, and thats
Linux, like most modern operating table, below. for a process to create a copy of itself. This
systems, can run many applications operation is called forking. The new process
at the same time, through a feature called Everything you know is wrong is called the child and the original process
multi-processing, or multi-tasking. I can Even if youre not a programmer, youll be is called the parent. The child shares the
easily count the number of processes that used to some of these concepts. Take the code segment with the parent that is, it is
my machine is running with a command notion of a current directory for instance (as executing the same program. It receives a
such as: reported by the pwd command). You think of copy of the data segment, the stack, and
ps -e | wc -l yourself as being in a particular directory. the heap. (The reality is actually a bit more
The answer turns out to be 175, which But really, its the process thats running complicated. These memory regions are not
seems quite a lot for a humble laptop thats your shell that holds the concept of current copied piecemeal, but the copy-on-write
basically just editing a text file. directory. Youre probably also aware that operation of the virtual memory system
So how do all these processes come into youre running as a specific user, as reported makes things behave as if they were.) The
being? Well, some of them are started at by the id command. But again, its really child also inherits many other things user
boot time. These are the system services the process thats running your shell that ID, current directory and so on from
(usually referred to as daemons), and many maintains the notion of user identity. This is the parent. In fact, the child begins life
of them may continue to run indefinitely, the identity thats used when access control essentially as an exact clone of the parent
until the system is shut down. Some checks are made am I allowed to write to except for one small thing it has a different
services (such as the Apache web server) such-and-such a file, for example. process ID. Returning to our actor/script
maintain a pool of processes to enable them Although there are many circumstances analogy, forking is roughly analogous to
to promptly service multiple concurrent under which a new process is started, there our original (parent) actor calling out to the
clients. Quite a lot of processes come into
existence when the desktop is started. Of Information carried by a process
the 175 processes I counted earlier, rather
more than 60 are there to give life to my Item Description
desktop or to run the applications that are Process ID (PID) Unique integer identifying the process
active there. Finally, some processes are Code segment Memory region that holds the programs executable instructions
started by my own actions when I launch an Data segment Memory region that holds statically defined data
application from a menu or dahsboard, or I Stack Expandable memory region used to store local function variables
type a command at a shell prompt. Heap Expandable memory region used to store dynamically allocated objects
A process is sometimes defined as Priority Determines how favoured the process will be by the scheduler.
an instance of a program in execution. Derived from the nice value
The analogy of an actor reading from the Signal disposition The way that the process responds to the receipts of signals
script of a play may be useful the script are they caught, ignored, etc.
represents the program: the passive list Environment A list of environment variables of the form NAME=VALUE
of instructions of whats to be done. The File descriptors Handles on streams that are available for reading or writing
actor represents the process, the active (includes stdin, stdout and stderr)
entity responsible for carrying out those UID Read user identity
instructions. But perhaps the best way EUID Effective user identity
to get a handle on what a process is is to CWD Current working directory
delve more deeply into the resources and
64 www.linuxvoice.com
CORETECHNOLOGY
Try It Out
Compile C code } else {
To compile the C examples in this tutorial youll for (i=0; i<10000; i++)
need to install the C compiler (GCC). On a Debian- printf( **CHILD %d\n, i);
style system use this command: }
# apt-get install gcc }
and on a Red Hat-style system: To compile the program, run the command:
# yum install gcc $ gcc -o forkdemo forkdemo.c
Now create a file called forkdemo.c with and assuming you dont get any compilation
content as follows: errors, run it like this...
#include <stdio.h> $ ./forkdemo
void main() The thing to notice here is that the output
{ from the parent and the child is interleaved in a
int i; non-deterministic way, as the scheduler switches
if (fork()) { back and forth between the processes. Its also
for (i=0; i<10000; i++) possible (rather likely in fact) that some of the
printf(** PARENT %d\n, i); CHILD messages will appear AFTER the shells The classic fork/exec/exit/wait model. This is
next prompt.
what happens every time you run a command.
wings for a new actor, who trots out onto exec() is akin to the actor discarding his last command through the variable $?. For
the stage and stands by the side of the first current script, picking up a copy of Macbeth, example,
actor, sharing a copy of the script. and starting at the beginning. He remains $ grep root /etc/passwd
the same actor, but hes performing a root:x:0:0:root:/root:/bin/bash
Scary C code different play. There are, in fact, six versions $ echo $?
To see how this really works Im going to of the exec call, but I will not burden you with 0
inflict a few lines of C code on you. The the minutiae of their differences. The call is $ grep xyzzy /etc/passwd
action here centres around the fork() unusual in that it doesnt return except in the $ echo $?
system call. Its a simple enough call -- it case that it fails (usually because it cant find 1
takes no arguments and returns just an the executable). $ grep root /etc/xyzzy
integer result but of all the system calls in Two other system calls are important grep: /etc/xyzzy: No such file or directory
Linux its perhaps the one that is hardest to for management of processes exit() and $ echo $?
get to grips with, because although only one wait(). The exit() call is simple enough it 2
process makes the call, two processes terminates the process. You can pass an Here we see that grep returns an exit status
return from it the original parent and the integer argument to exit(), which is passed of 1 if it doesnt find the pattern and 2 if it
new child. They figure out which is which by back to the parent process and is known cant find the input file.
examining the return value from the call. In as the exit status. The convention is that The wait() call is used by a parent process
the parent, fork() returns the PID of the an exit status of zero indicates a normal, to wait until its child process (or one of its
newly-created child. In the child, it returns successful termination, and non-zero values children) terminates. This call can also be
zero. So you invariably see the fork() call indicate failure of some sort. used to retrieve the exit status of the child.
wrapped inside an if test. Keeping in mind For programs started from a shell Using fork(), exec(), exit() and wait() we can write a
that in C any non-zero integer value counts prompt, you can find the exit status of the minimal shell:
as true, and zero counts as false, the code
might look something like the boxout above.
Sometimes, parent and child continue to
Try It Out
execute the same program. This happens, Write a shell }
for example, when Apache spawns its pool Create a file called tinyshell.c with this content: else wait(0); /* Parent */
of spare server processes. More often, #include <stdio.h> }
though, the child will start to execute a #include <unistd.h> }
different program. This is what happens, for #include <stdlib.h> Now compile and run it something like this:
example, when I type a command into the /* A minimal shell */ $ gcc -o tinyshell tinyshell.c
main() $ ./tinyshell
shell. (Im talking about running a command
{ > date
that lives in an external executable file, not a
char line[100]; Wed Mar 19 15:25:35 GMT 2014
built-in shell command such as echo or cd.) /* Main command loop */ > hostname
A process runs a new program by executing while (printf(> ), gets(line) != NULL) { ubuntu1204
an exec() system call. In doing this, the code, if (fork() == 0) { /* Child */ > who
date, stack and heap of the old program are execlp(line, line, (char *)0); chris tty7 2014-03-19 13:52
discarded; however, the process retains its /* Dont come here unless execlp fails */ chris pts/0 2014-03-19 14:05 (:0)
process ID, its current directory, its open file printf(%s: not found\n, line); > ls -l
descriptors, and (usually) its environment. exit(1); ls -l: not found
To return to our actor/script analogy, an
www.linuxvoice.com 65
CORETECHNOLOGY
66 www.linuxvoice.com
CORETECHNOLOGY
you can examine the environment of your like crontab and the command line mail make it easy to run multiple applications on
shells process with the env command: program which editor to use) DISPLAY a single host, all the while ensuring each
$ env (which tells graphical programs where their remains separate.
SSH_AGENT_PID=31487 X server is) and CLASSPATH, which tells But you can do that with processes too! In
TERM=xterm Java apps where to look for their class files. fact we can see threads and processes as
SHELL=/bin/bash Environment variables are commonly set in one end of a spectrum of containment
USER=chris shell startup files such as /etc/profile. technologies, with chroot jails, containers
LANG=en_GB.UTF-8 and full-blown virtualisation at the other end.
HOME=/home/chris As a final thought As we move across the spectrum, less is
The list Ive shown here is vastly stripped Theres quite a bit of interest at the moment shared and more is separate. For example,
down. As they are inherited, environment in Linux Containers, which is finally reaching processes all share the same TCP/IP port
variables can be used to pass configuration some level of maturity. In his excellent space I cant have two processes binding
information to applications. Examples feature about them in LV002, Jonathan to port 22. Each container, on the other
include EDITOR, (which tells commands Roberts wrote: The idea of containers is to hand, provides a separate port space.
www.linuxvoice.com 67
FOSSPICKS
Mike Saunders has spent a decade mining the internet for free
software treasures. Heres the result of his latest haul
CD/DVD image editor
68 www.linuxvoice.com
FOSSPICKS
Dianara 1.2.0
T
he big social networking Pump.io account. And if you dont
sites, such as Facebook, have one of those yet, you can get
Google+ and Twitter, have one from many different sites we
two major problems: theyre all used https://pumpit.info.
massively centralised, and they Reassuringly, the Pump.io service
retain scary amounts of personal doesnt just let random applications
data about us. Its not all bad connect to your account and post
though. Pump.io is an example of a things (a sure source of spam), so
social networking service that is Dianara needs a validation key and
both open source and decentralised confirmation from the web
that is, anyone can run a server interface that you want to link the
that becomes part of the network. program to your account.
So no single company owns or
controls the service, and if one Pump.io up the volume
machine goes down, users Pump.io is a relatively simple
registered on another machine service compared with the Dianara crams plenty of information and widgets into its window,
wont be affected. Anyone can set making better use of space than the web interface.
heavyweights of Facebook and
up their own Pump.io node (even Google+, and this is reflected in the
on low-spec kit such as a application. You can post packs in a good amount of
Raspberry Pi), so if anyone is messages to your timeline (plain functionality. Its also decently
interested in a tutorial, let us know. text, or with media attachments), configurable, with options for
Anyway, Dianara is a graphical follow people to see what theyre up changing how notifications work
application for accessing your to, and click stars on posts to add and how often the timeline should
Pump.io account without having to them to your Favourites list. You be updated. Theres not much in the
go through a web browser. Its can also add comments to posts, way of online help, although the tips
interface is built using Qt, and to share them with other people, and are useful.
install it youll need the qjson-devel, set up lists (to separate friends The biggest problem for Pump.io
qoauth-devel and libmagic-devel from colleagues, for instance). is its relatively small userbase. But
packages. Extract the dianara- In all its an attractive and its a great system, so if we all get
v1.2.0.tar.gz archive and see the newbie-friendly program that still on Pump.io, maybe we can finally
INSTALL file inside for detailed show that info-hoarding Zuckerberg
installation instructions, including a
helpful list of dependencies for
Maybe we can finally show that fella whos boss
www.linuxvoice.com 69
FOSSPICKS
Firejail 0.9
C
ontainers, virtual machines, something strange? Yes, there are
chroot jails There are many only two processes listed and PID
ways to run programs in 1 (which is normally /sbin/init) is
restricted sandboxes, where they the current Bash process. Firejail
cant interfere with the rest of the has created its own process
system. This is great idea if youre namespace for this Bash session,
ramping up security measures, or so it cant poke around and discover
youre running a program from an anything else thats running.
unknown source and want to make Another useful option is:
sure it doesnt hose your distro. firejail --overlay bash
Setting up these sandboxes can be If you have OverlayFS enabled in
With the --overlay
tricky, though so Firejail provides your kernel, this will overlay a providing them with their own TCP/
option, file changes
an easier alternative. temporary filesystem onto the inside a Firejail session IP stacks, and it includes a simple
Both RPM and Deb binary current one. So you can create and are forgotten when the monitoring tool (firemon, which
packages are available to download modify files inside the jailed session ends. shows activity in Firejail sessions).
from the programs website, or you environment, but when you access In all its a simple and user-friendly
can compile it from its source code it, all of the changes are forgotten. way to run applications in restricted
(it has no unusual dependencies This is great when you have environments, so if youve been
and should install on any recent programs that need to write files, bamboozled with VMs, containers
distro). Once you have it installed, but you want to revert to the original and chroot commands, give it a go.
run it along with a program like so: state of the filesystem when you
firejail bash close them. PROJECT WEBSITE
Now, inside the new Bash shell Firejail includes various other http://l3net.wordpress.com/projects/
firejail
session, enter ps ax. Notice ways to sandbox programs, like
Streamtuner2 2.1.0
F
or various reasons, mostly to player such as Audacious to hear
do with mountains and the streams. When you start
wheat beer, this author Streamtuner2 for the first time, it
started learning German four years asks you which player you want to
ago. It has been a tough ride, but use. Then it presents you with
one of the things that helped is the several internet radio station
abundance of German radio directories, some of which didnt
stations on the internet. work in our testing, which was
There are thousands of radio slightly annoying. We had the most
stations being broadcast via the luck with the SHOUTcast and Music
internet, and while you can access Goal services.
Fancy some Top Albania
them via your browser, its easier With thousands of stations to choose bookmark. Youll then find
Radio? Or perhaps some
and faster to search via a dedicated browse, across all manner of Bluegrass Jamboree? that station under the Bookmarks
program. Streamtuner2 is one such genres and languages, it can be Streamtuner2 has it all. tab, on the far left of the tab bar.
app: its written in Python with GTK difficult to remember your Streamtuner2 has some rough
as its front-end, so youll need the favourites. So Streamtuner2 edges in the layout and wording
pygtk package installed to run it. includes a handy bookmarking used in the interface, but its still a
Generic Deb and RPM packages system: right-click on a station and good way to explore the vast world
are available on the projects of internet radio.
website, and we had no problem
installing the Deb on Ubuntu 13.10.
Streamtuner2 includes a handy PROJECT WEBSITE
Streamtuner2 doesnt play audio bookmarking system. http://milki.include-once.org/
streamtuner2
itself youll need a standalone
70 www.linuxvoice.com
FOSSPICKS
Compression utility
PeaZip 5.3
P
eaZip is a graphical tiring work, so kudos to the devs for
application for creating and putting a lot of effort in.
extracting compressed PeaZips interface is attractive,
archives, and as of the latest clean and largely self-explanatory,
release, it supports over 150 archive so we wont dwell on it here, but
formats. (Yes, 150 thats not a instead focus on the new features.
typo!) Along with the usual The biggest addition in 5.3 is the
suspects such as Zip and .tar.gz, Compression Profiles. Go to File >
the program can work with Create Archive, and in the dialog
relatively obscure formats such as that appears, click on the down
.arc and .arj. If you created some arrow to the left of the OK button.
Compression Profiles
archives with a random piece of This provides some pre-created make it a one-click job Also in 5.3 are improvements to
shareware on your Amiga back in settings for compression, such as to choose formats and the file manager (such as a better
the early 90s, chances are that 7zip with password or Keep options. treeview sidebar), while bookmarks
PeaZip can still open them. output under 10MB for email can be sorted. The inclusion filters
PeaZip can use GTK or Qt for its attachments. These shortcuts are that you can use when choosing
interface, and along with Deb and very handy when you dont have which files should go in an archive
RPM packages, there are portable time to poke around inside are more flexible too. PeaZip just
versions that can be run without individual settings boxes. keeps getting better and better
installation. Just extract the .tar.gz its an outstanding piece of work.
file, jump into the resulting directory,
and run peazip inside. Packaging PeaZips interface is attractive,
up software to run across the
myriad Linux distros out there is
clean and self-explanatory. PROJECT WEBSITE
http://peazip.sourceforge.net
Password manager
gpgpwd 0.4
I
n the wake of the Heartbleed If youve used the GPG encryption
OpenSSL vulnerability most tools before, youre ready to go
major sites and services have but if not, enter gpg --gen-key to
recommended that users change create a new encryption key. Youll
their passwords and, of course, be prompted for a password, and
its a bad idea to use the same this will become the master
password across multiple sites. password youll use to access other
So weve all ended up with another passwords via gpgpwd. To create a
bunch of passwords to remember, new entry in gpgpwds database:
and for those of us without gpgpwd set somesite.com
gpgpwd is low on
incredible memories, a password Here, gpgpwd will ask you for a password that is, the GPG
dependencies, uses
manager comes in mightily useful. password for somesite.com, or existing tools (GPG) for password you used during the
gpgpwd is a great little manager offer to create a new one. A few security, and works --gen-key command earlier.
written in Perl and requiring the commands are available for without any faffing Passwords are stored in the
JSON and Try-Tiny modules, which generating passwords: around. encrypted .gpgpwddb database file
are available as libjson-perl and /alphanumeric 20, for instance, will in your home directory, and to
libtry-tiny-perl in Debian/Ubuntu- generate a random 20-letter/ remove them from the database,
based distros. Extract the program, number password. Hit Enter, and use gpgpwd remove followed by
switch into the resulting directory the password will be stored. To the site name.
and install as follows: retrieve it in future:
tar xfv gpgpwd-0.4.tar.bz2 gpgpwd get somesite.com
PROJECT WEBSITE
cd gpgpwd-0.4 When you do this, youll be
http://random.zerodogg.org/gpgpwd
sudo make install prompted for your master
www.linuxvoice.com 71
FOSSPICKS
Checkit 0.2.0
I
f youve ever downloaded a (as root) procedure. Go into a
large file such as a distro CD/ directory containing files that you
DVD ISO image, youll probably want to check, and run this:
have seen a file called MD5SUM (or checkit -s -o *
SHA256SUM) to go alongside it. This stores and overwrites the
This contains a checksum a checksum for all the files in the
sequence of characters that can be current directory, storing the
used to check the integrity of the checksums in the files extended
download. This is all good, but if attributes (ie the bit of the
you need to watch the integrity of filesystem that contains metadata
many files on your filesystem, it about a file, such as its creation
After weve modified
becomes a bit fiddly to have foo. date). Your filesystem needs to checksums, and shows you which
test.txt, Checkit
md5sum and bar.md5sum files all have extended attribute support for gives us a red failed files have changed.
over the place. And then you have this to work, but if youre using message to show that Checkit isnt a replacement for a
to run the md5sum tool each time ext3/4, XFS, JFS or BTRFS youll be the file has changed. full-on intrusion detection system,
Checkit makes the whole process a fine. Now modify one of the files, and its limited to certain formats
lot easier by embedding a and then run: and filesystems (many archive
checksum into a files extended checkit -c * formats dont save extended
attributes (so you dont need This checks all files against their attributes, for instance). But for
separate files) and letting you do simple jobs it works just fine.
batch checks on multiple files.
Its only dependency is libattr1- Chechit embeds a checksum into PROJECT WEBSITE
dev, and you install it with the usual
./configure, make and make install
a files extended attributes. http://dennisk.customer.netspace.net.
au/checkit.html
Text editor
LE 1.15
I
n last issues cover feature we between formats. We used:
gave mad props to Vim, but we alien --to-deb le-1.15.0-1.x86_64.rpm
appreciate that not everyone Along the bottom youll see a
likes its mode-based operation and status line containing information
(initially) confusing keybindings. about the current file, while hitting
Emacs is a hugely powerful F10 (or Ctrl+B) opens the menu at
alternative, but it can still be tricky the top. Use the arrow keys to
to learn all the Ctrl/Meta+key navigate through the menus, and
commands. If youve come from an enter to open them. Youll also see
MS-DOS background, you might keyboard shortcuts in the menu
want a more accessible editor that eg F2 to save, or Ctrl+F to search.
LE is reasonably
presents its options in familiar you convert between Unix and
configurable, and if you
menus and LE could be exactly Back to the old house dont like the default DOS-style text files (they have
what you need. LE includes all the common colour scheme, others different line ending characters).
Despite having decent knowledge features youd expect in a decent are available. While its not the ultimate kitchen
of C, we couldnt get past the fiddly editor: syntax highlighting, search sink editor like Emacs, it does 95%
errors that cropped up when we and replace with regular of what most people need, and the
tried to compile LE from source, so expressions, line and column menu-based interface makes it
we converted the RPM package selections (with many available easy to pick up.
from http://lav.yar.ru/download/le/ operations to perform on them),
binaries/ to a Deb for our Ubuntu UTF-* support, custom colours and
PROJECT WEBSITE
system using alien. This is a very more. It can be used as a hex editor
https://github.com/lavv17/le
handy tool for converting packages (see the -h option), and even lets
72 www.linuxvoice.com
FOSSPICKS
Holtz 1.4.0
H
oltz isnt a single game games. The first, Zertz, is designed
as such its an engine for two players, but if youre on your
for four board games. own, you can set up the computer
And these arent your common- as an AI player. It combines
or-garden board games either, but elements of draughts and solitaire,
abstract strategy games that take and every time you lay a piece, you
a while to get your head around. remove a space on the board, so
Sadly, the README file is blank the playing area gradually gets
and the INSTALL file contains smaller. (The rules are complicated,
generic GNU build instructions so click Help > Contents in the
from 2002, so heres how to menu to get the full description.)
This is Relax, where
compile it: install the wxWidgets involves racing from the corners
your goal is to place
development packages from your Game of four halves pieces so that the to grab as much space on the
distros package manager (eg Dvonn, meanwhile, is another two- coloured lines extend board as possible.
libwxgtk2.8-dev and player game, which involves for as long as possible. Holtz is a brilliant little package,
wx2.8-headers) along with Boost stacking pieces on top of one and some of the games will keep
(libboost-dev). Then run another to control areas of the you busy for hours, even if they
./configure, make and sudo board, while Relax is a good seem rather odd at first.
make install, followed by holtzt to single-player game where you have
start the game. to score points by placing colour-
Click File > New in the menu to aligned pieces. The final game, PROJECT WEBSITE
http://holtz.sourceforge.net
choose one of the four included Bloks, is for two or four players and
Galois 0.3
T
etris has pretty much regular Tetris game will kick off. By
been done to death at this default, Galoiss Tetrisy games run
point, although we still see at a fair pace, but you can change
new versions on Freecode.com that by going to Game > Stop and
every week. So at first we almost then Game > Preferences (see
skipped over Galois, but then we Initial speed level). This is also
saw the screenshots, and just where youll choose a different
had to try it. Galois is a Tetris format, such as hexagonal or
engine that includes the classic triangular bricks.
game, but also some variants
with different shapes. To compile Ill have a T please, Bob
Whats this Tetris? Or
it, youll need GTK 2.4 and We love the hexagonal version: its Theres only one flaw: pressing
Blockbusters? Or some
LibXML++ 2.6; in Debian and similar enough to Tetris that it ker-azy mutant hybrid Esc to pause leaves the screen
Ubuntu-based distros, these are doesnt take long to pick up, and of both? intact, so you can plan your next
provided in the libgtkmm-2.4-dev many of the tactics you use in the move (the screen goes blank in
and libxml++2.6-dev packages. classic game still apply. The most Tetris variants). Well submit
When you start Galois, youre controls are as usual for Tetris, but a bug report
presented with a grand total of the unusual shapes make the game
nothing. Just a grey screen. Click different enough to exercise other
PROJECT WEBSITE
Game > New in the menu, neurons in your noggin, and www.nongnu.org/galois
however, and a version of the especially difficult at times too.
www.linuxvoice.com 73
LISTEN TO THE PODCAST
WWW.LINUXVOICE.COM
72
TUTORIALS INTRO
TUTORIALS
Dip your toe into a pool full of Linux knowledge with nine
tutorials lovingly crafted to expand your Linux consciousness.
In this issue
76 78 84
Ben Everard
Is off to investigate Linux usage on the Mull of
Kintyre. Next issue: the frog chorus.
M
Fonts are the handwriting Transform an ice cream tub, If you want to take pictures
oney has always been a
of computers. Create a Raspberry Pi, a mobile of badgers but youre afraid
thorny subject in the Free
your very own personal phone and two motors into of catching bovine TB,
Software world. Theres
typography, with Mike a robot in just six pages full follow Jon Archers example
no doubt that some companies are
Saunders and BirdFont. of Ben Everards words. and build a remote camera.
making huge amounts of profit on the
back of open source software. In fact,
we cant think of any major technology 86 90 94
companies that dont. However, many
of the projects that support these
companies are chronically short of
money. OpenSSL is a famous example
of this, but there are many more.
Fortunately, it seems to be sinking in
that essential infrastructure needs to
be funded properly. Pitivi, The Blender
Harden a server Move from XP von Neumann
Foundation and MediaGoblin have all Linux can be secure, but it Its the OS that we love to Juliette Kemp moves on to
raised significant amounts of money isnt always. Heres what hate, and its embedded it- John von Neumann, the
in crowdfunding. Elementary OS is you can do to prevent nasty self so deeply that its hard architect of the modern
working with BountySource.com to hackers and botnets from to get rid of. Mark Crutch computer, inventer of
provide cash incentives to people fixing getting into your servers keeps XP alive (undead?) in cellular automata and
bugs. Hopefully, 2014 will be a turning by Mike Saunders. VirtualBox. developer of the first virus.
point in the funding of Free Software.
Much as we may like the thought of
developers working on open source PROGRAMMING
projects for nothing, the truth is that
complex software requires time and FPGAs Error detection Android Studio
even the most altruistic people have 98 Design your own 102 Data errors are an 104 Google has just released
bills to pay. In the past, most paid microchips. Really! With an unfortunate fact of life. a new development
FPGA board you can load new However, that doesnt mean we environment: Android Studio. Its
open source developers were paid by
designs onto Field Programmable should just sit back and meekly based on IntelliJ IDEA, and it looks
corporations and followed their agenda. Gate Arrays and implement your accept our fate. With a bit of great. We take a look around the
By funding development directly, you get own integrated circuits. We start clever maths, we can fight back preview version and show you how
a say in what direction the project takes, simple and investigate some against flipped bits and ensure to create a simple smartphone
and you can help struggling projects chips using the ZPU processor, that the data that arrives is the app to help you digest all the
then build a few circuits that same data that we send, because latest news from the Linux Voice
keep developing great software.
use them. no-one likes nasty surprises. RSS feed.
ben@linuxvoice.com
www.linuxvoice.com 75
TUTORIAL DIY TYPEFACES
I
f you were using Linux in the late 90s (or youve
WHY DO THIS? seen screenshots of the desktop environments
Create funky typefaces back then), youll know that it was pretty ugly.
from scratch or based
on existing designs Fonts, in particular, were a bit of a disaster area. Today
Give your printed we have gorgeous desktops and window managers, The street sign well be using to create the lowercase a
documents or website a and distros ship with oodles of top-quality, free-as-in- character in our custom font.
unique feel freedom fonts. But have you ever considered making
Export to TTF, EOT and your own font? You can create one from scratch if from the projects website, extract it, and follow the
SVG formats
youre full of ideas, or base one on an existing design instructions in the README. Once you have it
eg an old document or a logo. Its much simpler installed, just enter birdfont in a terminal to start it.
than it sounds, so well explain how. In this tutorial well use an existing design as the
To make our custom font well be using BirdFont basis for a font. Well take a street sign and create a
(www.birdfont.org), an excellent font editor that runs glyph (font character) of the letter a from it. Of
on Linux, Mac OS X and Windows. Packages are course, if you want to make a complete font then
available for many distros, but if you cant find it in youll need an image that contains all letters
your distros repositories, grab birdfont-0.37.tar.gz (uppercase and lowercase) along with numbers.
76 www.linuxvoice.com
DIY TYPEFACES TUTORIAL
3
Smoothen the edges 4
Align the paths
Back in the bottom-right of the toolbox, click the Click the (show/hide background) button again.
icon (show/hide background image). Then click the Chances are that the current paths wont be 100%
button at the top. Now hold down Shift, and click on all perfectly in sync with the original image, so click and
of the blue points on the outline, going round the drag the blue points to line them up (theyre Bzier
whole glyph clockwise. When theyre all selected, click curves, so you can also alter them with the green
the (tie curve handles) button in the tool pane and points). If you have an area that needs removing, like
the edges will be rounded out. the hole in the bottom of the a character, for instance,
draw a new path as per the previous instructions, and
when its complete click on Create Counter From
Outline). Then smooth out the points as in step 3, to
get the result shown below.
That looks a lot better! With the edges rounded its Here weve added the inside part of the character as a
starting to look like a proper character. counter path. We wont be giving up the day job.
5
Preview it
When youre happy with everything, go to File >
Preview (youll be asked to enter a name for the font).
Then a Preview tab will appear, showing your glyph
being used in some example sentences.
If youre happy with the results, congratulations
you can now go on to do all the other letters! (It might
be a long job.) If you need to fine-tune the character
more, click its tab again, choose the arrow (Move
Points) button in the tool pane, and fine-tune it. And
if you need any help, pop by our wonderful forums at Our new a character in BirdFonts Preview. Sure, it looks
http://forums.linuxvoice.com. rather out of place, but when weve done the others
www.linuxvoice.com 77
TUTORIAL BUILD A MARS ROVER
RASPBERRY PI:
TUTORIAL
BUILD A MARS ROVER
Polish your CV and call NASA: youre about to become
BEN EVERARD
a professional-grade robot builder.
R
obotics is a complex area that requires a phones should work, though youll need the
WHY DO THIS? combination of electronics understanding appropriate development environment).
Get started with robotics and the ability to use specilised If you havent worked with robotics before, the final
Learn more about the machinery. That last sentence is a common four might sound a little complex, but dont worry, they
Raspberry Pi
sentiment, but its utter balderdash. Modern neednt be. While you could use almost any motors
Build a robot army and
take over the world development boards like the Raspberry Pi (and the you can get your hands on, there are some easy,
host of expansions that do with them) combined with reasonably priced ones that are particularly easy to
the flexibility of Linux makes robotics incredibly easy. use from PiBorg (http://piborg.org/accessories/
To prove this, were going to build a Mars rover-type dc-motor-gearbox-wheel) and other suppliers. You
buggy based on a Raspberry Pi. Youll be able to only need two of these to drive the robot, and the only
control it remotely, and itll stream video back to the assembly is pushing the wheel onto the axle.
controller. To make control really easy, well build a
smartphone app to use the phones accelerometer, so Reliant Mars Robin
you can drive the buggy by turning the phone (much For the final wheel (ours has three, but yours could
like the controls in many smartphone video games). have four), we used a ball caster (like this one: http://
There are quite a few parts to this, and well be shop.pimoroni.com/products/pololu-ball-caster-
using a few different technologies to control different with-3-4-metal-ball). This allowed the back of the
parts, but thanks to the wide range of development buggy to move freely and follow the front two wheels.
tools on Linux, its not as difficult as it sounds. The Raspberry Pi does have General Purpose Input
For the hardware youll need: and Output (GPIO) pins that can be used to switch
Raspberry Pi and SD card (it is possible with a low-power components like LEDs on and off. However,
model A, but a model B will be easier to develop on). motors draw a much higher current than the GPIO
Raspberry Pi camera module (the NoIR module will pins can provide. Therefore you need some way of
be able to see in the dark). taking a signal from the Pi and converting it into an
Raspberry Pi-compatible Wi-Fi dongle electrical current powerful enough to drive a motor.
(see http://elinux.org/RPi_USB_Wi-Fi_Adapters). For the purposes of this project, we can classify these
Power supply for Raspberry Pi. into two types: on/off controllers and variable speed
Power supply for motors. controllers. The first (such as the PicoBorg or the
Two motors and drive train. relays on a PiFace) will work, but the controls wont be
One or two more wheels. as finely-grained as they could be. We used a
Motor controller. PicoBorg Reverse (http://piborg.org/picoborgrev),
Chassis. which enables us to vary the speed of each motor
Youll also need a Linux machine to do some (other controllers are available with the same features).
development on, and an Android phone (other smart The most important thing is that the board you use as
the brains of the robot should be controllable from
Python (almost all are). There should be sample code
on the boards website to show you how to do this.
The build
The chassis can be as simple or as complex as you
like. Specialised robot chassis are available that are
robust and capable of carrying lots of sensors. We
dont need this much for a simple buggy though. You
can use anything provided you can mount the wheels
on it and it will support the electronics.
An ice cream tub makes Finally, we used a USB power pack and a 9V battery
a simple and cheap robot to power the Pi and the motors respectively. This is
chassis just make sure quite a lot of hardware, but all of it could be used on
you wash it out first. other projects.
78 www.linuxvoice.com
BUILD A MARS ROVER TUTORIAL
Obviously the build will vary depending on exactly A bit of glue will hold the
what parts youve chosen. For us, it involved motors in place, but be
connecting the PicoBorg Reverse according to the careful not to get any on
instructions on the website (http://piborg.org/ moving parts.
picoborgrev/install).
To set up the buggy, we glued the motors to either
side of one end of the ice cream tub, and bolted the
caster to the other end. This created a three-wheeled
buggy driven by the two motors at the front. We set
the Wi-Fi to automatically connect to our network
using the WiFi Config tool on the Raspbian desktop.
All motor controllers should come with some test
code so that you can make sure everything is working.
The software that installs the PicoBorg Reverse
drivers will also put an app on the desktop. If you
havent already, you should run that now. Now is also
a good time to make sure that both motors are wired
the correct way round. With both motors on forward,
the buggy should obviously move forward. With motor
1 on and motor 2 off it should turn left, and with motor content/uploads/2014/04/turtle.png you are
2 on and motor 1 off, it should turn right. If this is requesting the file /wp-content/uploads/2014/04/
different on your buggy, you just need to switch the turtle.png from the server www.linuxvoice.com. The
wires around until it works correctly. server will respond to this request by sending
an image from the Python drawing tutorial from
Fire up Python Linux Voice issue 2.
The PicoBorg Reverse software includes a Python Requests dont have to be for files though. The web
module to control the motors, but it doesnt install it to server can deal with requests however it wants. You
the global Python directory, so its not available to can also send bits of data in the URL. These
scripts that are run from other locations. In order to arguments in the URL string come after a question
make this module available, youll have to copy it mark and are separated by ampersands. For example,
across yourself with the following code (you may in the URL www.google.co.uk/search?q=linuxvoice,
need to adjust the path depending on where you the argument q is set to the string linuxvoice.
unzipped the install files): Were going to use the Python Tornado web server
sudo cp /home/pi/picoborgrev/PicoBorgRev.py /usr/lib/cd to use these requests to control the motors on the Pi.
pymodules/python2.7/ Youll need to install this on the Pi with:
Well use a simple web server to control the buggy. sudo apt-get install python-tornado
Web servers work by waiting for requests, and then The code to control the motors using the PicoBorg
serving web pages based on the request they get. Reverse is:
Normally, the request is given in the URL that the import PicoBorgRev
website visitors browser sends to the web server. For import subprocess
instance, if you visit www.linuxvoice.com/wp- import tornado.ioloop
import tornado.web
Alternatives to the Pi
maxspeed = 0.3
PRO TIP
The Raspberry Pi is particularly well suited to this project PBR = PicoBorgRev.PicoBorgRev()
because the camera is well supported and there are plenty Robots are like Lego:
PBR.Init() once its built, play with it
of motor control add-ons to provide all the functionality PBR.ResetEpo() for while, then take it to
you need. However, its not the only option. It should be bits and build a new one.
possible to do more or less the same thing on a BeagleBone
Black, although youll have to do a little bit more work to get class TurnHandler(tornado.web.RequestHandler):
streaming video set up (theres a guide here: http://shrkey. def get(self):
com/installing-mjpg-streamer-on-beaglebone-black). PBR.SetMotor1(min([float(self.
Larger boards such as the Odroid or Udoo should work as get_argument(motor1))/100, maxspeed]))
well, though theyll drain the batteries faster, and their extra
PBR.SetMotor2(min([float(self.
processing power isnt really useful for this project.
It should be possible to use a microcontroller such as get_argument(motor2))/100, maxspeed]))
an Arduino to handle the motor control (though it would self.write(Updated)
be better to use Bluetooth than Wi-Fi in this case). Getting class HaltHandler(tornado.web.RequestHandler):
streaming video working with a microcontroller would be def get(self):
challenging, though probably not impossible if you are
subprocess.call([sudo, halt])
determined enough. However, you could do this separately
using a wireless webcam.
if __name__ == __main__:
www.linuxvoice.com 79
TUTORIAL BUILD A MARS ROVER
to the Pi such as a little LCD motor (which is TX packets:81516 errors:0 dropped:0 overruns:0
Web sockets
The method weve used for controlling the motors is, well, A better method would be to create a communications
a little hacky. It works, but it doesnt work well. The main channel through which you can continuously send data. There
problem is that theres a large overhead each time you change are a couple of options for this: TCP sockets or Web sockets.
the motor speed. The phone app has to negotiate a new TCP Both are supported by Python, and both have plugins for the
connection and send the data, then the Tornado server re- Cordova framework that were using for the Android app.
initialises the module to send data to the server. This means Neither should be excessively complex to set up, though they
theres a noticeable lag between turning the controls and the will require some knowledge of both Python and JavaScript.
buggy responding. Part of this is also due to the interval that Using one of these methods, you should be able to reduce the
the app checks the accelerometer, but this has been adjusted latency of the control and increase the frequency with that the
to work well with the speed of the server. app updates the accelerometer readings.
80 www.linuxvoice.com
BUILD A MARS ROVER TUTORIAL
www.linuxvoice.com 81
TUTORIAL BUILD A MARS ROVER
other hand, if you drop the accelerometer, it will read 0 export PATH=${PATH}:/home/ben/adt-bundle-
because its in free fall and not experiencing any linux-x86-20140321/sdk/platform-tools:/home/ben/adt-bundle-
acceleration. (Actually, it will read a little higher than 0 linux-x86-20140321/sdk/tools
because of air resistance.) Youll need to amend the paths to point to the
As long as you hold the device still, the Android SDK you downloaded and extracted. You can
accelerometer measures gravity. It measures it in run these commands in the terminal, but it wont
three dimensions (x, y and z), which means that you remember the settings, so youll have to re-enter them
can use it to measure the orientation of the device in each time you reboot. In order to add these
three dimensions. In other words, it tells you which permanently, add the two lines to the .bashrc file in
way up the device is. your home directory.
First, though, youll To create a Cordova project for the buggy run:
82 www.linuxvoice.com
BUILD A MARS ROVER TUTORIAL
if (window.piMoving) {
var motor1Prop = (acceleration.y + 10)/20;
var motor2Prop = 1 - motor1Prop;
Weve used Cordova to
var totalSpeed = acceleration.z * 10; The acceleration in each axis is returned as a
create a phone app, but
var motor1Speed = motor1Prop * totalSpeed; number between -10 and 10. The formula you could easily modify
var motor2Speed = motor2Prop * totalSpeed; (acceleration.y+10)/20 returns a number between 0 the code to create a web
sendString = http:// + document.getElementById(ippi). and 1 depending on how far the phone is rotated. This interface using sliders
value + :8000/turn/?motor1= + motor1Speed + &motor2= + is then used as a multiplier for the speed of one motor. or buttons to control the
motor2Speed; The multiplier for the speed of the other motor is this buggy.
element2.innerHTML = sendString; value taken away from 1.
document.getElementById(turnIframe).src = sendString; The overall speed is the acceleration in the z axis
} multiplied by 10. This gives it the range -100 to +100
} (with negative values being backwards). This is the
Although its not completely necessary, you can same range that the motors have. To get the final
increase the frequency with which the app updates speed for each motor, we just multiply that motors
the buggys speed by altering the frequency setting in proportion by the total speed. This is quite a simplistic
the startWatch function. In the following example, it method of calculating the speed, and the turn
updates it once a second, but you could set this to be directions will go back to front if the phones held the
higher or lower. wrong way up. However, it works, and its easy to
function startWatch() { understand, so its good enough for our buggy.
var options = { frequency: 1000 }; With the code ready, you just need to get it on to
watchID = navigator.accelerometer. a phone in order to run it. Unfortunately, this can
watchAcceleration(onSuccess, onError, options); require a little fiddling with the Udev rules. Theres
} full information on the Android developer site here:
The full code is on the Linux Voice website. http://developer.android.com/tools/device.html. You
This calculates the speed for the two motors. can skip step 1 because Cordova will handle it for you.
acceleration.y is used to change the direction and Once this is set up, and the phone is plugged into
acceleration.z is used to change the speed. This your computer, you can compile and transfer it to the
works for holding the phone in landscape. With the phone. Enter the following in a terminal in the root
screen at right angles to the ground, the buggy will directory of the app:
stop, and as you tilt the screen forward (so the screen cordova build android
starts to face upwards), it will start to move. If you tilt cordova run android
the screen back, the buggy will move backwards. As you can see, this isnt a particularly elegant
Tilting the screen from side to side (as though it were solution. Running two web servers is a little over the
a car steering wheel) will turn the buggy. top. It could have been re-written to do everything in
one either by serving the video up from Python or by
controlling the motors from PHP. The phone app
Security
could be more integrated rather than just serving up
This robot is controlled via Wi-Fi with absolutely no security an iframe of the webcam controller. However, this
whatsoever. Anyone else on the network could quite easily project isnt about technical perfection, its about
take over control. Normally this isnt a problem on a local
demonstrating how you can quickly and easily link
area network, but there may be occasions where you want
a bit more privacy. Tornado does handle security quite well, things together to easily create complex robots by
though its beyond the scope of this tutorial to go into it in using the tools that are available on Linux.
detail. Take a look at the documentation on the projects
website for guidance on this (www.tornadoweb.org/en/ Ben Everard is the co-author of the best-selling book on
stable). Securing the video stream may be a little trickier, as learning Python with the Raspberry Pi, Learning Python with
its not really designed for it. Raspberry Pi. He wrestles lions for fun.
www.linuxvoice.com 83
TUTORIAL BADGERCAM
A
trail camera will capture images of wildlife that
PARTS REQUIRED frequent a certain area, such as woodland.
Raspberry Pi These images, still or moving, can be captured
SD Card (bigger the without the need of the photographer to be present.
better) The camera either constantly records video or uses
Pi Camera motion detection technologies to trigger an image
Waterproof case with capture. Off-the-shelf versions of these are expensive,
see through area
dont offer any option for customisation, and contain
USB Wi-Fi dongle
proprietary hardware and software.
USB rechargeable
portable battery pack A Raspberry Pi, with its fantastic range of hardware
and software options, is an ideal platform to create a
similar device with the potential to create your very
own wildlife videos and photographs. Although this Components cost money, but the beauty of the Pi is that
project is geared towards building a Pi-based trail everything can be re-used for your next project.
camera, there are many other situations where this
could potentially be deployed; it would also make a date (sudo apt-get update; sudo apt-get upgrade).
simple security camera, for example. One more update we need to pull in is the latest
firmware for the Raspberry Pi. This includes the latest
Installation camera firmware, which is required by the
First, ensure your camera is connected to the Pi and RaspiMJPEG camera control software. This can be
that you have a network connection for installation. done by running sudo rpi-update.
Now we can install the OS and the required software. It should be part of the Raspian install, but we also
The central part of this project is a piece of software need to ensure that Git isinstalled. This will be used to
called RaspiMJPEG (which is based on the MMAL retrieve the software and scripts needed to complete
library) to control the Pi camera. this installation. Lets confirm it is installed by running
From the starting point of a base Raspbian install, the command sudo apt-get install git. We can now
we can start up the Pi and use the configuration tool start to install the components required to provide the
to increase the free space, ensure that SSH starts on web interface, motion detection and live feed.
The box we used had an boot and set the password for the Pi user. One other Fortunately for us the majority of this is captured
IP rating of 65, which vital step is to enable the Pi camera. inside a script created by Silvan Melchior, who also
essentially means it is nice Once we have finished with the configuration tool created RaspiMJPEG. Run the command:
and waterproof. the next thing is to ensure that the system is up to Git clone https://github.com/silvanmelchior/RPi_Cam_Web_
Interface.git
This will download the initial scripts for the install
along with some configuration files and pre-compiled
binaries (dont worry these are open source, just
pre-compiled to save time).
84 www.linuxvoice.com
BADGERCAM TUTORIAL
www.linuxvoice.com 85
TUTORIAL SERVER HARDENING
B
ruce Schneier, the well regarded American Anyway, while most server-oriented Linux distros
WHY DO THIS? expert on cryptography and computer are pretty secure out of the box, they still make
Stop bots and crackers security, once said these wise words: security certain sacrifices for user-friendliness. In this tutorial
getting easy access to
your systems is a process, not a product. Keeping your servers safe well show you how to tighten key components in
Understand the from malicious types isnt just achieved by chucking a server system, including OpenSSH and Apache,
trade-offs between on a few extra pieces of software, but by having and demonstrate how you can mitigate potential
security and proper plans and procedures to deal with issues that problems in the future with scanning tools and an
convenience
come up. And security is a moving target you might intrusion detection system.
Re-use the skills you
learn here when you have your systems locked down and fully patched In this case well be using a vanilla installation of
install distros in the right now, but you never know what holes are going Debian 7, as its arguably the most popular GNU/Linux
future to be discovered in the future. Look at the OpenSSL distribution used on servers, but the guides here will
Heartbleed mess, as an example be applicable to other distros as well.
1 HARDENING OPENSSH
Its absolutely imperative that we start with OpenSSH. OpenSSHs daemon (server) configuration file is
Why thats? Well, its almost certainly the way youll be stored in /etc/ssh/sshd_config, so youll need to edit
interacting with your server, unless you have the that (as root) to make changes to the setup. The first
luxury of logging into it directly via a physically thing to do is find this line:
connected keyboard and monitor. For headless PermitRootLogin yes
servers, a good SSH setup is critical, because once Change yes to no here to disable direct root logins
you have that out of the way, you can focus on the via SSH. This immediately adds an extra layer of
other running programs. security, as crackers will have to log in with a regular
86 www.linuxvoice.com
SERVER HARDENING TUTORIAL
www.linuxvoice.com 87
TUTORIAL SERVER HARDENING
2 HARDENING APACHE
The standard Apache web server configuration in
Debian is fairly secure and usable out of the box, but
can be made even tighter by disabling a few features.
For instance, try to access a non-existing URL in your
Apache installation, and at the bottom of the 404 not
found screen that appears youll see a line like this:
Apache 2.2.22 (Debian) Server...
Its best not to tell the world the exact version of
Apache youre using. Vulnerabilities that affect
specific versions occasionally appear, so its best to
leave crackers in the dark about your exact setup.
Similarly, Apache includes version information in its
HTTP headers: try telnet <hostname> 80 and then
HEAD / HTTP/1.0 (hit Enter twice). Youll see various
bits of information, as in the screenshot. Apache is telling the world its exact version details, both
To disable these features, edit the Apache in 404 pages and HTTP headers but we can fix that.
configuration file; in many distros this is /etc/
apache2/apache2.conf, but in the case of Debian, its This is an exceptionally powerful module that can
security-related settings are stored in /etc/apache2/ protect against SQL injection attacks, cross-site
conf.d/security, so edit that instead. Find the scripting, session hijacking, trojans and other risks.
ServerSignature line and change On to Off, and then After installation a configuration file is placed in /etc/
find the ServerTokens line and make sure its just modsecurity/modsecurity.conf-recommended;
followed by Prod (ie the server will just say that its the rename this and remove the -recommended part to
Apache product, and not give out specific version activate it. The rules for detecting attacks are provided
information). After youve made the changes, restart in /usr/share/modsecurity-crs/ go there and have a
Apache with: look inside the base_rules, optional_rules and
service apache2 restart experimental_rules directory. Each .conf file inside
Apache also tries to be helpful by providing directory has some comment text explaining what it does, so if
listings for directories that dont contain an index.html you find something useful, copy (or symlink) it into the
file. This feature, provided by the Apache module /usr/share/modsecurity-crs/activated_rules folder.
autoindex, could be abused by hackers to poke around Next, youll need to tell ModSecurity to use these
in your system, so you can disable it with: rules. Edit /etc/apache2/mods-enabled/mod-
PRO TIP a2dismod autoindex security.conf and beneath the Include /etc/
ModSecurity is loaded
modsecurity/*.conf line, add these lines:
with advanced features, Status report Include /usr/share/modsecurity-crs/*.conf
so visit www.modsecurity. Another initially helpful (but risky on production Include /usr/share/modsecurity-crs/activated_rules/*.conf
org/documentation for
all the details.
machines) module is status: this lets you go to Now restart Apache to activate the configuration.
http://<hostname>/server-status and get a bunch of By default, ModSecurity only detects problems and
information about the configuration and performance. doesnt act on them, logging its work to /var/log/
In Debian its only possible to access this page from apache2/modsec_audit.log. This gives you time to
the same machine on which Apache is running, but see how the rules will affect your site (and if they
this may vary in other distros, so its wise to turn. it off could break anything). When youre confident with
unless you really need it using a2dismod status. everything, make ModSecurity actively prevent
Theres a very useful module called ModSecurity, exploits by opening /etc/modsecurity/modsecurity.
which you can grab with a quick: conf and changing the SecRuleEngine option from
apt-get install libapache2-modsecurity DetectionOnly to On. Finally, restart Apache.
88 www.linuxvoice.com
SERVER HARDENING TUTORIAL
www.linuxvoice.com 89
TUTORIAL VIRTUALBOX
VIRTUALBOX: CONVERT AN XP
TUTORIAL
BOX INTO A VIRTUAL MACHINE
Ease the move to Linux by bringing your old Windows
MARK CRUTCH
XP machine with you.
O
n 8 April this year Microsoft issued its last destination machine is a Linux box, you can use this
WHY DO THIS? update for Windows XP, leaving it vulnerable same method to migrate your old system to a virtual
Keep hold of your old XP to future security exploits. Despite months of machine running on a MacOS host, or even another
installation
advance warning there are still millions of machines version of Windows if you really want to.
Save 5.5m in support
costs running this now obsolete operating system. Although
Move to Linux without this may seem like a perfect opportunity to migrate to Gather your hardware
the risk of losing XP Linux, many users are still reticent to give up on their Before starting our migration, its worth noting a few
functionality old machines. One way to overcome this inertia is to hardware requirements. Virtual machines can quickly
convert the old Windows box into a virtual machine eat into available memory, drive space and processing
(VM) that will run inside the new Linux system, power, so a capable host machine is a must. Take a
providing the reluctant user with a digital security look at the old XP machine to determine how much
blanket to cling to. memory it has, and how much of the hard drive is in
The real aim is to reduce the number of XP systems use, then ensure that the host has sufficient spare
that are connected to the internet: every machine capacity to cover both the virtual machine and its own
taken offline is one less that can host malware or day to day usage. A large USB hard drive will also
participate in a denial of service attack. With that make things a bit easier, although its not essential as
in mind well not only convert the physical box to long as you can move large files around using a
a virtual one, but also include a few tips to ease network connection.
the move to Linux and reduce the need to boot the The Windows licence is probably tied to the old
Windows VM or put it online. physical machine, so strictly speaking you should
Well be migrating a Windows XP machine, but the keep the hardware for as long as you have the
same approach also works with Vista and Windows virtual machine. Youll probably need the Windows
Disk2vhd was written to
create disk images for 7. Due to hardware differences, licensing rules and Product Key from the sticker on the old box, but if
Microsofts own VirtualPC various OEM flavours of Windows, not every machine thats too faded to read there are programs available
program, but it works just will migrate using this approach but weve had that can extract the product key from a running
as well with VirtualBox. far more successes than failures. Although our Windows system. Although Microsofts anti-piracy
restrictions can sometimes cause problems, most
XP machines migrate relatively smoothly. There are
no guarantees, though, especially with XP Home and
OEM installations, so dont go spending lots of money
on extra RAM and a bigger hard drive until youre sure
the migration will be a success.
90 www.linuxvoice.com
VIRTUALBOX TUTORIAL
www.linuxvoice.com 91
TUTORIAL VIRTUALBOX
spare it, allocate the same amount as is present in the to add a hard disk (check the tooltips to distinguish
physical source machine. The third page is where well between the two small icons, if its not clear which
tell VirtualBox that we dont want a hard drive, and one represents a hard disk). In the resultant dialog you
then finally create our new machine but not until should select Choose Existing Disk, then pick your
PRO TIP VirtualBox has offered a final warning about our lack VHD file from the VMs directory.
Once the main migration of a disk. Were close to starting our virtual machine, but its
is working you may wish Congratulations: you now have a half-imaged worth taking a couple of minutes to step through the
to clone your VHD le
into VirtualBoxs native physical machine and a disk-deprived virtual machine. other settings pages. If youve installed the VirtualBox
VDI format, as its likely Take a well-earned break while the imaging chugs its extension pack then its worth checking that USB 2.0
that the code for its own way to completion. is enabled. We also like to enable the Remote Display
format is better tested
and more robust. Select option, which lets you access the screen of your
the File > Virtual Media Add the virtual hard drive. running VM from another machine using a remote
Manager menu in the With the imaging process over, you should now find a desktop client such as Reminna or Rdesktop. On the
VirtualBox Manager, then
release your VHD le large VHD file on the USB drive. Copy any other files Advanced tab of the General Settings panel its usually
from the VM. Copy it to a that you want off the XP box, then finally shut down worth enabling the Shared clipboard feature. Set it to
dynamically allocated VDI the physical machine forever (hopefully). Mount the bidirectional to let you copy and paste text between
le, then attach it to the
Windows machine via the USB drive on the host machine, and copy the VHD file the Linux host and the virtual machine. We tend to use
Settings dialog. Check into your new virtual machines directory. Unless you the Description tab in the same panel to hold a copy
that it works, then delete specifically chose otherwise its probably in a folder of the Windows Product Key, to save me rummaging
the VHD le.
called VirtualBox VMs in your home directory. around the loft for the physical box if I need to enter it
Return to the VirtualBox manager and select your in future.
XP VM in the list on the left. Click the heading of the One final thing to set up is networking. We dont
Storage section in the right-hand panel to open the really want this machine on the internet, but youll
VMs settings dialog with the storage page showing. probably want it connected during its first boot to
Select the IDE controller and click on the small icon deal with Windows activation requirements. On the
Network panel, enable the first adaptor, and choose
NAT from the first pop-up menu. Ensure the Cable
Connected setting is checked.
With all that done its time for the big moment.
Close the settings dialog, ensure the XP VM is
selected on the left, click the Start button in the
VirtualBox toolbar, and watch your new virtual
machine boot
92 www.linuxvoice.com
VIRTUALBOX TUTORIAL
www.linuxvoice.com 93
TUTORIAL VON NEUMANN, EDVAC, AND THE IAS MACHINE
J
ohn von Neumann was born in Hungary in Von Neumann consulted on both the ENIAC and
1903. He was a prodigy, publishing two major EDVAC projects. The initial design of the ENIAC, the
mathematical papers by the age of 19. After first programmable general-purpose computer, did not
teaching at the University of Berlin, in 1930 he was include the ability to store programs, and while it was
invited to Princeton University in the US, and later programmable and Turing-complete, the
joined the Institute for Advanced Study there. During programming was done by manipulating switches and
this time he contributed to several branches of maths, cables. (Colossus was programmed similarly, but was
including set theory, game theory, quantum not general-purpose, being dedicated to cryptanalysis.)
mechanics and logic and mathematical economics. ENIAC used an immense number of vacuum tubes to
During the late 1930s, he worked on modelling both store numbers and calculate, and punch cards
explosions, which led to his involvement in the for input and output. It was developed to run artillery
Manhatten Project. He is also credited with developing calculations, but due to the involvement of von
the strategy of mutually assured destruction which Neumann and Los Alamos, in the end the first
drove the Cold War. (In game theory, mutually assured calculation it ran was computations for the hydrogen
destruction is an equilibrium, in which neither player bomb, using around a million punch cards.
has the incentive either to act or to disarm.)
Von Neumann was also heavily involved in early EDVAC and the First Draft of a Report
computing, partly because the work he was doing on The EDVAC was proposed by the inventors of ENIAC,
the hydrogen bomb required vast and complex Mauchly and Eckert, in late 1944 before the ENIAC
calculations. These were done initially by human was fully operational, but using improvements
computers women using desk calculators to run thought of while building it. EDVAC, like ENIAC, was
the calculations required, on a production-line basis. built for the US Armys Ballistics Research Laboratory
During 1943 they began to use IBM punched-card (at the Aberdeen Proving Ground). Although it hadnt
machines, which worked at roughly the same speed yet been built, von Neumanns famous First Draft of a
but didnt need sleep. (A single calculation problem Report on the EDVAC was written (by hand while
To run the emulator on
Linux and study von took three months, which Richard Feynmann reduced commuting to Los Alamos by train) in June 1945.
Neumanns programming to three weeks by running cards in parallel on the The Draft Report contains the first published
methods, you will need machines.) These machines, however, werent description of the logical design of a stored-program
Java version 5 or later. programmable computers; they were just calculators. computer, specifically the design that is often now
known as the Von Neumann architecture and which is
still widely used today. However, there is controversy
over the extent to which this was solely von
Neumanns work.
Some of the EDVAC team maintained that the
concepts arose from discussions and work at the
Moore School (where EDVAC was designed) before
von Neumann began consulting there. Other
documents suggest that Eckert and Mauchly had
already thought of the idea of a stored program, but
they hadnt fully outlined a design.
The First Draft of a Report on the EDVAC was,
indeed, a first draft. It was intended as a summary
and analysis of the logical design of the proposed
EDVAC, with further extensions and suggestions from
von Neumann. In it, von Neumann recommended that
the computer have a central control unit to control all
operations, a central processing unit to carry out
operations, and a memory that could store programs
and data and retrieve them from any point (ie random
94 www.linuxvoice.com
VON NEUMANN, EDVAC, AND THE IAS MACHINE TUTORIAL
www.linuxvoice.com 95
TUTORIAL VON NEUMANN, EDVAC, AND THE IAS MACHINE
96 www.linuxvoice.com
VON NEUMANN, EDVAC, AND THE IAS MACHINE TUTORIAL
Line 3: We store the incremented working number you prefer feel free to try it out!). We start off with n
back in location 10, and start the process again. (see the data labels at the bottom), load it into the AC,
Lines 46: As above, but this time around our new and check that it is still non-negative. If so, we jump to
result is stored in location 13. We increment the the sq subroutine.
working number one more time before stopping. The first four lines of sq are familiar load up n,
Lines 79: These are empty just for ease of setup. square it, and store the square in the out location.
The empty lines mean that we can store our working Next is the interesting part.
number in location 10 and leave a bit of room to add S(x)->Ac+ 3 loads the instruction at location 3 into
more instructions if desired. (If you remember coding the AC register. Location 3, if you count lines
in BASIC with line numbers, you may recall numbering (remember that the locations start at 0) contains the
in tens to give yourself wiggle room; same thing!). instruction R->A on its left side and At->S(x) out on its
Lines 10-11: The assembler instruction .data is used right side. So we now have a number representing
to put the numbers 4 (our working number) and 1 (for those instructions in the AC.
use when incrementing) into locations 10 and 11. The The next instruction, S(x)->Ah+ adds one to that.
original programmers would have just been able to This effectively alters At->S(x) out to At->S(x) out+1.
write numbers (whether all zeros for an empty line, or We then write this altered instruction back to
data numbers) straight to tape. location 3, with
To run this, go to the Execute menu and choose
Clear, Assemble, Load, and Run. Check out the RAM
Ap->S(x) 3
(specifically, Ap alters Von Neumann designed a
Selectrons window to see the contents of the the right-hand side of self-replicating computer
registers -- you should see 16 in location C
(hexadecimal) and 25 in location D. (You might need
the instruction at
location 3, and Ap program, which is considered
to change the Data view to Decimal.) You can also alters the left-hand to be the first computer virus.
step through the program one instruction at a time side). So the next time
using Debug mode, and watch the registers change in we loop around this
the Registers window, if you prefer. code, instead of writing the output to the location
In fact, if you change the Data view of the RAM labelled out, well write it to the next location along.
Selectrons window to Hexadecimal, you can code To watch this happen, you can use Debug mode, step
your instructions directly into the Selectron locations. through the code, and keep a close eye on the
Each location has two sets of one 2-place and one Registers window.
3-place hex number, corresponding to an The next three lines load n up again, decrease it by
instruction+location, twice. So, for example, the hex one, ad save it. We then jump back to loop with the Cu
representation of S(x)-R is 09, and the first instruction instruction, and go round the loop again.
of our first line is 09 00A (A being 10 in hex). If you load and run this, youll see that you get the
Heres a loop version of our squares code using squares from 1000 output in locations 1020. This
assembly language (with thanks to the writers of the is the behaviour that the von Neumann architecture
IAS Sim software for the loop control code): makes possible: altering the programs stored
loop: S(x)->Ac+ n ; load n into AC instructions as you go along.
Cc->S(x) sq ; if n >= 0, go to sq
halt Final years
.empty Von Neumann carried on working on computing,
alongside his other areas of interest, for the rest of his
sq: S(x)->R n life. In 1949, he designed a self-reproducing computer
S(x)*R->A n program, which is considered to be the first ever
R->A computer virus, and he worked on cellular automata
At->S(x) out and other aspects of self-replicating machines. He
S(x)->Ac+ 3 also introduced the idea of tochastic computing
S(x)->Ah+ one (which, broadly, uses probability rather than
Ap->S(x) 3 arithmetic) in a 1953 paper, although the computers
S(x)->Ac+ n of the time werent able to implement the theory.
S(x)->Ah- one Sadly, he died in 1955 from bone or pancreatic
At->S(x) n cancer. (A biographer has speculated that this might
Cu->S(x) loop have been due to his presence at the Bikini Atoll
.empty nuclear tests in 1946.) His contribution across his
fields of interest was truly immense and he might well
n: .data 10 have contributed still further had he lived longer.
one: .data 1
out: .data 0
Juliet Kemp is a scary polymath, and is the author of
The labels here are part of the assembly language,
OReillys Linux System Administration Recipes.
to make looping easier (but it could be done by hand if
www.linuxvoice.com 97
CODING FPGAS
F
ield Programmable Gate Arrays (FPGAs) are USB device. In this tutorial, were going to use a Papilio
WHY DO THIS? chips that can be programmed to perform One 500K, which we bought from the Gadget Factory.
Make funky noises different actions. However, theyre In many ways, you can think of this as the Arduino of
Create hardware programmable in a different way to CPUs and FPGAs. Its not the most powerful chip available, but
customised for your
exact needs microcontrollers. An FPGA contains a series of logic its enough to get started, and there are some
Peek into the innards of circuits that can be programmed to connect to each easy-to-use tools to help beginners get started on it.
chips and learn about IC other in different ways, so when programming an The Gadget Factory also sells the Papilio Pro, which is
design FPGA, you dont describe a series of steps like you more powerful than the model were using (in FPGA
would in Python or C but the circuit that you want to terms, a device is more powerful if it has more
implement. In many ways, you can think of an FPGA components inside it, thereby enabling you to create
as being a bit like a breadboard for prototyping a your larger and more complex circuits).
own chips. Because of this, you can program FPGAs Gadget Factory also produces a range of wings,
to perform some tasks much quicker than they could which are add-on hardware to enable things like audio
be done on a CPU (such as mine bitcoins). and VGA output. Since the FPGA can be programmed
One common use of FPGAs is to re-implement to include the driver circuits for these, theyre far
processors and other chips from old computers such simpler than they would be for microcontroller boards.
as games consoles. Its important to remember that
the FPGA doesnt The language of hardware
One common use of FPGAs emulate the design of a
chip like a games
The two common languages used to program FPGAs
are Verilog and VHDL, but diving straight into the code
is to re-implement processors console emulator may isnt the easiest way to get started with the Papilio.
98 www.linuxvoice.com
FPGAS CODING
www.linuxvoice.com 99
CODING FPGAS
Figure 1. These pulldown most of the wings are simple connectors to the
resistors ensure that the hardware (sometimes with a high- or low-pass filter).
To positive voltage This sketch is designed to work with an audio wing
pin reads low when the
button isnt pressed. that includes a low-pass filter and an audio jack.
However, this isnt essential. It is possible to connect a
speaker directly between the output pins and the
R1 ground (though its best to add a 220 resistor to
6.8k prevent too much current being drawn).
5%
The speaker should be connected to pin 8 on the
To ground side with the single strip of connectors (CL 0).
With this in place, upload everything to the Papilio
R2 as you did before. First, click on the appropriate BIT
220
5% file link, and once this has finished, click on the icon to
upload the sketch. You should hear the music playing.
If its a bit quiet, you can increase the volume by
To input pin changing 11 to 15 in the following lines:
ym2149.V1.setVolume(15);
ym2149.V2.setVolume(15);
ym2149.V3.setVolume(15);
things in addition to the ZPU and the output pins: a Youll need to reupload the sketch for this change to
YM2149, a sigma-delta DAC and an Audio splitter. The take effect.
first takes the data file and converts it into audio data,
the second takes the audio data and creates the You cant arrest me, Im a rock star
signal, and the final one takes a mono audio signal You may have noticed that there are also examples to
and splits it so that it works with stereo headphones. play Atari MOD files and Commodore SID files.
The ZPU has 10 empty wishbone slots. These are However, these are too big to fit on the Papilio One. If
the places that additional peripherals can connect to you want to use an FPGA to emulate audio chips, the
the wishbone bus of the processor. In this example, Papilio Pro is a better choice because it has more
the YM2149 is connected to wishbone slot 5. This is space for these more complex designs.
set up in the code with: In the next example, well keep going with music,
ymplayer.setup(&ym2149,5); but steer away from these more complex designs.
The program then reads data from the SmallFS Instead, lets get back to basics with a sine wave
filesystem. This is included as part of the sketch thats generator. The one included with ZAP is designed for
uploaded, and it contains the files in the smallfs folder testing circuits, but it also works for generating tones.
in the sketch folder (these are saved in sketchbook in In ZAP, go to Papilio > Papilio Examples > Bency_
your home directory). If you have other YMD music Waveform_Generator to open the sample project, then
files, you can put these in there, and play them, though go to File > Save As to create a copy.
theres not much space. ZAP does come with one The software is set up to generate a sine wave at
thats loaded by default called 2.4 MHz, which is a far higher frequency than humans
music.ymd. can hear, so before uploading it, youll need to change
Add-on bits of Papilio hardware are known as this to something a little more audible. Lets go for
wings, and these slot directly into the headers on the middle C (or 261.6Hz). Change the line in setup() to:
board. There are a few available; because the FPGA setFreq(0.0002616);
can be reconfigured to include any driver hardware, Burn the bit file to the FPGA, then upload the sketch.
You should have a nice clean tone that gets a
annoying after a while. To make the tone a little more
Designing chips
interesting, we can add a slight vibrato effect by
In this tutorial weve only looked at using designs that changing the sketch to the following:
have already been made and compiled for the Papilio. It is #define MYBASE IO_SLOT(5)
possible to create your own and upload these. If you want
#define MYREG(x) REGISTER(MYBASE,x)
to understand whats going on at a deep level, theres a free
book on the Spartan E3 (the FPGA in the Papilio) and VHDL
(a hardware definition language) on GitHub at float frequency= 0.0002616;
https://github.com/hamsternz/IntroToSpartanFPGABook. float frequencyStep = 0.0000002;
Alternatively, The Gadget Factory has produced a int numberOfWarbles = 10;
schematics library. This enables you to work at a much
higher level and link together components such as the sine
wave generator. It is still quite technical, but easier than void setup() {
working with raw VHDL. There are some video tutorials on setFreq(frequency);
their website to help you get started: www.gadgetfactory. }
net/learn.
void setFreq(float freq)
100 www.linuxvoice.com
FPGAS CODING
{
unsigned long long phase = freq * 44507433.119;
MYREG(0) = phase;
}
void loop() {
for(int i=1;i<numberOfWarbles;i++){
setFreq(frequency + frequencyStep*i);
delay(10);
}
}
Most of this is taken from the example sketch, with
just a little added to take some values out to variables
(to make them easier to change), and a for loop that
changes the frequency slightly. This will vary the
frequency by gradually increasing it, then dropping it
back down. A more sophisticated version would also
drop the frequency back down gradually, but well
leave that up to you to implement.
This produces a slightly more interesting tone, but it
still just keeps playing it on and on.
Our little synth will
The ZPU has plenty of input/output pins that we unsigned long long phase = freq * 44507433.119;
probably never produce
can use, and the ZAP environment gives us a way of MYREG(0) = phase; any top 10 hits, but it has a
controlling the sine wave generator based on these } sound unique to us.
inputs. Were going to use this to create a simple void loop() {
keyboard. To save space, well only use five keys (four // put your main code here, to run repeatedly:
to play notes and one to control the vibrato), but you for(int i=1;i<numberOfWarbles;i++){
can use the same techniques to build up to a more setFreq(frequency + frequencyStep*i);
complex instrument. The banks of IO pins are handily delay(10);
arranged in blocks of eight, and five of them are }
completely free (three of the sixth are used up by the frequency = 0.0;
wave form generator, but the remaining ones could be if(digitalRead(0)==HIGH){ frequency = freqC; }
used for control). if(digitalRead(1)==HIGH){ frequency = freqD; }
The code is similar to the example above, with some if(digitalRead(2)==HIGH){ frequency = freqE; }
input pins set up, and some if statement to control the if(digitalRead(3)==HIGH){ frequency = freqF; }
variables depending on which ones are pressed. frequencyStep = 0.0000002;
#define MYBASE IO_SLOT(5) if(digitalRead(4)==HIGH){ frequencyStep = 0.000002;}
#define MYREG(x) REGISTER(MYBASE,x) }
The buttons cant be directly connected to the pins,
float frequency = 0.0; as they need a pair of resistors in order to correctly
float freqC = 0.0002616; control the voltages. See figure 1 for details of how
float freqD = 0.0002936; these should be connected. The five input pins on the
float freqE = 0.0003296; Papilio are in the middle row at the bottom of the pin
float freqF = 0.0003492; bank on the right-hand side if you hold the Papilio
float frequencyStep = 0.0000002; with the USB port facing upwards.
int numberOfWarbles = 10; We havent even scratched the surface of whats
possible with the Papilio and other FPGAs. The ability
void setup() { to create custom hardware in chips enables you to
// put your setup code here, to run once: easily create things that are quite difficult with
pinMode(0, INPUT); microcontollers, and this is only one use for them. At
pinMode(1, INPUT); the moment the library of components to go into your
pinMode(2, INPUT); designs is still quite small, but its already exciting. As
pinMode(3, INPUT); they become more popular with the hobbyist
pinMode(4, INPUT); community, you can expect to see a growing range of
setFreq(frequency); //Sets in Mhz easy-to-use schematics.
}
Just in case you missed it, harware wrangler Ben has written
void setFreq(float freq) //sets in Mhz a book about Learning Python with the Raspberry Pi. Its
called Learning Python With Raspberry Pi.
{
www.linuxvoice.com 101
CODING NINJA
W
hen sending data across a network or p1 is calculated based on even parity with data bits
storing it on disk drives, theres a chance d1, d2 and d4.
that the data will become corrupted. Good p2 is calculated based on even parity with data bits
hardware design can help minimise this, but it can d1, d3 and d4.
never eliminate it completely, so its important to be p3 is calculated based on even parity with data bits
able to detect when these errors happen so that the d2, d3 and d4.
data can be re-sent. The data is sent in the order p1,p2,d1,p3,d2,d3,d4.
The easiest way to check for errors is to add a parity By interlacing the parity bits in this way, you can
bit. This is an extra bit of data added after each small not only tell that an error occurred, but which bit it
block thats used to detect errors. There are two types occurred in. For example, if p1 and p2 are incorrect,
of parity: odd and even. In odd parity, the bit is used to but p2 is correct, then you know that the error must
make it so there is an odd number of 1s in the data, be in d2 (or there is more than one error). This
while even parity makes it an even number of 1s. means that if you are reasonably confident that the
When checking the data, the computer just counts the communications channel wont flip more than one
number of 1s and sees if it matches with the type of bit out of every 7, you can correct any single-bit error.
parity being used. On the other hand, if its a noisy channel, you can
For example, the letters LV are 01001100 detect any two-bit errors (these would be corrected
01010110 in ASCII. With an even parity bit added to incorrectly if you dealt with them as single-bit errors).
each letter, they become 010011001 010101100.
This adds one bit for every eight bytes of data, so Stop: Hamming time
there is more to send; however, in many cases itll be This is known as a 7,4 Hamming code, because the
a good trade off because therell be fewer errors. This method was developed by Richard Hamming, and for
extra data is known as redundancy because it doesnt every 7 bits set, 4 are data.
add any information (we still only have the letters LV, The reason we know how many bits can be
but weve sent 18 corrected or detected by a particular code is because
bits rather than 16). of the Hamming distance. This is the number of bits
A parity bit is an extra bit of data A parity bit wont that have to flip to get from one valid sequence to
added after each small block, detect every error.
If any single bit
another. For example, using the 7,4 hamming code,
1111 and 0111 are encoded as:
which is used to detect errors. gets flipped then 1,1,1,1,1,1,1
it will flag it up, but 0,0,0,1,1,1,1
if two bits get flipped, it wont detect the error. It will You can see that at least three bits have to flip
detect an odd number of errors in the data, but not an to get from one to the other. If you calculate 7,4
even number of errors. You could increase the error Hamming codes for all possible values of d1,d2,d3
detection by using a parity bit on a smaller piece of and d4, youll find that this is the minimum number
data. For example, you could split the above data into of bits different between any two, so we can say
four-bit chunks and add a parity bit on these. This that it has a minimum Hamming distance of three.
will improve the error detection, but at the expense Whenever there is a single-bit error, it will be closer to
of extra redundancy. The best trade off between the one code than the other. However, if there are two-bit
these two opposing forces will depend on how error- errors, then it will be closer to the wrong code.
prone the communications channel is. If you want to detect or correct more errors, then
you need to increase the Hamming distance. Again,
Error correction this means increasing the redundancy. It turns out
There are other ways than just splitting the data up that this is easily done by adding a parity bit that
into ever smaller chunks. One common way is to add covers every bit (p1p3 and d1d4). The result is
three parity bits for every four bits on data. In this a code that has four bits of data for every eight bits
case, the parity bits (p1, p2 and p3) are interspersed sent and a minimum Hamming distance of four (this
so that they only cover some of the four data bits (d1, is an 8,4 Hamming code). This can still only correct
d2, d3 and d4). a single-bit error, but it can detect three bit errors in a
102 www.linuxvoice.com
NINJA CODING
d1
p2
p1
d4
d3 d2
p3
A Venn diagram like this one can be
used to work out which bit is in error
in a 7,4 Hamming code. The three
circles represent the parity bits, and
the error is the data bit thats within
all of the circles of the parity bits
showing errors, but not inside the
circle of the parity bit not showing
errors (if there is one).
single block. A 9,4 Hamming code would be needed to To reverse the CRC, the full data is run through the
correct two-bit errors. It is possible to go on building same process, except that the CRC value takes the
codes with more and more redundancy that can place of the trailing zeros. At the end, if the remainder
detect and correct more and more errors. However, is 0 then the CRC data is correct; otherwise there is an
the more bits you add, the more you have to send, and error in the data (well leave it up to you to perform this
so the less data you can get through the channel. and check that the above value is correct).
CRCs dont help you fix the error in the same way
Cyclic codes that Hamming codes do, they just try to spot them.
Hamming codes are good for detecting errors in very CRCs can also be designed to be longer or shorter,
noisy channels, but other times we want a solution and the length will make them better or worse at
thats very quick to calculate and that doesnt have too finding errors.
much redundancy. In this case, we may use Cyclic The reason this is very efficient to implement in
Redundancy Checks (CRCs). The mathematics of hardware is that it can be done with little more than
why these work is a little complex, but in practice, they a shift register and a few logic gates. This is far less
are a little like long division using XOR, and the than what is needed for Hamming codes. Because
remainder is the redundancy used to check that the of this simplified requirement, it can run in real time
received value is correct. Lets look at an example even on very fast data transfer, and youll find CRCs
using the coefficient 1011 on the data 01001100 (the in everything from CDs and DVDs to Ethernet and 3G
letter L in ASCII) and a three-bit CRC. mobile networks.
01001100 000 data (trailing 0s are the 3 bits for the CRC) The outside world is a scary place for data. There is
1011 divisor aligned with the first 1 all manner of electromagnetic interference and other
00010100 000 result of XOR problems just waiting to flip 0s into 1s. With a little
1011 divisor aligned with the first 1 careful planning, though, we can protect our precious
00000010 000 result of XOR digits and make sure they dont come to any harm.
10 11 divisor aligned with the first 1
00000000 110 result of XOR
The CRC finishes because the result is all zeros except Ben Everard is the best-selling co-author of the best-selling
Learning Python With Raspberry Pi.
for the three bits that form the CRC value (110).
www.linuxvoice.com 103
CODING ANDROID
A
ndroids success is colossal. Its the most requirements for running your own applications,
WHY DO THIS? widely distributed version of a Linux-based development isnt even that difficult especially if you
Develop for a hugely operating system, used on everything from just want to hack your own solutions into the chaos.
successful platform
smartphones and tablets to cars, fridges and air Which is exactly what were going to do here, in what
Get into the Android app
store and make $ conditioning units. Its only a matter of time before it will be the first part of a series on creating a Linux
Never miss another reaches your toaster. And while it may have started Voice application for Android.
Linux Voice podcast life outside of Google as an advanced operating Were going to start modestly. Well build a very
system for digital cameras, Googles purchase of simple RSS reader app that will parse the latest posts
Android, Inc. in 2005 slotted Android into Googles from LinuxVoice.com and enable you to select a story
plans for mobile world domination, inadvertently to open in a browser. As a starting point, we may then
making it the operating system for the touchscreen expand upon this simple application to create a much
generation the opposite of Apples iOS, with all its more functional application. But its also a perfect
walled garden and hardware consistency. Android is way to acclimatise yourself to Android development,
wild, chaotic, uncountable and outgrowing itself. But and from there, put your own ideas into code. And
its also open source and still relatively open. You dont because were embracing all things cutting-edge and
need to pay Google to write software for it, and you chaotic in this tutorial, were going to use this as an
dont need to root your device to run your applications. excuse to try Googles own Android development
Despite an unwieldy API and a huge boilerplate of environment Android Studio.
1 INSTALLATION
Android Studio exists solely for Android applications.
It ties itself seamlessly with the Android SDK and the
emulator tools used to test your code, and also offers
cutting-edge shortcuts for writing. Theres WYSIWYG
realtime app rendering, a UI designer, Android
templates and an editor that spots mistakes as they
happen. But its cutting edge nature also means its
unstable, and Google doesnt yet recommend it for
use in mission-critical development. Thats not going
to affect us as we take our preliminary steps in
Android development, but its something to consider Its worth updating Android Studio frequently, as each
when your app development ambitions take you update makes the environment more stable.
further than a simple RSS reader.
Android Studio is based upon another IDE, IntelliJ However, we find installation on Mint an easier
IDEA, and as you might have inferred by the mention proposition as it automatically deals with
of Eclipse and IntelliJ IDEA two IDEs written in Java, dependencies and the environmental variables
Android is all about the Java. Java is something of a required by Android Studio to find the SDK (which also
contentious language even now, but theres no needs to be installed manually). To install from
denying its ubiquity. More importantly, as long as Ubuntu or Mint, just type the following:
youve some previous experience in an object-oriented sudo apt-add-repository ppa:paolorotolo/android-studio
environment, Java is legible and easy to understand sudo apt-get update
and get along with. Its a good choice for a hacker- sudo apt-get install android-studio
friendly tutorial. This should grab over 650MB of data, as the
We installed Android Studio on both Arch Linux and download includes the SDK alongside the
Linux Mint/Ubuntu. Arch packages are held in the user development environment and any dependencies
repository, while manual installation is also relatively youve yet to install. But it will leave you with a full
straightforward: just download and execute a binary. development environment capable of building
104 www.linuxvoice.com
ANDROID CODING
projects that can run on your desktop through an border. After checking against the server, the
emulator and deployed to your own Android devices. application will almost certainly announce that theres
Android Studio can be started by typing android- an update that can be installed, and unlike other
studio on the command line, or through an icon applications installed through a distribution, in-place
embedded within your desktops launch menu, and updates to Android Studio work. Just let the
the first thing wed recommend you do after the application run and update itself. Android Studio is in a
splash screen has gone is to ignore the Welcome to rapid state of development, so its a good idea to keep
Android Studio window, and instead open the small on top of updates. There are usually one or two per
Check For Updates link in the windows bottom month, and recent updates have been very stable.
2 DEVICE CONSIDERATIONS
From the Welcome to Android Studio window, click
on New Project to start our adventure. Weve now got
to change a few values in the next window that
appears. The app needs a name, and we called ours
simply Linux Voice. Well also need a package name,
which needs to adhere to Javas package naming
convention. Recent versions of Android Studio will
automatically create this from your application name,
but if you need to change this to something that
closer matches your own configuration, make sure it
uses the reverse hierarchical naming pattern, normally
(but not always) linked to the top level domain of your
organisation plus the name of your app.
The next three fields ask you which version of the
The Android Studio New
SDK you want to build your application against. using a 4.x version of Android, theres still almost a
Project wizard creates
Android has changed a lot over the years, and many fifth of all Android devices running Gingerbread. We sensible defaults for nearly
of its more advanced features are only available in the decided with setting a minimum required SDK of 14 all values.
4.x SDK. But while choosing the latest SDK is the (Ice Cream Sandwich), while setting the target and
easiest option, the best answer is going to depend on compile SDK at the very latest version, 19 (Kit Kat).
what capabilities you want your application to have You can leave the other options at their default
and where you want it to be used. Unlike iOS, many values just make sure that Create Activity is
Android users cant simply update their devices to the enabled, as this adds the next page to the New Project
latest releases. Many manufacturers dont even wizard, which enables you to select which kind of
provide updates, and even when they do offer template to use for your project. These are worth
updates, theyve usually made so many modifications exploring, as each example will include the best
to Android themselves that it takes many months for practice for different elements of a typical Android app,
an update to be distributed. The result is that there are and each new version of Android Studio includes
many different versions of Android in active use. more. But for our first application, were going to keep
things simple and go with the Blank Activity. This lets
Choose your platform us build things up from scratch but also avoids too
Google uses statistics gathered from its Google Play many complex concepts that come with more
app to report on the devices accessing the store over complex templates. After selecting the blank template,
the previous seven days, so that developers can make the final page is where we give our activity a name.
their own judgment on which platforms to target. An activity is what Android calls the application PRO TIP
Weve printed the table from early April, and you can component that expects something of the user. For When using try and
see that while a significant percentage of devices are nearly every instance, that means putting something catch, debugging is much
on the screen you can interact with. Android likes to easier if you isolate each
exception rather than
Current Android versions break down the functional components within an grouping them together
application, and an activity is one such component, (as we have).
Version Codename API Distribution usually with one purpose. It could be a web browser, or
2.2 Froyo 8 1.1%
a music player, but equally, it could be a stream of RSS
2.3.3 -2.3.7 Gingerbread 10 17.8%
3.2 Honeycomb 13 0.1% stories, which is the only activity our application is
4.0.3 -4.0.4 Ice Cream Sandwich 15 14.3% going to provide. An application is then a combination
4.1.x Jelly Bean 16 34.4% of multiple activities tied together to create a fully
4.2.x 17 18.1% functional tool. Having said that, you can leave the
4.3 18 8.9%
Activity and Layout names at their default values, as
4.4 KitKat 19 5.3%
they make only a cosmetic difference.
www.linuxvoice.com 105
CODING ANDROID
3 ANDROID EMULATION
This is where we hit some cutting-edge turbulence.
With Android Studio 0.5.7, the template generated an
error before wed even got to the code. The error
console complains that the Android Support
Repository isnt installed. And while this was indeed
installed, any update required another update to push
the Support Repository version up from 4 to 5. To fix
this, we needed to open one of several support tools
used to augment the Android development
environment the Android SDK Manager. This can be
opened from the Tools > Android menu, and when
opened it lists the various SDKs and tools installed
alongside Android Studio. We needed to allow this to
update two packages, which it did automatically after You can run almost any real and functional Android
accepting a couple of licences from Google. Hopefully, device from the Android Virtual Device manager.
you wont have to go through a similar process when
you first start Android Studio. selected and click on the Expand button to the right
Before we spend a little time going through Studios of the drop-down list. This will open AVD the Android
GUI components, first click on the Play button in the Virtual Device manager.
toolbar at the top of the window. This will build and This is the tool that manages your real and fictitious
attempt to launch the template, which is itself a fully virtual Android devices, and to get started you need
executable application. Most of the few seconds to click on the Device Definitions tab. This page
it takes is spent launching the Android Debug lists common definitions for a device, and clicking
Bridge, ADB, which is a tool that grabs runtime and on AVD will create an instance for you to run. If you
debugging information from a runtime instance of want to edit any of these settings, youll need to clone
your application, whether its running on an emulator a definition first. This will allow you to adjust things
or on a real device. such as the native resolution of a device, or whether
PRO TIP both portrait and landscape modes are available.
Android Studios editor Android emulator After youve added a device to create an AVD, you can
will grey-out lines, such The next window that appears lets you select which edit runtime options such as the amount of internal
as imports, if theyre device you want to run your application on. The story available to the emulation, whether an instance
redundant, and even make
suggestions for spelling Android Emulator is one of the most useful tools is persistent (storing the data between sessions), or
corrections. for both Eclipse and Android Studio development, whether graphics calls use your real machines GPU,
as it enables you to run your code on a fully fledged as well as the target level of the SDK.
Android device, albeit one being emulated in software. If youve got the correct packages installed, you
This does affect performance, but it also means can also switch between the much slower ARM CPU
you can spin up any kind of device you want, from emulation to the x86 instruction set of your native
old models using an ancient version of the SDK, to system. This gives a big performance boost and
models with resolutions and hardware combinations wont cause any compatibility issues unless youre
that dont get exist, and you dont have to spend any performing more complex or low-level operations.
money getting the latest devices. From the Choose We opted for a clone of the Nexus 4 profile with no
Device window, make sure Launch Emulator is other modifications.
106 www.linuxvoice.com
ANDROID CODING
name listed in the AVD manager: enable the Use Same Device For Future Launches
emulator -scale 0.5 @AVD_for_Nexus_4 so that you dont have to go through this step again -
The emulator window will appear at the proper scale although this only works for the current session.
and proceed to load Android. This can take a minute A few moments later, your virtual Android device
or two if youre emulating an ARM CPU, but speed should burst into life and your application will run
obviously depends on your system. Before too long, automatically. This is the default testing environment,
you should have a working Android system that you and if you take a look back in Android Studio, you
can unlock by sliding the padlock to the right with a should see that its in constant contact with the
click of the mouse. emulator. When you start debugging or monitoring
You should also be able to go back to the Choose your application, youll be able to break execution and
Device window from Android Studio and see the watch variables across the Android Debug Bridge
running instance listed beneath the Choose A exactly as you could if the application was running
Running Device button, which should be enabled. natively on your desktop. If everything is working
To run your application, select the running device correctly, you should see the ubiquitous Hello world
from the list and click on OK. Wed also suggest you staring back at you, and its now time to start coding.
www.linuxvoice.com 107
CODING ANDROID
6 MAKING A CONNECTION
The last line in the previous snippet is try, and its one dataRSS.postURL = new String[itemLst.getLength()];
of Javas most useful functions. Its an exception dataRSS.postContent = new String[itemLst.getLength()];
handler that forces us to deal with the consequences Were now going to go through itemLst using a for
of something not happening rather than allowing the loop and attempt to assign the contents of the
app to crash. The situations dealt with by try will be elements referred to by the tag names title, link and
dealt with by a catch instruction later on in the code. content:encoded by passing them to NodeList
In the next two lines, well give url the address of our elements, which is simply a collection of nodes we
feed and ask Java to open a connection: hope will contain the data were after.
url = new URL(http://www.linuxvoice.com/feed); for (int i = 0; i < itemLst.getLength(); i++) {
HttpURLConnection conn = (HttpURLConnection) url. Node item = itemLst.item(i);
openConnection(); if (item.getNodeType() == Node.ELEMENT_NODE) {
If the connection can be made successfully, our Element ielem = (Element) item;
application will get past the following if statement, NodeList title = ielem.getElementsByTagName(title);
taking us into the section of code that deals with the NodeList link = ielem.getElementsByTagName(link);
nitty gritty of the XML within the RSS feed. There are NodeList content = ielem.getElementsByTagName(content:en
many ways to deal with RSS/XML, but weve found coded);
the easiest to be DocumentBuilder, which provides an Because we cant be certain that the data were
API to access the tree layout of an XML file. In the after will be contained within the title, link and content
following code youll see that we set up a few NodeLists weve created, well need some exception
variables before structures for getting to the data handling again with try as we attempt to assign the
within the data stream before db.parse(url. values from the RSS to the string arrays we created:
openStream()) passes control of the data to the try {
variable we call doc. Well also initialise the arrays we dataRSS.postTitle[i] = title.item(0).getChildNodes().item(0).
created in the dataRSS class using the size of the list getNodeValue();
gleaned from the RSS and now held in itemLst: dataRSS.postURL[i] = link.item(0).getChildNodes().item(0).
if (conn.getResponseCode() == HttpURLConnection.HTTP_OK) { getNodeValue();
DocumentBuilderFactory dbf = DocumentBuilderFactory. dataRSS.postContent[i] = content.item(0).getChildNodes().
newInstance(); item(0).getNodeValue();
DocumentBuilder db = dbf.newDocumentBuilder(); } catch (NullPointerException e) {
Document doc; e.printStackTrace();
doc = db.parse(url.openStream()); }
doc.getDocumentElement().normalize(); In the previous piece of code, youll see that weve
NodeList itemLst = doc.getElementsByTagName(item); included the catch block for dealing with the
dataRSS.postTitle = new String[itemLst.getLength()]; exception. As you might expect, all this does is output
the methods (the stack trace) of the application that
have led to this point, and well finish of the class with
All our import
closure on the previous try as well as close brackets
lines were
for all the other blocks. Weve put these on the same
automatically
added via lines for brevity, as you should be properly indenting
Android your code or getting Android Studio to do it for you
Studios (Code > Reformat Code in the menu):
auto-complete } } }
features. } catch (Exception e) {
e.printStackTrace();
} } }
108 www.linuxvoice.com
ANDROID CODING
www.linuxvoice.com 109
MASTERCLASS VLC
MASTERCLASS
Essential Linux tools explained this month, the VLC media
BEN EVERARD player and a trio of command line media tools
T
he VLC Media Player is a free and open-source on the internet. You can directly access media on your
JOHN LANE multimedia player. There are a number of local machine, either its hard drive or DVD. If you plug
Linux media players to choose from but this in a media player that uses the Media Transfer
one can play just about anything and will often Protocol (MTP) you can access its contents directly.
succeed where other players fail. If you have any DLNA (Digital Living Network
But it is much more than just a media player. It was Alliance we know, it sounds horrible) devices such
originally a pair of applications: the VideoLAN Client as a PVR machine on your network, then you can also
called vlc and the VideoLAN Server called vls. The access their content through the playlist. DLNA is a
client and server functionality are now both contained media sharing standard offered on some internet-
in a single application the VLC Media Player, which ready audio-visual devices like televisions and PVRs,
everyone now refers to as VLC. and it is a simplified subset of something called
You can use VLC to encode videos in a similar way Universal Plug And Play, which VLC also supports.
to the command-line tools that we looked at earlier Opening the playlist (Ctrl+P) and selecting Universal
and you can use it as a streaming server. But youll PlugnPlay will query the devices on the network (this
probably want to start by using it as a player. may take some time) and then offer a list of content.
Click on an item to play it. Other network services can
Playlist be accessed in a similar way VLC supports SAP, the
Central to VLC is its playlist, which is more than your Session Announcement Protocol, which gives access
typical playlist you can create, load and save your to published multicast services and Apples Bonjour
VLCs programme guide own playlists, but what we have here is more of a protocol.
lets you see whats on TV. gateway to content, both on your local network and You can even directly access Freeview digital
television broadcasts if you have a working TV card
and know your local transmitters frequencies. Go to
Media > Open Capture Device and select the TV
Digital capture mode. Enter the relevant frequency and
press Play. Programme guide information is collected
and you can view this with Tools > Program Guide.
Internet media
Beyond your local network and TV antenna, the
internet is a rich source of media, and VLC gives easy
access to internet radio sources like Icecast and
Jamendo through the Internet choices on the Playlist
screen. You can also add your own media favourites,
such as your favourite Linux podcasts.
To add a podcast, go to View > Playlist, then click
on Podcasts; the Plus sign opens a dialog where
you can enter the URL for the podcast (for example,
www.linuxvoice.com/podcast_opus.rss), giving you
110 www.linuxvoice.com
VLC MASTERCLASS
Your preference
We already mentioned how you can change the look
and feel with custom skins. You can also change the
behaviour with Preferences (Control+P). There are
many options available here to change VLCs
behaviour, but its unlikely that you will need to change
many of them. If you want to back up your
www.linuxvoice.com 111
MASTERCLASS COMMAND-LINE VIDEO
A
s with most things Linux, there is a perplexing The software that performs encoding and decoding is
number of media tools available. Many of commonly referred to as a codec, and is defined by
these are merely wrappers around a small standards that can have multiple implementations.
number of utilities that perform the heavy lifting These implementations all produce acceptable input
and the most common ones include Mencoder and for any decoder, but may differ in the way they do it.
FFmpeg, which were going to look at here. One popular codec these days is called H.264,
Mencoder comes from the same stable as the otherwise known as MPEG-4 Part 10 or AVC, the
MPlayer media player, and it enables audio and video Advanced Video Codec. The usual open-source
files to be decoded, filtered and re-encoded. As its implementation is called x264. H.264 is very good
built from the same codebase as MPlayer, if MPlayer at producing high-quality video with small file sizes
can play it, Mencoder can decode it. and is therefore the current codec of choice for the
FFmpeg is a collection of tools and libraries for internet and mobile devices. Blu-ray discs are also
encoding, decoding and streaming audio and video. encoded using H.264.
It includes the libavcodec library, which is widely used The file itself is a container, and there are various
by other packages including Mencoder. FFmpeg container formats that you will encounter including
claims to be able to work with pretty much any AVI, MP4, MKV and Ogg. You will usually find H.264
multimedia file. within an MP4, MKV or MOV container.
In addition to ffmpeg, the command-line tool for Both Mencoder and FFmpeg use the same
converting multimedia formats, the package includes libraries for the codecs (libavcodec) and containers
a streaming server called ffserver and a basic player (libavformat).
called ffplay. Use ffrobe to display media information
about a file. Enter the command line
Both Mencoder and FFmpeg are complex and you So, how do we use them? Basic usage requires that
will often find that using internet searching will offer you supply an input file, some options and an output
you the command line sequences that you need to file, like this example:
achieve a task and those search results will determine mencoder input-file -oac mp3lame -ovc lavc -o output-file.avi
the tool you use. The mencoder command reads the input-file and
Both tools are uses the given audio and video codecs to re-encode
112 www.linuxvoice.com
COMMAND-LINE VIDEO MASTERCLASS
www.linuxvoice.com 113
/DEV/RANDOM/
Dota2 addiction
A
short time ago I found myself at the Second monitor to
keep an eye on IRC
head of a table one of the many
restaurants of a large Las Vegas hotel.
To the left of me, some of the very best Go
programmers in the world were conducting a
vociferous and sometimes vicious argument Microphone for
when I feel brave!
with those situated opposite, a collection of Obligatory Linux
some of the worlds very nest Python Voice DVD shot!
programmers (these are not mutually exclusive
sets, but it paints a nicer picture).
As I slurped on my noodles, I listened in
wonder and some small degree of awe as the
114 www.linuxvoice.com
COMPETITION
I
n issue two, we challenged you lot to Just remember the simple rules: no more
draw pictures using just 100 lines of than 100 lines, and only the turtle module
Python and the turtle module. The can be used.
results were so fantastic that it was too
difficult to pick just one, so weve decided to The winners!
take the cowards way and have a joint first Steven Mintons pastoral scene uses the
place. Both entries used clever maths and relationship between maths and real life to
clever programming, and they used them to create a country scene thats far more
create very different pictures. detailed that we thought would be possible
Well put all the entries (along with the in just 100 lines. The second just shows off
source code) online at www.linuxvoice. the inherent beauty of maths to create a
com/python-gallery, so head down there to quartet of abstract pieces. Both of them, we
see all the entries and to take a peek behind feel deserve a place in a gallery, but for now
the scenes. Although the competition is a page in Linux Voice will have to do.
now closed (and there are no more prizes), Thanks to everyone whos helped to make
well keep the website updated with any new the Linux Voice competitions such a great This could be yours! The exclusive Linux Voice
pictures that are sent in. To get on the site, success. Keep an eye out in future issues as leet T-shirt is only available to the winners of the
send your code to ben@linuxvoice.com. we have some big plans! Linux Voice challenges.
Congratulations to Steven Minton for creating this scene. The clouds and Theres lots of maths behind this entry. Wed love to tell you how
ferns are drawn using fractals, and loops draw the flowers. Jonathan Whitaker created this masterpiece, but we havent a clue.
www.linuxvoice.com 115
This is what weve done in the last 12 issues.
Subscribe to the next 12 from just 38.
Every subscription includes access to every PDF, ePub and audio edition weve ever published.
shop.linuxvoice.com