Page 1


Pi User 10 pages of Pi projects Add super sensors Discover Edublocks Build a chat client Play the classic Red Alert

Coding Academy: Build easy web apps with Laravel

Get into Linux today!

Faster! Lighter! Better! Streamline your distro for top speed and glide to open source satisfaction The top nine light distros Support old hardware Maximise your memory

64 pages of

Linux & Pi projects!

Mainflux man

This sort of centralised IoT solution didn’t exist… So we started building it

Draško Draškovic´ is tying to fix the internet of things



Use Kali to manipulate puny humans and the Raspberry Pi

A modern desktop packaged to perfection

Social engineering

Gnome distros

Next-gen audio tech

Make Linux sound sweet with the latest audio update

Welcome Get into Linux today!

What we do

We support the open source community by providing a resource of information, and a forum for debate. We help all readers get more from Linux with our tutorials section – we’ve something for everyone! We license all the source code we print in our tutorials section under the GNU GPL v3. We give you the most accurate, unbiased and up-to-date information on all things Linux.

Who we are

This issue we asked our experts: We’re looking at running Linux on older systems, so what’s the oldest hardware that you’ve run Linux on? Other than your aging wetware... Jonni Bidwell I tried to get Slackware running on a 486 box circa 1996, but was unsuccessful. Some seven years later I would finally manage to install Linux (Gentoo) on an Athlon 1800. It got me through a PhD with only slight mental scarring. Lately I’ve gotten Rockbox running on an old MP3 player.

Nate Drake In 2007 I supplemented my meagre student grant by recycling old computers from hospitals. One salvaged machine was a 1997 Gateway 2000 PC with a 166MHz processor and 16MB of RAM. It ran Mandriva for all of three hours before turning into a large metal paperweight.

Bobby Moss With just a new battery, a bigger hard drive and the PowerPC version of Lubuntu I turned an old indigo “clamshell” model Apple iBook into a blog writing machine. What it lacks in compatibility it makes up for with its striking plastic case design and satisfyingly ergonomic keyboard.

Les Pounder Remember the Asus EEE PC? Sure you do − it was the netbook that came out in 2008. It had a Celeron 900MHz CPU, 512MB of RAM and 4GB of flash storage! Well, I still have one and I use it with Tiny Core as a simple network monitoring tool when working on site.

Mayank Sharma My first brush with Linux was on a Pentium 166MHz MMX back in 1997. It was fitted with 64MB of RAM and was good enough to run Slackware 4.0. If you want to time travel to the early 90s, use qemu and the Slackware 1.01 from

Your own supercomputer Can you feel it? The thrilling static in the air? It’s because the world’s top 500 supercomputers are now all run on Linux. The last couple of non-Linux Chinese holdouts have dropped out of the list, superseded by newer Linux-running replacements. An unstoppable combination of factors help foster this environment: generational expertise though open source in academia, research labs and beyond make it the prime choice for development. Built-in support for high-performance commodity components, drives down hardware costs and speeds development. The modular and scalable nature of the kernel ensures that it can be tailored to any task. Reliability, efficiency and more all mean that Linux is now the only choice for high-performance computing. That’s lovely, but how does it apply to your perfectly capable <cough> AMD Athlon XP from 2003? All the features of the Linux kernel that make it perfect for powering supercomputers, apply to your 15-year old technology, too. If properly motivated, kernel developers and distro maintainers can still compile and package compatible kernels and the required software to run on. It’ll run as fast and smoothly as your hardware allows. But for how much longer? This issue we’re looking at how Linux distros are made to support older hardware, how they’re tuned to run on lowmemory systems and generally run faster on limited hardware. With more mainline distros cutting 32-bit support − even though it appears 32-bit systems still account for around 20 per cent of PCs out there − the question is how much longer will up-to-date software be available for them? Of course, we can’t all stand still software wise, so we’re looking at the latest Gnome distros. The latest developments with the Linux audio and multimedia layer Pipeworks. Explore how social engineering works with Kali. Pop NextCloud on the Amazon Web Service. Build the classic Red Alert game with OpenRA and so much more; only Linux makes it possible. Enjoy!

Neil Mohr Editor

Subscribe & save!

On digital and print, see p22

January 2018 LXF232    3


"I am not afraid of storms, for I am learning how to sail my ship." – Louisa May Alcott

Reviews ii OnePlus 5T...................... 15 The latest big-screen, small-priced, flagshipkiller from OnePlus; a mammoth six-inch screen with a near-identical spec to the model launched mere months ago.

Fast and light distros We have the technology to rebuild him… Faster. Lighter. Smarter. Dive inside the distros that use less memory, less processor time and still support 32-bit systems all on page 30.

Come for Android, stay for the luxurious six-inch display.

Intel Optane SSD 900P..... 16 An incredibly fast, next-gen SSD technology that probably won’t be powering your new Linux PC, but it’s nice to know about!

Roundup: Gnome distros p24

ArchLabs 2017.10............ 17 Distro proliferation is all too real, but not when it comes to Arch, feels Shashank Sharma, as he tries yet another variant…

NethServer 7.4.................18

Shashank Sharma doesn’t enjoy spending too long configuring a server. Will NethServer’s custom interface help? (yes)

VMWare Workstation 14... 19 After years of working with its competitor, Shashank Sharma tries the latest VMWare release. Biased much? No way, not us!

Vivaldi browser 1.12........ 20

Being averse to exercise, Shashank Sharma isn’t keen on hopping distros, or even browsers, but with Vivaldi, he’s tempted.

F1 2017................................21

The commute to Linux Format Towers has suddenly become a good deal shorter. A new car? No, we relocated to central Bath.


Prima donnas, rich staff and fast cars, the LXF carpark is no place for a lady.

4     LXF232 January 2018

Security is one of the biggest challenges and must be addressed on many levels. Draško Draškovic´ on the internet of things p38

On your FREE DVD 32-bit Peppermint 8, Special! Legacy OS 2017, AntiX 16, Tiny Core 8, Linux Lite 3.6 p96

Only the best distros every month

Raspberry Pi User

Subscribe & save! p22

In-depth... Next-gen Linux audio........... 44

Pi news.................................... 56

First there was the Advanced Linux Sound Architecture, then PulseAudio and now PipeWire rules over them all, says Jonni Bidwell.

Izzy Bartley from Leeds Museums and Galleries. New Code Club training courses, the Pip Pi Switch project and more Octa Pi projects to try.

BME680 Breakout.................57 Les Pounder adds environmental sensors to his life-sized Enterprise spaceship in his back garden.

Edublock coding.................... 58 Transition from block coding to Python with this student-developed project and Les Pounder.

Open Red Alert...................... 60 Nate Drake takes over the world with his trusty Pi and an open source RTS from yesteryear.

PipeWire sounds sweet to us!

Chat server............................. 63


Mayank Sharma helps you talk to the world, or just your friends, with a personal chat server.

Terminal Tail.....................................70

Coding Academy

John Knight revisits one of the older commands to explore what’s new and what’s not, to get you up to speed.

Laravel web apps.................. 88 The Laravel framework makes it straightforward to put together web-based apps. Kent Elchuk is your friendly code-wielding guide.

Protocols Wireless networks...........72

Kotlin objects......................... 92

Cracking out his slide-rule and chalk, Sean Conway prepares a lesson in how 802.11 transmits data and how to diagnose it.

Mihalis Tsoukalos takes a deep dive into object-oriented concepts with Kotlin.

That Cloud thingy NextCloud on AWS.......... 76

Regulars at a glance News.............................. 6 Roundup.....................24 Overseas subs...........69 The new Kernel 4.14 LTS is here, a

Shashank Sharma never liked

new GitLab licence, new Dell Ubuntu

Gnome, so we’re forcing him to test a world” yet? We’re not sure, get Linux

devices, new Intel ME flaws and new

pile of Gnome distros! Bwahahahaha! Format in your part of the world now!

Linux super computers. It's all new!

User groups................. 11

Is Europe classed as “rest of the

HotPicks.....................49 Next month................98. Alexander Tolstoy hasn’t got time to Let's make the world a better place,

Les Pounder loves his sausages,

worry about a hard Russian winter,

so we're building the best (probably)

especially ones from Lincolnshire.

he’s too busy worrying about the

PC ever! With Linux, obviously.


Discover how Bobby Moss chucks up an instance of NextCloud on the Amazon cloud for fun and profit.

best FOSS, including Audacity,

Dnfdragora, Torrential, DPixel,  

Cries for help! Cries for privacy! Cries

Otter Browser, Yarock, Outwiker,

for company! Cries for mathematics!

Wisetagger, Zeit, Supertuxkart and 

And crying (it’s been a hard month).

Space Logic Adventure.

Start 2018 the right way, with a

Get your customised multi-desktop pimped, LXF respin of Ubuntu 17.10

stashed under the pillow.

Gnome only with LXF231.

Security Social engineering........... 80

Nate Drake sends the lawyers into a spin as he devises phishing attacks, faking Facebook pages to lure unwitting editors to their doom.

Sysadmin Administeria..................... 84

Subscriptions............ 22 Back issues................68 subscription of Linux Format safely

Free hosting care of Amazon.

Our subscription team is waiting to take your call.

Dr Sinitsyn is trapped in Linux Format Tower’s server dungeon testing Osquery   and patching over the leaking Kracks.

January 2018 LXF232    5

This ISSUE: Linux kernal 4.14

ME hacked

Dell ships Ubuntu

Super Linux

Linux kernel

A securer, faster, better kernel

The Linux kernel 4.14 with long-term support until 2023 is out in the wild and comes with some solid updates.


he latest long-term support release is now available, and while there wasn’t a huge amount of fanfare over the kernel that will be powering Linux systems for the next six years, there’s some pretty major changes included. The headline features to be found within version 4.14 include an increase in supported memory limits in x86 hardware (128PiB of virtual address space, 4PiB of physical address space), support for AMD Secure Memory Encryption (in AMD EPYC enterprise processors), support for zero-copy of data from user memory to sockets, heterogeneous memory management (to future proof for upcoming graphics cards) and more. You can read a full list of the many changes at LinuxChanges. According to Linus Tovalds in his release announcement for the 4.14 kernel (which can be read at, “It’s probably worth pointing out how

RISC-V is being worked on to arrive with 4.15.

6     LXF232 January 2018

the 0day robot has been getting even better (it was very useful before, but Fengguang has been working on making it even better, and reporting the problems it has found)”. Linus is referring to Intel’s 0-Day test project led by Intel engineer Fengguang Wu. This testing system automatically runs regressions tests on the kernel, as well as over 400 Linux developer trees, and it runs as soon as a change is made to the kernel. In all, there were over 1,500 contributors to this release, according to Linus, and it includes a large number of device driver updates and support for developer boards such as the Raspberry Pi Zero W. With 4.14 now released, attention has turned to the upcoming 4.15 release, though as Linus

AMD’s Epyc processors now receive greater support in the 4.14 LTS kernel.

version 4.15 is a RISC-V port. Again, announced by Linus (www., the open instruction set architecture (ISA) which is based on reduced instruction set computing (RISC) principles should be stable and included in a glibc release. As Linus himself admits, “I tried to fix things up for the locking changes, but I expect I might have missed something anyway. But hopefully it’s in good-enough

“There were over 1,500 contributors to this release, including a number of device driver updates and support for developer boards” warns, the merge window for 4.15 may be shorter, as Thanksgiving takes place during the second half of the merge window. However, the workaholic that he is, that may not result in a reduced merge window, as “I will have my laptop and internet access.” One of the most interesting additions that should be coming with

shape that fixups and continued development should be fine.” Other exciting additions to 4.15 will including AMDGPU DC support, bringing a range of features for owners of AMDs recent Radeon Vega graphics cards, more XFS features, support for the Raspberry Pi 7-inch touch panel, and more.

All the latest software and hardware reviewed and rated by our experts

OnePlus 5T Dual-lens camera and top dog for performance has James Peckham ditching his other smart phones SPECS OS: Android 7.1.1 Screen: 6.01inch, 1,080x2,160, Amoled, 18:9 ratio CPU: Octa-core Snapdragon 835, 4x 2.45GHz + 4x 1.9GHz Kryo cores GPU: Adreno 540 RAM: 6GB (8GB) Storage: 64GB (128GB), No SD Rear camera: Dual 20MP + 16MP (f/1.7, 24mm, gyro stabilisation), 2,160p @ 30fps video Front camera: 16MP (f/2.0, 20mm), 1,080p video Audio: 3.5mm jack, speaker Comms: WiFi 802.11ac, Bluetooth 5.0, NFC, USB 3.1 Type-C Sensors: (A-) GPS, fingerprint, accelerometer, gyro, proximity, compass Battery: fixed 3,300mAh Li-Po Dimensions: 154.2 x 74.1 x 7.25mm, 153g

The fingerprint sensor now sits in the middle of the rear black casing.


ooking at the OnePlus 5T, it’s hard to believe that the company that made it is less than four years old. This is a phone that manages to hold its own alongside flagship devices from companies that have enormous pots of money to spend on R&D. Yet OnePlus has managed to make one of the best phones of 2017 and undercut the competition. OpenPlus has jumped to a dualcamera setup that enables you to capture some attractive-looking bokeh shots with blurred backgrounds, as well as boasting a lossless zoom feature, which essentially means that zooming in on subjects will only result in a negligible reduction in image quality. The aperture on the main sensor here is also impressively wide at f/1.7 – slightly improved from the 5 model – and it means you’ll be able to take some of the best smartphone photos possible right now, with it getting close to that of the Google Pixel 2’s quality. The design of the new phone feels like a big step up for OnePlus. It’s still using the same materials as the OnePlus 3T – the body is made of anodised aluminium – but this is the slimmest and most attractive OnePlus phone to date. It retains a silent switch (good) and a 3.5mm audio jack (good) alongside the

USB-C port. But we imagine this is why it’s not waterproof IP rated. The OnePlus 5T is only available in midnight black. The older 5 model varied on the specification you bought and the two spec. options do remain: the base 64GB/6GB version and the more expensive 128GB/8GB model.

Screen evolution OnePlus has upgraded – at least physically – to a 6.01-inch Full HD AMOLED display with its odd 18:9 ratio and 1,080x2,160 resolution. The new display with reduced bezels has pushed the previously front-mounted fingerprint sensor to the rear. The phone ships with latest version of the companies OxygenOS overlay, which is based on Android Nougat 7.1.1. So you get all the new goodies of splitscreen apps and the ability to switch your lock screen wallpaper plus a few upgrades from OnePlus. The manufacturer has also confirmed there will be an Android Oreo 8.0 update. OnePlus has packed in the Snapdragon 835, which comes in the HTC U11, Pixel 2 and Samsung Galaxy S8. This is a top-flight SoC and will happily handle any game you throw at it too. It’s also one of the fastest Geekbench 4 scores we’ve seen: it averages 6,663, which is impressive. The 3,300mAh battery does a reasonable job, powering it to the end of a day leaving us with 20 per cent at 11pm. Our video test only dropped 12 per cent, besting the iPhone 8 Plus’s 23 per cent and LV V30’s 13 per cent and close to the Galaxy S8’s 11 per cent. It offers fast charging, too. OnePlus has achieved great things with the OnePlus 5T. The company may have increased the price, but it’s now offering a fully rounded device that

The 6.01-inch AMOLED screen is lovely to hold in the hand.

blows much of the competition out of the water, while still hugely undercutting the competition. Complaints are it’s not waterproof, the audio isn’t the best, while battery life could be better. Yet if you’re after a device that can shoot phenomenal images, run the latest games and apps with ease, and look great at the same time, you’ve just found it. LXF

Verdict OnePlus 5T Developer: OnePlus Web: Price: £449 6GB/64GB (£499 8GB/128GB)

Features Performance Ease of use Value

9/10 10/10 9/10 9/10

A phone that can do everything well but costs half that of other flagships. It’s hard not to recommend.

Rating 9/10

January 2018 LXF232    15

Reviews Web browser

Vivaldi 1.12 Being fundamentally averse to exercise, Shashank Sharma isn’t keen   on hopping distros, or even browsers, but with Vivaldi, he’s tempted… In brief... Vivaldi is a customisable cross-platform web browser. It’s based on Chromium’s blink rendering engine and targets disgruntled Opera users who miss features which were removed when Opera moved away from the Presto layout engine. You can install it using . DEB and .RPM binaries from Vivalidi’s website.


here’s no shortage of web browsers, if our number of Roundups on them are any indication. Then again, a web browser is the quintessential desktop app and perhaps the most commonly used one as well. But still, Vivaldi’s raison d’être was best explained by its co-founder and COO, Tatsuki Tomita is an interview with Ars Technica: “...there’s no reason for anybody to use yet another browser if it looks the same as the others and works the same way. So, we’re focusing on users who want more out of the browsing experience.” The browser quickly puts this approach to practice. The first time you launch it, Vivaldi asks you to spend some time setting it up. You can choose a theme/skin for the interface as well as a background picture, and are given the opportunity to move the tabs from their default position at the top to the left, right, or to the bottom. In the side panel on the left are the familiar browser tools: bookmarks, downloads and history, along with a notes taking app, which enables you to attach screenshots and files to the notes. The browser also has several useful controls at the bottom of the screen. There’s a button to take screenshots, a page zoom slider and a Pages Actions menu, which enables you to tweak the current page’s look and feel in several different ways. Vivaldi boasts several usability improvements as well. You can pull the tab bar vertically to get a visual preview

Features at a glance

Image information

Right-click an image and select Image Properties to view metadata information about the image.

20     LXF232 January 2018

Easier navigation

Control the browser using mouse gestures and key combos, both of which can be easily customised.

You can add a website to the side panel, which helps you keep an eye on a social media service, such as Twitter, while you’re viewing another.

of all open tabs. There’s a trashcan icon in the tab bar which you can use to restore closed tabs or any blocked popups. By default, it cycles open tabs in the order they were last used, but you can change it to the more familiar cycling order from the expansive settings panel. In terms of Privacycentric features, Vivaldi uses Google Phishing and Malware protection and search, suggesting the search and address field isn’t enabled by default.

What users want There are three headline new features in the latest Vivaldi 1.12 release. The first helps photographers view metadata information for images easily, but it’ll only work for sites that haven’t stripped this information from the images. Then there’s the revamped Download Panel. It now displays several useful bits of information about the files you’re downloading. The third big feature is the introduction of a slider in the appearance settings and can be used to limit the saturation level for websites’ themes colours. The features might not be stellar in themselves but they were the result of direct feedback from its users. In fact, the request for the saturation slider was addressed to Vivaldi’s Twitter account and was implemented the next day. The browser’s press release refers to this to underline the project’s commitment to listening to the users

for smaller but important features while they work on bigger functionalities that can take time to implement. Two such bigger features which we mentioned in our previous review (LXF207) are Sync and an inbuilt Mail client. In a blog post, Jon promised that the team is working to roll out these (and other) prominent features. Also, while Vivaldi aims to roll in the most commonly used web browser features in the core product, and doesn’t have an extensions infrastructure in place, you can install add-ons built for Chrome following instructions on Vivaldi’s knowledge base. A very glaring downside to this otherwise well-rounded product is its Proprietary license, which is unlikely to impress open source purists. LXF

Verdict Vivaldi 1.12 Developer: Vivaldi Technologies Web: Licence: Proprietary

Features Performance Ease of use Documentation

8/10 8/10 8/10 9/10

A useful web browser which, despite its early days, is shaping up to be a real challenger to the mainstream options.

Rating 8/10

Roundup Roundup Gnome distributions

Every month we compare tons of stuff so you don’t have to!

Best Gnome distro While he scrambled for the hills when Gnome 3 was announced, Shashank Sharma has since decided to welcome Gnome back onto his desktop…

How we tested... Most mainstream Linux distributions feature a Gnome-edition, or at least offer it in their software repositories. With user-friendly software management tools, you can easily install Gnome on top of any Linux distro. But, for this Roundup, we’ve limited our selection to projects that ship with Gnome out of the box. Ubuntu, having recently returned to the Gnome fold, has received plenty of attention for this reason. Which is why it isn’t on our list: we’re focusing on projects that have been faithful to Gnome for a long time. We’re comparing these distros on their default app selection and software management capabilities. We’re also interested in the release policy; a distro that requires a fresh install every six months will find few takers. Most importantly, we want a distro that stands out from its peers and is fun to use.


Our selection Antergos Debian Fedora3 Manjaro Zorin OS

long with KDE, Gnome is one of the oldest desktop environments for Linux distributions (distros). Unlike its peers such as XFCE and KDE, Gnome has inspired some of the most popular desktop environments today. Cinnamon and Mate were both born when the project announced its strikingly different 3 series. Developed by the Solus project, Budgie desktop was also inspired by Gnome. While some of its past releases cost it some users who didn’t like the new design direction adopted by the environment, the newer release of Gnome has helped

24     LXF232 January 2018

the project win back some staunch critics such as Linux Torvalds. While Gnome is a popular choice for desktop distros designed for newbies, you’ll also find it powering special-use distros designed for pen-testing and forensics, or multi-media and production. It’s also the default on CentOS, RedHat Enterprise Linux and various other server-centric distros.

For this Roundup, we’ve limited our selection to desktop distros, which can easily be moulded for any tasks. In Debian, we have one of the oldest Linux distros. Fedora is at the other end of the spectrum, and is often the first to introduce new technologies. Antegros and Manjaro are both Arch based, while Zorin OS makes up for the lack of Ubuntu on this list.

“The newer release of Gnome has helped the project win back some critics such as Linux Torvalds”

Gnome distributions Roundup

Bundled software What programs are on offer, for everyday use?


ost modern desktop distros ship with a number of default programs and packages. These range from web browsers, email and chat clients, to office and productivity programs, multimedia players and even games, and help users quickly get started with their distro. Almost all the distros on our list ship with an impressive collection of applications. Debian and Fedora both follow strict software packaging guidelines and this restricts the packages available with these distros out of the box. While Fedora only ships with free and open source software, Debian sticks to its Debian Free Software Guidelines and ships with only free software. Despite this limitation, both these distros offer Firefox, the LibreOffice suite, audio and video players, chat and IM client, and more. Manjaro Linux is the only one to feature the Lollypop music player. Designed for Gnome, it boasts of all the usual features and also supports playing internet radio. But it doesn’t offer a list of stations by default and you

Zorin OS is the only distro that offers Wine out of the box, including PlayonLinux.

Verdict must manually specify the web address of the station you wish to play. Like the first letters in their name, Antergos and Zorin OS are at the extreme ends from one another. Zorin OS at 1.6GB is lighter than Anetergos’s 2GB image, but still packs in more packages. Apart from the usual productivity, multimedia and internet application, Zorin OS ships with a number of games such as Mahjongg, AisleRiot, Sudoku, Mines and more. Antergos is also a bit of an exception from the rest. This is because it’s the

Security How do these distros keep you safe?


hether it’s on account of an ill-configured system, a security breach, or accidentally dd’ing the wrong partition, loss of data is an all-too-real possibility. Nefarious websites are another risk to

bear in mind. You must therefore take every precaution to protect your system and data. None of these distros ship with a parental control tool out of the box. If you have children who use the machine

Zorin OS and Manjaro ship with SeaHorse, a capable security program.

only distro in our list that doesn’t ship with any office/productivity tools. While LibreOffice is the standard fare in all the others, Antergos doesn’t even provide a lightweight alternative such as Abiword. It instead offers esoteric tools such as Documents and Books. Developed by Red Hat, these collection managers are of little use on a fresh installation, especially in the absence of a word processor. Apart from this faux pax, the distro ships with Chromium as the default browser, Totem media player, Cheese, but only a handful of other tools.

to connect to the Internet, consider installing additional software to shield them from the internet. You must also adopt some useful habits such as installing extensions on your browser of choice to stop scripts and block adware. Consider installing a proxy such as DansGuardian, which can also be used to block certain websites. It’s also a good practice to back up your sensitive data. Unfortunately, this is another area where the distros are sorely lacking. With the exception of Zorin OS, which ships with Deja Dup and enables you to schedule backups and even store them on a remote location, the other distros don’t offer a back-up solution out of the box. Of course, you can install Deja Dup, or one of its many alternatives from the software repositories on each of the distros in this month’s Roundup. Another area where Zorin OS outshines the other distros is the firewall. It ships with Gufw, which helps users quickly define firewall rules. As with back-up tools, you can install Gufw and other firewall tools using the software repositories on the other distros.


HHHHH Debian

HHHHH Fedora

HHHHH Manjaro


HHHHH The minimalist Antergos makes it ill-suited for those with slow internet.

Verdict Antergos

HHHHH Debian

HHHHH Fedora

HHHHH Manjaro


HHHHH Zorin OS edges past Fedora, thanks to the inclusion of Deja Dup.

January 2018 LXF232    25

Fast & light distros

Fast & Light distributions Mayank Sharma hates that he has more PCs in his attic than on his desk, so he’s finally doing something about it…


couple of years back Linus Torvalds rejected a patch for dropping support for 1995-era EISA-based platforms. He argued that it wasn’t broken and didn’t adversely affect the other parts of the kernel. But while the kernel can afford to support legacy hardware as long as they have even a single user, distributions and individual projects can’t afford that luxury. To make efficient use of their finite resources, distros through out 2017 have been dropping support for 32-bit platforms. Popular Linux distribution Elementary OS doesn’t even have a 32-bit version. Newer projects like Solus didn’t even bother to release a 32-bit version. It’s the same story with niche projects like the privacy-centric Tails Linux. Even mainstream projects like Arch and Ubuntu have ceased

to spin installation ISOs for 32-bit machines. This really isn’t surprising since machines based on this architecture were taken off the shelves back when Gordon Brown was residing in 10 Downing Street. Mainstream Linux distros are designed to appeal to a large number of users, a majority of whom run modern hardware. As a result they’ve become too bloated for

isn’t surprising that a large number of open source developers are working   hard on making obsolete hardware   usable again. In fact, the recent advent   of feature-rich, resource-hungry software has reinvigorated efforts to breathe   new computing life into those underpowered workhorses. Over the next few pages, we look at some of the best distros that are designed from the grounds up to use the meagre resources on your old hardware judiciously. We’ll also look at the individual components that make up a distro and help you prune them for performance. These lightweight programs and distros help you make sensible use of the limited supply of the computing resources on these machines and have them whizzing again in no time.

“A large number of developers are working to make obsolete hardware usable again”

30     LXF232 January 2018

older machines. Without a dollop of system memory and an extra core or two, these distros will never deliver the best performance on your old workhorses. But thankfully, you can still put those old machines to good use. And it really

Fast & light distros

Fighting the digital flab You can take steps to streamline a distribution.


ne of Linux’s strongest features is its modularity. Major parts of the system are built up from smaller components that can be taken out or replaced, which is one of the reasons that has fuelled the growth of the number of the Linux distributions. This extends to desktop environments that might seem monolithic, but are actually composed of many different smaller programs and utilities. So you can swap out the file manager or even replace your entire init, like many distros have done with Systemd, with relative ease. To manage files, you can use an orthodox file manager like Krusader, which is based on the venerable Midnight Commander, but it’s graphical instead of text-based. Another strategy is to use the file manager from one of lightweight desktop environments such as Thunar from Xfce or PCManFM from LXDE. Web browsers Firefox and Chromium perform poorly on computers without adequate resources. So it’s a good idea to switch to the fltk-based Dillo web browser which offers tabbed browsing but little else. The Webkit-based Midori and Qupzilla both offer many of the frequently used features you’d want from a web browser, but with a smaller footprint. To play media you can use MPV, which is based on the mplayer2 code. Then there’s Abiword word processor if you need something with more features than what you get with plain text editors such as the command-line based Nano or the graphical Leafpad. You can combine it with the Gnumeric spreadsheet as a lightweight alternative to LibreOffice.

Sweeping changes The biggest thing you can do to speed up a desktop Linux computer is to select a lightweight desktop environment. If you’re using a machine that’s low on resources, you should avoid the mainstream desktop environments like KDE and Gnome. These environments are overflowing with useful features, but need a fair amount of system resources. Instead, you should swap them out with a lighter desktop, such as LXDE, LXQt, Mate, Moksha, Enlightenment or Openbox. LXDE has been producing a functional lightweight desktop since before the dawn of flashy bling-laden desktops. The desktop is popularly used by mainstream distros to offer

The Liquorix project (https:// produces kernel optimised for desktop, multimedia, and gaming workloads.

a version that’s less demanding on a system’s resources; a prime example being Lubuntu. This distro will live on a machine with just 128MB of RAM. If your machine has got a bit more juice than this, you could use Xfce. The desktop offers some features like launcher panels that are missing in LXDE and offers richer default programs, but isn’t quite as zippy. Compared with these veterans, Mate is a new entrant that’s a continuation of the officially abandoned Gnome 2 desktop. It’s designed and pitched as the desktop for users that crave the productivity offered by Cinnamon, but lack the resources required to power the main Linux Mint desktop. The real veteran, however, is Enlightenment which is rather unusual. It isn’t really a desktop environment, but rather a window manager, which is why it lacks taskbars, panels and even menus. Yet unlike many lightweight environments, the Enlightenment desktop is full of eye-candy that you’d expect from a full-blown environment, at a fraction of the resources. Another comparatively new lightweight desktop environment that’s steadily growing in popularity is LXQt. It’s a combination of the discontinued Razor-Qt desktop with components from LXDE and the result is an ultra-fast desktop built with a modern Qt look and feel.

Optimised core You can also give your installation a performance boot by optimising its kernel. Virtually all distributions provide a “one-sizefits-all” kernel that’s compiled with generic options. You can, however, replace it and compile a kernel for optimum performance on your specific hardware. By default the kernel is configured with drivers to support a number of configurations. You can disable drivers and get rid of other unnecessary options to cut down

the size of the kernel, free up some memory and also shave off some boot time. Another option is to apply a performance patch to a stock kernel. One of the most popular alternatives to the standard kernel has been compiled by Con Kolivas from lots of different performance patches. The kernel patchset is called -ck, and it has been built with an emphasis on desktop performance. To install it, use your distro’s package manager to

first download the kernel source for the version the patch applies to, along with all the tools for building your kernel. Then download the patch from Kolivas’ website (www.users.on. net/~%20ckolivas/kernel) and use the patch command in the kernel source folder to apply the changes, such as sudo patch -p1 < patch4.*-ck1 . When the source is patched, continue to build the kernel according to your distribution’s instructions.

January 2018 LXF232     31

Draško Draškovic´

The Main

(flux) man Jonni Bidwell learns about IoT platforms, embedded programming, messaging protocols and bootloaders from veteran coder and Mainflux founder Draško Draškovic. ´

38     LXF232 January 2018

Draško Draškovic´ Draško Draškovic ´ is CEO and cofounder of Mainflux, an open source, industrial, Internet of Things Cloud platform written in Go and Erlang. He holds an MSc in electronics, telecommunications and industrial control systems from Belgrade University and is an expert on semiconductors, communication protocols and lots of things we can’t even begin to understand. Draško’s worked on a number of FOSS projects, including OpenWRT, U-Boot and OpenOCD, and has worked for a number of major hardware providers. This includes Texas Instruments, where he helped develop the popular OMAP chips which can be found in most every 2G and 3G mobile phone. Lately, he’s been working on IoT and 5G technologies, and most recently has been dabbling with Blockchain technology as applied to the domains of security, data integrity and device identity. In a joint effort with two of his Mainflux colleagues, he has just finished a book entitled Scalable Architecture for the Internet of Things, which will be available by the end of 2017. We caught up with him at the O’Reilly Software Architecture Conference, held in a swanky hotel in London, to get the lowdown.


Linux Format: How did you get into Linux and open source in general? Draško Drašković: I got into open source relatively early, back in my student days. The whole computer centre was running Linux mainframes and we used open source software for developing student projects. I recognised the benefits of software freedom and the GNU philosophy corresponded to my own point of view. Since then I’ve used almost exclusively free software for my own projects. I try and use, promote and ship open source products wherever possible for industry projects. Just after finishing my studies and obtaining my MSc. I started working at the university’s Innovation Centre, which was part of its computer centre and sponsored by the government’s Ministry of Technology. One very interesting project was for security in a Serbianlocalised distribution. At this point I switched from being an advanced Linux user to becoming a bona fide kernel hacker. We got help from former students who were now professors in other countries, because we wanted as many quality contributions as possible so that our distribution could be as secure as possible. After this project I joined a French company in Belgrade. It worked with semiconductors, which has always been my area of interest. After a few months we had a big project with Texas Instruments (TI) in Nice on the French Riviera, and I started working with them after this. Since then I’ve moved between Nice and Paris

working for various companies in the semiconductor and wireless communications domains. And practically always used Linux.

GPIO, UART, I2C, SPI, USB and similar, as well as networking (wired and wireless). Linux lower layers are very exciting to hack on, but if you take, for example, just the Linux Wi-Fi subsystem—it’s a very complex area and demands a lot of knowledge of how hardware functions and sometimes even physics around radio transmissions over the ether. So you need to understand how the protocol works

LXF: What are some of the highlights of your (considerably impressive) career so far? DD: Besides my time at TI, I worked at a startup called Sequans Communications where we built a chip that was used in the world’s first 4G phone, the HTC Evo. I also worked on the On his life-long loyalty to linux Devialet high-fidelity audio system (www. phantom-speaker), which is basically a distributed wireless computer system for audio. It achieved worldwide popularity and won at the physical layer, but also the layers above that are specific to the device. lots of prizes. It’s interesting in that it’s just a Linux machine with a lot of support for wireless LXF: Sounds hard. Tell us more about coding streaming and specialised FPGA circuitry for for embedded systems. audio processing. Besides that, I’ve worked on DD: Embedded programming poses a lot of OpenWRT, OpenOCD, U-Boot and Mainflux. challenges. But it’s extremely exciting. So peripherals connect to the CPU over the LXF: You have a strong background in standard hardware interfaces I mentioned engineering and electronics. Is that earlier, and they also have their own controllers necessary for low-level kernel programming? with their own internal registers. These are DD: Yes – knowledge of digital electronics and embedded in the SoC at a particular address computer architecture is essential here. It’s space. RAM is an important peripheral, and that important to understand HW communication has its own controller. To boot Linux you need to and control interfaces and protocols – like

“I try and use, promote and ship open source products wherever possible”

January 2018 LXF232     39

Wired for sound

The only good system is a sound system. Jonni Bidwell is here to tell you all about Linux’s offerings, so listen up!

Wired for sound S

ound is a sensitive issue, and as humans we’re very sensitive to audio stimuli. The reason sprinting races are started with a gun and not a flash is because we react much more quickly to sound (about 150ms) than light (about 200ms). If we’re watching a film while our system is busy, then the video and audio may become momentarily desynchronised. In order to restore sync we could skip (or back up) either audio samples or video frames. Almost universally, media players opt for the latter, since viewers will notice a blip in the audio much more than a couple of dropped frames. We tend to take for granted being able to play high-quality audio without discerning any distortion, but keeping

all those buffers healthy and keeping everything ticking in time with the quartz crystals in the audio hardware is hard work. Linux often gets a bad rap for multimedia support. Whether it’s mp3 playback not working out of the box, video tearing, or Blurays requiring voodoo number theory and a blessing from the god Ba’al before they play

murky patents governing the use of particular technologies. Then there’s hardware that doesn’t adhere to standards – and let’s not forget that dragon, DRM. In fact, Linux has an impressive, state-of-the-art multimedia stack, capable of handling not just a 7.1 soundtrack while leisurely streaming 4K video, but also, thanks to JACK, 192khz studio recording or music production. Further, the nascent Pipewire project will modernise things yet more, bringing lowlatency playback/recording, real-time multimedia processing and support for sandboxed applications. But even today, Linux distributions have some state-of-the-art multimedia capabilities. Join us on a journey through the multimedia systems that, for the most part, we no longer need to fight with…

“Linux has a state-of-the-art multimedia stack, capable of handling a 7.1 soundtrack”

44     LXF232 January 2018

(see LXF223), there are no shortage of gripes. Most of the time, though, this isn’t Linux’s fault, or even the fault of the hard-working maintainers of kernel driver stacks or multimedia projects. Very often there are

Wired for sound


he first audio subsystem for Linux (and other UNIX-like animals), the Open Sound System (OSS), provided basic support for playback and recording, and more than satisfied the audio needs of most ‘90s bods (we were simpler creatures back then). There was also patchwork support for some devices that was provided directly by the manufacturers (some of them did care about Linux, even in the 90s), but this was generally closed source. OSS grew out of the drivers for the then-popular Sound Blaster 16 card, which had many clones. It also provided the lowlevel kernel drivers for audio hardware, as well as an API for applications. As with anything vaguely hardware-related in the early days, getting sound working required recompiling your kernel, and optionally tears or hair loss. Functionally, OSS provided the /dev/ dsp* and /dev/mixer* devices, which generally could only be accessed by one process at a time. This meant that two applications couldn’t play sound simultaneously, unless the hardware was capable of mixing the streams natively, and OSS was able to persuade it to do so. To solve this the KDE and Gnome desktops developed their own sound systems, aRTs

Besides all the balkanised Linux audio systems that preceded it, PulseAudio also provided special dispensation for Flash, which was all-too common in the 2000s.

applications much easier, unless of course you still needed direct OSS support, or wanted to support both aRTs and ESD. And so began the Jenga-like adding of layers to the audio stack. Simple DirectMedia Layer (SDL) is a wrapper around all of the above (as well as input drivers, DirectX/OpenGL and the Windows and Mac sound systems) that’s still around today. Its portability makes it especially popular for cross-platform games. But one wrapper is never enough, and so libao was born. Libao had some nice features and eventually

“Open Sound System grew out of the drivers for the Sound Blaster 16 card” and ESD respectively, which did the required mixing in software and despatched the resultant stream to OSS. This worked well, and made writing audio

found its way into the popular Mplayer project in 2001 in the form of libao2 – the –ao option lives on there as a means to choose which sound system to use.

ALSA in action In 2002, OSS developer Hannu Savolainen, then contracted by 4Front Technologies to work on the stack, released OSSv4 under a proprietary license (though it was re-released under the GPL five years later and is still developed today). This led to Linux adopting the Advanced Linux Sound Architecture (ALSA, which had been in development since 1998–see LXF108) for the 2.6 Kernel. Many people were happy with this arrangement, although there were criticisms of OSS on Linux besides its

Loud quiet loud – and repeat We’re all familiar with the “voices too quiet, explosions too loud” problem when watching media at home. Film directors like people to have to listen intently as chiselled jawlines whisper sensitive yet plot-critical information, and they also like viewers to feel like they’re in the middle of an explosion, rather than a few blocks away. This is fine with a THX surround sound system in an acoustically engineered space where these noises can be reproduced accurately. However, your home setup may not be of this fidelity, and even if it was, all kinds of things can still happen to the audio before it hits your speakers. What comes out has likely been resampled (your sound card may, for example, prefer 48kHz to 44kHz), downmixed (there are many terrible ways of

squishing 7.1 channels into two), and treated with any number of other transformations. The audio stream you’re playing might not even be that good quality to begin with. Heavy MP3 compression does terrible things to messy waveforms like speech, making it sound dull. Be that as it may, the main culprit for this annoying issue is the nature of noise itself. Explosions generally are hugely louder than whispers, and making audio equipment that can cope with this volume range is hard. So the solution is to subtly boost the whispery bits and gently attenuate the shouty bits. This is known as Dynamic Range Compression and you can find an option to activate it in VLC, or with mpv use the option af=acompressor .

Dynamic range compression might improve relations with your neighbours.

January 2018 LXF232     45

Tutorial AWS storage

NextCloud: Put files on AWS

Concerned about the possibility of government snooping, Bobby Moss has turned to NextCloud and Amazon to build his own Dropbox replacement.

Our expert Bobby Moss

develops cloud microservices for a global IT consultancy and its clients. In his spare time he works on free software projects and tinkers with old hardware.

Amazon’s already huge list of cloud services is constantly growing and handily, all of them can be configured from the same administration panel.


Quick tip There are one-click install options to deploy NextCloud into AWS (such as the one from IVCISA: http:// However, your mileage will vary depending on how well-maintained these solutions are.

nless you’ve been living under a rock for the past decade, you’ll have come across at least one cloud file storage service offering free space online for backups and syncing documents across devices. Dropbox is probably the best known in Linux circles because of its excellent cross-platform support, but there are other great alternatives like MEGA, Spideroak and Ubuntu One (God rest its digital soul–Etd) that are also available. However, such services are far from immune when it comes to security and privacy concerns. For example, in 2016 Dropbox managed to leak 68 million user passwords in one breach. At the time of writing, despite MEGA’s excellent security record, it still hadn’t enabled two-factor authentication (an essential technique where your phone generates an additional code as an extra layer of security) for user logins. Question marks have also been raised about how often cloud providers in general share information with government intelligence and law enforcement agencies without a warrant. While end-to-end encryption can assuage some privacy and security concerns for your files while they’re in transit, there are no guarantees about how secure your files are

76     LXF232 January 2018

“at rest” on disk drives and there are no guarantees about how well these companies have secured their own backups and your file history. So, if we want to eliminate the need to trust these companies to be good custodians of our data, what are our options? Well, we could manually encrypt and decrypt every file using a third-party application each time we edit it, but a more elegant – and less tedious – solution might be to create our own cloud file service. Don’t worry, this isn’t as arduous as it sounds! Thanks to companies such as Amazon, Microsoft, IBM, and Google you don’t need to host your own server farms and data centres. You can borrow infrastructure cheaply from someone else and with the help of some free software you can build a ready-made cloud file service instead of coding your own from scratch.

Head in the clouds For this tutorial we’ll be using NextCloud, a server-side system that anyone can install to back up and sync their files across the Internet. Much like the Dropbox and MEGA services, you can also view and edit documents in the browser and install a desktop or mobile client to keep local copies in sync. In previous issues of Linux Format we’ve covered OwnCloud, the project NextCloud is forked from. The main reason behind the fork is philosophical: the former makes money with a premium edition that contains enterprise features while the latter includes every feature in the community edition but sells optional support packages to business users instead. From a feature perspective, NextCloud includes in-built video chat and document editing with Collabora 1.8 (an online

AWS storage Tutorial That syncing feeling NextCloud isn’t restricted to storing files and folders – you can also sync all of your contacts and calendars. Although importing entries from other web providers like Google can sometimes require a little trial and error, activating both through the browser is as easy as enabling them in the Apps section of the Settings menu. Thunderbird users will be pleased to know they can sync contacts and calendars stored this way with their favourite mail client. For names and addresses ensure you install the Cardbook

add-on, then import the entries using CardDav via Addressbook and then New Addressbook Remote. You can find the necessary address for this from NextCloud by opening the Contacts section in the browser and clicking the hyperlink symbol next to the name of the contacts list you wish to import. Provide your credentials and follow the wizard to sync your changes. To sync calendars with your mail client ensure the Lightning add-on is installed (or enabled if you’re using a version of Thunderbird that

version of LibreOffice) when you enable the rights apps, while OwnCloud offers great one-click deploy options. Which of the two you decide to use is largely down to which features you most value and your own personal preference. We’ll also be using Amazon Web Services (AWS) to host this NextCloud instance. There are plenty of great alternative providers, but at the time of writing Amazon’s “free tier” was the most generous and comprehensive. All AWS accounts have 30-days’ free use of a “t2.micro” on-demand instance each month that contains 1GB RAM, one CPU and some limited block storage for file hosting. Given this has roughly double the amount of memory the NextCloud manuals recommend it should be ideally suited for this tutorial.

Exploring the Amazon The first step is to create a new AWS account. You can do this by heading to and clicking the button that says Create a New User. You can use your existing Amazon account if you wish, but you may want to use a different email address as an added security measure. Next, follow the account creation wizard, ensuring you register as a personal rather than business user. Don’t panic too much about adding credit card details: if you stick to services labelled “free tier” then you should avoid any unexpected charges (you can see more details about what is included at For security reasons AWS will also verify your phone number is valid before allowing you to continue. By default, you’ll be using what Amazon calls a “root account” with maximum permissions. This isn’t a good plan: if someone cracks your password they can spin up all the instances they want at your expense and access personal information like your address and payment information. The first thing you should do to secure your root account is setup multi-factor authentication (MFA) by following the instructions at 1. It’s also a good idea to use Amazon IAM to create a new admin user for dayto-day usage by following the best practices detailed in the AWS documentation here: IAM/latest/UserGuide/best-practices.html. Once you’ve secured your AWS account and logged back in with your new IAM admin user you’re now ready to create a new instance to run NextCloud from. For the purposes of this tutorial we’ll be using Amazon EC2. Simply select the service from the admin console and create a new “t2.micro” instance running Ubuntu Server 16.04 LTS. You can safely leave the other settings with their default values and once

includes it by default). Next, you should click the three-dotted menu beside your calendar entry in the browser window to fetch the CalDav URL from NextCloud, which you can then use when you follow the wizard launched from Calendar and New Calendar. It’s also possible to sync contacts and calendars to other devices such as smartphones and tablets, and you can find comprehensive instructions for how to do this in the NextCloud user manual:

you’ve followed this wizard you’ll need to wait a moment or two for the instance to start up. It will show as “pending” while it’s still being initialised. Before we move on to installing NextCloud you should ensure that you enable HTTP and HTTPS ports for your new instance. Simply head to the Security Groups panel, select the rule that applies to your instance (it will likely have “launch-wizard” in the name) and add those two protocols as new rules in the Inbound tab. Take care not to remove the inbound rule for SSH.

Be prepared Once the inbound rules have been added you should ensure your new instance is selected in the Instances panel of the EC2 console and click Connect for SSH setup instructions. When you’re prompted to create new SSH keys you should follow the instructions and ensure you download the private key. Keep it somewhere safe and accessible so you can use it to access the server. Once you’ve followed the instructions from the Connect button in your bash shell you should ensure the version of Ubuntu in this instance is up-to-date: $ sudo apt update $ sudo apt upgrade -y $ sudo reboot You’ll need to reconnect SSH after running the reboot command, and when prompted you should stick with the existing grub setup. The next step will be to install a full web server and database.

Quick tip AWS isn’t your only option when it comes to cloud providers. Microsoft Azure, Google Cloud, Heroku and IBM Bluemix all offer trial periods and a free tier. You can also build low-cost virtual servers on Digital Ocean, Vultr and Linode. Shop around to find the cloud platform that meets your needs.

It’s straightforward to manage your EC2 instances and grab useful information like its public IP address and log files through the browser.

Improve your Linux skills Subscribe now at 1)

January 2018 LXF232     77


myfavouritemagazines has over 100 one-off guides and specials which celebrate your favourite subjects. There’s something for everyone treat yourself or give gift.


Or call now – UK: 0344 848 2852 Overseas: +44 344 848 2852 MyFavouriteMagazines is the official magazine subscription store of Future. You can save up to 74% on a huge range of popular magazine titles. Every magazine subscription will be delivered direct to your door, and includes free UK delivery; guaranteeing you don’t miss a copy of your favourite magazine.

Linux Format 232 (Sampler)  
Linux Format 232 (Sampler)  

You can subscribe to this magazine @