email apps linux laptops Control your email with the best clients
Go mobile with the perfect distro install
manjaro linux 17 + 3 Pi projects thermal vision barcode scan billboard
The #1 open source mag
Discover the best distro for your desktop
pages of tutorials & features
64 Eleanor McHugh From helicopter controls to protecting privacy creating LIFE
Munin & monet
Coding automata for fun and profit!
Next-gen monitoring with the prettiest of graphs
revive retro games with open source BUILD YOUR OWN VPN FOR SAFER BROWSING
FREE GIFT Subscribe now! Page 24
Western Digital Red 10TB
Mark Pickavance says this capacious NAS-targeted drive has its strengths, and spins up an array of drives big enough to handle the LXF team’s sci-fi collection.
TP-Link Omada EAP225 Outdoor
Mark Pickavance tests TP-Link’s affordable outdoors Wi-Fi solution by sitting in the garden with a laptop and a large Pimm’s.
What to do with old PCs would be a crisisinducing existential question for Shashank Sharma, if not for projects like Quirky.
Does this firewall meet Shashank Sharma’s needs? For starters, it has to be easy to set up and simple to manage…
Zorin OS 12.4 Core
Ubuntu-based distros are a dime a dozen, and Shashank Sharma isn’t easily impressed. Is Zorin something special?
Management have bunkered down, terrified on the top floor of Linux Format Towers as Evan Lahti proclaims: This Means War!
4 LXF242 October 2018
Mayank Sharma helps you choose your next distribution, how to build one yourself and reveals 20 of the best out there p32!
We love storing our own stuff and this month it’s our emails! Discover the best email client that money can’t buy, as Shashank Sharma puts five through their paces.
The code less travelled
Eleanor McHugh takes us on a journey from a physics degrees to Visual Basic helicopter navigation, to the idea that a right to privacy is a delusional ideal Jonni Bidwell should let go.
Google releases Android 9 Pie The latest version of Android is now out, with a focus on AI. oogle has released the latest version of its Android mobile operating system (known as Android 9 Pie, http://bit.ly/ LXFAndroid9). While it comes with some nice new features, as with previous versions of Android the release will be staggered, meaning if you don’t have a recent Google-made phone, you may be waiting some time to get the update. At the moment owners of Google Pixel and Pixel 2 phones, as well as Essential Phone, can download the update for free right now. Phones made by Sony, Xiaomi, HMD Global, Oppo, Vivo, OnePlus and certain Android One Phones will receive the update by the end of August. You’ll need to check with your phone manufacturer or network operator to find out when your phone can expect the update. If you have a very old device, or one from an obscure manufacturer, then you may be out of luck. So, what features can you expect when (or if) you get Android 9? Our sister site TechRadar has put together a breakdown of the best new features (http://bit.ly/LXFAndroid9TR). These new features include Adaptive battery life, which uses machine learning to prioritise apps you’re likely to use, while closing ones you won’t, to help preserve battery life. Google partnered with Deep Mind to refine its deep
learning algorithms, and it looks like it’s made some good progress in helping to prolong battery life – which is one of the biggest complaints from smartphone users. Google has also improved adaptive brightness to calibrate your display in certain conditions. If you don’t want to wait for Android 9 to reach your phone (or you’d like to get away from Google), then LinageOS (https://lineageos.org), the free and open-source operating system based on Android, has released version 16, which is based on Android Pie. For a list of supported devices for this OS, head over to http://bit.ly/ LXFLineageOSSupport.
As usual, Google products like the Pixel 2 will get Android 9 first, sensible people can wait for LineageOS to catch up.
AMD’s latest hits new Linux highs Benchmarks for the CPU in Ubuntu blow past results in Windows. here’s some great news for Linux users who are considering AMD’s latest Threadripper CPUs. Benchmark tests run by TechSpot (http://bit. ly/LXFTechSpotBench) showed that these high-end processors performed better in the mega-tasking tests in Ubuntu 18.04.1 LTS than they did in Windows 10. While the 32-core 2990WX performed brilliantly in both Windows and Linux, the performance difference when using Ubuntu was occasionally stark. For example, in the Stockfish 9 test, a free and open source chess engine, the 2990WX saw a 23 per cent performance boost when running in Linux compared to Windows. In the John the Ripper test, which is a password cracker, the increase
was even more impressive, with it performing the tests three times faster in Linux than in Windows. In almost every test AMD’s 2990WX performed noticeably better in Linux than in Windows, proving that if you want to make the most out of this impressive CPU then running Linux is clearly the way to go. The tests pitted the 22990WX against Intel’s 7980XE, its flagship 18-core processor. In most of the tests AMD’s chip outperformed the more expensive Intel CPU. Interestingly, Intel’s chip also saw improved performance in a number of benchmarks when run in Linux. This will be interesting reading to people who have shelled out for these expensive processors, because it looks like Windows 10 is holding back the performance potential of some CPUs.
the Call for Code
Jamie Smith Chief marketing officer, The Linux Foundation.
While we know that technology can’t prevent natural disasters from occurring, we do know that it’s a critical tool in our toolbox that can help save lives and minimise property damage. With this in mind, The Linux Foundation stepped up to answer the Call for Code along with IBM, the UN Human Rights Office, the American Red Cross, David Clark Cause, the Cloud Native Computing Foundation and a global community committed to minimising the impact of the more frequent natural disasters that occur. The inaugural Call for Code challenges the world’s 22 million developers to tackle and find solutions around disaster preparedness and recovery. The winning Call for Code solution and team will be awarded a $200,000 prize along with an opportunity to pitch their idea to a venture capitalist. From AI, machine learning, data science, IoT, geo-spatial and open source technologies, and so much more, you only have until September 28 to submit your Call for Code solution! Entries will be judged by a panel of technology and disaster experts, including Linus Torvalds, the creator of Linux and Git. Answer the call – learn more at CallforCode.org.
October 2018 LXF242 7
This ISSUE: Valve drinks the Wine Android 9 Pie released AMD CPU performance Lubuntu 20.10 drops X.Org Liberapay returns Gaming
Steam update now makes Wine integration seamless Gaming on Linux has just had a major boost with Valve releasing the Beta version of Steam Play, which enables users to play Windows-only games. post on the Steam community forums written by Valve representative PierreLoup Griffais has revealed an update to Steam Play (see http://bit.ly/LXFSteamPlay). The upshot is that Windows games can now be played on Linux using Proton, a modified version of Wine (Wine Is Not an Emulator), without too much stress being placed on system resources. According to Valve, Proton is based on Vulkan, a popular open-source graphics API that’s multiplatform, which means it runs on Windows, Linux and macOS (and other operating systems), rather than APIs such as DirectX, which is Windows-only. You can view Proton’s code on Github at http://bit.ly/ProtonGitHub. The new Steam Play is good news for not just Linux gamers, but potentially all PC gamers. If you’re a PC gamer, then it’s all but essential to have Windows installed, as only a fraction of games get ported over to Linux (or macOS). This has meant in the past gamers have had to pay for a Windows licence, rather than using that money on games or upgrading their hardware. Source: gamespress/PR material
Cuphead is one of the previously Windows-only games that can now be played in Linux.
6 LXF242 October 2018
Valve has tried to wean PC gamers off their Windows dependence before. A growing number of games on Steam are now Linux compatible, and Valve also designed its own gaming-focused Linux distro with SteamOS. However, if Steam Play and Proton can bring Windows games to Linux, then this could be a game changer: people could ditch Windows without missing out on many games. At the moment this is an early version of the software, and not all games are supported. It also doesn’t support games that aren’t on Steam, such as EA’s modern games. The move is already making a significant difference, as Forbes reports (http://bit.ly/ LXFForbesSteam) that in less than a week since the launch of the new Steam Play software, the
Valve continues to do great work to bring PC games to Linux.
In less than a week, the number of games that can be played from Steam in Linux grew by almost 1,000 number of games that can be played from Steam in Linux grew by almost 1,000. That number is likely to continue to grow as Steam users continue to test the software and give feedback on the stability of the games Proton is running. This is incredibly exciting news, and Valve has also confirmed to the GamingOnLinux website (http://bit.ly/LXFGamingOnLinuxSteam) that people buying Windows games to play on Linux will count as a Linux sale. This will help game developers see just how much of an appetite there is for officially porting their games to Linux.
Linux distribution Reviews
Quirky 8.6 What to do with old hardware would be a crisis-inducing existential question for Shashank Sharma, if not for projects like Quirky… in brief Packed with a large array of useful applications, the distribution runs entirely from RAM and can keep old and low-spec machines from turning into a paperweight. While it can be installed to disk, the project is perfectly at home providing persistent storage when running off a USB stick. If you like the idea of running distributions off RAM alone, also try Astrumi and Puppy Linux..
lot of distributions, especially niche projects such as firewall and pentesting solutions, exist because the creators wanted a distribution that caters to their needs, and they found the existing offerings lacking. Quirky Linux was designed in 2013 for a different purpose: to continue pushing the Linux desktop metaphor. While initially an install-only project, Quirky is now available as an installable-Live environment that can also run off a USB drive or SD card. The 400MB ISO packs all the useful applications needed for everyday use, and gives you the option to either install it to disk, or to save your current live session onto the disk or USB stick, which you can then boot into later when needed. This makes Quirky a convenient portable We rarely come across such a well fleshed-out lightweight and ready-to-use distribution. But distribution, with persistent storage. the inability to install a boot loader, is perplexing. Some might even call it… quirky! The installer gives you the choice of performing either a full or frugal installation. The former Unlike most other lightweight distributions, Quirky is the traditional installation to hard disk that all Linux features the complete LibreOffice suite, and a large distributions are capable of. With the latter option, all your selection of applications. Best of all, it offers tools for settings and configuration will be stored onto a folder, encrypting files and storing passwords out of the box. whether on a disk, or USB drive. Another useful and much needed utility is Pup Advert Blocker, which can be used to block all manners of ads on the default SeaMonkey browser, or any alternative you Different is good You’re greeted by the Quick Setup tool when you first boot may install using the software manager. As Quirky is built from the latest DEB packages from Ubuntu 16.04.x series, into the live session. This single-stop application enables you can use the PETget Package Manager to install you to configure all the usual elements such as country, keyboard, timezone, as well as network settings. You can additional applications from the software repositories. also set a hostname, enable the firewall, change the The choice of lightweight JWM and the stunning screen resolution and more. performance speeds make Quirky ideal for low-spec After you’ve configured your system, you can click the machines, but couple these with its default set of Save button on the Desktop to store the settings onto a applications and there’s no reason why it can’t replace remastered ISO or on your disk. On subsequent reboot, your existing distribution. the system will automatically load the configuration from this stored file, so you won’t have to configure your VERDICT system every time. When installing Quirky, you must use the Gparted Developer: Barry Kauler Web: http://bkhome.org/quirky utility to create a partition for it. Then click the Install Licence: Various button on the desktop to launch the installer, which leads you through a series of basic steps. Unfortunately, the distribution doesn’t install a boot loader, and instead Features 10/10 Ease of use 8/10 insists that one must already be installed before you Performance 10/10 Documentation 10/10 choose to commit Quirky to your hard disk. The desktop is peppered with icons such as file, www, While it may sit pretty on older machines, Quirky isn’t any apps, setup and so on, and you can use these to launch less than any of its bulkier and more popular peers. applications, and configuration utilities. The applications and setup buttons respectively launch the home-grown Rating 10/10 Easy Apps and PupControl utilities.
October 2018 LXF242 19
subscribe Save money today!
Subscribe! Sign up today and get your FREE Eclipse Charger
FREE GIFT Worth £69.99
Don’t miss out, subscribe now!
The Eclipse Charger, with its stylish looks and integrated cable tidy, will revolutionise how you top up your portable devices. Its Smart IC Technology auto-detects your device’s input to charge at maximum speed, and you can charge up to three devices at the same time!
IT’S EASY TO SUBSCRIBE!
Click: myfavouritemagazines.co.uk/lin/eclipse Call: 0344 848 2852 24 LXF242 October 2018
Overseas subs on p67
PLUS: Exclusive access to the Linux Format subs area! 1
CHOOSE YOUR PACKAGE! print edition
print + digital
FREE GIFT The cheapest way to get Linux Format. Instant access on your iPad, iPhone and Android device.
Get both the print & digital editions for one low price. Plus your free Eclipse charger
Every 6 months by Direct Debit
Every 3 months by Direct Debit
Every 6 months by Direct Debit
Every issue comes with a 4GB DVD packed full of the hottest distros. Plus your free Eclipse charger
*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 October 2018.
October 2018 LXF242 25
1) Only available to MyFavouriteMagazines.co.uk subscribers.
1,000s of DRM-free PDF back issues and articles! Get instant access back to issue 66 (May 2005) with tutorials, interviews, features and reviews. At linuxformat.com
roundup Email clients We compare tons of stuff so you don’t have to!
Roundup Claws Mail Evolution Kmail Mailspring Thunderbird
Shashank Sharma By day Shashank is a New Delhi trial lawyer, but by night he’s an open source vigilante!
Can’t decide which desktop email client to use? Shashank Sharma has been locked in the Linux Format Server Dungeon tweaking his SMTP.
how we tested… Unlike the last time we ran a Roundup of email clients (LXF151 – seven years ago!) when we installed the different applications on their native desktop environments, we’re running all of them on the Budgie desktop this time around. Most distributions carry these applications in their software repositories, and we’re running the latest available versions of each of them. The only exception is Thunderbird, because its latest release isn’t yet available in the software repositories, and we had to install it manually. Most email clients are similar in appearance, but we’ll be testing these tools on their performance, their search capabilities and ability to handle junk and spam messages. We’ll also keep an eye out for any standout features on offer, and their support for IMAP and POP accounts. Extending functionality through plug-ins and other customisation options is another criteria to consider when choosing an application that you’ll rely on for important communications.
26 LXF242 October 2018
hile email clients may appear to have not changed much since their debut on the Linux desktop, the different applications are constantly working on adding new features to please existing users, and attract new ones. In addition to accommodating for touch devices, many applications also support advanced features such as delivery notifications. This is especially useful when working with an IMAP account, such as that of GMail. Much like the perfect web browser, or text editor, there’s no clear answer as to which is the best email client. The ideal feature set for a desktop email client depends on the
intended use. A casual home user probably doesn’t have any need for features such as delivery confirmation or scheduling, which would be relevant to business users. Despite many viable alternatives on offer for users who prefer the command-line over a GUI, we’ve restricted ourselves to graphical applications for this Roundup. While our selection may seem heavily in favour of GTK, with only one KDE application thrown in the mix, the chosen applications can be installed on any desktop, and your distribution’s software management tool will fetch the additional libraries needed for these applications to function properly.
Email clients roundup
Unique features What makes these particular email clients stand out from the crowd? inux machines fitted with either 8 or 16GB of RAM are unlikely to be affected by the memory footprint of the always-open email applications. However, for low-spec or older machines that have limited hardware resources, Claws Mail is the perfect solution. Not only does it require far fewer resources than its peers, it’s also feature rich, supporting both POP and IMAP accounts. In addition to extensive filtering capabilities, it also enables you to create coloured labels when sorting messages. Setting up new accounts is also straightforward in all the clients tested here. Apart from emails, you can also use Evolution to schedule appointments and track your tasks list. Together with KMail, both programs are especially conscious of users’ privacy and provide easy means to sign, encrypt and decrypt messages. The import wizard on KMail supports a large number of applications that the tool can import from, such as Evolution, Thunderbird and Outlook Express. If you’re on a non-KDE system, you must install the akonadi-import-wizard package to access the feature. Like the others, Mailspring also supports creating multiple accounts. Even the free version provides limited access to some of its Pro features such as delivery notification, which produces a pop-up as soon as emails are delivered to the recipient’s mail box. For important messages that require urgent replies, you can also create a reminder when composing messages. The application will inform you if no one has replied to your message within the specified time period. You can also receive a summary of messages sent and received, as well as track whether recipients
Many features are enabled by default on Mailspring, including signature. You should customise it before you start using the application for professional communications.
actually open your emails, and whether they click a link in the message body, by clicking Activity on the sidebar. When reading emails with Thunderbird, if you double-click a message, it opens in a separate tab. Unless you close such tabs after reading the mail, Thunderbird will keep them open indefinitely. Unlike the other tools that require add-ons to protect you from phishing attacks, Thunderbird natively offers this feature. Like its brother Firefox, Thunderbird features a vast array of addons that can be used to extend its functionality. You can also configure it to block HTML messages, if you find them a nuisance.
VERDICT Claws Mail 7/10 Mailspring 10/10 Evolution 7/10 Thunderbird 8/10 KMail 7/10 Mailspring takes the lead because of some innovative offerings out of the box.
Filter and search Just like Hogwart’s sorting hat! Mail now offers users’ 15GB mailboxes. Yahoo similarly offers 1TB of storage space for your messages and attachments. While this is much appreciated, the downside to the vast storage space is that people no longer delete emails. Most email services now enable you to archive mails, or perform a similar function such that the Inbox is reserved only for important messages. This inevitably leads to massive mailboxes that hold tens of thousands of messages over the years. As you subscribe to more mailing lists and add more contacts, your mail client should make it possible for you to perform filtering operations to automatically sort the different messages into dedicated folders, or apply labels for easy identification. Just as important is the search capabilities, because looking for one particular email from your father from several years ago, when he routinely sends several in a day, can be a daunting ask. All the clients enable you to create different filters for each configured account. You can set these applications to perform a number of operations such as moving mail to specified folders and applying labels based on different conditions such as from, to, header, BCC, subject, size, attachments, and so on. When searching for messages, Mailspring provides instantaneous results, offering matching suggestions even as you
Despite being on a par with all the other three in terms of speed, KMail’s ‘find messages’ feature is disappointingly unintuitive.
type in the search box. You can also use advanced GMail-style search queries with the tool, such as ‘in:unread’, etc. Claws Mail can be quite slow when connecting to your existing mail account which already has thousands of messages. The search, although fast, lags behind Thunderbird and Mailspring.
VERDICT Claws Mail 9/10 Mailspring 10/10 Evolution 9/10 Thunderbird 9/10 KMail 8/10 While all the tools are fairly fast when searching, Mailspring has the edge.
October 2018 LXF242 27
Mayank Sharma can’t help you find your purpose in life, but he sure can help find a distribution for your purpose. inux, the kernel, by itself wouldn’t be of much use to most of us. Version 0.01 of the Linux kernel made its debut in September 1991, but it only made sense to a particular Finnish student and his ilk of uber-geek hackers. One of them, Owen Le Blanc of the Manchester Computing Centre (MCC), wrote a menu-driven installer to install the kernel along with a handful of GNU utilities, and in the process created the first Linux distribution in February 1992. This distribution allowed even non-Unix users to get a taste of Linux and helped roll in more developers.
32 LXF242 October 2018
Later that year Peter MacDonald created the Softlanding Linux System (SLS) distribution that offered a software collection on top of the X11 graphical interface, which had only recently been ported to Linux. SLS in turn spawned two major distributions. The first was Slackware created by Patrick Volkerding in July 1993. Over two decades later it remains the oldest Linux distribution that’s still actively maintained. The other was Ian Murdoch’s Debian. Although it had been in development for several months, v0.91 released in January 1994 was its first public release and included a simple package system that could install
and uninstall packages. The next major milestone in the Linux distribution timeline also happened in 1994 with the birth of Marc Ewing’s Red Hat Linux. Together these three distributions form the bedrock of the modern Linux distribution habitat. Although there have been other independent distributions such as Crux, Arch, Gentoo and Puppy, a majority of the current stock is an offshoot of the three oldest distributions. You’ll find hundreds of them on distrowatch, all vying for a slice of your hard disk. Over the next few pages we’ll help you sort through the lot and pick the one that’ll serve you best.
Name your poison What do you want to get out of a modern Linux distro? s users make their way to Linux, one of the first peculiarities they encounter is that there’s no single one Linux. The concept of distributions is fairly foreign to a majority of new users migrating from the shores of proprietary desktop operating systems. Longtime readers wouldn’t flinch at the fact that Linux is essentially just a kernel, but Linux, the operating system that most people refer to is actually the distribution: a collection of software consisting of the kernel and all the support programs that a user would need. On the face of it, all distros borrow from the same common pool of apps and libraries. However, a Linux distro is more than the sum of its parts. All distros, especially the mainstream ones, put in several hundred hours working on the open source components to tweak and polish them to suit their particular flavour of Linux. For a majority of projects, it takes a globally dispersed team of developers to engineer and ship a Linux distro. The popular distros go that extra mile to create a solid operating system experience, and write everything from installers to several critical programs and utilities to help manage the
How we tested Our distros have been tested against various parameters that vary from one category to the next. For instance, when evaluating a beginner-friendly product we pay attention to the custom tools and other tweaks that help increase the distros’ usability. That’s because a new Linux user needs to be handheld through everyday computing tasks as they get familiar with the lay of the land. While choice is the hallmark of open source, it’s a distraction to a first timer. A good beginner-friendly distro helps users by making choices on their behalf. Some go to the extent of forking popular apps to write customised versions that can be handled by newbies. Generally speaking, a distro aimed at the inexperienced user should be easier to use than your typical desktop distro. For server distros, our focus will be on their comprehensibility and ease of rollout and management. Like desktop distros, server distros are designed to work on various hardware configurations depending on how you plan to use them, but will perform best on 64-bit hardware. In contrast, hardware is a paramount factor for distros designed for older boxes.
installation. The top distros are also constantly evolving, some more than others. Some distros have the resources of cash-rich multinational corporations (Ubuntu, Red Hat, OpenSUSE) that fuel their R&D. Yet thanks to the nature of open source, that one factor alone doesn’t always help corporate-backed projects get a technological edge over pure donation-based, communitysupported (Mint, Debian, Arch) efforts. In this feature we’ve broken down the seemingly endless list of distros into five mostinquired categories that cover the top-use cases for deploying Linux, from the desktop to the business server and everything in between. Choosing a distro is an involved process, and this is why many users prefer to stick to the one they have set up and update it every six months or so. However, most distros, especially the more popular ones, are constantly evolving. A distro that fell out of favour for introducing a new feature in one release might score better than its peers when that feature stabilises in a subsequent release. Of course, we aren’t going to suggest that you keep hopping distros whenever a major player unveils a new version. But if you’ve been using the same distro for a while, it’s time to take a good look at the other options out there.
Conspicuous omissions We’ve deliberately avoided the contentious “best desktop” category, which frankly would just list: Ubuntu, Linux Mint, Fedora, OpenSUSE and then any one of a multitude of distros whose inclusion or absence will in turn enrage various groups! Debian is also very much absent despite its fine pedigree and foundational status in the Linux ecosystem. If we had a pure Server category this would clearly be in there (don’t start on us with Devuian–Ed) but hopefully this is an insightful list for those newer to the world of Linux distros.
Do it yourself We’ll also help you create your own distro. That would seem counterproductive given the myriad of excellent options on offer. The custom distros we’re talking about here are highly customised ones that you’ve tweaked as per your needs. Imagine converting your perfectly setup system into a live installable medium? Carry it with you on a flash drive or even install it on other PCs you use. Besides satisfying your personal itch, there are several other uses for a custom distro. You can spin one with programs that you use in school and pass it around to everyone in class, stuffed with class notes and other study aids. You can do something similar within a professional organisation as well that uses a defined set of applications. The possibilities are practically endless!
TOP 20 DISTROS
Beginner distros Deepin
An elegant-looking Debianbased distribution that uses an intuitive custom desktop along with a host of custom tools.
Its customised Gnome rendition will impress new and old desktop Linux users alike, but it has stringent requirements.
Another aesthetically pleasing distribution with beautifully crafted desktop and apps, only limited by its default cache of programs.
Its USP is the appearance altering tool that’ll make the Gnome desktop similar to that of Windows, which will comfort new users.
Its host of custom tools such as its software utility and welcome screen make light work of regular desktop tasks.
October 2018 LXF242 33
Interview Eleanor McHugh
Jonni Bidwell had never talked to anyone who programmed BASIC for helicopters. Until he met Eleanor McHugh…
The Code Less
Travelled 40 LXF242 October 2018
Eleanor McHugh Interview
Eleanor McHugh takes Jonni through the ups and downs of her eventful working life.
leanor McHugh describes herself as a privacy evangelist and freelance reality consultant. Her “accidental career” has seen her working on avionics, satellite comms, broadcast TV and, latterly, digital identity systems. She’s also a speaker at Ruby and Go conferences. We met her at the O’Reilly Software Architecture conference in October 2017 to find out more.
Linux Format: You’ve had quite an illustrious career path: trained as a physicist, worked on aircraft systems and are now involved with digital identity management. It’s quite dizzying just thinking about it. Can you tell us a bit more of your story? Eleanor McHugh: It’s a purely accidental career. When I went to university I wanted to go off and build rail guns. LXF: I can sympathise. EMcH: This was in the 1980s and there was huge amounts of money in Star Wars type projects [see Strategic Defense Initiative], and really I wanted to build rail guns and gamma ray lasers. Unfortunately, I spent too much time at uni hacking on computers and not enough time paying attention to electronics lectures. I disastrously ruined my degree the first time and had to resit it. At that stage, the only thing that I was qualified to do as a mainstream job was advise on the safety and control systems of nuclear reactors, which isn’t a particularly broad market. LXF: Hey now, if it’s good enough for Homer Simpson… EMcH: Yes, and I must admit I’ve watched him over the years and thought to myself, “If only”. But I don’t think I could be trusted with that responsibility in the long term. So after a couple of years of doing the kind of stuff you do when you finish uni and haven’t got anything to do, I figured that I’d spent all of my life playing around with computers anyway – I’ve been coding since I was about 11 – so I thought, “Why don’t I do that? How difficult can it be to earn a living as a programmer? They’d be paying me to do what I love.” Except that’s not really how it turned out. I drifted through an MSc, and then by
accident a friend was working on aircraft control systems. He invited me to do a very short project for three months that would’ve paid for my MSc. I needed a dissertation topic and I needed the money, and he insisted it would only be three months. So two and a half years later when I finally got out of that particular field I was a burnt-out wreck. Yet I had created something that I’m still incredibly proud of, but which shouldn’t exist: a cockpit navigation system written in Visual Basic 5.
Then I was sucked into this weird project by a friend. He was the CTO of an ISP based up in Camden – it was the only certified ISP that could do DNS registration. Because he was my best friend’s fiancé she bullied me into going to a project for him because he needed some work doing and couldn’t really afford it and I would do it on the cheap. Friends… they don’t care about your mortgage. He jumped ship from there because he got this brilliant offer to CTO another project
on wanting to join the arms race… “This was in the 1980s and there was huge amounts of money in Strategic Defense Initiative-type projects, and really I wanted to build rail guns and gamma ray lasers” LXF: I am at once impressed and terrified. EMcH: It was certified for use in emergency service helicopters in Derbyshire, Durham and Strathclyde. Real lives being saved by this damned thing I made. As I say, I emerged from that a burnt-out wreck. I think a lot of people’s first programming job was like this: working stupid hours, not sure what you should say no to. So I drifted through a couple of projects with a team doing satellite communications, then over into real-time broadcast control networks for television. I got burnt out on that, too: four years of dealing with a client who was very, er, special left me not wanting to deal with people any more. I think I went for about seven months without speaking to anyone.
with another company. I was left behind with this thing, they just sold the company, and the people that bought it didn’t want to build it. I didn’t really want to build it either. But they did want to keep paying me for three months so that they at least had the option to build it. In that time he put together this team to work on something called dotTel. The idea was that ICANN wanted to prove DNS that could be used for more than just looking up machines. So it was really the start of the whole move toward novelty domains. I think at the time they were called sponsored gTLDs. And it was a totally mad project, because what they really wanted to do was take a global address book system, which they wanted to implement as an
October 2018 LXF242 41
in-depth Game engines
The pixel-doubling option is handy if you don’t like squinting at tiny explosive barrels and other sprites in OpenRA.
Open Source Game Engines Like the Revenant in Doom II, Jonni Bidwell brings the corpses of lost video games back to life with a lil’ bit of FOSS magic
one of us at Linux Format are as young as we used to be. But our considerable collective age means we remember some fantastic games. Some of these go way back: Exile, Elite, Repton, The Last Ninja on the BBC model B, Uridium and Maniac Mansion on the C64. Most of us spent most of our youth playing Amiga games, Monkey Island taught us how to swordfight, and who could forget those Bitmap Brothers
46 LXF242 October 2018
classics: Xenon 2, Speedball 2 and The Chaos Engine? Just talking about them makes us want to fire up an emulator and relive those halcyon days. But emulation can be clunky, and getting hold of ROMs and the like is tricky. Even playing early PC games through DOSBox can be troublesome. Thanks to the magic of open source though, we can do better. Many classic titles have had their game engines reverse engineered or revamped, so that the original game
assets can be used seamlessly on a modern system. This can make for a completely authentic experience, or allow new features (better graphics, proper network play) to be added. More importantly, it enables us oldies to show those young whippersnappers what gaming was like back in the day. Before the days of running around in a slick 3D environment, chasing in-game purchases, and learning to swear in Russian by listening to in-game chatter.
Game engines in-depth he LucasArts adventure games have achieved legendary status. Its first graphical effort, 1987’s Maniac Mansion, set a new standard for the genre. The game featured a bespoke scripting engine, imaginatively titled Script Creation Utility for Maniac Mansion (SCUMM), which provided high-level routines for common game primitives: characters, locations, dialogues and inventory. This not only made coders’ lives easier, since they could work with humanreadable scripting commands rather than assembly, but also made the task of porting the games much easier, since this only required porting the engine to the new platform. The SCUMM scripts and game assets could more or less be used as is. SCUMM came about because many of LucasArts’ programmers were originally mainframe1 programmers, and found it much easier (and faster) to compile code on those machines before porting it to the native platform. By writing clean and portable code for SCUMM, coders Ron Gilbert and Chip Morningstar afforded themselves the luxury of being able to write in a flexible scripting language that could be rapidly compiled for multiple platforms: the C64, Amiga, Atari, PC and Mac. SCUMM also made possible all kinds of things never before seen in adventure games: point ‘n’ click gameplay, multiple characters and background tasks/animations. It was arguably the first game engine, in the sense that it decoupled game assets and gameplay. Amazingly, with only modest modernisations, SCUMM would go on to power a decade of adventure games. These included the Monkey Island series, Loom, Day of the Tentacle, Full Throttle, The Dig and more. Now, picture yourself back in the early 2000s, and suddenly you want to relive those memories of playing Monkey Island 2: LeChuck’s Revenge, but without the wrist ache that came with swapping the 11 disks that housed the Amiga version. Well, that game had a DOS release so you could probably get it working in Windows XP, but no, even back then you were pretty militant about using Linux, so that won’t fly. DOSBox had just been released, but so had an ambitious piece of free software called ScummVM, which reimplemented SCUMM natively, not just for one game, but for a whole bunch of them. Even in its infancy, this amazing software caused a stir amongst Linux gamers (all three of them), since it provided another avenue for Windows (and Mac) titles to be played on Linux. ScummVM came about as a result of one Ludvig Strigeus’ desire to better understand adventure game engines, so that he could write his own. He started by reverse engineering Monkey Island 2 and eventually
Once you’ve got the game’s file you’re exactly one click away from a quick Skirmish in Command and Conquer.
The small matter of legalities Dabbling with emulation and the like can fairly rapidly lead to legally murky waters. In the US copyrights last for 75 years, so even ROM files of early arcade games are off-limits. Even if you own an original copy of the game on one platform, you’re not entitled to download another (getting data off Amiga formatted disks requires special hardware, for example) for use on an emulator. Just because a title is no longer available doesn’t entitle you to download it. However, old PC games are readily available for cheap on auction sites, fairs and stoop sales (which is like a yard sale if you live in Brooklyn). The century old “first-sale doctrine” covers this legally. For older titles you’ll need a USB floppy drive, and apparently computers now don’t come with optical drives either so you might need one of them, too. For the reinvented game engines under consideration in this feature, we’re only interested in getting the asset files from the original media. This circumvents any DRM issues we may run into if we were running the original binaries. OpenSC2K was a remake of the classic (and dromedary-jokepacked) Sim City 2000. Alas, in July GitHub received a DMCA takedown notice that obligated it to take the OpenSC2K repository offline. That repo included assets from original game, and since Sim City 2000 is still sold by EA for about £5 (though the company has offered it for free in the past) the project soon attracted the attention of EA’s legal team.
came up with an interpreter capable of playing the game. This would be the first version of ScummVM. Meanwhile Vincent Hamm was independently tackling SCUMM from a different angle, by investigating the scant documentation available online and investigating the scripts inside Maniac Mansion and Zak McKracken and the Alien Mindbenders. The two combined their efforts and worked on ScummVM, somewhat haphazardly at first. However, interest in the project skyrocketed when it was featured on Slashdot a
Lucasarts done good “SCUMM was arguably the first game engine, in the sense that it decoupled game assets and gameplay” popular thing of the time called a website, and a slew of developers wanted to join the party. Initially, ScummVM was written in C and supported a handful of games: Monkey Island 2 (how the project began), Zak McKracken and the Alien Mindbenders and Indiana Jones and the Last Crusade. The master source tree was stored on Strigeus’s machine and Hamm would contribute there. By 2002 the project had been rewritten in C++, which brought portability, and supported tens of SCUMM games, and even a nonSCUMM adventure: Simon the Sorcerer. This led to some naming controversy, but in the end the original name stuck. Today, ScummVM supports hundreds of games and tens of engines: Sierra’s AGI and SCI interpreters, Coktel’s Gobliiins (sic) series, and Revolution Software’s Amiga classic Beneath a Steel Sky (which is available for
October 2018 LXF242 47
TutorialS ISBN information
ISBN Book Wizard
Get more from books
Les Pounder reveals how we can scan our collection of books and learn more about them, using ISBN data and GUI Zero. ooks come in all shapes and sizes but what they have in common is a unique reference number called an ISBN (International Standard Book Number) that acts as a unique identifier. In this project we’ll learn how to search ISBN numbers using a Python GUI application and then check how much the book is selling for online. Set up your Raspberry Pi and power up to the Pi desktop. Insert your USB barcode scanner, and it should be set by default to scan a code and automatically “press” the Enter key. If not, there should be a sheet of barcodes with your scanner that can be used to program the scanner. Test your scanner by scanning barcodes into a blank text document. To install the Python packages that we’ll use in the project, open a terminal window and enter the following command, followed by Enter.
Our barcode reader was from Amazon for around £40 and it’s quite basic. You can pick up more advanced and specialist readers that can also handle QR codes, which are great fun to use!
our expert Les Pounder is a freelance maker who works with organisations such as the Raspberry Pi Foundation to promote maker skills. Read his blog at bigl.es.
$ sudo pip3 install isbnlib guizero
Close the terminal and go to the main menu, click Programming>Python 3 to open the editor. Once the editor is open, click File>New to open a new blank file. Now click File>Save and call the file bookscanner.py.
Coding the project Our first two lines of Python are imports, these are libraries of pre-written code that enable us to do more with Python. In this case we import the isbnlib to enable Python to use ISBN data, then we import a library to enable our code to create a web browser session. Finally, we import certain classes from the guizero library. These classes handle creating apps, text, buttons, boxes to store text, and extra windows.
You need Any model of Raspberry Pi The latest version of Raspbian An Internet connection for your Pi A USB barcode scanner Code: https:// github.com/ lesp/LXF242/ archive/ master.zip
import isbnlib, webbrowser from guizero import App, Text, PushButton, TextBox, Window
Next we create a global variable (a variable that can be used inside and between functions) that will store our 13-digit ISBN number: global ISBN13
Our project is made up of three functions, which will later be called in the application. GUIZero, the library we are using to create the application, uses functions to trigger events when a button is clicked, and because we have three buttons, we need three functions. The first is called update_details and it’s used to get the book details and display them in the GUI. We start by defining the function: def update_details():
We reuse the global ISBN13 variable, before creating a new object called book, which will store the value entered into a Textbox that’s used to capture input:
52 LXF242 October 2018
global ISBN13 book = input_box.value
Our first use of the isbnlib is to download the metadata (book information) and store it in the object book_meta, then download a description of the book: book_meta = isbnlib.meta(book) description = isbnlib.desc(book)
Meta is as meta does From the metadata stored in book_meta, we need to extract relevant pieces of data, namely the title, author, year of publication and the full ISBN13 number. All of this data is stored in the book_meta object as a dictionary, and so to pull data from the dictionary we need to supply a key. In this case it’s the text in square brackets. For example, [“Title”] will give us the name of the book. The only exception to this is for our Author, as we need to supply an index number for the list contained inside the dictionary: title = book_meta[“Title”] author = book_meta[“Authors”] year = book_meta[“Year”] ISBN13 = book_meta[“ISBN-13”]
We now create a new object called details , and use that to create a new GUI window application, which has the title of the book and the author name as its title. We also set the width of the window to 700 pixels, and set the layout to use a grid system: details = Window(app,title=title+” “+author, width=700, layout=”grid”)
We shall create a space in our window for publication data and author details. We create sections using Text,
Claire Wicher founded CodeUp UK in 2015, a code club for adults that run across North West England.
pi PROVIDES A GLIMMER OF HOPE Five years ago the government introduced a computer science curriculum; a positive move for an increasingly digital nation. But while the UK is facing a huge skills shortage, the number of students taking the subject is declining. While the nation struggles to resolve its digital crisis, one glimmer of hope for our future is the Raspberry Pi. Aside from being affordable, it’s a fun way of making hardware and programming accessible to young people of all ages. As exciting as coding is, it’s when combining the Raspberry Pi with physical computing projects that the mini computer comes into its own. I’ve run over a hundred sessions on physical computing for young people and adults over the past few years. Nothing beats that moment where your learners go from feeling overwhelmed to flashing their first LED or making their first ‘thing’. For those looking to pursue their learning further, the Raspberry Pi community is one of the most engaging and nurturing groups I’ve ever come across. It’s not uncommon for a course leader to learn something new from a young attendee, as people of all ages share knowledge and ideas freely. It’s because of initiatives such as the Raspberry Pi that we can have confidence in the future of technology. Where the Raspberry Pi paved the way for other educational technologies to incite the UK’s youth with passion for technology and problem solving, it also continues to be a pioneer in innovation and learning for both students and educators across the world.
50 LXF242 October 2018
Power Over Ethernet is finally released Everyone loves a good HAT and no one more than Raspberry Pi users. They’re a stylish lot! core new feature of the Raspberry Pi 3 B+ was the ability to deliver power to it over a wired Ethernet connection, known in the biz as Power over Ethernet, or PoE. It was announced back in March 2018, and six months later the HAT (Hardware Attached on Top) that enables people to use the feature has been released. The new HAT is different from most other add-on Pi HATs in that it’s stackable. The board connects to both the 40-pin GPIO and the
four-pin header for the PoE. The HAT is singlesided, which ensures that it fits within the footprint of the Pi once it’s installed within the official Pi case. A 25mm fan has been included, which is designed to assist with overall system cooling. The fan is controlled over I2C (so no GPIO are used) via a small ATMEL processor. This means it can be temperature-controlled and this is user definable, so it’s not always on. To enable this you’ll need to get the latest firmware ( sudo rpi-update ). To stack HATs on top you’ll need to buy longer pass-through headers to expose the pins on the other side of the PoE HAT. You will need one for the 40-way and one for the four-way connector that has the PoE splitters on it. Find out more details by visiting www.raspberrypi.org/products/poe-hat. Six months after the initial announcement, Power over Ethernet arrives on the Pi.
CREDIT: Raspberry Pi Foundation
Support comes with v1.9
Roll up, roll up!
oogle has been supporting the Raspberry Pi in all sorts of ways and it remains at the cutting edge. While Tensor Flow could be made to run on the Pi, it wasn’t easy. So it’s amazing news that with the v1.9 update Tensor Flow can be installed with just two commands. More information at http://bit.ly/LXF242flow.
3 October: Leeds JAM 6pm to 8pm Dixons Unity Academy www.facebook.com/LeedsRaspJam
6 October: York Pi Scratch Course 11am to 15pm Tang Hall Explore Library, York https://yorkpijam.com 13 October: CornwallTech JAM Cornwall College Pool, Redruth www.cornwalltechjam.uk 20 October: Beeston JAM Beeston Library, Nottingham. 12.30pm to 3.30pm https://twitter.com/ beestonrjam
Tutorials Visual explorations
Making glitched art
Alex Cox shows how you can make pictures pretty(ish) using audio filters. he German artist Joseph Beuys once said “Everyone is an artist.” He didn’t mean it literally – that’s the thing with lasting quotes, they’re rarely entirely straightforward – but figuratively; everyone has within them the essence of an artist, the ability to create. You can be artistic with everything you do, and with all the tools at your disposal. So let’s create, and get a little silly, with a tool that’s absolutely not meant for visual art in the form of Audacity. You’ll know Audacity as that stalwart, ubiquitous, fully featured audio editor and recorder. It’s possible that it’s already been installed along with your distro. If not, grab it from your package manager, because it’ll certainly be included in the official repositories. The idea here is that we’ll go completely rogue and open up an image file in Audacity, apply some suitable filters, then open up our adulterated image to see the results – tweak and repeat until the results are pleasing.
our expert Alex Cox always uses the wrong tool for the job. Once he went for a night out in Bath wearing actual beer goggles. Things got very messy…
Presenting the prerequisites
Audacity isn’t limited to the plugins it ships with. You can add LADSPAcompatible effects: visit www.linuxsound.org/ ladspa.html for more details.
There are certain conditions to making this work, though. One is that we need to use a straightforward image format. Attempting to run audio filters on compressed formats like JPEG will corrupt the image entirely, and tagged formats like TIFF will similarly go wrong. We’ve found the best results come from Windows Bitmaps, which store pixel data in a simple array – shifting this around tends to work just fine. Another caveat, though: the BMP format includes a header at the top of the file. It doesn’t actually do a lot, but mess with it and you’ll render your image unreadable, so it’s important to confine your filtering to the meat of the image. There are also a number of audio filters that jumble the bits of the source image so severely that the results will be nothing but visual noise – if the image works at all – so we’ll take you through a few that we’ve confirmed working, but beware that
certain operations simply aren’t going to work. It’s all about experimentation anyway: there’s little way of predicting what your results will look like, at least until you’ve done a little experimentation of your own.
The right image
With Audacity installed, you’ll probably also want to install and load up GIMP and convert your images to the correct format. Open your chosen image, then use File>Export As to convert them. For best results we’d recommend saving in the Windows BMP format, then, after clicking Export, expanding Advanced Options to switch it to 24-bit format. You’re welcome to try other variables, as different data structures can give different results depending on the effects you apply to them. Now to open it up. In Audacity, go to File>Import> Raw Data, and set the encoding to U-Law (which should really be written µ-law, or mu-law, but we’re not here to pick holes [speak for yourself – Ed]), the byte order to Big Endian, and pick a single mono channel before clicking Import. You now have your image converted to a waveform in Audacity. Don’t listen to it – it sounds, understandably, absolutely awful – but it’s ripe for the glitching. Use Ctrl+A to select the whole track, then drag the left edge slightly to the right to avoid the header. Now to completely mess it up. Head to Effect>Echo, stick with the default values, and click OK. You’ll see the waveform subtly change. Now export your newly filtered image using File>Export>Export Audio. Change the format to Other Uncompressed Files, select RAW (header-less) as the header, and the U-Law encoding as before. Change the file extension to .bmp, hit Save, then accept Audacity’s warning that you’re saving to an odd file format. Click OK when Audacity asks for meta tags, as we don’t want to add this. Head to the location in which you saved your file, and open it up. You should (all being well) find it opens fine and is pleasingly corrupted. If it doesn’t open, it’s possible you nicked the header area with your effect – try again, this time giving Audacity slightly more headroom on the left edge of the waveform.
Different file bit-depths will lead to different results. Here’s the exact same echo filter run on 16-, 24- and 32-bit bitmaps.
58 LXF242 October 2018
Echo is a reasonably extreme alteration – try the Delay filter for a similarly eerie (and more tweakable) effect. And don’t be afraid to pull the sliders around to change the way these filters interact with your images. For a more subtle effect – okay, perhaps it isn’t that subtle – try running the invert filter. It doesn’t have the same effect as inverting the colours within GIMP – you end up with a bright, fairly radical interpretation of the colours within your original image, with many of the colour
Migrate your new ThinkPad to Linux
Armed with a new Lenovo ThinkPad T580, John Lane takes a backup, installs Ubuntu and legally virtualises Windows… enovo’s ThinkPads are the world-famous business portables with the IBM heritage, with the T series being the traditional ThinkPad laptop range. Lenovo claims they’re as tough as nails and reliable enough to keep you productive in any environment, thanks to their MIL-SPEC construction. And they’re great Linux machines, too! In this tutorial we will install Linux on a new ThinkPad and virtualise its Windows license after taking a system backup, just in case we ever want to return the laptop to its shipping condition. You’ll need at least one USB stick of at least 16GB, but you’ll find it handy to have two or three to use for different bootable images. There are various ways to back up your ThinkPad; you could use: A live Linux USB stick; The Windows Recovery Drive tool; or The Lenovo USB Recovery Creator tool. The first option is useful if you want to take a backup before Windows gets a chance to start or if you’ve had the ThinkPad a while and have been using it, installing applications and storing your own files. The recovery options require that you are in Windows and they are explained in the box on the facing page. Recoveries provide a way to factory reset the ThinkPad, but they are not a complete backup solution because
our expert John Lane consults and writes about Linux. Now on a ThinkPad, in the garden, with a beer…
they don’t include any applications that you’ve installed from third parties, nor your files and data. An alternative is to forego all of the above hassles and use a clean Windows 10 ISO image, downloadable for free from Microsoft, as the basis of any recovery strategy. The main omissions from this approach are Lenovo Vantage, a support application you can download from https://vantage.lenovo.com and a trial install of Microsoft Office, which is freely available from Microsoft anyway. You may also miss out on some other bloatware of little importance. Backing up with Linux is the most flexible and there are many options. All require booting a live distro from USB, which is also how you can try Linux without installing, and how you install it when you’re ready. But we must first overcome one of Microsoft’s evil demons because it prevents us entering the BIOS or booting from a USB stick, and we need to do both to get Linux started.
Not too fast now… Fast Startup is a recent Windows feature (first seen in Windows 8) that gives end users the illusion of a fast boot time but, in reality, windows never actually shuts down; users are logged off but the system then hibernates, a state known as ACPI Sleeping State 4 (or
The ThinkPad is delivered in a hibernated state so it quickly launches into Windows when switched on.
Windows does its best to prevent you seeing this menu.
60 LXF242 October 2018
Tutorials Virtual private networks
Protect your identity with the VPiN Adam Oxford turns an old Raspberry Pi in to a VPN gateway for your home. aring about your online privacy and actually following best practices to protect it are two different things. As Linux Format readers, it’s likely that you know the principles of what we should do to avoid the great data collectors and geo-locators in the sky, but maintaining constant vigilance is an effort that soon gets tiresome, if not downright impossible. For example, you know that you should be using a VPN to avoid ISP-level filters imposed by various pieces of UK law. Setting up and using a log-free VPN service from your Linux desktop is straightforward enough, but what about all the other devices in your home? For example, if you use a games console to watch iPlayer, Netflix or YouTube on your TV, how do you route traffic from there effectively? No consoles have built-in VPN software. There’s no app in the PlayStation store. One solution would be to buy a router that can connect directly to a VPN service, protecting all the traffic on your home network a single stroke. Or, if you have an older router, to modify it with an OpenWRT (see LEDE in LXF234) firmware and add controls such as these in. Or, if you want cheaper and more straightforward solution, you could use a Raspberry Pi…
our expert Adam Oxford spends his time between writing, teaching, mentoring and camping in the South African landscape.
Pi right there
Want the VPN to start whenever the Pi boots up? Use this command: sudo systemctl enable openvpn@ example. service, where example is
the name of the .conf file you want to connect to (excluding the filetype).
With just a few fairly simple scripts, you can configure any Raspberry Pi to be a headless VPN gateway. This means that when it’s connected to your router, you can send traffic to it from other devices before they connect to the outside world – essentially putting them behind a VPN. Here, we’re using a first generation Pi – it’s a nifty repurposing of a piece of kit that’s past its sell-by date for most other common Pi-related projects. To get started, you’ll need four things. A Raspberry Pi, an SD card preloaded with the Raspbian operating system and a subscription to a VPN service of your choice. We’re going to use Nord VPN, which assures us that it doesn’t log user behaviour or filter for particular activities such as P2P protocols. There are services that promise even more anonymity, or are more affordable, but Nord is a good place to start investigating options. The fourth thing you’ll need is a copy of your provider’s OpenVPN configuration files and encryption certificates. There are usually a lot of these – one for each server you can connect to – so pick a handful that you want to be able to quickly access. We opted for two
64 LXF242 October 2018
This is the network setup screen from your games console.
UK and two US servers, choosing one that supports the UDP protocol and one that supports TCP/IP. You should find these configuration files on your VPN provider’s website. Download them and unzip them into a folder on your desktop.
Install packages We want our Pi to be running headless, in other words without a keyboard and monitor attached, which means that once its up and running we’ll need to access it using a remote shell and SSH. For the first run it can be easier to access the Pi directly by plugging in peripherals, at least until you have made sure it has a fixed IP address on your network, which is essential for this walkthough. To do that, open a terminal on the Pi desktop and type sudo nano /etc/network/interfaces . Edit this file to look like this (you can choose any free IP address for the line that ends in 12, bear in mind that the 1 in the third part of the address could be another number). auto lo iface lo inet loopback auto eth0 allow-hotplug eth0 iface eth0 inet static address 192.168.1.12 netmask 255.255.255.0 gateway 192.168.1.1 dns-nameservers 188.8.131.52 184.108.40.206
Press Ctrl+O to write out the file, and then press Ctrl+X to quit nano.
Learn to compose and record better Is it a kind of diet Ardour or an all-powerful multi-track sequencer? John Knight explores the intriguing sound editor Qtractor. or those not in the know, Qtractor is a Qt-based (https://qtractor.sourceforge.io), Linux-only Digital Audio Workstation (DAW) designed around JACK. However, the term DAW may put readers on edge, as Qtractor was meant to be a MIDI sequencer with some DAW features, but it’s safe to say the project has gone way beyond that! Qtractor is a big program with many components and possibilities, so we’ll barely be able to scratch the surface. Nevertheless, we can at least show you the basics so you can hit the ground running and take it further yourself. The best way of tackling this beast is probably to start with tasks of lower complexity and slowly build up to something more advanced. Before you can get started there are a number of things to take care of. Firstly, you need to have JACK working correctly. JACK is a complex system (try Ubuntu Studio–Ed) that opens up a whole new can of worms, so we’ve given it its own separate box rather than bore you with it here. Mercifully, once JACK is set up it will retain your settings and you needn’t touch it again. Qtractor also has the thoughtful touch of starting JACK automatically for you – unlike most JACK apps. While we’re here, please open your software manager as well, as there are a lot of plugins and external programs you’ll need along the way. Chiefly, you’ll need QjackCtl, and you should install jack-keyboard if you plan on recording MIDI without an external device. We’ll also refer to numerous plugins and effects. Qtractor supports LADSPA, DSSI, VST, and LV2 plugins, plenty of which can be found in your software manager, but also online. We would normally be selective, but unless drive space is at a premium, you may as well install every plugin you can find! Finally, please do a quick check of your levels before we get started. It doesn’t really matter what sound source you are using – shouting into your internet microphone will do for now – but please check that it’s working properly and will record in something you already know and trust. Now, let’s get started…
our expert John Knight when he’s not laying down a sick drum beat, he’s pontificating about how gaming will help Linux take over the world!
If you’re serious about sound editing, use a dedicated PC for the job. Keep the nonaudio hardware simple: you don’t need an ultra-powerful CPU; on-board video will be fine – save the PSU watts for the sound card.
The easiest task in Qtractor is recording basic wave audio, so let’s start with some simple multi-layered
68 LXF242 October 2018
Once you have MIDI recording enabled you can use Qtractor’s lovely piano roll editor, which will be familiar to anyone who has used Rosegarden or LMMS.
recording. By default Qtractor will start in an empty session, ready to go, but it will be easiest if you save now before going any further – this way you can name the project, set the tempo, and so on. From the main toolbar click File > Save As. In the new Session window that appears you will be given fields for the name of the project, where to save it, and somewhere to write a description. Before you click OK, open the Properties tab and you will find two important controls: Tempo, and Snap/Beat. Tempo lets you set the BPM and time signature of the project, and the Snap/Beat function will let Qtractor break your tracks down into cool workable chunks – more on that later. Looking at the interface, there are three main panels and a messages bar. On the left is where all your tracks are listed and controlled. In the centre is the main editing field where you will record and manipulate audio. And on the right is the file list, where you can preview tracks and drag them into the editing field. To record a new piece of audio, first create a new track. You can do this by either right-clicking in the track panel or clicking Track in the main menu, either of which will give you a menu for choosing Add Track. This will open a new Track window. From here you can change the name of the track, choose whether you want Audio or MIDI, add plugins, and define your inputs and outputs. Don’t worry about these other options yet, for now just choose Audio from the Type field and press OK. You will now see a new track, ready for you to record in.
Tutorials Munin and Monit
Munin and Monit
Monitoring advanced users and admins
Mihalis Tsoukalos explains the necessary things that you need to know to start using Munin and Monit for monitoring your Linux servers. onitoring is what separates professional system administrators from amateurs and it can save you lots of time and energy. This tutorial is about Munin and Monit and how you can use them to monitor a Linux system – you will certainly appreciate the simplicity of the Monit setup process and the elegant output generated by Munin. Although software like Munin and Monit will make the job of Linux monitoring easier, the most difficult thing is deciding what to monitor, which mainly depends on the tasks and the configuration of the Linux server.
our expert Mihalis Tsoukalos has forgotten more things than you’ll ever know!.
Find out more about Munin at http://bit.ly/ LXF242munin, and Monit at http://bit.ly/ LXF242monit. And head to http://bit.ly/ LXF242mundoc, http://bit.ly/ LXF242md1 and http://bit.ly/ LXF242md2 for documentation.
Munin is software that generates pleasing and informative graphics about the operation of a Linux machine. Monit, on the other hand, is an easy to install yet powerful monitoring program that checks the availability of various Linux services such as Apache, Postfix, and MySQL, which, if you wish, it might restart if it finds out that they are not behaving as expected or that they are down. Therefore, combining Munin and Monit gives you a handy way to monitor both the operation and the services of a Linux machine. It should be clear by now that Munin is for observing the operation and the system resources of a Linux
Figure 2: llustrates the use of munindoc command that helps you find information about the plugins of Munin and has support for autocompletion.
72 LXF242 October 2018
Figure 1: Shows the initial screen of the Munin site as served by the Apache web server and created by Munin.
machine in order to avoid potential problems and Monit is better at protecting the services of a Linux machine from malfunctioning. Note: although Munin can monitor more than one Linux server, this tutorial only explains how you can monitor the machine that Munin runs on. It is now time to install both Munin and Monit before continuing with more practical topics.
You can install Munin and Monit on an Ubuntu 18 Linux system by executing the following with root privileges: # apt-get install munin munin-node munin-pluginsextra # apt-get install monit
The first command installs Munin and various Munin plugins as well as a plethora of Perl packages whereas the second command installs Monit. You can find out the version of each one of the two programs as follows: $ munin-node --version Version: This is munin-node v2.0.37-1ubuntu0.1 $ monit -V This is Monit version 5.25.1
The output of the previous two commands also verifies that Munin and Monit have been successfully installed and that you are ready to start using them. You can start Monit by executing systemctl start monit . The Munin server process can start by executing systemctl start munin-node . Both Monit and Munin will start running and monitoring things provided that they are appropriately configured – we will get on to configuring Monit and Munin a little further on.
PowerShell on Ubuntu vs grep on PDP-11 Microsoft (and Canonical) keep on bringing Windows technologies to Linux, Valentine Sinitsyn reports. Or are they just telling old tales in a new way? emember those old April Fool’s news stories about Microsoft releasing some of its goodies for Linux? Internet Explorer in RPM seemed too ridiculous to fool even a zero-day Linux newbie, yet it was a trend around 2000. While it’s true that Internet Explorer or Microsoft Office for Linux have yet to be seen; frankly speaking, we don’t miss them too much. But on the server-side, Microsoft’s attitude obviously changed some years ago, and yet another, Microsoft-
Getting older our expert Dr Sinitsyn is a cloud infrastructure developer at Yandex by day, an open source contributor by night, with interest in everything from AH to X509.
“That’s old hat. Don’t do it.” How many times a day do you hear these words as an IT specialist? But what exactly makes a software technology age? In the real world things are simpler. Old cars consume more gas, pollute more and run slower than modern ones. Old hats (yes, the real old hats) go out of fashion, yet you probably only have to wait a few years before they’re back in vogue again. Some things – like the Mona Lisa, for example – don’t age at all. Put simply, an old something either doesn’t perform as well as a new one, or it doesn’t age. Here, “perform” might mean a measurable quantity such as speed or (more often) someone’s personal impression of such a quantity. In a virtual world, things are different. The ed editor would perform on your box much faster than on an original PDP-11. Brian Kernighan still uses it “very occasionally”, but I doubt many of us out there do the same. Yet we are happy to run Vi (OK, Vim), which is only marginally younger, by IT standards. At least it doesn’t use Electron. What is it that makes the difference? I believe two things are important here. The first one is your expectations. While you can still edit files in ed, you’d expect the editor to show you not only a single line, but the larger piece of text and a cursor to move around. That’s something which didn’t exist at the time that ed was born. And another reason is something that doesn’t exist anymore: you don’t want the kernel to support hardware architectures that are no longer in production. Everything else is fashion, just as in the case with your hat!
76 LXF242 October 2018
baked, open-source project doesn’t make too much of a buzz. Really, with Microsoft releasing Azure Cloud Switch (essentially a Debian-based distribution), hell must have frozen over, so why bother? Yet one recent release caught our eye: PowerShell Core is available as an Ubuntu Snap. It may not be so exciting technology-wise – PowerShell has been open source since 2016 – we feel this is conceptually important. In case you’ve missed it, PowerShell uses the same building blocks as the Unix command line: commands (called ‘cmdlets’ here) and pipelines. But instead of passing raw lines of text, cmdlets exchange typed .NET objects, so you never need to ‘parse the output’. So in some sense, this addition closes the loop: a Unix-inspired technology has landed on Linux, revised. We don’t think PowerShell is going to replace Bash or Zsh (and it doesn’t aim to) and yet this mix of ‘old new technologies’ was what made us try PowerShell on Linux. Not everyone welcomes Microsoft embracing Linux. For those of us on that side, there is a similar story. PowerShell might sport object pipelining, but do you remember where pipelining itself comes from? In a July 2018 interview with Computerphile, Brian Kernighan, the man who coined the term ‘Unix’ and the ‘k’ in Awk, remembered the origins of grep. PDP-11 was a rather resource-constrained system, which made the stream transformation model where you don’t need to store the complete output very promising. In a nutshell, grep was a stand-alone version of the “g/re/p” command in ed: it took a regular expression (/re/), matched lines globally in a whole file (g) and printed them (p). If this sounds old school, consider the following: grep was born to aid analysing newspaper articles which date back to 1800s! This twist in a history shaped how we use Unix tools today. And these tools, in turn, inspired new tools and languages - including both PowerShell and Perl.
PowerShell feels a bit like osquery (LXF232), but is in theory much more capable. Waiting for Get-Service on top of systemd, though.
The best new open source software on the planet
Alexander Tolstoy tends to prefer silence over performance and therefore downclocks his high-end video card.
Zanshin Radeon-profile Marker Tremotesf LibreSprite LibreOffice Socr Pale Moon ImageFeatureDetector Freeciv Doom Retro Task manager
Zanshin Version: 0.5 Web: https://zanshin.kde.org any KDE users get nervous at the very mention of the word akonadi and prefer to turn this information management service off. Despite this prejudice, Zanshin – a Plasma-centric organiser – works like a charm and proves that Akonadi is more useful than you might expect. From the end-user perspective, it looks like a neat, smart and superproductive tool for getting things done. Zanshin is powerful, yet it has a very low entry barrier, which means that you just launch it and start adding new items instantly. The design of Zanshin implies integration with a resource entity such as Google Calendar and Tasks, Microsoft Exchange Server, a DAV groupware resource, or a local iCal calendar file. Once you’ve added the resource, you can add projects and contexts (semantic links) and populate it with your items. An item is simply any string you type in the central part of the Zanshin window, just like in a chat. An item can have both a start date and a due date and you can also set it to recur at set intervals – daily, weekly, monthly, and so on. It’s better to experience the workflow than to describe it, so if you feel you need a helping tool for putting things in order, Zanshin can be a perfect companion. The application features an ‘Inbox’ folder where you can receive to-do tasks from other sources. For instance, this will integrate with KMail and lets you turn an email into a task in your mailbox and see it later in Zanshin’s inbox. There’s a simpler path, though, too: just press Alt+F2 and write anything with the ‘todo:’ prefix, and this will also work. As long as Zanshin has ties with KDE PIM and KRunner, it benefits from running in Plasma, but it still keeps all its core features elsewhere. The reason Zanshin is so effective is because of its design, which guides you the right way and keeps everything tidy, without any chance for a mess. Recently Zanshin became a part of the KDE Applications bundle, so most Linux distros already have it and you don’t need to bother building it from source.
Zanshin integrates nicely to the KDE’s heads-up display and provides a quick way for writing down your thoughts and tasks.
Explore the interface of Zanshin... 6 3
Tha main tree The core structure of your pages, such as projects, contexts and also the global inbox.
Edit tasks The Editor panel lets you add extra text and describe your task in more detail.
Sources of information Add your Google Calendar, Microsoft Exchange or Kolab Groupware server, iCal file or stick with a basic local calendar.
Schedule your tasks Set the start and due dates, and choose the recurrence type (daily, weekly, and so on) so your task can be started.
The main task list Type something at the bottom and see your text appear above in a task list.
Control tasks’ completion The thin blue line expands into a small top panel with the ‘Stop’ and ‘Done’ buttons.
October 2018 LXF242 81
Coding academy coding academy Automate the shell
Learn to automate the Shell with custom GUIs Mark Chisholm shows you how to use whiptail to spruce up your shell scripts by adding a user-friendly and easy-to-use GUI. ou’ve probably heard the phrase “the Linux command line is very powerful” and if you’ve ever wondered why that gets said so often, it likely has a lot to do with shell scripting. This in itself is a great thing because all of those CLI tools and programs you use can be scripted. However, you can go a step further with shell scripts and make them with a graphical user interface. Let’s face it – a lot of people prefer a GUI and yet a lot of Linux diagnosing, troubleshooting and maintenance takes place in the command line. Whiptail enables us to get the best from both worlds. It makes it possible to create everything you need to install a Linuxbased OS to a hard drive, or create a diagnostic and maintenance shell script. And now that we’re going into shell scripting, hopefully now you can feel a lot more comfortable in the terminal emulator if you know how to automate the shell.
our expert Mark Chisholm hasn’t needed to do maintenance on any Linux system because it’s all done with shell scripting and with whiptail even looks good, too. Bonus!
History of the Shell
If you’d like to take a look at the inspiration behind this article and where a lot of the code comes from you can find it at https:// github.com/ MorpheusArch/ LinDiag.
The Unix shell is the command line interpreter that gives the user a traditional Unix-like command line user interface. The shell is what we’re scripting, so it’s worth knowing a little of the history behind it. A popular shell that’s present by default in a lot of Linux distros is Bash, which began as the Bourne Shell, written by Stephen Bourne in 1977. It appeared in version 7 of the Bell Labs Research version of UNIX. In the old days of black screens with green text it was the only interface available to the user on Unix like systems we know today such as Linux. There was actually a shell that predated Stephen’s Bourne shell called the V6 shell, which emerged in 1971. In it, concepts such as pattern-matching parameters were introduced, and handled in their own utility called glob. The if command that was used to evaluate conditional expressions was also introduced with glob. It kept the V6 Shell at a very manageable level, with just under 900 lines of C source code. It’s the program that takes commands from your keyboard to the operating system to perform. This is what makes it so powerful: we’re given control directly and we can automate it with shell scripts.
88 LXF242 October 2018
The shell provides access to the operating system. It’s an essential part of Linux and is also one of its most powerful features.
Later on other shells came out: zsh, dash, psh and mksh being one of the most recent notable examples. The shell is not a terminal emulator however. A terminal emulator is a separate program that enables the user to interact with the shell. And before you ask, there isn’t really a best shell to use or a best terminal emulator to use. If any one of them were objectively the best, we would all be using them.
Getting started In this tutorial, we’re showing you how to automate a few Linux tasks while providing a graphical user interface to navigate in any terminal emulator and shell. We’re also going to show you how to use whiptail message boxes to display information. The whiptail GUI is provided by the shell so you can even get a graphical user interface through secure shell connections. It’s also possible for whiptail shell scripts to work in a headless server environment. If you’ve done shell scripting before this should be quite easy to pick up. Whiptail doesn’t exactly add complexity to shell scripting or make it more difficult – it’s just another set of challenges! You may have noticed that whiptail looks a lot like dialog, both in code and appearance. You’re correct that it’s similar, but whiptail is just a more modern version that uses newt instead of ncurses. Which could be important to remember if you have to rely on older
On the disc Distros, apps, games, books, miscellany and more… hail the new king!
Manjaro Gnome 17.1.12 Neil Bothwick Have to ever been to a Linux User Group (LUG)? There’s been some interesting discussion on the UK Lugmaster mailing list recently about the future of LUGs and it seems many are well attended and useful. You may think that in these days of instant communication and social media that physical meet-ups are a thing of the past, but that’s not the case. I’m involved with Liverpool LUG (LivLUG), where we have monthly meetings, usually featuring a talk by one of our members or the occasional guest, followed by an adjournment to a local pub where things rapidly go off topic. The focus of LUGs has changed over recent years. With the popularity of the Raspberry Pi, IoT hardware and even Android devices, the focus is no longer purely on desktop Linux distros, but on the wider world of open source. They’re also a great place for those new to Linux to find their feet, talking to moreexperienced folk about their problems and getting solutions in a friendly atmosphere. If you already attend a LUG, bear in mind it’s like any other open source project: it relies on people to contribute in order to survive. That’s not to say you shouldn’t turn up unless you’re prepared to do something. But it’d be good to do something to help those that have done the work, even if it just offering to buy a drink for whoever gave a talk at the meeting. I’ll talk all day for free drinks!
96 LXF242 October 2018
ot so long ago, it felt as if every new distro that appeared was a respin of Ubuntu. That wasn’t such a bad thing: Ubuntu is a solid base and provides software for making respins that was fairly easy to use and consistent. But it did mean a parade of distros that were almost but not quite Ubuntu. Then people cottoned on to Arch Linux, a distro aimed at the more expert end of the market, but one that provided greater opportunities for customisation. So now we have a number of distros that use Arch Linux as their base. One of the pioneers in this approach was Manjaro and we have the latest release on the DVD for you. There are a few variants of Manjaro, each with a different desktop. We’ve included the XFCE (see LXF236) version in the past, but this time we’ve gone for the full Gnome desktop. While Arch Linux is aimed at the more experienced user, that doesn’t necessarily apply to distros based on it. Manjaro is as easy to use, install and manage as Ubuntu, thanks to the addition of graphical administration tools such as package managers (Manjaro has two of these as well as the command line pacman). As a result, Manjaro is generating a lot of interest
Manjaro, the latest version in its GNOME incarnation, is ideal for intermediate open source users.
these days, and now you can see what all the fuss is about. We know that some of you like to boot the DVD in a virtual machine for testing. This is useful but it often results in the distro running slower than on real hardware. This applies to almost all distros, especially those that use 3D accelerated desktops, but sometimes there are more significant issues, such as when the distro doesn’t include support for the virtual hardware, and this is the case with Manjaro. It does work with VirtualBox but can fail to boot, both as a live disc and when installed to a virtual hard disk, when used with Qemu. It’s not a big deal, as you can install and use VirtualBox, even if you are a Qemu die hard, and it in no way affects running Manjaro, either live or installed, on a “real” computer. Login details: username manjaro; password manjaro.
The easy Manjaro installer highlights the difference between Manjaro and its base distro of Arch.
Defective discs: For basic help on running the disc or in the unlikely event of your Linux Format coverdisc being in any way defective, please visit our support site at www.linuxformat.com/dvdsupport. Unfortunately, we’re unable to offer advice on using the applications, your hardware or the operating system itself.
beginner and old Pc friendly
Linux Mint 19 MATE es, we had Linux Mint on last month’s DVD, but no collection of the hottest Linux distributions would be complete without at least on variant of Mint. This is the 32-bit release with the MATE desktop, so everyone can give it a go. MATE is the lighter alternative to the 3D accelerated Cinnamon desktop, but there’s actually very little difference in functionality. One just has a little more eye candy while the other is faster. Given the number of people that complain about software bloat, we expect this to be the more popular choice. Login details: username mint; no password.
Mint’s MATE desktop provides a good compromise between eye candy and performance.
Bodhi Linux 5 here are many desktop environments or window managers to choose from when using Linux. Some are fullfeatured, like Gnome and KDE, and are probably the best known. Others, like XFCE and LXDE, are more lightweight and still quite popular. Then there are the little known gems, like Enlightenment. This lightweight window manager has a loyal, almost fanatical following, but hasn’t really broken through to the mainstream. Part of the reason is that it’s in a constant state of flux with no real stable version.
64-bit To remedy this situation, Bodhi Linux now uses Moksha, a fork of Enlightenment 17. Bodhi is based on Ubuntu, so it has a solid foundation, with the lightweight Moksha desktop on top. Lightweight can sometimes be taken to mean bland and lacking in features, but that’s certainly not the case here. And if providing a lovely smooth desktop with supporting applications and plug-ins isn’t enough, Moksha also comes with Terminology, probably the best X-terminal program out there. Login details: bodhi, no password required.
The Bodhi desktop. It’s enlightened but without Enlightenment.
New to Linux?
We answer your questions, insert the DVD and open index.html What is Linux? How do I install it? Is there an equivalent of MS Office? What’s this command line all about?
Download your dvd imageS!
using the disc Using Linux for the first time can be very confusing. It’ll be unlike anything you’ve likely used before, especially if you’re used to Microsoft Windows or Apple Mac OS. Generally our DVDs are designed to be run directly, which is to say when you first power on your PC (or Mac) it should “boot” from the DVD – so before Windows or Mac OS even starts to load – with Linux running directly from the DVD. This trick is known as a Live DVD. It enables you to try out the various versions of Linux without having to install or change anything on your PC. Just remove the DVD, restart your PC and it’ll be exactly as you left it. While many systems will boot off a DVD when it finds one, many will not. See below for the standard process for enabling booting from a DVD on various desktops and laptop PCs. The alternative option is to locate the ISO file on the DVD and write this to your own USB thumb drive and attempting to run that. We recommend using Etcher from https://etcher.io that’s available for Windows, Mac OS and Linux. Good luck!
boot the disc Many PCs should boot automatically if they’re turned on with a disc in the drive. If not, many offer an early ‘Boot Menu’ accessed by tapping a key while powering up: F9 (HP), F12 (Dell, Lenovo), F8 (Amibios) or F11 (Award BIOS). Alternatively, use the BIOS/UEFI to adjust the boot order to start with the optical drive. Again, this is accessed by tapping a key during power up, usually Del but sometimes F1 or F2. Some new UEFI PCs require access via Windows: holding Shift select its Restart option. If you’re still having problems using the DVD visit: www.linuxformat.com/ dvdsupport Mac owners: Hold the C key while powering on your system to boot from the disc.
Get code and DVD images at: www.linuxformat.com /archives
October 2018 LXF242 97
You can subscribe to this magazine @ www.myfavouritemagazines.co.uk