Preparing OpenStackInstallation Guide
Preparing OpenStackInstallation Guide
FR W INU
DO LI L
E N X
KA
The fastest ways to Store, search and edit your
E
4. OA201
backup and deploy photos with open source
7G D 9
L
PLUS!
B
3 Pi PROJECTS
SERIAL CONTROL
GET ANIMATING
USE EASYGUI
VOICE CONTROLLED
SMART HOME
Use Linux to add true smarts to your
home with security and open protocols
pages of
65 tutorials
& features
Make Arch as easy
Omoju Miller to use as Ubuntu
on how GitHub is using
Get perfect Steam
machine learning gaming with the Pi
SOUNDS FUN VECTOR DRAWING
Better Audacity Create better, scalable
audio editing diagrams with LibreOffice
WELCOME
WHO WE ARE
Learn more at www.nitrokey.com.
Control everything!
source smart home, so what’s the
smartest thing in your life right now?
REVIEWS
VOICE CONTROLLED
SMART
Happy Hacking Keyboard Pro2 19
Neil Mohr is certainly no hacker, but he
does have to type an awful lot. As much as
he likes the idea of an optimised compact
keyboard, is this thing worth it?
HOME
Slax 9.8 20
Once the apple of Mayank Sharma’s eye,
can the back-from-dead slimline distro
manage to retain its charm despite all the
changes and updates?
Refracta 9.0 21
A Devuan-based distro doesn’t particularly
excite Mayank Sharma, but this one
comes with a bunch of interesting
tweaks and custom scripts.
Dusk 24
Management are nervous again, as Ian
Birnbaum appears to be ignoring their
ROUNDUP INTERVIEW
memo not to go in the ruins in this retro
first person shooter.
on youR
RaspbeRRy pi useR fRee dvd
Kali Linux 2019.01
64- & 32-bit
Raspberry Pi news 50
Quantum computing on the Pi, power Page 96
issues and running x86 programs.
Using EasyGUI 52
CREDIT: IBM
Les Pounder shows us how to use Python
to search Google to gain inspiration for our
next maker project.
tutoRials
Hardware security
opinion encryption
irefox has announced that one of its impressive list of features, enabling you to
Keith Edmunds
is Tiger Computing Ltd’s MD,
f most popular Test Pilot experiments,
Firefox Send, is getting an official
specify when the link to the file expires, how
many downloads of the files are allowed, and
which provides support for launch. Firefox Send (https://send.firefox. whether or not to add an additional password
businesses using Linux. com) enables people to quickly and easily send for extra security.
files with end-to-end encryption. You can drag The people to whom you send the link
and drop files onto the web page and a link is simply need to click it to download the file –
The standard IT created that automatically expires, so nothing there’s no need for them to have a Firefox
support model of yesteryear is kept online permanently. account set up. A beta Android app is also
was ‘wait until it breaks’. The service is free to use, and if you sign in launching imminently. You can find out more
Support departments were you can send files up to 2.5GB in size. It has an at: http://bit.ly/LXFFirefoxSend.
event-driven, where an
event was a user calling
them to report a problem.
Today, we should
software routers
distinguish between user
support – helping someone
to use IT effectively – and
system support, where we
Skype for Web EU proposal
keep things running. The
events that drive system
support should come from
loses its shine could kill off
a monitoring system, not
the users. Why? There are
three reasons.
Latest version of the
VoIP software loses custom firmware
Firstly, waiting for Linux and ChromeOS. EU Directive would outlaw
systems to break implies
an impact to the business icrosoft has been making some
installation of user firmware.
before you fix anything.
That’s not acceptable.
M welcome and well-received overtures to
the open source community lately, but he EU Radio Equipment Directive
Secondly, your users won’t
tell you that the MySQL
when announcing the latest version of Skype for
Web, among a number of new features Microsoft
t (which can be read at http://bit.ly/
LXFEURadio) has an inclusion that
replication is five hours let slip that its browser-based version of Skype has worried many people, at this early stage.
behind the master, or that will no longer officially support ChromeOS or It requires manufacturers of routers, and other
the second disk in a RAID Linux. Users of those operating systems who try devices sending and receiving radio signals, to
set has failed. You’ll only to use the new Skype for Web will now be faced place a block on allowing customers to install
find out when more things with an error message saying that their device is software that has not be certified by the
break, and you’ll almost not supported–though some users are reporting original manufacturer.
certainly have lost data. success with Chrome browser or changing the This effectively means any third-party
That’s not acceptable. user agent to Windows on ChromeOS. Thus if developed router firmware such as the Linux-
Thirdly, it’s your job to be you’re a Skype user on Linux or ChromeOS, based OpenWrt (https://openwrt.org), which
aware of what’s happing, to you’ll need to use the native app instead. offers additional features and greater control,
work proactively to keep could no longer be installed. Worryingly, this
things working. won’t just be limited to preventing custom OS
Proactive support installations on routers, but potentially any other
improves system availability devices such as GPS, smartphones and more.
and data integrity. It’s how The FSFE published a Joint Statement against
we do things these days. If skype for web Radio Lockdown which has been signed by
your users have to report is no longer many organisations and businesses concerned
available
server problems to you, you about this. You can read the full statement here:
on certain
have already failed. https://fsfe.org/activities/radiodirective/
platforms…
statement.en.html
Image credit: Microsoft
Distro watch
OPINION
WA-HEY,
What’s behind the free software sofa? WAYLAND
SWAY 1.0
The first stable release of Sway, a “consistent, flexible,
and powerful desktop environment for Linux and
FreeBSD” as creator Drew DeVault calls it, has been
released. In a refreshingly honest release
announcement (http://bit.ly/LXFSway1), DeVault Jonni Bidwell
explains how “nearly 300 people worked together, wants only the best for you.
writing over 9,000 commits and almost 100,000 lines
of code” for this release, which has been completely So GNOME 3.32
overhauled for a much better experience compared to came out, and to
Sway 0.15, which was, by DeVault’s admission, a celebrate I finally switched
“buggy, frustrating desktop to use.” Download it from: over to Wayland. Of course,
http://bit.ly/LXFSway1Download. Sway 1.0 is a new desktop for Linux it wasn’t all smooth sailing.
and FreeBSD. As is well documented, I am
fond of Guake, the drop
down terminal.
REACTOS 0.4.11 Unfortunately Wayland has
A new version of the open source operating system no truck with programs that
that enables you to run Windows applications has been want to grab keystrokes
released. As the release statement notes (http://bit. without focus, so its handy
ly/LXFReactOS), this new version brings substantial F12 hotkey didn’t work.
improvements to the kernel that improves Since I spend most of my
performance and addresses a number of issues. time writing in LibreOffice
A compatibility issue with PCs running Intel’s Skylake (we both know that’s not
(or later) processors has been addressed, so it can true – Ed), pressing this
now run on more modern hardware, and Win32 ReactOS 0.4.11 is an open source key resulted in the current
improvements have been included as well. re-implementation of Windows NT. paragraph becoming the
first item in a list.
Frustrating, but of course
this is expected behaviour;
ROSA R11 it’s just that under X, that
ROSA Desktop is a Linux distro that was once a fork of F12 keystroke could be
Mandriva Linux, and the latest version comes in four intercepted to prevent
desktop flavours: KDE 4, KDE Plasma, LXDE and Xfce. this unwanted listifying.
In this latest release, the Linux kernel has been The future of tech
updated to 4.15, and there’s added support for journalism may well sadly
installing the distro on devices with fast M.2 and be listicles, SEO-friendly
NVME solid state drives. If your Russian is any good, headlines and simplification
you can read up on the release announcement at: ROSA is a Russian distro with a choice beyond recognition. But
http://bit.ly/LXFROSA11. of desktops. such bilge and bunkum will
never grace these pages.
Instead have a handy two-
ANTIX 17.4 sentence guide to getting
This distro based on Debian’s current ‘Stable’ branch Guake working in Wayland.
has had an important update that is now available to Disable the F12 shortcut in
download. antiX 17.4, ‘Helen Keller’, comes with an LibreOffice. Go to GNOME’s
updated kernel which has been patched to mitigate Keyboard Settings and bind
against Meltdown, Spectre and CVE-2019-8912 F12 to the command
vulnerabilities. All packages have been updated to guake -t . The second
Debian 9.8, and there are improvements to the argument toggles visibility,
localisation of applications plus improved icons and so will do the desired thing
themes. Find out more at http://bit.ly/LXFantiX174. whether the terminal is up
antiX 17.4 brings some important security or down. Done and the flat
updates to the distro. Earth disc keeps on
spinning.
Kernel Watch
opinion
just
emulate it
Jon Masters summarises the latest happenings in the
Linux kernel community, for your reading pleasure.
inus Torvalds announced Linux 5.0, represents a translated view in which regions
L and with it the opening of the merge
window (period of time during which
of memory may appear large and contiguous
to software, but in fact are mapped using
Jon Masters is a kernel hacker disruptive changes are allowed ahead of 5.1). OS-managed ‘page tables’ into many different
who’s been involved with Linux for In his announcement, he detailed a few last- physical locations by hardware. The translation
more than 22 years, and works on minute fixes, and that he was happy overall is fine for most purposes, and in fact is critical to
energy-efficient ARM servers. with having extended the 5.0 cycle by a week, our ability to write modern applications. But
following the atypical 5.0-RC8. The new kernel there are times when contiguous virtual memory
includes many new features, among them the is not enough.
I’ve lately been Energy Aware Scheduler covered in last issue. Sometimes, hardware needs truly contiguous
playing a lot with different It also gains support in the AMD GPU regions of physical memory. This can be
computer architectures that drivers for FreeSync, a technology popular because the hardware is less complex – for
interest me. An architecture with gamers that smooths the display by example, with embedded devices that are not
describes the kind of aligning the transition of the frame displayed capable of ‘scatter gather’ memory operations
fundamental instructions with the vertical blanking interval of the when moving data around. But it can also be
that are understood by a desirable for performance on much
family of computers; for
example ‘x86’ for Intel and “physical memory quickly bigger machines. When a
sufficiently large region of
AMD, ‘arm’ and ‘riscv’. For
example, nearly everyone
begins to fragment as it contiguous physical memory exists,
a so-called ‘huge’ page mapping
reading this has an x86 is allocated and freed” can be created to represent the
laptop computer, and virtual-to-physical translation of a
maybe an Arm-based display. A complete summary of what’s new large region using fewer entries in page tables,
Raspberry Pi or three for in 5.0 is provided (as usual) by KernelNewbies and the hardware structures that cache these.
various projects. at https://kernelnewbies.org/Linux_5.0. The problem is that when a system is
But for other kinds of running, physical memory quickly begins to
computer, it’s much harder Physically contiguous memory fragment as it is allocated and freed, so
to get one at home. In some Linux generally deals with two different views eventually it can become difficult to find large
cases, this is due to cost. of memory: physical and virtual. Physical regions of contiguous physical memory. Zi Yan’s
Few people have the space, memory describes the actual chips within the “Generating physically contiguous memory after
power budget or building machine (that is, the DRAM), and is usually page allocation” pages aim to help by effectively
structural support, let alone quite limited compared to secondary storage defragmenting physical memory to free up large
the money, for a personal such as a disk or NVMe. Virtual memory chunks of it.
mainframe. In other cases,
scarcity is a factor. Older
computers are hard to come ongoing DeveLopment
by, some are so new that
they haven’t been made yet. David Howells posted a Request For Filesystem and Memory Management
The latter case includes Comment patch series titled “Containers Summit about the preferred tests that
new designs that are coming and using authenticated filesystems”, should be run against patches destined for
but are not on the market intended to start a conversation about -stable kernels.
just yet. In almost all of containerising the kernel’s support for Stable kernels are those released by
these cases, there are crypto keys that it can manage on behalf of Greg Kroah-Hartman and based upon
readily available emulators filesystems and other subsystems. The existing Linus kernels with various fixes and
that let you test drive just as patches introduced a new, explicit notion of backports, intended for those who want to
easily as running a virtual a container in kernelspace, which has not run an upstream kernel but need some
machine on your desktop. previously been the case. level of maintainance.
A good example is the These ideas were rejected for a variety Greg noted that various tests against
RISC-V QEMU port and of reasons, but they may just start a new stable probably exceeded those for
associated tools, which you dialogue about in-kernel container mainline releases, while others piled
can get hold of at https:// representation. Sasha Levin proposed a on with input around the different tests
github.com/riscv/riscv- discussion at the upcoming Linux Storage that could be run.
qemu/wiki.
BIG words
I enjoy every issue immensely as it only brings me
further down the rabbit hole of this amazing universe
we call Open Source and all things Linux.
I’m looking to your wise and written ways to see
what discoveries you have made or found in the HCI
(Hyper Converged Infrastructure) landscape. I have
seen some details on a Proxmox + Ceph HCI solution,
but not as modular as Nutanix. I work with
a company here in Canada and we are a leading
provider of Nutanix, that has Linux underpinnings
and while mighty, it is costly. Would anyone like to
Is there any interest in hosted Directoy-aaS for explain Hyper Converged
cloud services? One may leverage a ClearOS or Infrastructure to us?
Zentyal SMB server, companies could join a local
on-premise infrastructure with cloud services like Neil says
Google Apps and maintain a single sign-on service Wow – you’ve used all the words, and I even recognise
through DaaS. Have you tried this yourself? some of them! Most of this is way over our heads,
David, Canada though it’s the sort of thing we leave to the genius of
Valentine to cover in his intermittent Administeria
section. I tend to aim contents at the sort of thing most
home users could have a play with over a weekend –
WIN A SECURE NITROKEY STORAGE 2 unfortunately, deploying a business-wide, single sign-on
cloud solution is slightly above that, but we enjoy
Send your thoughts to the Linux Format dungeon learning about the possibilities.
server at [email protected],
be picked as Letter Of The Month and Too clever
win* a 32GB Nitrokey Storage 2! My home network has now grown to five PCs, all
The Nitrokey is worth a cool €149, has 32GB of running Mint Xfce. One sits in a corner recording
hardware-encrypted storage, supports hidden Freeview SD from six tuners and saving to hard disk.
volumes, secures your online accounts with one- For ages, I was then transferring these recordings
time passwords, can encrypt emails, files and hard using the ‘shoe-leather’ method of using a pair of
drives and is an open source, open hardware The Nitrokey is 32GB flash drives to copy them in batches onto the
solution. Protected with AES-256 and RSA keys up your one-stop playback PC on the other room.
to 4,096! Learn more at www.nitrokey.com. security solution. This worked fairly well, as I wrote scripts to do the
donkey work. The only problem I had was that the
Helpdex
[email protected]
LETTER_OF_THE_MONTH
H
Getting RC with the Pi
My ongoing project is to take old RC cars
and replace the receiver/controller IC
with a Raspberry Pi. I have tried a
number of different solutions such as
WebIOPi and Wyliodrin, but Les
Pounder’s article on Flask in LXF229 gave me another solution
that I have got working and which I really like.
Head to libremusicproduction.com for Another aspect is to untether the car from the access point,
some awesome music guides.
and I wonder if Les could do an article on setting up a peer-to-
peer ad-hoc network between an android tablet and a Raspberry
script would complete, but as we were watching TV Pi? [Peter found a solution at http://bit.ly/LXF249point].
any pop-up would be invisible behind the playback. For the benefit of other people who don’t like doing things the
I brainstormed several schemes but nothing simple easy way, I have discovered that each of the three scrap RC cars
did the trick. have a different receiver/control IC, but all the ICs have the same
Then one day I was tapping away in a terminal on pin-outs. I’m tempted to use an IC socket as the connector
my laptop while copying the latest LXFDVD to a flash between the Pi and the car. Also, it has been necessary to power
drive. When the copy finished, as I was already in a the Pi separately from the motors.
terminal, rather than fight trying to find the little You can see an early attempt at http://bit.ly/LXF249picar.
button on the DVD drive I just typed eject and the Peter Merchant C.Eng (Ret’d)
drive pinged open. A lightbulb went on over my head
(is the eject command supposed to do that? – Ed). Neil says
The Pi and
So a quick edit to the script and that was it – each This is why we love the
Linux enables
time the recordings were all copied and it was ready Raspberry Pi, as it enables crazy projects
for the next flash drive, the script would just eject people to deploy Linux in some to take off.
the DVD drive on the PC. Brilliant… what could pretty inventive ways alongside
possibly go wrong? creative solutions. Good luck
A few nights later we were sitting in the dark with your project, and if anyone
watching a scary film. The copy finished just as the else is implementing open
tense bit of the film built, the DVD drive shot open source in interesting ways,
with a loud click and the pair of us jumped a couple let us know!
of feet! This finally gave me the nudge I needed to
drill a hole through the wall and run an Ethernet
cable to the theatre PC. magazine but sometimes a little more info/examples
Dave would be nice. Thanks for your attention and
listening to my two cents.
Neil says Dean Hansen
We’re glad you’ve gone with the more sensible solution
of drilling holes in walls. Neil
I get your point, but as a Linux and open source
You’re firewalled magazine we’re going to cover all the topics that
There are lots of Raspberry Pi magazines and encompasses, and as the Raspberry Pi is very popular
information on projects out there. I could do without we’d be silly to ignore that. Giving it just eight per cent
your Pi User articles. I would prefer more info and of the magazine each issue doesn’t seem outrageous.
examples on your tutorials, especially on setting up But we are going to write about firewalls, as it turns out
firewalls, security apps and encryption. I like your Jonni is getting paranoid about IPv6. Again.
WRITE TO US
Do you have a
burning Linux-
related issue
that you want to
discuss? Write
to us at Linux
Format, Future
Publishing, Quay
House, The
Ambury, Bath,
BA1 1UA or email
lxf.letters@
futurenet.com.
Q Document
scanning workflow
by Linux should do the job. Check the list
of supported hardware at http://sane-
supports several other formats. The
software enables you to save various
After using Linux for technical work project.org and pick a device that suits profiles, covering resolution, size, colour
and development for a while, I’d like to your needs and budget. I have used a depth, single- or double-sided and more,
completely move all office-related tasks Brother (same here–Ed) laser printer and which means setting up for a particular
to Linux (Manjaro KDE) as well. scanner in the past and it worked well. Now type of document is as simple as pressing
Besides some minor issues with I use an HP all-in-one device that has the the scan button, selecting a profile and
printers, the main impediment is how to benefit of duplex scanning, without having pressing Go.
set up my document scanning workflow. to feed the pages in twice. There is also quite extensive post-
Currently I scan all incoming documents HP devices are supported by the hplip processing support. It can use unpaper to
in one go, manually ‘staple’ them into driver package. This is open source but clean up and de-skew scans, it can also
individual multipage PDF documents and the scanners need a binary firmware file apply OCR (optical character recognition)
store them to Evernote. too. Hplip’s setup utility takes care of software to the scanned image, and save
Could you recommend document downloading and installing this, but it is a text copy of a page as a hidden layer
scanner hardware and corresponding something of which you should be aware if behind the scanned image. Although this
software to manage the workflow and you have a strict policy on using only open layer is hidden, it’s searchable, so you have
store the documents? source software. multi-page scanned images that can be
Roland Stadler For software, I haven’t found searched for a particular word or phrase.
anything better than Gscan2PDF (http:// There is no option to save to Evernote,
Q Zlow filesystem
I thought I would try out ZFS,
required to restore performance with 4K
disks. Then re-copy all your data back to
I just replace ‘mint’ with ‘peppermint’ in
the instructions you provided to him?
having heard so many good things about the hard disk. David Thompson
techradar.com
DISCOVER THE ALTERNATIVE
TO APPLE AND WINDOWS
Take complete control of your computer by learning how to choose, control and
use a version of Linux that is tailored just for you
ON SALE
NOW
Rating 7/10
Slax 9.8
Once the apple of Mayank Sharma’s eye, can the back-from-dead
distro manage to retain its charm despite all the changes?
or a long time Slax was the
in brief
The once-
f de facto distribution for
bootable USB disks. Back
popular then, the lightweight distro was
miniscule based on Slackware, but was still
distribution relatively easy to customise.
designed for Then, as with many one-man
removable projects, it stopped receiving updates
devices such as and has been dormant for several
USB drives was years. Now in its second innings, the
dormant for distro has undergone a dramatic
several years, change with the move to Debian, yet
and came back retains all the features that made it
to life re-based stand out from the swathe of Live
on Debian’s USB distros.
Stable branch Slax is available for both 32-bit Slax doesn’t have traditional support options, but its custom scripts have enough documentation
(Stretch) and 64-bit machines and its ISO to make first-time users welcome.
instead of weighs in under 300MB. The distro
Slackware. is getting regular updates and is gradually taking on new /media/sdb2/custom.sb saves all changes into the
It still packs features, the majority of which are behind the scenes and custom.sb module inside the external storage. This
in a graphical focused on improving compatibility with modern module can then be put on the USB along with the other
desktop and hardware. For instance, the previous version improved modules, or can be used to generate a new Slax ISO.
a handful of compatibility with new USB devices, and shaved a Slax’s developer has written scripts to reduce this
essential apps, handful of megabytes from the ISO image by using 1MB process to a single command. On a related note, the only
but can be blocks to compress the SquashFS filesystem instead of new feature in the 9.8 release is the possibility to exclude
easily fleshed the previous 512K blocks. core Slax modules when rebuilding a new ISO.
out using Slax has a unique mechanism for installing onto a Slax also includes a PXE server that can again be
Debian’s USB disk. Instead of dd-ing the ISO to a USB stick, you activated with a single script. You can test this feature
package need to loopback-mount it and copy its contents to a in VirtualBox by attaching the NIC of the Slax VM to the
management ext4-formatted disk. Then run a script from inside the internal network. Once the PXE server is running, any
system. USB to make it bootable, and you’re good to go. other VM that’s connected to the internal network and set
The distro offers three boot options. By default it to boot from the network will boot into Slax by grabbing
boots with the persistence option to save any changes the Slax modules over the network.
made in the Live environment. You can optionally Despite all the changes, Slax has managed to retain its
choose to boot into the factory environment by disabling edge. It’s lightweight, fast and easily customisable.
persistence. The third option runs the Live environment Behind the scenes, its developer is toiling hard to make it
entirely from RAM. It’ll perform a lot better than the compatible with a large amount of modern hardware. If it
previous options, but will only work on machines that continues on its current trajectory, it won’t be long before
have an adequate amount of memory. the distro reclaims the top spot among the portable Live
Despite its miniscule size, Slax boots to a graphical USB distros.
desktop sporting the lightweight Fluxbox window
manager. The desktop runs Slax’s homegrown and very
minimalist xlunch application launcher that weighs in at
VerDiCT
only 25K. The headline feature of the distro, however, is DevelopeR: Tomas Matejicek
its modular architecture. Everything in Slax, from the core Web: www.slax.org
components to the web browser, is a module that users licence: Several
can enable or disable on the fly as needed. This makes it
fairly simple to customise the distro to suit your needs. feaTureS 9/10 eaSe of uSe 8/10
Any changes you make to the distro, such as altering PerformanCe 9/10 DoCumenTaTion 8/10
the wallpaper or apt-get-ing new apps, are automatically
saved if you’re using the distro from a writeable medium The minimalist distro hasn’t lost its charms and is in our
such as a USB disk. If you’re running Slax from a non- opinion still the best option for lugging a USB Linux.
writeable medium like a CD or have disabled persistence,
you can still save your customisations by rolling them into Rating 8/10
a module. A simple command like savechanges
refracta 9.0
A Devuan-based distro doesn’t particularly excite Mayank Sharma, but
this one comes with a bunch of interesting tweaks and custom scripts.
here aren’t many desktop
in brief
Refracta is a
T distros based on Debian’s
systemd-free Devuan fork.
regular desktop But what makes Refracta interesting
distro that has are its custom scripts and packaging
a bunch of policy. It’s based on the latest
customised Devuan 2.0 ASCII release, it’s
tools to help available for both 32-bit and 64-bit
you install and machines and its selection of pre-
customise the installed apps make it an ideal
distro, and lightweight distro for daily use.
eventually roll Refracta uses the Xfce desktop,
your own Live the CLI-based Mutt as the default
ISO that you email client, and Abiword for word
can carry on processing. One of the highlights
a bootable of the distro is that its desktop is
USB stick. installed as individual packages Refracta’s scripts would be nicely complemented by a stripped-down flavour of the distro that
rather than a metapackage. This users could flesh out as needed.
makes it easier to customise their
installation by removing individual parts without affecting utility also has several tweakable parameters for
other parts of the desktop. So for instance, you can advanced users. First-timers can stick with the defaults
remove Xfce’s Thunar file manager without zapping the to generate a custom ISO to mirror their modified
entire desktop environment, and replace it with another installation. The script works flawlessly, and spits out
one like PCManFM. the ISO as promised.
Besides these, it’s a fairly standard collection of apps The third custom script is Refracta2usb, which helps
that’ll satisfy all kinds of users. Users will appreciate the make a bootable USB drive. Unlike other similar utilities,
fact that the Firefox ESR release is equipped with the this script can do a lot more than just transfer an ISO
HTTPS Everywhere and NoScript add-ons. One image to a disk. It can also create a bootable USB directly
interesting app that we particularly like is FireMenu, a from a running Refracta instance! The running instance
graphical application menu for Firejail. The app, placed has to be either from a Live CD or a Live USB and not
prominently in the top panel, presents a list of apps that from an installed instance of Refracta. Again, this option
when selected are launched in a Firejail sandbox. will also roll all the changes you’ve made to the running
FireMenu is fairly easy to operate and you can easily instance into the bootable USB. The script also gives you
customise its list of apps. While we had no issues running options to create a persistence partition that can be
apps like Firefox, GIMP and Audacious in the sandbox, the optionally encrypted for added security.
entry for MPV got us nowhere. As a desktop, Refracta doesn’t offer much to write
The main draw of the distro are its custom scripts. home about: it’s a pretty standard Xfce distro with some
First up is Refracta Installer, for anchoring the distro to esoteric app choices. What made us take notice are its
your hard disk. It’s a graphical installer that’s unlike any custom scripts. They are very useful and work as
we’ve encountered, with lots of tickboxes and pop-ups. advertised to help you package your customisations.
Its dexterity will appeal to advanced users, though it
comes with enough adequate defaults to be usable in
the hands of first-timers as well. There isn’t a dedicated
VerDiCT
partitioning tool, though, and this crucial task is instead DevelopeR: fsmithred
deferred to Gparted. Web: https://refracta.org
The installer is constantly evolving and taking on new licence: DFSG-compatible licences
features. The latest version that comes with this release
supports GPT disks and full-disk encryption. Another feaTures 9/10 ease of use 8/10
unique and interesting aspect of the installer is that PerformanCe 9/10 DoCumenTaTion 8/10
instead of anchoring the stock environment, it transfers
the Live environment along with any modifications, The stock Refracta isn’t really impressive, but its scripts make
including changes to the configuration and the app the distro worth checking out.
selection. Once you’ve installed a modified Refracta you
can easily convert it into an installable ISO image with the Rating 8/10
Refracta Snapshot script. Like the installer, the snapshot
For great savings on all of our magazines, see the entire range onlline
myfavouritemagazines.co.uk/spring192
Dusk
Management are nervous again, as Ian Birnbaum appears to
be ignoring their memo not to go in the ruins…
here we were, just about hip-
SPECS
T
Heed the chilling cry of “Get
deep in corpses and spent orrrrf ov moi laaaaand!”
Minimum: shotguns shells,
OS: Ubuntu when we read the writing on the wall.
12.04 64-bit Scrawled in blood, a message: “Don’t
CPU: 2.4GHz go in the ruins”. A raspy noise echoed
dual core behind us. It wasn’t quite an animal
MEM: 2GB sound, but it wasn’t human, either.
GPU: GeForce Turning, we found something much
9800GT or worse than a bad guy: a closed door
equivalent marked Ruins Access. The raspy
HDD: 2GB breathing came again from just
behind it. An actual chill ran down
Recommended: our collective back.
CPU: 2.4GHz Dusk is an homage to ’90s first-
quad-core person shooters such as DOOM,
Mem: 4GB Quake and Half-Life. It’s also a love letter to weird cultist of shooty monsters and bullets is to move, to run circles
GPU: Geforce horror genre films like The Hills Have Eyes and The Texas around the bad guys, kite them into big groups or toward
GTX 460 or Chain Saw Massacre. More importantly, it’s great. Dusk is explosive barrels, and shoot as fast as you can.
equivalent <expletive deleted> great. Speed is the first but not the only tool. Starting with
Notes: Don’t At the beginning of Dusk, you’re meat-hooked (at least a pair of sharp sickles and moving up through the
go in the ruins the third-worst way to wake up) and trapped in a hostile traditional FPS loadout closet, you shoot demons and
world, mostly unarmed. Like the ’90s shooters it draws bad guys with pistols, lever-action rifles, double-barrelled
inspiration from, the first tool Dusk gives players is speed. super shotguns, assault rifles, sniper rifles and grenade
This is a game where pressing the Forward button zips launchers. The most unexpected weapon found so far
you along the ground, and, charmingly, bunny hopping was the Riveter, a bulky steel box that launches hot
adds momentum just like it used to in ye olden days. construction-grade welding rivets that, for some reason,
With a heavy W-finger and a lot of jumping, exploring the explode spectacularly. We’re not sure why a rivet driver
creepy farmhouses and industrial buildings of Dusk’s first might act this way – it seems counterproductive for
chapter felt like touring a retro videogame art museum on construction work – but it is extremely fun.
a motorcycle. The blocky graphics in Dusk are the most obvious
It’s not speed for speed’s sake; you’re moving fast throwback reference to the era of games it idolises, but
because it’s the only way to survive. There are a lot of dang if they don’t look great anyway. The sharp polygons
different enemies in Dusk, from possessed scarecrows to of enemy bodies might be two decades out of date, but
hooded Klansmen throwing dark magic, but almost all of modern lighting and particle effects did a lot to make us
them charge straight ahead with melee attacks or shoot feel interested in exploring, and blowing up, the world
swarms of projectiles at you. The variety of enemies, around us. The limited polygon count and low-res
some big, some small, shooting bullets that move at textures have a jagged, unreal quality that makes corn
So little time, different speeds, makes every fight a constantly changing mazes look creepy and country churches look properly
so much to kill. obstacle course. The only way to navigate a crowded field cursed by evil magicks.
The single-player portion of Dusk consists of three
campaigns. Starting from that first moment in a weirdo’s
murder-dungeon, you fight your way through farms,
industrial zones and apartment buildings until you’ve
completely wiped out the cultist and/or demon
population of Dusk, Pennsylvania. We’d honestly
expected Dusk to be a straightforward recreation of
’90s shooters, including a generic or non-existent story.
Instead, the biggest surprise for us was discovering a
genuinely interesting, gripping little horror story on offer.
This is where Dusk becomes more than a parody or
homage to a once-ubiquitous genre and starts kicking ass
on its own terms. The bare, pixelated corridors of yore
have been replaced by low-poly but recognisable and
memorable level and environment designs. DOOM, with
its limitations, offered a bare set of hallways, but in Dusk
Rating 8/10
SUBSCRIBE!
Sign up today and get your
SoundMAGIC e11c
earphones YOUR
GIFT!
WORTH
£50
Don’t miss out,
subscribe now!
“A great pair of
affordable in-ear
te
headphones, comple
with remote
and mic”
PLUS! PLUS!
Every issue comes with a 4GB DVD The cheapest way to get Linux Get both the print & digital
packed full of the hottest distros. Plus Format. Instant access on your editions + DVD, for one low price. Plus
your SoundMAGIC e11c earphones iPad, iPhone and Android device. your SoundMAGIC e11c earphones
*Terms and conditions: This offer is only available for new UK subscribers. Gift is subject to availability. Please allow up to 60 days for the delivery of
your gift. In the event of stocks being exhausted we reserve the right to replace with items of similar value. Prices and savings quoted are compared
to buying full-priced print issues. You will receive 13 issues in a year. You can write to us or call us to cancel your subscription within 14 days of
purchase. Payment is non-refundable after the 14-day cancellation period unless exceptional circumstances apply. UK calls will cost the same as
other standard fixed line numbers (starting 01 or 02) or are included as part of any inclusive or free minutes allowances (if offered by your phone
tariff). For full terms and conditions please visit: www.bit.ly/magterms. Offer ends 31 May 2019.
Roundup
Clonezilla Deepin Clone
G4L WereSync
FOG Project
Shashank
Sharma
By day Shashank
is a New Delhi trial
lawyer, but by
night he’s an open
source vigilante!
how we teSted…
Cloning
flexibility
Do they offer enough options to
meet your cloning requirements?
lonezilla offers a lot of control over the cloning process.
C You can use it to clone individual partitions or complete
disks, or to clone the disk or partitions to an image – Direct disk-to-disk cloning options are faster than going via the image route,
which can then be saved to another locally attached disk, or even but come with certain amount of risk and don’t offer the same flexibility.
a removable drive. Rather than cloning to an image, Clonezilla can
also directly clone the disk or a partition to another disk or don’t wish to image them immediately. WereSync, meanwhile, is
partition. Although this process worked for us when cloning entire a Python script that has a graphical interface and is designed for
disks, we wouldn’t recommend it and would rather suggest you regular users. The utility only offers direct drive-to-drive cloning,
go via the imaging route, which is a lot safer and offers far more instead of the more popular and safe drive-to-image cloning
flexibility than direct disk-to-disk cloning. option offered by the others.
Much like Clonezilla, G4L has a very verbose interface, which Deepin Clone’s primary option is also a direct clone from one
gives you several options to help fine-tune settings when creating disk to another, although it does offer the option to clone and
and restoring images. Like Clonezilla, you can use G4L in restore via an image too. The app enables you to clone complete
separate modes, with the RAW mode that can clone all types disks as well as individual partitions. Note however that it cannot
of disks and partitions being the most useful. You can save the clone mounted partitions, nor can it save images on the same
images locally or across the network via FTP, SSH, SMB or NFS. partition or disk it is cloning. It also doesn’t offer any options to
For the impatient, G4L also offers the option to directly clone a compress, split or encrypt the cloned image.
drive without imaging it first.
Unlike the previous programs, FOG Project doesn’t work as a VErdICT
Live CD and thus has a different cloning mechanism. When you
use FOG Project to image a computer, it offers plenty of options, ClonEzIllA 8/10 G4l 8/10
with various fields to describe the host images. It can also dEEpIn ClonE 5/10 WErESynC 6/10
arrange the images into groups for easier management. There FoG projECT 8/10
are also several options to schedule the imaging process, if you They all offer enough dexterity for imaging a disk or partition.
Other custom
parameters
Do they offer any supplementary
options to assist with cloning?
part from presenting you with a list of disks and partitions
Usability
What makes them
stand out? Clonezilla 8/10 deepin Clone 8/10
Clonezilla is one of the most If there’s one area where Deepin Clone
nlike desktop apps, disk recommended tools on Linux forums for trumps the rest of the competition, it’s
Supported filesystems
Will they work across all machines in your network?
lonezilla supports a wide number of filesystems, from In contrast, there isn’t much information on the internet
Network use
Are these tools good for only imaging
local disks and partitions?
ou can use Clonezilla for multicast cloning via two
Deploying images
Putting the cloned images to use.
e wouldn’t fault you for thinking that the process for
AlSo ConSIdEr
Two of the tools featured in lXF in the past, but not included ones that do the grunt work in the background. The two that
this time around due to them not showing any signs of life, are are really worth mentioning are Partclone and FSarchiver.
Redo Backup & Recovery and Mondo Rescue. The former is by They both support a large number of filesystem formats and
far the easiest bare-metal cloning option we’ve run into. Its can quickly roll disks and partitions into movable archives.
downside, however, is that it takes away a lot of the control The real CLI veterans, however, don’t need anything else
over the cloning process in lieu of convenience. besides the venerable dd tool, which can be used to
The only real alternatives for cloning disks besides the ones effortlessly clone a disk or a partition with a single command.
we’ve already covered in the Roundup are the command-line You’ll need to know what you’re doing!
SMART
HOME
If you utter “Siri”, “Alexa” or “OK Google” in Jonni Bidwell’s
home, all the lights go off and the router disconnects.
ep, we’re pretty cynical about house so that it can be ‘smart’, so that the profit by not having to pay people to drive
Introducing Mycroft
A Pi-powered, friendly-looking home helper on the scene.
Actually, there are two – and you can use their code.
he Mycroft Mark 1 launched in 2016 and was be the Mark 1, a Pi or your Linux box.
(Text-to-speech) engine locally. This will take a long This means you can SSH into it from another
time on an older machine, but will be worth it if you machine with the following:
want Mycroft to talk to you during those dark times of $ ssh [email protected]
internet outage. Finally you’ll be asked whether to add If you’re talking to Picroft, the username
the Mycroft Helper command path to your profile; this will be pi and the password will no longer be
will make your life easier, so say yes here. All Mycroft mycroft because of course you diligently
commands begin with mycroft , so typing this then carried out our earlier instruction to change it
pressing Tab will help you manipulate it. You’ll be asked as soon as possible.
for a sudo password and then a quite considerable If the microphone level in the CLI doesn’t
number of packages will be downloaded and installed. respond, quit out of the CLI with Ctrl+C and The PS3 Eye works
You may see a warning about an outdated version of check the output of: out of the box with
Mycroft, even if
Pip (we noticed it on Ubuntu 18.04.2), but this is $ arecord -L
we are only using
apparently safe to ignore. If your mic is not detected, you will need to battle its PS3 ear. Image
Now we’re ready to run Mycroft for the first time, with sorting out your particular hardware – the fairly credit: Evan Amos/
which is done from the mycroft-core/ directory with ancient Playstation 3 Eye camera/mic is strongly public domain.
$ ./start-mycroft.sh debug recommended by the Mycroft team, and works out of
The debug option starts a command line interface the box. If on the other hand it is detected there, you
and shows extensive startup logs. Once everything’s may need to install and tweak Pulseaudio.
loaded, it will give you a unique six-character This is almost exclusively going to be a Pi issue since
registration code to pair this device with the Mycroft all major distros will have this already. It was necessary
Home service. Take a note of that because we’ll need it on our ReSpeaker HAT, so check the box below for
in a moment. There’s not a lot Mycroft can do until this some guidance. Bear in mind that you can always
pairing is complete. return to the CLI client with:
$ mycroft-cli-client
Creating a Mycroft account
Visit https://home.mycroft.ai, as the vocal prompts
should tell you if your speakers are working, to create SETTING UP THE RESPEAKER
an account from where your Mycroft devices can be
managed. Enter the pairing code and give your device The Seeed ReSpeaker 4-Mic Array Pi HAT is, as they say in the
a name and description. The CLI started earlier should business, a nifty bit of kit. As well as four microphones, it has twelve
acknowledge the new device, and you’ll be able to enter LEDs which can be used to indicate audio direction of arrival, or just
natural-language questions, commands (started with : to flash randomly and concerningly. It has GPIO and I2C connections
– type :help to see a list), or, audio setup permitting, so that other devices can be daisychained to it, or it can stack directly
speak directly to Mycroft through your microphone. onto Seeed’s GrovePi hub, allowing even more sensors to be
It will try to answer anything which you precede with connected. It uses the AC108 codec which at present isn’t supported
“Hey Mycroft”. by the Raspbian kernel, so we’ll need to install a custom one. Connect
At this point, you can continue with keyboard and to the Pi, either by SSH or keyboard, and quit the Mycroft CLI. Run
monitor plugged in, which is probably a good idea for the following commands:
the moment. However, if you’re planning on a headless git clone https://github.com/respeaker/seeed-voicecard.git
Mycroft Pi setup you’re going to be connecting to it cd seeed-voicecard
over SSH, so you may as well practise that now. You’ll sudo ./install.sh
need your Pi’s IP address, which you can either ask it The install script will chug along for a while, and eventually you’ll be
for directly or type: able to reboot and activate the new kernel with sudo reboot .
whats my ip address Reconnect if you were SSHing, then run sudo raspi-config to set
into the CLI – Mycroft doesn’t care about apostrophes, up the audio. Select ‘7. Advanced Options’, then ‘A4. Audio’, then
incidentally. It should respond vocally and output ‘1. Force 3.5mm jack’. Then reboot and enjoy.
something like If you run into difficulties you may need to install Pulseaudio and
>> My network I.P. address is 192 dot 168 dot 0 dot 23 restart Mycroft’s daemons, with:
$ sudo apt install pulseaudio
$ ./start-mycroft.sh all restart
If it still doesn’t work (and
remember, if in doubt a reboot
never hurts), the Pulseaudio
input device may need to be
changed. List the devices with
pactl list sources and then
change the default to match the
line beginning Name in the
output, with:
pactl set-default-source “alsa_
input.platform-soc_sound. The ReSpeaker is suitably equipped with
multichannel-input” twelve LEDs and four microphones. No
Mycroft’s glorious ASCII splash screen. Yet another opportunity for Cool turntables, though.
Retro Term to make an appearance.
esides being able to tell you your IP address, One of the most popular skills for Mycroft is openHAB
Add the add-on Add some more add-ons Browse the Eclipse market
1 Open a browser pointing to your 2 While you’re at it, have a look at the 3 With the Eclipse market integration
openHAB host on port 8080 – it’ll be the myriad other openHAB add-ons on offer. installed, several new add-ons appear in
same IP address as mentioned above. Note that add-ons are occasionally lost the Bindings section of openHAB’s add-
Navigate from Add-ons to the Misc section when the system updates, so on occasion ons catalogue. To view them it’s best to
and look for Eclipse IoT Market. Install it by you’ll need to reinstall them. The docs change to a denser layout (rather than a
clicking the button. For clarity, installing clearly say this is going to change in the long list) using the widget at the top-right.
anything from external sources should future. There’s an openHAB Android app Type market into the search box to see
always be done with caution. available on Google Play and F-Droid. Eclipse market entries only.
Install the Hive binding Mycroft, meet openHAB Crank up the heat
4 Locate Chris Foot’s ‘Hive from 5 Add the openHAB skill from the 6 For now, only changing the
British Gas Binding’ add-on and install it. Mycroft Marketplace at https://market. thermostat is supported. If you run into
In order to make it work you’ll need your mycroft.ai/skills. You’ll find it in the IoT difficulties check out the slightly older
Hive account details and an API key. This section along with bindings for Google AIY, project by Rob Kenny at http://bit.ly/
may require registration at the official site Home Assistant and other platforms. If lxf249hive. This aims to do more, but the
https://my.hivehome.com/login. Once you’re interested in learning more about project has been dormant since January
you’ve logged in you can generate an API what Hive can do, check out the official 2018. Still, there are some useful scripts
key and add these into the appropriate reference for Hive’s REST API at https:// that might help you better understand the
place for the add-on. developers.hive.com/reference. Hive interface.
F Marketplace at https://market.mycroft.ai/
skills – don’t worry, they’re free). You can
forget to click Save at the top of the page to yet again
confirm your intent. This second confirmation is
install them directly from there, verbally with something necessary because besides the API connection to
like “Hey Mycroft install coinflip”, or manually at the Spotify, which is done by an OAuth, a further device
Mycroft CLI. You can also install skills from the authentication is necessary, which requires the Skill to
mycroft-skills GitHub repo. You’ll also find excellent retain your Spotify credentials. See the documentation
documentation on how to write your own there. at http://bit.ly/lxf249spotify4 if you want to log in via
If you have a Spotify Premium account, there’s a Facebook, or generally find out more about the project.
skill for that. You can either play tracks through other You can now ask (or type into the CLI) queries such
devices via Spotify Connect, or play them through as “What Spotify devices are available”, “Show my
whatever Mycroft’s running on. Add the Spotify skill playlists”, or “What song is this”. You can also issue
from the Marketplace; you should see a message like demands, for example “Play discover weekly”, “Play Get
INFO - Will install [‘mycroft-spotify’] from the Free by Major Lazer” (not again!–Ed) and “Stop playing”.
marketplace In the Skills configuration page in your Mycroft Profile,
in the CLI. Before you can use the Spotify skill, you’ll under Remote Control Device you can also change the
need to enter some credentials. In the links to the left of default playback device, having Spotify stream to your
the Marketplace, navigate to My Account > Profile. Mycroft device, if you like.
From here follow the Skills link at the top of the page. Interestingly, just as we complete this feature, some
Scroll down to the Spotify Skill section and enter your big news has surfaced in the voice recognition world.
Spotify credentials. You’ll be asked to bestow Mozilla has just released, under a Creative Commons
permissions on our Mycroft skill, and hopefully will be licence, version 2.0 of the Common Voice dataset.
This includes thousands of hours of matched audio
and transcription in 18 different languages, including
openHab and otHer pLatForms Welsh (lechyd da!–Ed). It enables smaller projects
access to an open dataset the like of which was
We’ve barely scratched the surface of what openHAB is capable of, previously only available to large companies.
but it’s just one of a number of platforms that can interoperate to one Mycroft has its own anonymous voice-data
degree or another among themselves and indeed Mycroft. collection feature, which you can opt into at the bottom
For example, there’s a Minecraft plug-in for openHAB, so you can of the Basic Settings on the Mycroft Account page.
control actual devices in your house from the voxellated world of the Looking ahead, the company will likely incorporate the
game. It uses the popular SpigotMC plug-in – look it up. You can also Common Voice data into the collaboration it already
use openHAB to communicate with Nest devices and Amazon Echo. has with the Mozilla DeepSpeech team (https://
We could actually write a whole feature spanning the diverse research.mozilla.org/machine-learning). One day
selection of robots and circuits it’s capable of interfacing with (well, the goal is for DeepSpeech to be the default Speech to
if you’re offering… – Ed). Text (STT) engine in Mycroft, but at present it requires
There’s also a Mycroft skill for controlling devices connected via considerable GPU power to run at adequate speeds. In
the popular open source Home Assistant platform (www.home- future this can be farmed-out to the cloud, and indeed
assistant.io), which can talk to all sorts of things like Sonos audio Mycroft already has a pool of GPU-heavy machines that
systems, Alexa, Google Assistant and Z-Wave devices. Like openHAB, can take care of the grunt work for ML-savvy Mycroft
Home Assistant has a smartphone app and offers a handy web
interface – and we could probably devote a whole lot more space to it
than these three sentences.
Google Assistant has its own Python library. Naturally we’d rather
you used something that didn’t come from Mountain View, but since
you may already be using it, maybe you’ll be interested in hacking it.
You can check out the sample code at http://bit.ly/lxf249python 3.
The Mycroft
add-ons page
has several IoT
offerings, and
there are several
platforms outside
of Mycroft. The Spotify skill unfortunately won’t pay your Spotify bill. But it does
need some access to your account.
3) https://github.com/googlesamples/assistant-sdk-python/
4) https://github.com/forslund/spotify-skill
all too often fails to make head nor tail of the noises that
come afterward. That said, Precise is already being
used elsewhere. A particularly interesting use case is
Sickweather (www.sickweather.com). The site has
been using it to track coughs and sneezes in public
places, particularly on transport. With reliable data, and
enough of it, the goal is to map and predict outbreaks of
flu and other diseases – a veritable Sickness Forecast,
hence the name. It’s quite bizarre, we think, that a tool
ostensibly focussed so strongly on spoken words is
finding use in the much more general field of hacking
There must be an awful lot of phonemes, glottal stops and pulmonic and croaking noises.
consonants in so much audio data. We trust Mycroft and Mozilla and everyone else
working on this for the good of open source, but it’s
users. In the meantime, those made of really strong hard not to be a little creeped-out at voice data being
stuff may want to run their own DeepSpeech instance. harvested. We already share far more than we should
At the beginning of this tutorial, we mentioned the with the internet through Facebook and Google and
Adapt intent parser. A new intent parser, Padatious – friends. As voice becomes an ever more popular choice
based on neural networks and machine learning and all for interacting with the Internet and the Things
that jazz – is currently being developed by Mycroft. connected to it in your home, surely we will be sharing
Where Adapt focuses on small groups of words and more and more sensitive information with the services
tries to extract intent from them and the relationships they connect to.
between them, Padatious analyses whole sentences. That is troublesome if data turns out not to be
According to Mycroft it’s likely that Padatious will sufficiently anonymised. And on that vaguely
replace Adapt on some platforms, presumably ones despondent note, we’ll sign off before the small army
with sufficient algorithmic horse power. of Picroft machines we set up in the LXF Towers
Unlike closed source assistants, we can be basement gets caught up in an awful feedback loop
reasonably sure Mycroft isn’t listening to us at all times. and destroys us all.
More precisely, it is listening at all times, but any audio it
picks up before the wake word is discarded.
A corollary of this is that without the wake word,
everything is discarded. The default engine that listens
for the wake word is called PocketSphinx, but an
alternative, Precise, is available (see http://bit.ly/
lxf249precise 5). Precise is much more, uh, accurate The more we look
and is based on data collected from Mycroft users who at it, the more that
have opted-in to the data collection mentioned above. cutesy smile starts
to take on a bit of
At present, Precise is used only as a wake word an air of Clippy,
detector. That’s why you may become suspicious that the ever-helpful
Mycroft is so swift at responding to “Hey Mycroft” but paperclip.
on her talk…
“It’s a new vision for
the global brain – deep
learning with humans
instead of machines.”
Human computIng
macHIne learnIng
Never one to turn down talking about high-powered
programming over biscuits and coffee, Jonni Bidwell
meets the multitalented Omoju Miller.
o
Learning Engineer at GitHub. The master and
She holds a PhD from the the Padawan.
University of California,
Berkeley (which, apart from its academic
excellence, she chose for its proximity
to Skywalker Ranch). While studying for
this part-time, as well being a mother,
she worked as an expert at Google for
its non-profit fund for Computer Science
Education. We were lucky enough to
catch up with her at O’Reilly’s Velocity
conference in London, October 2018.
see what other people are doing. More they really? The first AI class I took was if we can figure out the nature of humans
importantly, for me, is to get a view outside a sort of cognitive science seminar; it that would be like a scientific way to
of just AI. What are people thinking about was a different kind of thing because question the existential. So I thought this
in education? What are people thinking it gave a sort of historic precedence of was all fascinating, and that was it, I just
about in public health? That kind of thing. why this whole thing started. It went wanted to do that. It’s like metaphysical
And then seeing what kind of initiatives the all the way back into an exploration of exploration but from a scientific stance.
World Economic Forum is up to. the metaphysical, and how humanity I didn’t really think of it as machine learning
questioned the nature of reality, why we or AI.
lXF: What made you specialise in artificial are here and if there is a god, and how
intelligence and machine learning? those lines of inquiry led to the founding of lXF: Was it more of a continuation
om: I was already fascinated with mathematics, to the founding of physics. of some bigger journey?
Computer Science, but I became even Mathematics were a way to separate om: Right. Basically I thought it was really
more fascinated when I discovered AI, and what we know from what we don’t know interesting, but it turns out it’s also really
it was specifically for one reason… In high and make inferences. We continued down useful too.
school, you know, you get your math book. that path all the way down to logic, all the
If you’re learning Pythagoras’ theorem way to von Neumann machines, to the lXF: I’m quite interested in computer
there will be a picture of Pythagoras and invention of computers and all that kind science education, so let’s continue
a little blurb about his life. I was always of stuff. It’s just a natural progression, with that theme. I enjoyed your TEDx
fascinated about all these people in logic machines to AI. It’s the same quest talk about dispelling “The myth of the
these books – what kind of people were of figuring out the nature of humans, and innate ability in tech” [see http://bit.ly/
lxf249tedx 2], particularly as it applies
to coding. What is wrong with this idea,
becomIng non-toXIc that when someone shows some inkling
of being good at maths, or whatever, that
lXF: Open source has become quite justice? Like reform and work with the we then think, oh they’re gifted, they’re
popular, and unfortunately that has community to bring them back. That definitely going to be a good coder?
brought with it some pretty toxic seems healthier than kicking people om: So this myth, I don’t think we quite put
behaviour in some communities. What out, which doesn’t help anybody. that term to it, but what we’re saying is it’s
do you think we can do to further Something else I’m interested in essentially biological determinism. We’re
address this problem? deeply: can we do some research to saying some people are born with a special
om: I think we have to have very strong see the genesis of communities and genome that gives them a special ability to
codes of conduct and very strong what are the leading indicators of a do computationally rigourous work, while
community and safety teams. It might community becoming toxic? Then we others can’t. It’s the same idea behind
seem strange, because open source can we nip those things in the bud. people that say “I’m a math person” or “I’m
is open source – there’s not someone Another thing is that it’s quite not a math person”.
sitting there working full time [in every difficult to figure out what is toxic There’s no such thing as predisposition
project]. However, there are some open and what isn’t, because it’s often to mathematics or computation or
source projects that have grants and community-dependent. Sometimes to reading. It’s about how we haven’t
actually do have full-time employees. certain behaviour isn’t toxic in one done enough research in education to
When a project gets to that stage, I community because it’s the norm, actually understand how people acquire
think they need to prioritise having a and it doesn’t marginalise or ostracise computation. They acquire knowledge in
community and safety team: a group anybody. But when someone from that two modes: an emotional path and a logical
of people whose whole job is to curate community joins another and carries path. These two paths have to weave
the culture and set the tone for what is that norm over, it might be toxic in this together for the knowledge to seep into a
acceptable and what is not acceptable. new community. human being. Human beings are embodied
And then something radical, which How can we change this? By doing creatures and they are deeply emotional;
I would like to see more of: instead research in this area, hard-core the concepts that they have in their minds
of banning people from projects, research and datamining, and then are emotionally mediated as well.
what if we did things like restorative acting on that research. Even in the language we use, when
you think of falling in love, you think of
love as warm and the absence of love
as cold. These are deeply emotionally
triggered concepts and it’s related first to
the warmth felt by the baby inside their
mother’s womb. Later, when the baby
is laid on the mother’s chest, warmth is
transferred from mother to child. If the
baby is put down, then the heat dissipates
and the baby doesn’t like that.
And that is one of our first associations
with something negative, that loss of heat,
that cold. We humans try and cheat that
by swaddling, we’re trying to trap some
of that heat. This is how we learn and it’s
deeply wired into our brain. When it comes
2) www.youtube.com/watch?v=BFWVHSeakkg
One of the most exciting features in Kernel 5.0 is You can achieve a lot from the terminal, but many
AMD’s FreeSync, which enables variable refresh rates users will be desirous of installing some sort of desktop
on suitably expensive GPUs and displays. If you are environment. One of the main draws of Arch Linux is
lucky enough to have such technologies, Arch Linux is access to the latest Gnome/KDE/Cinnamon/<insert
a great place to test them out. You won’t need to mess your favourite DE here> goodness. What is less known
around with patching kernels, PPAs or custom Mesa is that Arch provides opportunities to customise the
builds to get everything working – everything’s already software selections of most of these. If you’ve done a
in the repos, awaiting your download. little distro-hopping, you’ll have some idea of the
Assuming you’ve already got a working desktop with different ways that things can be arranged in GNOME
the xf86-video-amdgpu driver installed, you’re halfway and KDE Plasma (and Xfce, MATE, and all the others).
there. We just need a minimal xorg.conf snippet which You’ll likely also be aware of the applications bundled
frobs the required option. So create /etc/X11/xorg. with each desktop, and may have been frustrated when
conf.d/20-amdgpu-freesync.conf and fill it with: trying to trim this down. Ubuntu has done quite well at
Section “Device” providing a good but not excessive selection of GNOME
Identifier “AMD RX590” applications. But if you naively try to remove Evolution
Driver “amdgpu” (or anything related to it), watch Apt threaten to tear
Option “DRI” “3” your system asunder.
Option “VariableRefresh” “true” In Arch, the base GNOME desktop and the core
EndSection applications are encompassed by the gnome package
It’s early days for FreeSync on Linux; at the time of group. Another group, gnome-extra, includes extra
writing, the feature is disabled for browsers, video games and utilities. Entering pacman -S gnome will
players and desktop compositors. Still, Linux gamers offer to install the 65-package entirety of the core
are reporting FreeSync success for OpenGL games. group, which you can do by just pressing Return.
Alternatively you can slim down the selection – for
New versions of KDE Frameworks,
instance, you may not be interested in GNOME Maps/
Applications and Plasma land in Music/Photos/Todo, or you may not like Tracker
Arch pretty swiftly. indexing all your files.
The previous command shows each package with a
number next to it, and you can enter a space-separated
list of these numbers, and/or ranges, to pare things
back. If you’re not sure what a package is, query it with
pacman -Si packagename . As in most other distros,
GNOME defaults to using Wayland where possible,
falling back to X if things go awry.
To boot to the graphical login screen enable the gdm
systemd service with:
# systemctl enable gdm
KDE doesn’t have its own login manager, though SDDM
(Simple Desktop Display Manager) is the de facto
choice. One consequence of forgetting this detail is that
it’s possible to install a myriad of KDE-related packages
It’S the LIttLe thIngS and still not have anything like a functioning desktop,
since the display server (X.org or Wayland)
It’s hard to overestimate all the fine-tuning that goes into Ubuntu, dependencies are only pulled in by the display manager.
Manjaro or any other desktop-centric distribution. Recreating some of So first install that with pacman -S sddm and enable
those tweaks in Arch is tricky, but some of them are small things that it with systemctl enable sddm . Like GNOME, KDE
make surprisingly big differences. Plasma – the proper name for the desktop produced
For example, your command line life will be markedly improved if by the KDE community – can be installed as a package
you install the bash-completion package, which provides tab group with pacman -S plasma . Alternatively, just
completion for most commands. Note that you get filename installing the plasma-desktop package provides a
completion in Bash as standard – this package intelligently completes foundation for a more minimal installation. Unlike
command options, which is tremendously useful if you’re delving into GNOME, KDE applications are entirely decoupled
unfamiliar systemd or Qemu incantations. from the desktop, so you’ll want to peruse the ‘kde-
In our Arch-based distos roundup in LXF246, we found some great applications’ group to see what you need. This group
features in Antergos, ArchLabs, KaOS, Netrunner Rolling and Manjaro. has 161 packages in total, but if you just need a
Some of these would be hard to recreate from scratch, like ArchLabs’ terminal, file manager, photo/document viewers
stylish Openbox/Polybar/tint2 combo. But some are easy. If you and other basic utilities then start with:
want the Octopi or Pamac graphical package managers, they’re # pacman -S konsole dolphin kate gwenview okular
available straight from the AUR. Just follow our guide to setting that ark kcalc
up and then do pikaur -S octopi , for example. Alternatively, we can use metapackages. These
If you like Antergos’ glorious Numix GTK theme, that can be yours behave very much like groups, insofar as you can refer
with pacman -S numix-gtk-theme . Powerline is a plug-in for Vim, to a bunch of packages by a single name, but they differ
but it can also be used, as it is in KaOS, to jazz up your terminal. in that they are dynamic. If someone on Team Arch
Check out the wiki page at http://bit.ly/lxf249powerline for how. decides to add a package to the ‘plasma’ group, for
example, that package won’t magically appear on
Compute module 3+
les pounder takes a look at the last of this generation’s Raspberry Pi
and wonders what makers can do with this much power.
he Raspberry Pi Compute Module is one of
In bRIEf
A Raspberry Pi 3
T those boards seen in the maker community, but
rarely used in projects for most makers. It’s
B+ shrunk into designed for industrial use and this is evident by the form
the shape of factor. Measuring only 67.6 x 31mm and looks more like a
laptop RAM. stick of laptop DDR RAM (but not electrically compatible),
This tiny board this is actually a Pi 3 B+ shrunk down into the smallest
has plenty of form. It even has 1GB of RAM, the current maximum for
power but can this generation of Raspberry Pi.
be built into But what do we lose in the process? Well, chiefly
bespoke wireless connectivity: there is no Wi-Fi or Bluetooth with
It might look
projects this board. Another loss is that the CPU for the CM3+ just like a stick of
designed by the runs at 1.2GHz and not the full 1.4GHz found on the laptop RAM, but here we
user. If you are 3 B+.On the other hand, we gain eMMC storage in 8, 16 have a full computer.
building a and 32GB capacities – except for the CM3+ Lite, which
Raspberry Pi relies on offboard micro SD card storage. The eMMC
project and storage is connected directly to the processor and gives still straightforward. The first step is to clone a GitHub
want to scale up us an interface speed similar to a Class 10 micro SD card. repository, which includes the tools necessary to perform
into a product, This is not lightning fast access, but quick enough and a USB boot of the CM3+. This enables the CM3+ to be
or integrate the less prone to corruption than an SD card. mounted like a regular flash drive. Then we can either use
Pi into an The BCM2837B0 System on a Chip (SoC) is the same a tool such as dd to write a Raspbian image, or in our case
industrial as found on the 3 B+ and 3 A+, but the CM3+ can offer Etcher, which detected the CM3+ and wrote the image in
application, this up all of the GPIO pins present for this SoC – all 120 of around 10 minutes.
board is for you. them! To do this the CM3+, like its earlier versions, So what do we do with the CM3+? This is where the
requires the Compute Module IO board. This board fun begins. We can design our own circuit boards based
provides us with a single USB 2.0 port to connect a hub, around the board. For example we could build a CM3+
keyboard, mouse and so on. There are also connections powered museum exhibit with touchscreen controls,
for the official Raspberry Pi camera and display – in fact, multimedia playback and motorised elements. We have
two connections for each device, so dual screens and access to all of the GPIO present on the SoC; all we need
dual camera projects are possible. The CMIO board also is the time and patience to create a carrier board, like the
provides a micro SD card slot needed for the CM3+ Lite, CMIO, that breaks out the connections that we need.
and an HDMI connector. This board isn’t for everyone; in fact, it’s only really
Flashing the operating system to the eMMC is a multi- viable for building Internet of Things, robotics and
step process, which is not as simple as a regular Pi, but industrial applications. For the average user it’s more of
an interesting piece of Pi-powered technology. But for the
few who want to create their own Pi-powered products
without the bulk of the form factor, the CM3+ is an
interesting and expansive platform, and cost-effective.
VERDICT
DevelopeR: Raspberry Pi Trading
Web: www.raspberrypi.org/products/compute-
module-3-plus-32gb
pRice: £38
EASYGUI
Get inspiration for your
projects with Google
Les Pounder shows you how to use Python to search Google
to gain inspiration for your next project.
ach issue we write a new Raspberry Pi project Python 3 editor found in the Programming section of
reaches three, then it will stop. Each time the loop goes
round it will use an enterbox from the easygui library,
which is a dialogue box into which we can type, to
capture the user input. This is then appended to our
things list, which means it is added to the list.
for i in range(3):
things.append(eg.enterbox(msg=”READY >>> “))
We now have the items to search for, but we need to
convert them from list into a string – this is for our
Google search later. To do this we create a variable At the end
it chooses a
called inspiration and in it we store the converted random website
items from the things list, starting with 0, then 1 and 2. to visit from
This is all wrapped inside a string-formatting function the suggestions
that ensures the text is saved correctly. We then print stored.
this to the Python shell for debug.
inspiration = str(things[0]+” “+things[1]+” “+things[2])
print(inspiration) #Debug ( len ) of the list. Creating a variable called links to
store the multi-line string, we instruct Python to insert a
Round and round we go new line \n and then join the text together, starting When using the
Time for another for loop, and this time we use it from index 0 in our suggestion list. This is called slicing, easygui library,
to perform a Google search. For this we use the and by passing the value 0: we instruct the slice to start typing
inspiration variable, since it contains the search terms. start at 0. the name of a
We then instruct the search to use the Google TLD (top for i in range(len(suggestion)): function, for
level domain) for our country, in our case co.uk . links = “\n”.join(suggestion[0:]) example ‘eg.
The num value limits the number of links returned. Now that we have the multi-line string we can use it enterbox(‘ and a
helpful tool tip
The stop is a Boolean value tells our search to stop in easygui’s textbox function. This function takes a
will appear to
when it has enough links. Lastly, the pause value is set message ( msg ) and the text that we wish to show, in
show the syntax
to two seconds between each search, otherwise Google this case the contents of the links variable. for that function.
may block our computer from using its service. Each eg.textbox(msg=”Hey I found these that might be of this is common
time the for loop goes round, it prints the returned interest, I’ll open one at random after you close this for the majority
search item (the URL) and also appends the search message”, text=links) of python
item to the suggestion list we created earlier. The final line of code opens the default web browser libraries and is
for item in search(inspiration, tld=”co.uk”, num=3, for Raspbian, but the link it opens will be a random very helpful.
stop=1, pause=2): choice from the suggestion list we created earlier.
print(item) webbrowser.open(choice(suggestion))
suggestion.append(item) With the code completed, click Run > Run Module to
Moving along, we have another for loop and this start. You will now have no excuses when asked to
time we use it to convert our suggestion list into a devise a new project. Have fun!
multi-line string, a paragraph. We do this for the length
EasyGUI vs GUIzEro
If you have been hacking around with the Pi for a while, you will know
of guizero, written by Laura Sach who works for the Raspberry Pi
Foundation (https://lawsie.github.io/guizero). It’s a great library
which simplifies the way in which we can create Tkinter-based layouts
for many types of GUI application. We used it in LxF242 to create our
barcode scanner/Amazon book search app. So you might be
thinking, why did we choose easygui over guizero for this project?
Well, it comes down to our needs. We just needed a few dialogue
boxes to capture user input, and display the output from the Google
search. We can do this with guizero, but it would not be three simple
lines – there would be a few more lines, but still with simple code.
We have used easygui for a few years, and yes, it is rather old and
a trifle too simple for most projects. But for a really simple ‘Ask a
question, return an answer’ project, it cannot be beaten. To learn
more about easygui and how you can use it via a series of simple
tutorials, head over to its Read The Docs page and follow their work:
When the project starts, it instructs the user on how it will work, https://easygui.readthedocs.io/en/latest.
using a msgbox.
PI CAMERA
Build a Raspberry Pi
stop-motion studio
Christian Cawley plays with modelling clay and a Raspberry Pi camera
to make a movie – although it’s not quite that simple…
COMMS
+ TxD 3 3 TxD
USB Connector
Parallel printer to
Device Connector
SG 5 5 SG
EPP parallel and
9
RTS 7 7 RTS
Data
DB9 Connector
Serial connection –
2wire/4wire
(jumper for testing) CTS 8 8 CTS
synchronous serial
path mapping,
with additional RI 9 9 RI
landmarks shown.
Before starting the terminal session configured in or assume that the user has
Putty, let’s create a physical connection (technically, a sufficient knowledge to use the
short) between pins 2 and 3 on the nine-pin serial option of installing a null modem.
connector. Refer to the DB9 connector details on the If the two pins are switched in the
diagram: pins 2 and 3 are the serial transmit/receive serial device, transmit and receive
pins. By connecting the pins together, we are pairing will match. Otherwise, a null
redirecting the output on the transmit pin back to modem cable will need to be
the input on the receive pin. installed to take care of moving the
When the Putty session is activated you will be taken transmit and receive connections.
to a blank, black terminal-style window. Now select a Refer to the diagram for null modem
character on the keyboard. The keyboard character cable details.
selected should appear on the screen. If the character Let’s summarise the
appears, Putty has transmitted the character data troubleshooting process we’ve just
serially out of the transmit pin and, with the short in developed, to really get it into our
place, routed the transmission back to the receive pin, minds. First we confirmed the USB-
to be displayed on the screen. to-serial cable/adapter was
supported in the host PC by
The real thing checking that it was registered in
Now that we have confirmed Putty can transmit and Linux. Next we confirmed that the
receive over the USB-to-serial cable/interface, we can computer could transmit and
replace it with our unknown serial application. The receive over the USB-to-serial Putty’s screen layout
application will no doubt require the configuration cable/adapter using Putty. We isn’t necessarily the
same in different OSes.
details (COM port) used to setup the Putty session. shorted pins 2 and 3 on the cable/
If the cable/adapter worked with Putty it should work adapter’s connector, so that the
with the application, provided the communication ‘transmit’ and ‘receive’ were
details set up are correct. If not, you have isolated connected, then transmitted a character and watched it
the problem to the application. appear on the screen.
The serial application will need to be configured with Putty was then replaced with the computer you can find
the serial communication protocol details. The COM application we want to actually test, and the application simon tatham’s
port identifier is one piece of information. It is important was configured with the required serial port and putty repository
in serial communication that the transmission rate and communication protocol requirements (rate and at www.chiark.
the framing of the serial message be compatible framing details) given by the manufacturer. greenend.org.
between sender and receiver. For Putty, we relied on Finally, the PC was connected with the USB-to-serial uk/~sgtatham/
putty.
the default serial options, 8N1. cable/interface to the serial device, with the knowledge
Serial communication relies on both the transmitting that transmit and receive was taken care of by the
end and receiving ends agreeing on how they will frame manufacturer’s design, or a null modem cable needed
data for communication. Here is an analogy: two people to be installed to complete the communication path.
want to communicate. One speaks French, the other When you experience serial communication
English. Without establishing a language requirement, problems, what’s most important is to determine if the
both parties can transmit, but neither can understand infrastructure for serial communication actually works,
what is received. The same concept applies to serial without all the overhead of the new applications and
communication setup. devices. Once that is determined you can substitute the
The serial device manufacturer’s documentation known for the unknown, and should be able to isolate
should provide the details required to set up the what is not working.
application. The Putty serial screen is an example of
the values that should be found in the serial device
documentation. The application needs to know the the Lost art
speed and bit configuration in order to communicate.
You discovered the COM port by looking in the OS. It You would think that the knowledge that a straight-through
can take a lot of trial and error to work through the connection, or a null modem connection, is required for a bit of kit to
combination to get the serial protocol correct. work would be provided in the documentation. It’s my experience
Remember that pins 2 and 3 on the serial connector that this knowledge, more often that not, is lacking, however.
are ‘transmit’ and ‘receive’. When the cable is plugged With the demise of COM ports as computer hardware, a lot of
into the serial device, how does the serial device’s knowledge about serial communications has been misplaced. The
manufacturer take care of ensuring the transmit data belief now seems to be “Just hook it up and it’ll work!” We need to
pin is connected to the serial device’s receive data pin? restore the lost knowledge to troubleshoot connection issues.
It would be handy if this requirement is provided in the One caveat to keep in mind is not to apply both connection
documentation; if not, it’s back to our troubleshooting. methods at the same time. If the manufacture has switched the pins
There are two methods to achieve the connection and a null modem cable is installed, two rights in this case make a
goal. The serial device’s manufacturer may cross the wrong. Think about it: pins 2 and 3 are switched by the manufacture,
transmit and receive pins on the serial device end by and then again by the null modem cable.
switching the position of pins 2 and 3 on the connector,
hat sets FFF apart from other file managers is image files from within the terminal emulator itself,
Of course, if you’d like to define your own keyboard, Being a Bash script, FFF also supports tab-completion,
you can do that as well by editing the script to your so you don’t have to manually type the complete path.
satisfaction. Unfortunately, we don’t have enough space You can copy, move, or delete single files with FFF you can use
to provide a complete list of the default key bindings, by selecting the file/directory and then respectively the keys 1 to
9 to create
but here are some that you will use frequently: pressing the Y, M or D key. You can also select all files
bookmarks
in the current working directory using the same keys
to commonly
Key Function plus Shift. That is, press Shift+Y to mark all files for accessed files
J scroll down copying, or Shift+M or Shift+D to move or delete all or directories.
files. When you choose a file operation such as copy, open the FFF
K scroll up move or delete, the selected file is highlighted in red, script in your
H go to parent dir and the bottom of the interface will show in red the favourite editor,
operation you’re about to perform. For instance, if you navigate to the
L go to child dir
mark a file/directory for deletion, you’ll see: ‘# Directory
Enter go to child dir (12/12) [1] selected (trash) [p] ->/home/linuxlala/ favourites’
section and use
Backspace go to parent dir Desktop
the template
- go to previous directory Here, the path at the end of the line describes the
‘export
location of the file, the number in square brackets FFF_FaV1=/
! open shell in current directory describes the number of files, and the keyword in path/to/file-
F new file brackets describes the intended operation. The (12/12) or-directory’
at the beginning of the line describes the position of the . you can now
N new dir
selected file in the directory list. All the contents are use the keys 1
R rename arranged alphabetically, and FFF automatically to 9 to switch to
computes the total number of files/directories in the a bookmarked
In addition to J, K, H and L, you can also use the current working directory. So if your current directory directory,
or open a
respective arrow keys for the same purpose, as these has four files, named Alpha, Curses, beard and java,
bookmarked
are configured by default in FFF. That is, you can press they would be assigned numbers 1, 3, 2, 4 respectively.
file, irrespective
the right and left keys to respectively enter a directory, This is because FFF isn’t case sensitive. of your current
or return to the parent directory. The up and down keys Similarly, for a move operation, the line at the working
can similarly be used to select a file or directory. bottom of FFF would read: directory.
Most file managers help you do more than just (3/4) [2] selected (mv -i) [p]->/home/linuxlala/
provide easy access to a directory’s content; they also Downloads/projects/
help you rename, copy, move, search for or delete files. Here, the [2] means we’ve selected two files for the
Like its graphical counterparts, FFF too supports all move operation (mv -i) . Once you’ve chosen the file
these functions, and they’re all at your disposal with a operation to perform, navigate to the directory where
single keystroke. you want to move or copy the selected files/directories
You can press / followed by a string and FFF will and then press P. FFF then pastes the chosen files into
immediately print all files/directories which match the this new working directory. Unfortunately, there’s no
entered string. Unlike other command-line utilities, way for you to specify the path where you want to move
which retain a case-sensitive approach, the search or copy files: you have to manually navigate there and
feature on FFF is not case-sensitive. For instance, if then press P for the file operation to take effect.
your home directory contains several directories and In summary, FFF features many of commonly used
files which feature the letters M and m – whether at the features, has no real learning curve to speak of, and is
start, middle or the end – as soon as you start typing indeed, er, quite fast.
/m , FFF will automatically limit the contents to all
matching files/directories which feature these letters.
This means that the search results will include the
directory Music as well as the file beard-grooming-
tips.txt, and all other matches. The results will keep
getting narrowed down as you type.
If you also want to view hidden files/directories, you
can press the . key to toggle hidden files. Once on, the
option remains enabled, until you toggle it again. You
can similarly use the X key to determine the attributes
such as total size, permissions, time of the last access,
modification and so on of the selected file and directory.
Most graphical file managers let you type in the
directory you wish to access. If your present working
directory is ~/Documents and you want to navigate to
/Downloads/projects/calcurse/calcurse-4.3.0/
scripts, that’s a whole lot of key presses. Thankfully,
FFF also lets you type in the directory path you want to The FFF script is neatly split into different sections. Although not thoroughly commented, it can
access. First press : and then type the directory path. teach you a lot about Bash scripting.
SHOTWELL
How to build a photo
library in Shotwell
Nick Peers reveals how to bring order to your chaotic photo
and video library with Ubuntu’s default photo organiser.
igital photography has been become both a photos through creative use of colour and light
6
3
If files in the
Shotwell library
are moved,
deleted, or –
with removable
media –
disconnected,
they become
‘missing’ and 2 4
disappear from
the main view.
5
You can check
these under Filter photos Crop options
Library > Missing
1 Use the options in the left-hand pane to filter the list of photos in 4 Click to select the aspect ratio of your selection, or switch between
Files. Either various ways, including by event, tag or flag. portrait and landscape orientation using these tools.
restore the
Basic information Toolbar
file(s) manually, 2 When you select a photo to view, its basic file information is 5 Context-sensitive options appear here – when you’re viewing a file,
or select them displayed here. various editing tools plus the zoom slider are displayed.
all and click
‘Remove from Crop tool Extended information
Library’ to 3 The crop tool enables you to cut out superfluous detail: click and 6 Press Ctrl+Shift+X to display additional information not shown by
delete them. drag on the crop square to resize or move it. the Basic information tool.
from file or camera, and Folders, which is useful if you on the first and last days to select them all, then
don’t keep all your photos in a central location. One final choose Events > Merge Events.
want to back up option for browsing is tags, which is based on keywords The photos will then be grouped together under a
your Shotwell that are attached to individual photos. These can be single event that’s named according to the date(s) it
library? Because anything you like – a place or person, for example, and occurred on. Select this, right-click and choose Rename
thumbnails the benefits of clicking them are obvious. Event to give it a more memorable name – it’ll remain
are generated These viewing options form the crux of Shotwell’s organised by month and year to help you locate it in
automatically, organisation tools. Let’s begin with Events. As we’ve future. If you want to add a comment – basically a
all you need to seen, by default Shotwell uses days to create individual description packed with keywords you can use to locate
do is back up events, but you can create your own named events that the event later if necessary – right-click the event name
the database
can either span multiple days or split an individual day and choose ‘Edit Event Comment...’
file – you’ll find
this hidden
into two or more parts (for those busy days when you
away under cram in two or more engagements). Organisation options
~/.local/share/ If you’re splitting a single day into two or more It’s also possible to label photos individually or in
shotwell. events, simply select the day, then hold Shift as you selected batches. You can add titles, comments and
Visit the FaQ click on the first and last photo you wish to group into a tags (keywords), all of which can help you find them.
at https:// single event, before choosing Events > New Event. If Select a photo or group of photos and you’ll find options
wiki.gnome. you’re creating an event from photos spanning more for adding a title and comment under the Photos menu,
org/apps/ than one day you’ll need to select the month in which while the Tags menu enables you to both add new tags
Shotwell/FaQ they appear under Events (or the year, if the event is and modify existing ones. Tags are a good way of
for complete
split across two or more months). From here Shift+click adding locations to your photos; you could for example
details.
make it a rule to include a village/town, county/state
and country, so Ventnor, Isle of Wight, or Vancouver,
British Columbia, Canada for example.
You can also rate photos from one to five stars,
enabling you to rank your photos or even simply sort
your photos from best to worst. Look under Photos >
Set Ratings for the options available to you.
Select a month One final tool allows you to flag individual photos.
under Events The photo’s thumbnail is marked with a small grey
and you’ll see a
summary of all
exclamation mark, enabling you to draw attention to it
events in that for whatever reason you like – for example, marking
period. photos that need correcting. Right-click a photo or
selection of photos and choose ‘Toggle Flag’ to switch it
on or off as required. When you’ve flagged one or more
expaND SHotwell photos, you’ll be able to view them all together by
selecting Flagged under Library.
Shotwell’s capabilities can be increased through the use of plug-ins, By default, all of these changes have no impact on
some of which are provided with the program. These are managed the files themselves, but you may find that embedding
via the Edit > Preferences > Plugins tab, and you’ll see there are three the metadata into the files could be useful, because it
categories: Data Imports, Publishing and Slideshow Transitions. makes that data available to other applications. To do
These are the only plug-ins currently published and available for this for all the files in your collection, simply choose Edit
Shotwell, and they do change over time – for example, an option to > Preferences and tick ‘Write tags, titles and other
publish to Facebook was recently removed as it no longer works. metadata to photo files’. To apply it to individual files
You can see the current status of Shotwell’s plugins by taking a trip only, you’ll need to export the file (see below).
to http://bit.ly/lxf249shotplugs, where you’ll discover that the
obsolete Picasa Web Albums plug-in is in the process of being Shotwell’s image editing tools
updated to support publishing to Google Photos instead. Not all photos comes out perfectly, and Shotwell offers
If you fancy writing your own plugin, visit http://bit.ly/ some tools to help you make certain improvements.
lxf29shotplugs2 for a complete guide to doing so. After completing As already stated, these changes are all non-destructive
your plug-in, open your /Home folder in Files and create the following – the underlying file isn’t changed, so you can
folder path: ~/.gnome2/shotwell/plugins. Copy your plug-in file to experiment to your heart’s content without worrying
here and restart Shotwell – the plugin should now be available. about ruining the original file.
Individual changes can be undone as you make them
in the usual way with Edit > Undo, or you can remove all
of them at any time by opening the image and choosing
Photos > Revert to Original. If you perform any edits,
hold Shift to view the photo in its original, unedited form
Manage Shotwell’s for comparative purposes at any time. If you do make
plug-ins from the significant improvements to your photos that you’d like
Edit > Preferences to keep, you can save the edited version to disk: choose
dialogue. All
currently available
File > Export and choose any option other than
plug-ins can be ‘Unmodified’. You’ll also have the option to export any
found here. metadata you’ve attached to the picture. Either save
your copy to a new location or overwrite the original.
Quote the issue code shown above and have your credit or debit card details ready
SUBSCRIBE!
Don’t wait for the latest issue to reach your local store –
subscribe today and let Linux Format come straight to you!
3 GREAT
WAYS TO
SUBSCRIBE
Print, digital, and
print + digital
bundles!
AUDACITY
Advanced audio
recording and editing
John Knight returns to his old recording friend Audacity once again,
and finds things have become a little more advanced.
ig audio suites are great, but they can be Although technically Audacity can record multi-
Default or Pulse. Default will probably use ALSA, which if it starts clipping. Depending on your underlying audio
will run much faster, but if you’re using Pulse audio, system, you may be able to turn the recording levels
A cool feature open the properties for your sound card. In KDE we had back down with the slider in the top-right of the window.
veterans may to open the Advanced tab in the Audio Volume section,
not know about and from the Profile drop-down box, we used Analogue Running tracks
is the Wave Stereo Duplex. If you’re using digital speakers, just try Recording a piece of audio is great, but you can do
color entry anything that enables an analogue input. Once you have that on just about anything. What makes Audacity so
in the drop- something that works, write down what you did and popular is that it does multi-track layered recording,
down menu, don’t mess with it – record everything you can while it’s and probably makes it easier than any other program
which has
working! After this, Audacity should be smooth sailing. out there. If you’re new to the concept of multi-track
four different
colours, and is
Now to tweak the recording levels. recording, it allows you to record sounds one at a time
meant for easily The smaller the wave in height, the worse the in layers, slowly building up a soundscape.
differentiating signal-to-noise ratio will be, making the track hissy and For instance, the most common usage is in music
between probably muffled. The louder the recorded input, the where you may record each musician in isolation, rather
instruments. more likely it will ‘clip’ the edge of the waveform and than recording the band as a whole. You may lay down a
sound horrible and distorted. You want to strike a drum track first, and with that first drum track in their
balance where a good amount of space in the wave headphones, the bassist can record their track in a new
form is used, but leave room in the dynamic range for second layer. Then the guitarist could hear the drums
sudden loud notes, such as a big cymbal crash. Keep and bass playing through their headphones and record
turning up your instrument, input or mixer desk until their guitar in a third layer. With the instrumentals
your waveform is getting near the edge, and back it off finished, the singer can record their vocals.
If you’re a seasoned Audacity user, you need to
know that things have changed. When you hit the
Record button, Audacity used to create a new track
automatically and start recording in that. Now when
you click Record, Audacity will start recording on the
end of the current track, and just keep on adding to it.
If you would rather record into a new track, use the
keyboard instead of the mouse. Pressing R records
onto the end of the current track, but Shift+R records
into a new track. If you’re determined to have things the
The Envelope way they used to be, you can change it by choosing Edit
tool lets you > Preferences from the main menu. Open the
make smooth Recording section and in the Options field, click
and continual ‘Always record on a new track’.
transitions to
volume over time,
Note that Audacity now has latency correction built-
such as a long in, but some audio device settings may result in an error
fade-out. regarding latency timing. If this is the case, you can also
tweak your latency correction settings in the
Preferences window. In the Devices section, you can
recording With JAcK tweak the buffer length and ‘Track shift after record’
settings in the Latency field.
Running Audacity with JACK rather defeats the purpose of its simple
interface, but maybe there’s some kind of effect chain you want to Track-on-track action
create, or some kind of MIDI program you need to use, and the only Not only can Audacity do multi-track recording, but you
way to do it is JACK. First, you need to make sure JACK runs can also edit each recorded layer individually, making
properly. We recommend installing QjackCtl, which provides tweaks to any layer without upsetting the others. Going
a straightforward GUI for starting and configuring JACK. back to the band example, if you simply recorded them
If you try to start JACK and get an error, first try specifying your in one live image, you would have to mix them together
soundcard by clicking Setup, and in the Settings tab will be the as a whole and you wouldn’t be able to make many
Interface drop-down menu. Change the setting from ‘(default)’ to adjustments. But with separate tracks you can correct
your soundcard’s actual device name. If this doesn’t work, make mistakes and tweak each recording individually.
sure Driver is set to ‘alsa’ instead of ‘dummy’, and if it still doesn’t For instance, if the guitarist plays a bum note or the
work, try disabling ‘Realtime’. drummer coughs during silence, you can simply mute
To change Audacity from using ALSA to using JACK, open your their second of bad audio and the rest of the song will
system settings by choosing Edit > Preferences and in the Devices be unaffected. Or, if one instrument is too loud, you can
tab will be the Interface section. For Host, open the drop-down menu turn the volume down on just that track without
and change the entry from ALSA to ‘JACK Audio Connection Kit’. affecting the volume levels of any other musician.
It’s best to leave everything at default settings and see if you can If you want to turn a track up or down, just move that
record as-is. If you need more JACK connectivity, you change track’s Gain slider. If you wish to mute a second of
Audacity’s Playback and Recording devices to JACK, though you may audio, simply highlight the portion of audio you don’t
need to manually connect ports in QjackCtl’s Connect window. JACK want and press Ctrl+L, or click Edit > Remove Special >
is messy and temperamental at the best of times. Don’t use it with Silence Audio. For more advanced users who want to
Audacity unless you really need to! do volume automation, there is the Envelope Tool in the
main toolbar. This lets you make smooth volume
Trade-free exports
Simply saving your work isn’t going to be of much use,
because the only thing that will read Audacity files is
Audacity – you need to export your work. If you click
File and look at the Export sub-menu, you will see a
number of options. Firstly, we need to differentiate
between the ‘Export as…’ options and ‘Export Selected
Audio’. The ‘Export Selected Audio’ option is simple By simplifying and stripping back the underlying system, applying audio effects is much easier
enough: whatever you highlight with the Selection Tool than it is in big editing suites.
Building a secure
Missed part one
in LXF248? See
p66 for back
issues!
ne of the great things about dealing with static select the $5 instance. Choose an appropriate
workstation, we can use scp (Secure Copy) to copy opening the website it could well be that the rights are
the compressed file to the webserver. Do this with the incorrect. With that in mind, for each website perform
following command: the following commands:
scp /path/to/wordpress_exprt.zip -p 999 /home/ sudo chown -r www-user:www-user /var/www/
adminuser livinginstarbucks.com/html
As we are now using public/private keys for sudo chmod -R 755 /var/www/*
authentication, it will ask for your passprase. Once Because we’re using a virtualhost configuration, we
it’s uploaded, uncompress the Zip file using unzip need to make the DNS work as there are several sites
wordpress_export.zip . Copy the files from the local that share the one IP address. If you haven’t yet done
folder to the root folder of the webserver. so, it’s time to change DNS records. The reason we’ve
cp -r /home/adminuser/uncompressed_word_folder/* left it until this point is that if there is already a live
/var/www/livinginstarbucks.com/html website, it will go offline as we update it now.
By default, the Apache server runs with highly How you update will depend on your DNS provider.
Contents of the restricted rights. It is important to make sure that the Most DNS updates will be updated almost instantly. At
live website:
pure glorious files are owned by the right user (www-user) and that this point it should be possible to open a web browser
HTML files! the rights are correct. For example, if there are errors on to navigate to the URL in question. If you haven’t
updated (commented out) the entries in your localhost
file, you may get the wrong results. Just check you are
looking at the right server by pinging the DNS name.
If there are additional websites, repeat the process
for each one. To do things properly we should configure
the entries on the host so that the host can know what
it looks after. Open the hosts file and add all your
entries to the hosts file:
sudo vi /etc/hosts
Look for the line 127.0.0.1 and add both the
hostname and the www alias. Therefore, our example
would be:
127.0.1.1 localhost livinginstarbucks.com www.
livinginstarbucks.com
Lastly, implementing the correct firewall rules is
definitely strongly recommended. Implementing a
firewall with a proper policy provides protection from
ports that are open when they shouldn’t be. Using the
firewall can also allow extra security by blocking IP
ranges, or even countries if needed.
iMpLeMenting https is eAsy If you’ve got a static IP address, it’s pretty simple
to use firewall rules to prevent anyone from any other
Most technically savvy readers will know that HTTPS is the way network being able to attempt to SSH into the
forward, but historically it has always been tricky to configure. Enter, webserver. The best defence has multiple layers of
stage left, EFF’s Certbot. This is designed to implement HTTPS easily, security that prevent any one single facet breaking.
and really is super simple. To implement it, do the following: With that in mind, we’ll install UFW (Uncomplicated
sudo su - Firewall) using the following command:
apt-get install software-properties-common python-software- sudo apt-get install ufw -y
properties Before making it live, we need to make some
add-apt-repository ppa:certbot/certbot modifications, not least because our SSH port was
apt-get update changed earlier. We also want to allowing inbound
apt-get install python-certbot-apache HTTP requests. To add this port use the commands:
The above provides the dependencies, but to actually run and sudo ufw allow 999/tcp
implement the configuration use the following command: sudo ufw allow 80/tcp
certbot --apache -d mydomain.com sudo ufw allow 443/tcp
It will take a few moments to run but will configure everything for To make the firewall live use the command:
you. Once it’s complete, assuming that you’ve followed the main sudo systemctl enable ufw
guide it should be as simple as reloading the page, simply swapping It’s a good idea to ensure that the webserver can be
HTTP for HTTPS. reached on port 80 (HTTP), which aids with
Do note, however, that Certbot only approves certificates for a troubleshooting later on.
period of three months. This isn’t too much of an issue because it Currently there will be some defaults set up which
gives you the option to log in periodically and re-run Certbot, or are surplus to requirements.
perhaps use crontab to automatically re-run the command every sudo ufw status
week – Certbot only performs the renewal when there is a set We’re assuming that you’re not interested in running
amount of time remaining. IPv6. Therefore it makes sense to disable IPv6 – if it’s
Certbot also supports multiple domains at once, removing the not used, it should be turned off. To disable IPv6 use
need to manually manage each one – not to mention saving time, the following commands:
money and complexity! sudo vi /etc/sysctl.d/99-sysctl.conf
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1 understAnding Mod_reWrite
One done, use the command sudo sysctl -p to make
the changes permanent. Doing so can, however, impact Without this function working correctly, the whole export process will
applications such as apt. To mitigate the issue, force fail. Mod-Rewrite is used to rewrite URLs on the fly. Signs of it failing
the apt tools to use IPv4. Do this by editing the to work may be seen if the administrator clicks on a link and they get
appropriate file /etc/apt/apt.conf.d/99force-ipv4: the well-known ‘404 page not found’ error. The entire permalink
sudo vi /etc/apt/apt.conf.d/99force-ipv4 setup relies on mod_rewrite working correctly. If mod_rewrite fails, so
Acquire::ForceIPv4 “true”; will the export of the WordPress posts and therefore the final set of
We recommend a reboot to ensure everything is web pages will not work correctly.
correctly configured. All being well, at this point all the Mod_rewrite is very configurable and provides great functionality.
configuration is completed and updating your site has One example is to enable URLs to be rewritten to send data to a PHP
become as simple as performing the export as covered script that can use the input as part of the data to process, and the
in the previous article, then exporting the Zip file and script then outputting the PHP. Also, mass migrations can use mod_
uploading it to the production system as we’ve rewrite to deal with merging several domains’ worth of data into a
discussed above. single instance, using mod_rewrite depending on the entry URL used.
If you haven’t done so already, run the Simply Static A more detailed breakdown and discussion of mod_rewrite can be
export and download the zipped content file. Once found at the Apache.org website (http://bit.ly/lxf249mod).
downloaded, it can be uploaded directly to the Depending on the configuration, mod_rewrite can be specified in
webserver using the scp command. To copy the file to several places as needed, even down to the individual HTML folder.
the webserver, use the following command, substituting The /etc/apache2/httpd.conf file is the master file that sets the
as required: baseline settings that all virtualhosts takes as its base settings.
scp my_export.zip adminuser@livinginstarbucks. If the feature is not enabled in the root of our config, none of the web
com:/home/adminuser -p 999 hosts will work. Before changing any of these files, be sure to make a
Once uploaded, create a folder (called out in our backup so that any changes that are made can be easily reversed.
example) and unzip the file:
unzip my_export.zip -d out/
At this point there should be a folder with the revision to date. The easiest way to do this is to create
contents of the WordPress export. Copy the files into a Git-based repository in the cloud – choose from any
the /home folder, correcting the path as needed. Note of the major providers. Unless you have reason not to, When using
public and
that any WordPress links will have been converted to make it a private repository.
private key
folders and HTML text, so it is vitally important you Create your changes and perform the export from
logins, it’s
make sure all files are copied: Simply Static. Once downloaded, uncompress the files essential to
sudo cp -r /home/adminuser/my_export/out* /var/ and copy them into the Git-controlled folder. Add them ensure you have
www/www.livinginstarbucks.com/html/ as a new revision, commit and push it up. a copy of at
Depending on the configuration the owner and rights On the server side, install the git client: least the private
may need to be reset. This was done earlier and can sudo apt-get install git -y key. Without it,
just be repeated. At this point, open a new web browser At this point it becomes a simple affair to then log in logging in won’t
and open the website. All being well, you should see the to the webserver and clone the files to the webserver’s work because
static version of the website. /html folder. we disabled
password-
For those that are a bit more technically advanced, There are tweaks and options for other setups, but
based login.
it’s quite a simple affair to subject all these revisions to hopefully these tutorials provides a glimpse of what is
version control so that you can effectively see every possible when creating a static WordPress site.
LIBREOFFICE DRAW
Creating diagrams
and illustrations
There’s a much better way of creating technical and business diagrams
and illustrations than with a paint package, as Mike Bedford demonstrates.
hoto editing packages, also known as Of course, to be displayed on screen, it does have
Only connect
One reason for choosing to base this tutorial on
LibreOffice Draw is that it has some features that are
not universal among vector graphics software, but shapes used to signify the internet in network diagrams
which are particularly useful for the sort of uses you – and fortunately LibreOffice Draw provides several
might be interested in. An especially powerful feature tools for drawing irregular objects. You’ll find these at LibreOffice
is something called connectors. Connectors look like the Curve icon in the Drawing toolbar, and we’ll look at Draw offers
ordinary lines, and are used for connecting boxes and the general concepts here. options for
similar shapes in flow diagrams, organisational charts First up is the Polygon, and there are several options editing bitmaps.
and the like – but with one important difference – for this. The filled Polygon is much as you expect, and it as you’d expect,
Connectors remain attached to the objects they join enables you to define any closed shape from a number you can adjust
brightness
together, even if you edit your diagram by moving those of straight-line segments. There is also a variant where
and contrast,
objects around – the connecting lines re-route as you are constrained to angles that are multiples of 45
and this basic
necessary. Because this is such a time-saver for many degrees. Then there’s the plain (unfilled) Polygon, also functionality is
types of technical and business charts, our second step- with the 45 degree option – but this is really a enhanced with
by-step guide makes use of connectors. misnomer. It would be more accurately called a control over
Another handy feature, for those who require polyline, a line made up from several straight-line the three
mechanical drawings, is specific support for segments but with no fill. Note that, having drawn a primary colours
dimensions. Of course, you can add dimensions polygon, it’s possible to move, delete or add nodes – and gamma.
yourself in any drawing package, using text and that is, the points between line segments which appear
lines with arrow heads, but if you change the size as small squares.
of something you’d have to amend the dimensional Next is Curve, which is perhaps a bit confusing, since
information manually. With LibreOffice Draw’s all these tools are found under the broad heading of
dedicated dimensioning facility, on the other hand, Curve. Unlike the various types of Polygon, which are
once you’ve added a dimension, it will continue to composed of straight-line segments, a Curve – as the
show the correct value, irrespective of any resizing. name suggests – is made up of curved-line segments.
There’s clearly a limit to the number of LibreOffice Space doesn’t permit us a full description of how to
Draw’s facilities that we can illustrate in step-by-step draw a Curve or edit one and in any case, this is
guides, but this need not limit your voyage of discovery. something that’s best learned by trying it out. With a
So let’s consider a few more things that you might like Curve, in addition to editing the nodes you also have
to try out to help you get to grips with this powerful
package. You might want to work with bitmaps, for
instance. We suggest that you get to grips with this GrOupinG
useful feature by elaborating on the organisational
chart that we create in our second step-by-step guide. In the walkthrough on page 78, we create a line and a circle and then
In particular, since that exercise involves producing make several copies of that combination for use elsewhere in the
a company organisational chart, a good next step would diagram. If you’re doing this sort of thing, when you’re moving a
be to add photos of each staff member. If you don’t group of objects around it’s notoriously easy for them to become
have any suitable head-and-shoulder shots at hand, separated because you’ve accidentally forgotten to select one of
a quick Google image search will reveal no shortage them. It’s simple to prevent this, however.
of sample images. Because they will be reproduced at The secret is to convert those objects into what LibreOffice Draw
quite a small size, we suggest that you limit the file size considers to be a group. To do this, select the objects to be grouped
of your diagram by down-sampling the photos first, to and then select Modify > Group. Once a combination of objects is
something like 300 pixels, using a photo editing grouped in this way, it will be treated as a single object – as you’ll
package such as GIMP. discover if you try to select just one constituent part of the group.
As a group, therefore, it’s pretty much impossible to try to edit the
More irregular shapes group and find that your editing operation applies to only part of it.
So far, we’ve mostly talked about regular shapes such Grouping is reversible, which is good news if you subsequently
as squares, rectangles, circles and straight lines, since decide that you need to edit the individual parts of the group. As
they’re pretty much all you need for so many types of you’ve probably guessed, having selected a group all you need to
illustration. There are times, though, when you need do this is to use Modify > Ungroup.
something not quite so regular – for example, the cloud
the option of moving the so-called control points which of course, the options for editing the shape of a square
appear as small circles, and which enable the exact are limited to expanding or shrinking it, and individual
shape of a curved section to be adjusted. Mess around points or line segments can’t be edited. However, by use the
with control points to see how they affect the shape – converting it to a curve or a polygon using the Convert Gluepoints
feature to
it’s much easier to try than to describe! option on the Modify menu, all that changes. Now,
add extra
Finally, truly irregular shapes can be drawn using depending on whether you’ve converted it to a curve or
attachment
the Free-form Line tool, and its filled variant. These are a polygon, some or all of options that are available for points to
drawn by clicking and dragging to produce any line or editing polygons or curves become available, thereby objects.
shape, just as you would draw a line with a pencil or a giving you full control over the shape.
drawing tool in a bitmap package, although the result Another related facility is the Combine option, which
is subjected to a degree of smoothing. is also available in the Modify menu. This operates on
As a final bit of guidance on creating non-regular two or more selected objects and, while it might seem
shapes, it can sometimes be rather time-consuming to similar to grouping objects, in reality it’s very different.
achieve exactly the shape you need using the various Instead of grouping them together for ease of handling,
curve tools alone. For example, perhaps you want a they are actually converted, irreversibly, to a single
square with one of the sides turned into a curved line. irregular object, which can subsequently be edited by
The secret, in cases like this, is to start with the closest manipulating its nodes and control points. Again, have
regular shape which, in this case, is a square. Normally, a play – you’ll quickly get the idea of it.
usinG COnneCtOrs
STEAM
Stream your Steam
games at home
Push your Linux gaming to your big TV for real
gaming fun, with the help of Alex Cox.
Alex Cox GeForce Go, or even Steam from PC to PC – but a Steam Link box, you’ll want to give yourself a little more
is a tech expert damn convenient one if you have a library full of Steam breathing room. Lastly, don’t skimp on the power
and writer, games and an insatiable yearning for your sofa. supply: you need something that puts out at least 2.5A,
inexorably drawn Good news, then: Steam Link is dead, but long live because if your Pi doesn’t get the relevant juice, it’ll
to tinkering with, Steam Link, now reborn as a chunk of Linux code descend into a mess of glitches. Consider also adding
and inevitably suitable to run on a Raspberry Pi 3. Yes, you’ll be a heatsink kit to your box to prevent it frying itself.
breaking, investing more – you need a Raspberry Pi 3B or 3B+
anything put in (£34, plus all the other bits you require) – but once Get carded
front of him. it’s hooked up, you’ll get the same effect, and there’s Unlike the case with some single-use Raspberry Pi
nothing to stop you installing other stuff on your Pi to setups, there’s no special distro needed to be installed
give it a second job. RetroPi, anyone? Plex or Kodi? on your SD card: the Steam Link app installs and runs
It’s up to you. on top of Raspbian Stretch, the Pi’s default OS.
Download the desktop version www.raspberrypi.org
Prepare your Pi and unzip it, then grab Etcher from www.balena.io/
You absolutely need a Raspberry Pi 3B or 3B+. We etcher to get the OS image onto your SD card. Insert
didn’t try this on a Pi Zero or a previous version of the the card into your reader, run Etcher, drag and drop the
main Raspberry Pi branch, because we weren’t feeling ISO image onto the window, and proceed with the
masochistic enough; it’s unlikely to work at all, but if writing procedure. Make sure you’ve extracted
that’s all you’ve got, you’re welcome to try it. You also everything you need from that SD card, as this is a 100
need an Ethernet connection (we’ll come to this later per cent destructive procedure.
on) and, at least initially, a keyboard and mouse, before When the write’s done, pop the card into your
you replace them with a controller. A large SD card isn’t Raspberry Pi and boot up – it should drop you straight
a primary requirement (we installed on an 8GB card we to Raspbian’s Pixel desktop.
had lying around), but if you want to do more with your
Install Steam Link
Open up a terminal and type sudo apt update to make
sure your OS install is as current as it can be, and to
ensure Raspbian’s knowledge of its repositories is up to
date. Then type sudo apt install steamlink to download
the whole thing and install it automatically. That’s the
installation process done with – you should see a
Steam Link icon appear on your desktop, and the
program’s ready to run. You can now either double-
click that icon, or run steamlink within the terminal
window.
Use Etcher to If you have a controller, you can plug it in and
write your SD card. configure it now; Steam Link on the Raspberry Pi
Setting streaming up
within the Steam client.
you buy direct from us not available anywhere else super-safe ordering
THE BEST NEW OPEN SOURCE SOFTWARE ON THE PLANET
HotPicks
DigiKam Olive Cygwin LibreOffice ODrive
Quaternion Klogg Underrun Sandspiel
Alexander Tolstoy
almost broke the Matrix
after firing up Cygwin on
ReactOS. Luckily,
everything ran inside a VM.
Hyperfine Friture
IMAGE ORGANISER
DigiKam
Version: 6.0
Web: www.digikam.org
ne of the reasons why digiKam evolves so
Not so many
VidEO EditOr features that you’ll
get lost, but all the
Olive
essentials in place.
Version: Alpha
Web: www.olivevideoeditor.org
If you’ve worked
POSiX-COMPAtiblE EnVirOnMEnt with DosBox in
Linux, this is the
Cygwin
opposite of it.
Version: 3.0
Web: www.cygwin.com
arely do we talk about (or to) Windows users,
OffiCE SuitE
LibreOffice
Version: 6.2
Web: https://libreoffice.org
ODrive
Version: 0.2.0
Web: http://bit.ly/lxf249odrive
Quaternion is a
MAtriX CliEnt simple and robust
Matrix client for
Quaternion
everyday chatting.
Administering
lOG ViEwEr systems and
applications logs
Klogg
with klogg is a
true pleasure.
ShOOtEr GAME
Underrun
Version: GIT
Web: https://github.com/phoboslab/underrun
omething has gone wrong in our remote-
Sandspiel enables
PArtiClE SiMulAtiOn GAME you to build
spectacular
Sandspiel
schemes that
everyone will
love to explore.
bEnChMArK tOOl
Hyperfine
Version: 1.5.0 Web: https://github.
com/sharkdp/hyperfine
here are things in the world that can be very
Use Friture to
AudiO AnAlySEr find out if your
audio track or live
Friture
stream sounds
better than it looks
on visualisation
widgets.
SHELL SCRIPTS
Check the status
of your Git repos
John Schwartzman shows you how to write a Bash shell script that
can keep track of all of your many Git repositories.
transport directory need to be committed. command- # declare an array of the project names and their…
history and findit also need to have multiple files associated directories
committed. Using the shell script saves time: after declare -a proj
running the script, you can simply go to the directories proj[0]=”utility|$HOME/Development/UDS/utility/src”
that need attention. The top half of the script proj[1]=”transport|$HOME/Development/UDS/
establishes what you’re going to look for in all of the git transport/src”
status . outputs, and what you are going to display to proj[2]=”serverTest|$HOME/Development/UDS/
the user as a result. Running git status . in the base serverTest/src”
directory will give you the same information, but it can proj[3]=”clientTest|$HOME/Development/UDS/
be a bit confusing to look at. Also, you may have a lot of clientTest/src”
small projects, where the Git repository is the same as proj[4]=”simpleClientTest|$HOME/Development/UDS/
the project directory. simpleClientTest/src”
In this scenario, you’d have to go to each of your Git proj[5]=”throttledServerTest|$HOME/Development/
repository directories to issue the git status . UDS/throttledServerTest/src”
command. The git-status, command-history and proj[6]=”utilityTest|$HOME/Development/UDS/
findit projects fall into this category. utilityTest/src”
Let’s look at the shell script in detail. Line 1 tells proj[7]=”command-history|$HOME/Development/
Linux what kind of file this is (a Bash shell script) and command-history”
how it should be executed (in Bash); it’s standard proj[8]=”git-status|$HOME/Development/git-status”
Linux/UNIX boilerplate. proj[9]=”findit|$HOME/Development/findit”
#!/bin/bash numProjects=${#proj[@]} # keep track of the
Then there are some escape sequence definitions so number of projects in the array
that you will be able to output text in colour. Colour The next lines timestamp the output and print a
makes things easier to comprehend. blank line.
escRed=’\e[1;31m’ # define a few colour escape echo $(date) # timestamp the output
sequences echo
escYellow=’\e[0;33m’ In the bottom half of the script is a for loop. First,
escGreen=’\e[0;32m’ inside the for loop, you recover your project and
escReset=’\e[0m’ source directory from the current element of the array
Following the colour escape sequence definitions are using Bash pattern matching.
the two commands that you will execute in each of your project=”${proj[$i]%%|*}” # derive the project name
source repository directories. from proj[i] (return everything before ‘|’)
# define cmd1 and cmd2 dir=”${proj[$i]#*|}” # derive the directory name from
cmd1=”git status . | grep -c \”modified:\”” proj[i] (return everything after ‘|’)
cmd2=”git status . | grep -c \”Untracked files:\”” You iterate through the array to recover each of your
You can execute each of the these commands project names and cd to its associated source
from the command line to see what the git status . directory. In each source directory you execute cmd1
command is telling you before and after you pipe it and cmd2 and save the results in count1 and count2 .
through grep. Notice that we’re using grep’s -c (count) Based on the values of count1 and count2 you echo
option. This will suppress the output of the text we’re two status statements to the user. The first statement
searching for and simply tell us how many times the indicates the number of modified files that need to be
string appears in the output of the git status . committed and the second statement indicates whether
command. You’re looking for the strings modified: and or not gitStatus found any untracked files.
Untracked files: . The first string occurs once for each Once you’ve created your shell script in a text editor
file that is different from the version in the Git and saved it, you must tell Linux that it is an executable
repository. The second string occurs one time if git file. This is done so frequently that many developers
status . finds any untracked files; it will not appear at all and system administrators keep an alias for the
if it finds no untracked files. purpose: alias mx=’chmod +x’ . Add the alias to the file
The next few lines indicate what you’re going to $HOME/.alias or $HOME/.bash_aliases, depending
output to the user depending on the values of count1 on your distro. You then copy the executable into your
and count2 . /bin directory with a short name that you can
# define the output strings remember. Issue the following commands in your
strNoCommit=”has no files that need to be working directory.
committed.” mx gitStatus.sh
strCommit=”file(s) that need to be committed.” cp gitStatus.sh $HOME/bin/gitStatus
strNoUntracked=”has no untracked files.” Any time you want to know the status of your
strUntracked=”has one or more untracked files.” projects, you type gitStatus on the command line. If
The next lines contain a simple array of project you like, you can create a gitStatus shell script for
names and repository directories. Notice the vertical bar every Git repository on your system, or you can include
character ‘|’ used to separate the project names from multiple repositories and their associated projects in
their associated directories. Obviously, until you the same gitStatus command.
populate the proj array with your own project names Look at how much we can accomplish in a one-page
and repository directories, you’ll get nothing but errors. shell script. Hopefully this proves to be useful and that it
git status . will scream if you issue it in a directory that will give you some ideas for your own shell scripts. Have
is not associated with a Git repository. fun and keep coding!
WEBASSEMBLY + RUST
Speed your web apps
with WebAssembly
Mihalis Tsoukalos explains how to develop WebAssembly applications
from Rust, and how to use them with the help of JavaScript.
Hello world
After you’ve downloaded all the required files, you are
ready to start compiling Rust code into WebAssembly. .bin .gitignore LICENSE-APACHE package-lock.json
But first you will need to create a new Rust project webpack.config.js
using cargo generate . This command will clone and Now go to that directory and execute npm install . the Go way
use an external project template that comes pre- Instead of deploying the application in npm, we will use of generating
WebAssembly
configured with some rational default values in order to the local copy of it, which means that you should go to
code is much
save you time. It will ask you for a project name, which the pkg directory and execute the npm link command
simpler
in this case will be lxf (you can choose any name you with root privileges. Now, return to the /www directory compared to the
want, of course). The Rust program will print a “Hello and execute npm link lxf . Lastly, you will need to make Rust way, this
World” message – this is what the WebAssembly code the contents of www/index.js as follows: does not mean
will do, but in a way that you might not expect! $ cat ./www/index.js that Go is a
So, first execute the following commands: import * as wasm from “lxf”; better language
$ cargo generate --git https://github.com/rustwasm/ wasm.greet(); than Rust. It’s up
wasm-pack-template This is needed for telling index.js to serve our to you to decide
$ cd lxf # replace lxf with your own project name project instead of the default one. Finally, execute whether to use
Go or Rust.
$ wasm-pack build npm run start from the /www directory in order to
Figure 2 shows the output of the previous start the local webserver. You can now visit http://
commands as well as the initial directory structure of localhost:8080 and see the results of the lxf project
the Cargo project. The src directory contains the Rust as rendered by Firefox (see Figure 3 over the page). The
code of the project, whereas the Cargo.toml file
contains the dependencies of the Rust project.
The wasm-pack build command does all the work the CARGo tool
for you, which includes downloading all necessary
components and generating its output inside the The Cargo tool is very powerful and can help you develop Rust
pkg directory. The most important file in the pkg applications. Let’s look at most popular and useful commands of
directory is ./pkg/lxf_bg.wasm, because it contains this tool, along with a small explanation in order to help you
the created WebAssembly code. The output of the remember them while learning Cargo.
next command will verify that ./pkg/lxf_bg.wasm The cargo new command creates a new project – by default, that
contains WebAssembly code: project will lead to a binary executable. Should you wish to create a
$ file pkg/lxf_bg.wasm library, you should execute cargo new --lib instead. cargo build
pkg/lxf_bg.wasm: WebAssembly (wasm) binary compiles a debug version of the local package along with its
module version 0x1 (MVP) dependencies. On the other hand, cargo build --release generates
In order to see the results of the WebAssembly an optimised binary executable or library.
program you will need to publish it on a webserver The cargo clean command removes artefacts that Cargo has
either locally or on the internet – in this tutorial we’ll generated in the past – it will enable you to build a project from
illustrate how to use it on your local Linux machine. scratch. The cargo run command runs the main binary of the local
So execute the npm init wasm-app www command package, which is ./src/main.rs. cargo install installs a binary
to do this locally. You now have a new directory called executable, whereas the cargo uninstall command removes a Rust
/www inside the root directory of your Rust project, binary. Last, the cargo test command enables you to execute all unit
with the following: and integration tests of the current package.
$ ls -a www/ Figure 5 (see the final page) shows the default help screen of the
. bootstrap.js index.html LICENSE-MIT cargo tool. You can find more information about specific commands
README.md by executing cargo <command> --help .
.. .git index.js package.json .travis.yml
About WebASSembly
WebAssembly (aka Wasm) is a machine-model and executable
format targeted for a virtual machine, designed for efficiency – both
in speed and file size. That means that you can use a WebAssembly
binary on any platform you want without a single change. It also
means that WebAssembly binaries tend to be quite large in size,
though this shouldn’t be a problem with modern computers.
WebAssembly comes in two formats: a plain-text format and a
binary format. Plain-text format WebAssembly files have the WAT
extension, whereas binary files have the WASM file extension. A WAT
file uses S-expressions, whereas the binary format can be executed
by Wasm virtual machines.
Figure 5: This figure illustrates the use of the Cargo tool by showing An S-expression is an older textual format used for representing
its default help screen. trees. In the case of WebAssembly, an S-expression is used for
describing modules, which are the fundamental code units in
Must specify at least one of `--node`, `--chrome`, WebAssembly. Note that if you have a WASM binary file, you’ll have
`--firefox`, or `--safari` to load and use it using the JavaScript API.
When you define one of the allowed command line Apart from Rust, WebAssembly can also be generated by other
options, the command downloads the required programming languages that have support for static typing, including
packages and begin testing. The only requirement for Go, C and C++. Functions in WebAssembly should be included in
the test to run is that you should have the desired web modules – in our case, this is being taken care of by Rust, and most
browser already installed. other languages provide the same support.
Again, talking more about testing is beyond the
scope of this tutorial, but you can find plenty more
resources online. The entire process is also illustrated in Figure 6
below, which also includes the Go code of hw.go.
Go WebAssembly! However, choosing between Go and Rust for creating
In this final section we’ll talk about the way the Go WebAssembly code is a matter of personal preference. you can learn
programming language generates WebAssembly code, It looks like WebAssembly is here to stay, so it would more about
in case you want to compare Rust with Go in relation to be a good idea to learn more about it and how you can WebAssembly
WebAssembly generation. This section will not talk generate WebAssembly code from Rust. by visiting
about publishing the generated WebAssembly code – You should keep four things in your mind after WebAssembly:
https://
just the Go way of generating WebAssembly code. reading this tutorial. First is that WebAssembly is not a
webassembly.
The good thing is that as far as Go is concerned, programming language, second is that you can generate
org and https://
WebAssembly is just another supported architecture. WebAssembly code from many existing programming developer.
Therefore you can use the cross-compilation languages. The third one is that after creating the mozilla.org/
capabilities of Go in order to create your WebAssembly WebAssembly code you no longer need the compiler of en-uS/docs/
binary files. Additionally, you will not need to install any the programming language that you used; and the last WebAssembly.
extra packages for WebAssembly support in Go. one is that some JavaScript code is still required. Enjoy
So if you have a Go source file called hw.go, you can WebAssembly and happy coding!
compile it and generate a WebAssembly file as easily as
the following:
$ GOOS=js GOARCH=wasm go build -o main.wasm hw.
go
The hw.go file contains ordinary Go code without
any indication that it is going to be compiled into
WebAssembly. It is the values of GOOS and GOARCH
that specify and tell Go to create WebAssembly code. If
you do not specify the right values, the compilation will
not generate WebAssembly code or might fail
completely. There are various ways to see the output of
main.wasm, including using your favourite web
browser. However, if you have Node.js already installed
on your Linux machine, there is a much easier way to
see the output, which will save you from loading the file
in your web browser:
$ export PATH=”$PATH:$(go env GOROOT)/misc/
wasm”
$ GOOS=js GOARCH=wasm go run . Figure 6: This is the Go way of creating WebAssembly code – and illustrates a trick that can help
Hello World! you execute your WebAssembly binary without the need for a webserver.
pen-testing distro
stArt Here
using the LXFdVd
Using Linux for the first time can
be very confusing. It’ll be unlike
Kali Linux 2019.1 64- & 32-bit
anything that you’ve likely operated nce again we have only a single memory) to the live environment with apt.
before, especially if you’re used
to Microsoft Windows or Apple
macOS.
o distribution this month, but this time
we’re not neglecting our 32-bit users,
Speaking of the live environment, you may
notice that those are the only available options
with 64- and 32-bit versions of Kali Linux. It’s when booting the disc: the installation options
Generally our DVDs are designed
to be run directly, which is to say
been a while since the last Kali release – the end are all conspicuously absent. That’s because we
that when you first power on your of October 2018, in fact – and we like to removed them, much as we did eight issues ago,
PC (or Mac) it should ‘boot’ from encourage our readers to hack all the things because they don’t play nice with our multi/
the DVD – so before Windows or (in a totally legal and responsible way, of course), hybrid booting menu system. Given the choice,
macOS even starts to load – with
so here we are. we’d rather have a disc that boots to a nice live
Linux running directly from the
DVD. This trick is known as a Live The main event in this new release is version environment than one that offers broken
Disc. It enables you to try out the 5.0 of Metasploit Framework, released in January options, promises and dreams.
various versions of Linux without 2019, but there’s all sorts other goodies. We’ve Kali Linux is often run straight from a live
having to install or change anything gone for the MATE release this time, because we medium anyway, but if you do want to install it,
on your PC. Just remove the DVD,
restart your PC and it’ll be exactly
like it. This is the full-fat edition with all the tools just burn/write the Kali ISO (located in the Kali/
as you left it. ready to go. There’s only so much you can fit on or Kali-light32/ directories on the disc) to a
While many systems will boot a DVD, so we’ve got the Xfce-based Kali Light for DVD-R or USB stick. Writing the whole disc
from a DVD when it finds one, 32-bit users. This has all the basic tools, and you (either using dd or using a program like
many will not. See below for the can add anything you like (subject to available Unetbootin or Rufus) won’t work, partly because
standard process for enabling
booting from a DVD on various
desktops and laptop PCs. We took away
the installation
The alternative option is to
options and
locate the ISO file on the DVD and
added a warning.
write this to your own USB thumb
We are a cruel
drive and attemp to run that. We
and heartless
recommend using Etcher from
bunch.
www.balena.io/etcher that’s
available for Windows, macOS
and Linux. Good luck!
7 May
EDITORIAL
Editor Neil Mohr
Black-hat editor Jonni Bidwell
Run Linux on
Email [email protected]
UK 0344 848 2852
International +44 (0) 344 848 2852
cIRcuLATIOn
Head of newstrade Tim Mathers
pRODucTIOn AnD DIsTRIbuTIOn
Head of production UK & US Mark Constance
Chromebooks
Production project manager Clare Scott
Advertising production manager Joanne Crosby
Digital editions controller Jason Hudson
Production controller Nola Cokely
ThE mAnAgEmEnT
Chief content officer Aaron Asadi
Editorial director William Gannon
Brand director Andy Clough
Head of art & design Rodney Dive
Commercial finance director Dan Jotcham
It was more fun than expected, so we took Printed by Wyndeham Peterborough, Storey’s Bar
Road, Peterborough, Cambridgeshire, PE1 5YS
Distributed by Marketforce, 5 Churchill Place, Canary
hacking the low-cost Linux boxes to the next level! Wharf, London, E14 5HU www.marketforce.co.uk
Tel: 0203 787 9001
LINUX is a trademark of Linus Torvalds, GNU/Linux is abbreviated to Linux
throughout for brevity. All copyrights and trademarks are recognised and respected.
Where applicable code printed in this magazine is licensed under the GNU GPL v2 or
later. See www.gnu.org/copyleft/gpl.html.
Rescue distros
We are committed to only using magazine paper which is derived from
responsibly managed, certified forestry and chlorine-free manufacture. The paper in
this magazine was sourced and produced from sustainable managed forests,
conforming to strict environmental and socioeconomic standards. The
manufacturing paper mill holds full FSC (Forest Stewardship Council) certification
and accreditation
Before your think you’ve lost it all, try to rescue it. We test the Disclaimer All contents © 2019 Future Publishing Limited or published under
licence. All rights reserved. No part of this magazine may be used, stored,
best of rescue distros to discover how to save your bacon. transmitted or reproduced in any way without the prior written permission of the
publisher. Future Publishing Limited (company number 2008885) is registered in
England and Wales. Registered office: Quay House, The Ambury, Bath BA1 1UA. All
information contained in this publication is for information only and is, as far as we
are aware, correct at the time of going to press. Future cannot accept any
Child rescue
responsibility for errors or inaccuracies in such information. You are advised to
contact manufacturers and retailers directly with regard to the price of products/
services referred to in this publication. Apps and websites mentioned in this
publication are not under our control. We are not responsible for their contents or any
other changes or updates to them. This magazine is fully independent and not
to develop tracking tools that can locate lost children. any/all issues and/or editions of publications, in any format published worldwide and
on associated websites, social media channels and associated products. Any
material you submit is sent at your own risk and, although every care is taken, neither
Future nor its employees, agents, subcontractors or licensees shall be liable for loss
Better webcams
or damage. We assume all unsolicited material is for publication unless otherwise
stated, and reserve the right to edit, amend, adapt all submissions.
All contents in this magazine are used at your own risk. We accept no liability for
any loss of data or damage to your systems, peripherals or software through the use
of any guide. Many blue passports died to bring us this magazine.
Get more from your webcams as we explore the drivers, the Future is an award-winning international media group and
leading digital business. We reach more than 57 million
software and what you can do with a PC-attached camera. international consumers a month and create world-class
content and advertising solutions for passionate consumers
online, on tablet & smartphone and in print.