__MAIN_TEXT__

Page 1

0OOKS £5 EB

EE FR

Easy maths 1 GeoGebra 6.0 2 GNU Octave 5.2 3 Engauge 10.10 4 Genius 1.0.24 5 Scilab 6.1

OF

RATED: SCIENCE APPS

PLUS!

HOW TO…

!

REVIVE THE AMIGA USE TEXT SHORTCUTS GAME ON THE Pi

2.5G

DOWNLOBA D K ali 2020.3 Parrot 4.10

The #1 open source mag

BUILD A SMART

HOME OFFICE Everything you need to create the perfect Raspberry Pi-based smart workplace

HOME S E

RVER

HOME

C ON T

R OL

ER DOC K A S Y E E D A M

NE X

Learn how the world is helping to fund vital open source projects

DISCOVER MINDFORGER The ultimate project and task manager

Build a top-down shooter with Python Run Ubuntu 20.04 on the Raspberry Pi LXF October 2020

Funding crisis

How the PC survived over three decades

OUD

Create classic Doctor Who style synth music

VIDEO E E NC C ONF E R

HISTORY OF THE PC

TC L


Newsdesk

THIS ISSUE: RISC assessment Mozilla axes jobs Evil Russian hackers Detecting earthquakes Windows (really) hearts Linux

OPEN HARDWARE

RISC heads for the Linux desktop Apple strikes out with its own desktop Arm processors, and the world will likely follow, in its own way. ack at the end of June 2020 Apple made the not entirely unexpected announcement that it’ll eventually be ditching all Intel processors for a CPU architecture of its own design. As you may know, since 2010 Apple has been using its own in-house designed Arm-based mobile processors to power its iPhone and iPad devices. The evolution of these processors has delivered substantial speed increases generation over generation to the point that they could challenge low-end Intel desktop processors a number of years ago, while the latest designs were as fast in single-core results as high-end Intel cores. So it’s no surprise Apple would move to create its own desktop processors. While initial reports seemed to indicate Apple Arm devices would be entirely locked down, our own Jon Masters reported that this may in fact not be the case, which is good as the Linux and FOSS world has been running Arm-compiled

CREDIT: Alibaba

B

Alibaba’s T-Head SoC is headed for high-performance installations.

6     LXF268 October 2020

software for years. So will the 2020s see a move to mainstream RISC desktops? In certain ways Linux is already there. Ignoring the Linux-running, RISC-based supercomputer installations that rule the top ten, Amazon has its own custom-designed Arm server SoC, the Graviton 2. It’s a 64-core SoC with 42MB of cache, running at 2.5GHz with 8-channel DDR43200 memory and 64 PCIe v4 lanes on the 7nm TSMC process – serious stuff. Estimates put power use at 100W vs 210W for a similarly pegged Xeon processor. More down to earth, there are various Armbased Chromebooks and laptops at the budget and mid-range market segments. The original Asus Flip C101 used a Rockchip RK3399 SoC, as does the very capable PineBook Pro. It even gets a tentative thumbs up from the FSF (www.fsf. org/resources/hw/single-board-computers). But what of RISC-V? While it seemed it may have languished in embedded systems and cheap single-board computers, Alibaba has announced its first RISC-V, design the Xuantie-910 – a 16-core SoC designed to run between 2.0GHz and 2.5GHz on a 12nm process. With a 12-stage pipeline, out-of-order execution, 3-stage decode, 8-issue-a-cycle execution with vector engine and 128KB L1 cache, it claims this is the fastest RISC-V design ever. This all points to innovative, low-power designs coming through, and they’ll all be Linuxready. It’ll just depend if there’s a consumer standard that enables user freedom as the PC standard currently does.

RISC-V is currently being used mostly in embedded and, soon, highperformance computing solutions.

www.linuxformat.com


NEWSDESK

Kernel Watch

OPINION

GITS NEW AND OLD

Jon Masters summarises the latest happenings in the Linux kernel, so you don’t have to. inus Torvalds announced Linux 5.9rc3 (release candidate 3), which he has described as being a fairly calm release cycle overall. Among the many new features and drivers for hardware merged this time around are security and scheduler fixes. Intel platforms have gained support for FSGSBASE while Arm platforms now use the newer ‘schedutil’ CPU frequency governor. The inclusion of FSGSBASE support means that context switch (the time taken to switch from running one process – tasks in kernel speak – to another) latency will decrease. Since Linux uses context switches to enable it to run many tasks on a single CPU, as well as every time a program makes a ‘system call’ into the kernel for some service it needs, reducing this time is a net win. Meanwhile, Intel platforms have also gained support for the new SERIALIZE instructions that will be used to mitigate potential future security exploits. On the Arm front, switching to ‘schedutil’ (already the default on x86) will improve the ability for the kernel to assist the underlying hardware platform in making CPU frequency changes appropriate to the actually running workload. This should mean future Arm-based phones and even servers stand to benefit. Recently, Fenghua Yu from Intel posted updated patches implementing SVA (Shared Virtual Address) support for Linux. With these patches, an application can more seamlessly

L

Jon Masters has been involved with Linux for over 22 years. The Register recently ran a piece in which Microsoft’s representative to the Linux Foundation board, Sarah Novotny, talked about the potential barrier to entry imposed by plain text email and mailing lists for kernel development. The piece sparked a lot of (heated) debate about the relative merits for and against continuing to develop Linux in the way that it has been almost since day one. I would like to add my voice to those who support Sarah’s points. Linux continues to grow in terms of contributions, with 5.8 being one of the biggest releases yet. But at the same time, the community of kernel developers is overall an ageing one that faces challenges in the years ahead. Development today is conducted using the LKML (Linux Kernel Mailing List), a list with many thousands of messages posted each month. Every new potential feature is both discussed, as a well as posted in a series of git patch emails. Those just coming up in our industry, especially over the past few years, are very familiar with git, but less so with using mailing lists. They are more likely used to GitHub PRs (pull requests) and web based tools. So it is not bad to ask ourselves if we can find better ways to adapt to contemporary software development in the longer term.

10     LXF268 October 2020

share virtual memory (its view of the world) with a hardware device attached via PCIe. This is complemented by support for new x86 instructions (ENQCMD and friends) that enable applications to trigger PCIe atomic transactions to share status with hardware accelerators more easily. There is a bunch of nuance under the bonnet to make this all work, of course. One of the many pieces that gets wired up is support for PCIe PASIDs (Process Address Space IDs) that are used by PCIe devices to identify exactly how memory reads and writes should be routed to which application. An example way in which this can all be wired up together comes in the form of what Intel call its Data Streaming Accelerator. On certain platforms DSAs will allow “Applications [to] map portals in their local-address-space and directly submit work to them using a new [ENQCMD] instruction”. Why is all of this useful? Well, imagine a future in which you can attach plug-in adapters (or perhaps some will be built into your general purpose x86 CPU) just as today, but they don’t need particularly special device drivers to work. Instead, they just behave as memory devices that applications can communicate with. Much more can then be moved to userspace and out of the kernel. Since many users get their kernels from vendors, and those can take some extra time to gain new hardware support, this speeds up adaption for novel accelerators.

ONGOING DEVELOPMENT The RISC-V architecture may be about to gain support for booting using UEFI. Atish Patra posted version 5 of a patch series that includes the necessary ‘efi stub’ support used to hand off from a suitable bootloader (such as GRUB2, widely used on x86 and Arm systems already) to a RISC-V build of Linux. This should improve the ability for distributions to release general-purpose versions for RISC-V systems without needing to tailor to each platform. Sumit Semwal posted an updated (version 5) set of patches adding support for “Anonymous VMA naming patches” to Linux. VMAs (Virtual Memory Areas) are used to

represent memory allocated by programs, and anonymous memory means that not backed by an underlying file, such as malloc allocations done at runtime. It should be easier to boot Android userspace on mainline Linux after these land. Finally this month, in an example of incredible commitment to doing the right thing, Robert Richter posted an update about maintenance of certain Marvell hardware going forward. He and a number of others recently left the company, but he is volunteering to do his best to help send “odd fixes” where he can. We feel that this shows tremendous dedication.

www.linuxformat.com


ANSWERS

Answers

Got a burning question about open source or the kernel? Whatever your level, email it to lxf.answers@futurenet.com news is not good news Q No Following the demise of knode, I

had to choose an alternative newsreader and found Pan. I am currently running it under Linux Mint 20 – or to be more accurate, I was until 21 July. Since then I can neither send or receive messages. The log reports: “Unable to connect to “news.eternalseptember.org:119": 483 encryption required

It is the same when I switched to

news.aoie.org. I cannot find anything on the internet that might explain this. I can both receive and send using Thunderbird but I prefer a dedicated reader. Alan Secker

A

This is indeed odd; I have tried both Pan 0.145 and Pan 0.146 and cannot reproduce this problem. The message implies that an encrypted connection is required, but I was able to connect with and without using TLS. Check your

The Pan newsreader can handle both plain and encrypted access to news servers, if it’s configured correctly.

A QUICK REFERENCE TO… CONTAINERS A container in Linux is an area of the computer that is isolated from most of the rest of the system. It may contain a program and all the files and libraries needed to run that program, or it may contain an entire operating system. Programs running in a container may appear to be running on a normal computer, but they only have access to those resources that are within the container or any devices assigned to   it, whereas a computer running on   the host computer has access  to everything. This is not the same as a virtual machine; memory is shared, as is the kernel, so it is more efficient. Putting

12     LXF268 October 2020

a single application in a container – Docker is probably the most well known implementation of this – has a couple of key benefits. Firstly, you are isolating services, so if an exploit is discovered for, say, a webserver, the containerised version would only give that exploit access to the container, not the rest of the computer. The other key benefit is the one that makes Docker and similar options so popular. Once you have set up a container to run a particular program, that container can be deployed across multiple machines almost instantly and without concern for the underlying distro running on those computers.

Neil Bothwick

attempts to fix your Tuxbased faults.

settings carefully. If you have selected ‘Use Secure SSL Connections’ in the server configuration, make sure you also tick the box to trust the server’s certificate. When you switch to TLS, the port should change from the NNTP default of 119 to 563. Try running Pan from a terminal in verbose mode: $ pan --verbose

This will run the Pan GUI as normal, but spit out error and warning messages to the terminal. This should give you some clue as to what is going wrong, more so than the fairly simple event log available from the GUI. If you are running any sort of firewall, either on your computer or router, try turning it off briefly to see if that makes a difference, but don’t forget to turn it back on as soon as you can. It is likely that the change that caused this behaviour is not in your system, unless you installed or changed something on 21 July. You can check the package manager’s log at /var/log/apt/history. log for clues here. It is also possible that your ISP changed something, maybe blocking certain ports. I would expect something like that to cause Pan to emit error messages when run from the terminal. You say that Thunderbird still works, so it is worth carefully comparing the settings used in the two programs. You could also rename Pan’s data and configuration directory from ~/.pan2 to, say, ~/.pan2.old. Then restart Pan to start with a fresh canvas from which to add your groups. This could be something as simple as a broken configuration, but it does not appear to be a general problem with Pan.

it private Q Keep I sometimes want to exchange files with friends. I don’t have my own web server or anything like Nextcloud running, and it would be a hassle having to set up an account for each of them. I don’t want to upload to a commercial service like Dropbox, or an email service. I just want to be able to send files from my computer to theirs with the minimum of fuss, particularly for them. James L. Smith

www.linuxformat.com


REVIEWS Seeed Odyssey X86J4105 Les Pounder tries an Intel-powered SBPC with the Raspberry Pi’s GPIO. SPECS CPU: Intel Celeron J4105 (1.5GHz, 4 core, 4MB cache, 10W TDP) GPU: Intel UHD Graphics 600 Mem: 8GB, DDR4 Expansion: M.2 SATA III, M.2 PCIe 2.0 x4, MicroSD, SIM Ports: USB 2.0 x2, USB 3.1 A x1, USB 3.1 C x1 Comms: Wi-Fi 802.11ac (dual band), Bluetooth 5.0, Gigabit LAN Video: HDMI 2.0a, DisplayPort 1.2a Extra: RTC, TPM 2.0 GPIO: 1x 40 pin RPi, 1x 28-pin SAMD21G18, 1x Audio, 1x 4-pin UART, 3x 4-pin SATA, 1x 4-pin fan

ant the flexibility of a single-board computer that has GPIO pins for physical computing, but you need the speed and compatibility of an x86 PC? Enter Seeed’s Odyssey, which marries an Intel Celeron CPU with two sets of GPIO pins, one Arduinocompatible and the other with Pi accessories. With a three-year old Intel Celeron, 8GB of memory, optional 64GB eMMC, optional blue-metal case and optional 4G/5G SIM there’s enough power to run even Windows 10. We used the NVMe slot, a spare 256GB SSD and installed Ubuntu 20.04. The built-in Intel GPU supports 4096x2106 resolutions up to 60Hz. Cooling comes from a large heat spreader and fan on the underside of the unit. Benchmarking with Cinebench pushed the temperature to 75C without the BIOS-controlled fan kicking in or bottlenecking. The Intel Celeron J4105 calculated prime numbers nearly six times faster than the Raspberry Pi 4 and the DDR4 memory transfer rates are 5.7 times faster. The two sets of GPIO provide full Arduino 28-pin – via an ATSAMD21 MCU – support and a level of 40-pin Pi compatibility. Running a couple of Arduino scripts seemed to work flawlessly, but the same can’t be said for the Pi GPIO. While physically and electrically compatible neither the popular RPi.GPIO or GPIO Zero modules work, and so the majority of Raspberry Pi HATs and add-on boards will also not work. We tested Pimoroni’s Explorer HAT Pro and the Python3’s smbus I2C module, and we were unable to make the board work. If you have a simpler board, or a component which uses digital IO, these can be connected and used directly. There is a Python 3 module available but it wasn’t a pleasant experience

W

Way more processing grunt than a Raspberry Pi 4 can muster.

and it proved quite troublesome to even make an LED flash. The Gigabit network returned 942 Mbits/s with iperf and the Wi-Fi 25.8 Mbits/s and 50.5 Mbits/s over 2.4- and 5GHz bands. Typical Gigabit performance, but disappointing wireless networking. As this is an x86 machine, support for Linux distributions is a given. We tested the Odyssey with Ubuntu 20.04 and it was a smooth install process. The Odyssey X86J4105 is a board for makers. The Arduino GPIO is exceptionally easy to work with and can be used to wake the main system to perform a task, then return to a low-power mode. The Raspberry Pi compatible GPIO is a bit of a letdown, though. If there were a version of the RPi.GPIO Python 3 library then the Odyssey X86J4105 would have everything that a maker would need. If you need a low-power server or just love the idea of having Arduino capability on a PC, the Odyssey X86J4105 is a great choice.

VERDICT DEVELOPER: Seeed WEB: www.seeedstudio.com PRICE: $188 barebones FEATURES 9/10 PERFORMANCE 8/10

The optional case provides a good-looking and practical enclosure.

www.techradar.com/pro/linux

EASE OF USE 6/10 VALUE 6/10

The Odyssey X86J4105 seems to offer the best of all worlds, but if you need Raspberry Pi compatibility, look elsewhere.

Rating 7/10 October 2020 LXF268     17


SUBSCRIBE Save money today!

SUBSCRIBE

Sign up today and get your

Eclipse 3-Way USB Charger YOUR GIFT! WORTH £64.95

Don’t miss out,   subscribe now!

Product features Holds 6m of cable High-speed charging Smart-IC Technology Three devices at once No more messy cables

Charge multiple devices at maximum speed with the Eclipse 3-Way USB Charger. This easyon-the-eye charger is a three-port USB charging hub that keeps 6m of cable neatly wrapped inside when not in use, while providing neat   pop-up access with a gentle press of its top.

SUBSCRIBE NOW!

www.magazinesdirect.com/lin/eclipse20

Call: 0330 333 1113 22     LXF268 October 2020

www.linuxformat.com


5 for £5 offer p16

PLUS: Exclusive access to the Linux Format subs area! 1

! DON’T MISS s ar ye Now with 5 & r se U x of Linu Developer issues

CHOOSE YOUR PACKAGE! ANNUAL DIGITAL

ANNUAL PRINT

PLUS! Only

£50

Annual digital  by Direct Debit (NO GIFT)

Only

£65

Annual print  by Direct Debit

2-YEAR PRINT

PLUS! Only

£126 2-year print  by Direct Debit

*Terms and conditions: Offer closes 30 November 2020. Offer open to new UK subscribers only. Pricing is guaranteed for the first 12 months and we will notify you in advance of any price changes. Please allow up to six weeks for delivery of your first subscription issue (up to eight weeks overseas). Your gift will be delivered separately within 60 days after your first payment has cleared. Gifts only available to subscribers on the UK mainland. Gift does apply to digital subscription. The full subscription rate is for 12 months of 13 issues and includes postage and packaging. If the magazine ordered changes frequency per annum, we will honour the number of issues paid for, not the term of the subscription. For full terms and conditions, visit www.magazinesdirect.com/terms. For enquiries please call: +44 (0) 330 333 1113. Lines are open Monday- Friday 9am- 5pm UK Time or e-mail: help@magazinesdirect.com. Calls to 0330 numbers will be charged at no more than a national landline call, and may be included in your phone provider’s call bundle.

www.techradar.com/pro/linux

October 2020 LXF268     23

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 Maths packages WE COMPARE TONS OF STUFF SO YOU DON’T HAVE TO!

Roundup GeoGebra GNU Octave Engauge Digitizer Genius Scilab

Mats Tage Axelsson has spent decades figuring out reasons to use Linux computers. He’s still at it.

Mathematics packages There are plenty of times when you may need to find a mathematical solution to a complex problem – and these packages can help…

HOW WE TESTED… We carried out the tests on an old laptop to make sure none of the packages needed advanced hardware to do the job. To install the software we looked for as many options as we could find. Note that choosing an install option can affect the function of modules and external packages. To test the packages, we found problems from textbooks and tried to follow them with the software at hand. What we learned helped us assess how useful it will be for you. However, as these packages are more powerful than that, we also look at how you can use them for scientific course work. At the very least you can help your own understanding of the things happening in our world. The news covers current events with data and charts, and if you do not understand these you may be misled by rumours.

24     LXF268 October 2020

hy would yo want to do mathematics on Linux? Is not mathematics over when you leave school? No! Maths is fun. You may also have forgotten much of what you should have learned in school. With the packages in this Roundup we’ll show which you should choose for what purpose. While you can use all the packages here for learning, there are two in particular that are much better at teaching, rather than giving you results for some project. You will see that you can even control a drone with the help of mathematics. You will also be in good company because many university professors use these

W

packages as teaching aids, as well as teachers in “lower” schools. At least two of the packages we are looking at were developed for research: Scilab for chemistry and Octave for physics. This does not mean they are limited to those fields. No, they are both under constant development and they even have extensions that help other researchers reach new heights in their respective fields. Many of these packages have been used to create prototypes of various kinds. Indeed, with this software you can simulate everything you can think of, once you have learned how.

www.linuxformat.com


Maths packages ROUNDUP

Getting started To use these packages, you need to learn maths. Some of it you can pick up while using them. he software packages in this Roundup are academic in some form. For that reason, they have both comprehensive documentation and good tutorials. To get through them, you must also learn maths, though sometimes that is part of the reason to use them in the first place. Universities have developed several of the programs and are even maintaining them, adding new modules as they expand their curriculum. As you can probably guess, the tutorials are often very theoretical. On the academic scale, GeoGebra is much more of a teaching tool than the others. It is made as a web service for teachers and learning institutions. However, the source is available under the GPL so you can install it locally. One of its most impressive points is that the manual runs in the software – you don’t need to switch to a separate manual to learn about it. This is similar with Scilab and Octave. The two last ones have more power so you need to work more to get the full use of them. At first glance, Scilab and GNU Octave are both barebones, but don’t be deceived – their power lies in their modules. They both follow the UNIX philosophy where you design software to do one thing well and then create other software for other functions – or modules, in this case. The modules range through many disciplines, from physics to chemistry and of course mathematical proofs. Both of these packages have their own programming languages.

T

Genius has many examples. The source code is loaded into the IDE, but you have to find explanations in comments and other sources.

Genius is a programming environment for mathematics and is very easy to start using. The manual is a little tricky but all the examples available from the Examples drop-down menu are very clear. Don’t expect to be an expert any time soon, though, as it also has its own language (GEL). The language is designed to look similar to the way you write mathematics in academic situations. Scilab and Octave use the same method, so it’s worthwhile getting used to it. The outlier in this collection is Engauge Digitizer. This program has much fewer functions, but you may find it very useful anyway. It takes a picture of a graph and helps you get the values into a spreadsheet from it.

VERDICT GEOGEBRA 8/10 GENIUS 7/10 GNU OCTAVE 6/10 SCILAB 6/10 ENGAUGE DIGITIZER 8/10 Getting started easily may sometimes lead to a harder journey. Consider carefully before you go with one over the other.

Installing Any problems when installing? o get the most out of these programs, you will need to use graphs. For this reason, there are many dependencies for some of the packages – they are heavy on using other libraries. One solution to this problem is to ‘bake’ them into a Snap, Flatpak or AppImage, though that’s not an option for all the packages. Several of them are written in Java. GeoGebra has many applications for many platforms. You can use it anywhere, and you can install from your favourite repository or FlatPak. You can even find a Linux Portable version on the official website. The same goes for Scilab, except that you can run it directly from a folder, if you download the package from the website. Scilab also has a file exchange site for your work using Scilab. Octave is also available in both Snap and Flatpak versions. However, there are many Octave-based packages in the Ubuntu repositories, so if you plan to use those, it may be simpler to download it from the official repository. Another consideration is Cantor, which acts as a graphical frontend for mathematical software. It supports Scilab, Octave and Python, plus some others. It integrates with KDE, so is particularly useful if you’re using that. GNOME users may want to use a Snap or Flatpak to ensure that dependencies are all properly managed.

T

www.techradar.com/pro/linux

GeoGebra is installed very quickly so it is available to you with minimal fuss. Your first experiments are on the way immediately.

Both Genius and Engauge Digitizer are available from the Snap store, in your repository and as a Flatpak. These do not need many dependencies, so you can use any method with which you’re most comfortable.

VERDICT GEOGEBRA 9/10 GENIUS 9/10 GNU OCTAVE 7/10 SCILAB 8/10 ENGAUGE DIGITIZER 8/10 Complications during installing these packages are rare, and it’s easy to find solutions anyway since most are well-maintained old projects.

October 2020 LXF268     25


BUILD A SMART

HOME OFFICE Wiseguy Jonni Bidwell has some tips on making our homes and home offices smarter, with the latest FOSS offerings.

reative ingenuity and the ability to cram a network stack into the smallest of things have gifted us, over the past few years, some pretty funky home innovations. Legacy (classical?) home dwellers may see little merit in upgrading to a Smart Home, but we have some uniquely Linux ideas that may persuade them. Having a smart home needn’t mean having Alexa (the voice of Amazon’s Echo) eavesdropping on your every word. Nor does it mean the nameless entity within a Google Assistant reporting back to the mothership whenever you leave the bathroom light on. The Mycroft home

C

30     LXF268 October 2020

assistant can do all the good bits of these voice devices, but without the more chilling data-collection aspects. Best of all you can run Mycroft on a Raspberry Pi. But there’s more to smart homes than shouting at small robots. As autumn makes its way to the UK (and other Northern hemsiphere places), good citizens will be collectively donning long johns and firing up their boilers, heatpumps and sacrificial pyres. Some may find themselves having to shoulder the expense of a new boiler, others will want to see if their current one can be hacked and tweaked to make for a more economical winter. Through the magic of OpenHAB, we’ll show you how.

For many of us, the pandemic has seen our homes become unwitting extensions of the workplace, and depending on your line of work that may be the case for some months to come. So we’ve got a couple of projects for smartening your home office setup, too. Recuse yourself from Zoom meetings and banish Google’s office suite with the open source powerhouses Jitsi Meet and Collabora Online. And since Docker is all the rage, we’ll look at how we can harness its power better using the Portainer management engine. This will make it easy for you to add any service you can imagine to your self-hosted smart-home-office, so let’s get started!

www.linuxformat.com


Smart Home Office

A smart home office? Take a look at some great tools that can make a smart home smart, and a home office, er, official. o the cynic, all this new smartification of everyday items seems to involve putting networked computers in places where they’re not needed, and needing so many companion apps on one’s smartphone to keep tabs on all these smart things. In so doing, one opens all these devices (and possibly your phone too) up to attack. Some manufacturers are better than others at keeping their IoT things secured, and many attacks could be prevented by users changing default credentials. Since 2016, Raspberry Pi’s no longer ship with the SSH service enabled because it’s too easy to spot them when they’re exposed to the Internet. But there’s a lot of smarthome projects that are fun, safe, and will bring some degree of joy to your home. Lots of these are variations on standard Pi maker projects, we really liked for example Elio Struyf’s project documented at www.eliostruyf.com/diybuilding-busy-light-show-microsoft-teams-presence. This uses an LED array as a status indicator for outside your home office.

T

Watch this! The pandemic has gotten lots of us quite used to videoconferencing, and with that comes the terrible fear of children (or grown up children) interrupting your work chatter. Perhaps a brightly coloured warning light, that in this case hooks in to your Microsoft Teams account (it could be easily adapted to other services) to see if your status is “busy”. Home security systems are all the rage too. Again, the Raspberry Pi is excellent at this, you could adapt our Motion tutorial from LXF266 to set this up, rather than going with an off the shelf product. Besides security concerns, such products could at any point stop being supported by the manufacturer, which effectively makes them useless. This very thing happened when Google bought Nest back in 2014. Then last year they announced they were shutting down the Works With Nest program, effectively bricking all the legacy Nest hardware that

www.techradar.com/pro/linux

wasn’t produced by Google. In theory this could happen with open source projects too, but if it does, then at least the code is all there for someone else to take the reigns.

Hot smart stuff Utility companies are keen for everyone to have smartmeters now, and these go in tandem with smart boilers, smart thermostats, smart fridges. In theory these can save you money, and it’s certainly satisfying being able to pre-warm your house as you travel home. We’ll show you how you can connect all of these together through openHAB, the open source Home Automation Bus. No smarthome would be complete without a Voice Assistant, so we’ll revisit our old friend Mycroft over the page. We’re also embracing Docker this issue so we’ll look at using that to smarten up your home office set up, using the Nextcloud cloud productivity suite. Then we’ve got some tips on containing this container overload with Portainer, which is a management engine used to constrain your container overload! We’ll also show you how to set up your very own video conferencing service with Jitsi Meet. It’s going to be an action packed few pages, so get yourself a cup of tea and enjoy!

The Unicorn HD, with its 256 RGB LEDs and Python interface, could make an excellent warning light.

October 2020 LXF268     31


IN-DEPTH Funding free software

FUNDING THE FREE Jonni Bidwell delves into the thorny issues surrounding funding open source projects and urges you to support your favourite free software. or many of us, the price tag was a key part of what got us into free software. But giving everything away for free does not a viable business plan make, and many successful free software projects got that way by discovering sustainable funding streams. These might be in the form of donations, subscriptions, sponsorship or merchandise (there’s no better way to support your favourite project than owning a mug with their logo emblazoned on it). Or it might be in the form of a paid-for, premium version, which may include extra support or extra features. We regularly run features telling you to ditch proprietary services and join the self-

F

40     LXF268 October 2020

hosted revolution. But those services, be they Gmail, Dropbox or Zoom, are all free, and running your own will cost you in time (email is still hard, by the way) and infrastructure demands. Of course, numerous alternative services have popped up that, for a small fee, will provide these kind of services using open source tooling and without dubious data slurping practices. So in many ways the tables have turned. And there’s no doubt that there’s value in free software. Covid-19 has understandably made this landscape yet more difficult to navigate, so we’ll take a look at some initiatives that have been set up to help projects that are struggling as a result. And of course, we’ve got plenty of advice on how you can help.

www.linuxformat.com


Funding free software IN-DEPTH ou’ll have read in our news section about the Covid-related layoffs at Mozilla. The fight for a free and open internet is tough and we hope the streamlined Mozilla Foundation can continue its dedication to it. We’re perhaps a long way from the enthusiasm that saw a two-page ad in the New York Times announcing the release of Firefox 1.0, but let’s hope our favourite browser continues to innovate and impress. Most of Mozilla’s income is generated by search revenue deals. Right now Google is Firefox’s default search engine in the US and UK, Yandex in Russia and Baidu in China. If you think of Google as a rival browser maker (or if you see them as enemies of privacy and freedom), then they and Mozilla seem like odd bedfellows. But all’s fair in love and war, and it’s a deal that benefits both parties and has been extended for another three years. From 2015 to 2017 Yahoo!, in the US, Taiwan and Hong Kong, and for the princely sum of $375 million a year, enjoyed the default spot. It’s understood that the arrangement with Google involves it handing over somewhere slightly north of this figure. For what it’s worth, Google also pays the open source Adblock Plus to not block its ads. Mozilla’s new revenue centric focus will hopefully see it continue to thrive, starting with its VPN offerings and ongoing partnership with Pocket magazines.

Y

The cost of LibreOffice Last month we saw how LibreOffice is funded by the Document Foundation, and how that model may change in the future. LibreOffice is a huge project (thousands of contributors, millions of lines of code and hundreds of millions of users) and it’s not something that can be sustained without considerable resources. The Linux Foundation attracts membership fees from partner companies and events to support kernel development (they pay the salaries of Linus Torvalds and Greg Kroah-Hartman) and the growing number of other open source projects under its umbrella. Its mission is to cultivate further industry adoption of FOSS, so many member projects are in rapidly developing areas, such as cloud, automotive, security and machine learning.

Under the Linux Foundation, considerable efforts have been made to secure the low-level projects that essentially run the world. In particular, the Civil Infrastructure Project (CIP) aims to provide Super Long Term Support (SLTS) for designated kernel releases. The eventual goal is for this is to support hardware that may be in service upwards of 50 years, much longer than the decade offered by the most supportive of enterprise distros today. The first release to receive the SLTS treatment is 4.4, which since its release back in 2016 has seen 235 (and counting) point releases and will be supported until at least 2026. This kind of initiative will encourage forward-looking managers in the transport, infrastructure and energy sectors to embrace Linux. As Greg admitted in our interview in LXF259, there will always be projects that slip through the cracks. So the Foundation welcomes applications from new projects that fit with its mission. Yet there are dozens of other foundations that steward key open source projects. For example the non-profit X.org Foundation oversees all things relating to open source graphics stacks, from direct rendering code in the kernel to Mesa, Wayland and the venerable X.org server itself. Krita has since 2012 had its own foundation too, which solicits donations and organises crowdfunding to fund its four full-time employees. The Krita Foundation also receives

Linux Mint receives upwards of $10,000 a month in donations, much of which comes from loyal users like you.

ELEMENTARY, DEAR WATSON We’ve mentioned before how excited we are for elementary OS 6.0, but elementary releases are task-based, rather than time based, so that release will happen, teasingly, at its own pace. Supporters (financial, rather than moral) of the svelte OS have been treated to early access builds of the upcoming release. These shouldn’t be considered stable and certainly shouldn’t replace your 5.1 install at this stage, but we’d wager there’s a fair few folks (us included) who would be happy to pay to glimpse the next evolution   of the ever-so-pretty distro. If this sounds like you, then you can gain access to these early builds by donating

www.techradar.com/pro/linux

more than $10/month through   Github sponsors. Said distribution also generates income from its app store and in particular the curated apps thereon, which have been carefully crafted and tested to fit with their surroundings. That app store is also levelling up,   and will be known as AppCenter for Everyone in future releases. A successful campaign on Indiegogo raised $14,000 to fund the new, Flatpak-based, store. This will bring more of the latest applications to elementary OS, and obviate any difficulties with underlying Ubuntu LTS libraries being too old. Fans of mystery and intrigue will also

remember that a couple of years ago   a large private donation enabled elementary to hire Cassidy James Blaede, previously a part time volunteer, as a full-time developer.

Elementary’s App store is changing, and if you support them then you might just get a sneak preview of it.

October 2020 LXF268     41


HISTORY

OF THE PC

In a world of competing processors and operating systems, John Knight explores how the PC began, what powers it and how it’s still going.

PART ONE he PC; the personal computer; the IBM-compatible. Whatever you want to call it, somehow it has maintained a dominant presence for nearly four decades. If you try to launch any program written from the ’80s to the 2000s onwards, you have a good chance of getting it to launch: your PC has backward compatibility going right back to the ’70s, enabling you to run pieces of history as though they were from yesterday. In fact, your computer is brimming with heritage, from the way your motherboard is laid out to the size of your drive bays to the layout of your keyboard. Flip through any PC magazine and you’ll see everything from bulky desktop computers to sleek business laptops; from expensive file

T

44     LXF268 October 2020

servers to single-board devices only a few inches big. Somehow, all these machines are part of the same PC family, and somehow they can all talk to each other. But where did all of this start? That’s what we’ll be examining: from the development of the PC to its launch in the early ’80s, as it fought off giants such as Apple, as it was cloned by countless manufacturers, and as it eventually went 32-bit. We’ll look at the ’90s and the start of the multimedia age, the war between the chip makers, and the establishment of Windows as the world’s leading but not best operating system. But before we go anywhere, to understand the revolutionary nature of the PC you first need to grasp what IBM was at the time, and the culture that surrounded it.

www.linuxformat.com


PC history IN-DEPTH

BM was formed in the early 20th century by people who invented the kind of punch-card machines and tabulators that revolutionised the previous century. IBM introduced Big Data to the US government, with its equipment keeping track of millions of employment records in the 1930s. It gave us magnetic swipe cards, the hard disk, the floppy disk and more. It would develop the first demonstration of AI, and be integral to NASA’s space programmes. IBM has employed five Nobel Prize winners, six Turing Award recipients, and is one of the world’s largest employers. IBM’s mainframe computers dominated the ’60s and ’70s, and that grip on the industry gave IBM an almost instant association with computers in the minds of American consumers. But trouble was on the horizon. The late ’70s were saturated by ‘microcomputers’ from the likes of Apple, Commodore, Atari and Tandy. IBM was losing customers as giant mainframes made way for microcomputers. IBM took years to develop anything, with endless layers of bureaucracy, testing every detail before releasing anything to market. It was a long way from offering simple and (relatively) affordable desktop computers, and didn’t even have experience with retail stores. Meanwhile, microcomputer manufacturers were developing new models in months, and there was no way IBM could keep up with traditional methods.

IBM wasn’t just a colossus in size, but also in sluggishness. Observers claimed it would take “nine months to ship an empty box.”

Assembling a crew In August 1979, the heads of IBM met to discuss the growing threat of microcomputers, and its need to develop a personal computer in retaliation. They created a series of Independent Business Units, which were given a level of autonomy. One of these would soon be led by executive Bill Lowe, who would become the father of the PC. In 1980, Lowe promised he could turn out a model within a year if he wasn’t constrained by IBM’s methods. Lowe’s initial research led him to Atari, which was keen to work for IBM as an OEM builder, proposing a machine based on the Atari 800 line. Lowe suggested IBM should acquire Atari, but it rejected the idea in favour of developing a new model instead. This model was to be developed within the year, with Lowe given an independent team. This new squad, the Dirty Dozen – a group of IBM misfits – was allowed to do things however they saw fit to get the job done. The task was code-named Project Chess, with Lowe promising a working prototype in 30 days. Lowe went for an open architecture. While dealers were very interested in an IBM machine, it just wouldn’t work if they had to operate within IBM’s proprietary methods. If dealers were going to repair these machines, they needed to be made from standard off-the-shelf parts. By August, Lowe had a very basic prototype and a business plan that broke away from established IBM practice. Based on this new open architecture, the PC would use standard components and software, instead of IBM parts, and be sold via normal retail channels Over the coming months, the Dirty Dozen grew exponentially in number and toiled away to transform the prototype into a world-class machine. They focused on giving the PC an excellent keyboard, which they

www.techradar.com/pro/linux

Credit: Sandstein, CC BY-SA 3.0 https://commons.wikimedia.org/wiki/File:IBM_ system_360-50_console_-_MfK_Bern.jpg

I

delivered with the IBM Model F. It needed to be durable and reliable, so each key was rated to 100 million keystrokes. IBM was renowned for quality keyboards, and would try to replicate the feel of older beamspring terminal keyboards with a new Buckling Spring technology. These gave the keyboards the famous clacky sound and weighted feel that was popular with typists, giving a tactile feedback unrivaled at the time. The PC’s keyboard alone would become the main selling point for a lot of customers, and IBM keyboards would be the best in the business for the next two decades. Next, the crew turned to the CPU. IBM’s own 801 RISC processor was considered (which would have been significantly more powerful), but for convenience and compatibility’s sake, the team chose the Intel 8088. By choosing an 8088 processor over the superior 8086, technically the original IBM PC is only partly 16-bit. Both are internally 16-bit, but the difference is the 8088 had a cost-saving 8-bit bus. The simplified

APPLE II: THE GREAT RIVAL Without the Apple II, it’s possible the PC would never have existed. Although a subject of debate, it’s generally agreed that the Apple II was a primary influence on the PC. Many IBM engineers owned one – as did many customers, who found that they could easily do jobs such as working on spreadsheets that were nearly impossible on a giant mainframe. Sporting an 8-bit MOS 6502 processor, with between 4KB and 64KB of RAM, it debuted in June 1977 for a base price of $1,298.  It had an incredible production run, selling from 1977 to 1993. Developed by Steve Wozniak, the Apple II stands in stark contrast to products developed by Apple’s lesser Steve (Mr Jobs). Chiefly, the Apple II is designed around an open architecture, with a removable lid allowing easy access to the motherboard and expansion slots. Much like the PC, the Apple II would be the subject of numerous clones over the years. Even though the PC was newer, the Apple II retained advantages over the PC, such as having eight expansion slots over the PC’s five, and much more convenient gaming, with bundled joysticks and games that loaded in seconds.

October 2020 LXF268     45


TUTORIALS Ubuntu 20.04

UBUNTU

Get up and running with Ubuntu 20.04 Les Pounder loves Ubuntu and Pi, so all the better that he can now run his favourite distro on his favourite hardware! aspberry Pi OS, formerly Raspbian, has been the official operating system since the Raspberry Pi arrived in 2012. But over the years there have been a few attempts to port the popular Ubuntu distro to the Pi. With Ubuntu 20.10 being released in October 2020 – the first Ubuntu to be officially released for the Pi – we thought it would be fun to see if we can install Ubuntu 20.04 on a Raspberry Pi 4, and see what we can do. The simplest way to get the latest version of Ubuntu is via the Raspberry Pi Imager tool, available from https://www.raspberrypi.org/downloads/. Download and install the tool, then open it and select the Ubuntu Server 20.04 64-bit image, which will download the image from Canonical’s servers. Insert a 16GB microSD card into your computer and select it as the drive to write to. When ready, click WRITE to start the process and it should take no longer than 10 minutes to download and flash the Ubuntu server image. Once completed, eject the microSD card and insert it into your Raspberry Pi 4. Connect your keyboard, mouse, HDMI, Ethernet and finally power to boot into Ubuntu Server for the first time. The first boot will take the longest, and even when it looks like it’s ready to log in, it will need a little longer. Wait five minutes, then press Enter and you will be prompted to log in. The default username and password is ‘ubuntu’ and you will be prompted to change the password. Make sure that your Ethernet connection is working by pinging Google’s DNS server:

R

OUR EXPERT Les Pounder is an Associate Editor at Tom’s Hardware and a freelance Creative Technologist. He blogs about his discoveries at bigl.es.

YOU NEED Raspberry Pi 4, 2GB min Windows, Linux or macOS PC A 16GB microSD and reader Wired internet connection Details for this tutorial can be found at http://bit. ly/LXF268pi

$ ping 8.8.8.8

If the output reads Unable to reach destination then check your network before moving onward. Right now we have a basic Ubuntu server install, but there is no desktop or GUI. That is where Martin Wimpress’ Desktopify tool comes in. Martin is the Director of Engineering for Ubuntu Desktop at Canonical so he is well-versed in this subject. Desktopify is a script which installs and configures a base Ubuntu Server image into a full Ubuntu desktop install. To download his script type this into the terminal: $ git clone https://github.com/wimpysworld/ desktopify.git

50     LXF268 October 2020

Now change directory to the downloaded files.

Using the Xubuntu desktop we managed to run a slick, great looking and responsive session.

$ cd desktopify

Next we’ll run the desktopify command and pass it one argument: the desktop environment we want to use. We initially chose Ubuntu as we used a Raspberry Pi 4 8GB, but later we chose to install xubuntu by running the same command in the terminal. To change the desktop environment, simply change the name at the end of the line, like so: $ ./desktopify --de ubuntu

The install process will take some time, so grab a cup of tea and wait. When it is complete, reboot the Raspberry Pi. $ reboot

The Raspberry Pi will boot to the Ubuntu login screen; enter your username and password and the login will continue to the desktop. We are now using Ubuntu 20.04 on the Raspberry Pi 4! Let’s do a little housekeeping. First we’ll ensure that we have the latest list of software repositories, and then ensure our system is up to date. In a terminal type the following. $ sudo apt update $ sudo apt upgrade -y

The Ubuntu 20.04 install comes with Python libraries for working with the GPIO, but it is missing two things, the pip Python package manager, and a decent Python editor. To fix that let’s install pip. In a terminal type: $ sudo apt install python3-pip

For a Python editor we have many different choices, but we chose to install two: Geany, which is a general text editor with support for Python, and Mu, a simple

www.linuxformat.com


TUTORIALS Classic gaming

GAMING

Native Pi gaming with the classics

Christian Cawley is playing Doom and other games on his Raspberry Pi without emulation. ou probably think of the Raspberry Pi as a useful computing tool that can also handle a bit of emulated gaming. But there are plenty of games that you can install on the Raspberry Pi without needing an emulator. Open source games for Linux, classic games that have had the source code released, and games written in Python are all available. If an Arm-compatible build has been distributed, the game should run. First person shooters, shoot-’em-ups, strategy games and more are all ready to install on the Raspberry Pi. While simple to install, though, configuration can be tricky – especially when it comes to finding a suitable controller. You already know of one Raspberry Pi game that runs natively: Minecraft Pi. Many others are available and can be downloaded from the web or installed from repositories. Often they come ready to use, but in some cases, configuration is required to tailor the game for your Raspberry Pi model and controller setup (see boxout for more on controller setup). Doom is a key example of a game that has gone open source, had the source code adapted for Arm processors, and is now available for the Raspberry Pi. Available as a framework into which you can install WAD files, Doom is one of many games, mostly from the 16-bit era, that will run on the Pi without emulation. Running Doom on your Raspberry Pi is straightforward. You should be using a Raspberry Pi 2 or later and have a keyboard and mouse or game controller attached for playing. The Doom source code is also required. Released in 1997, this has been repackaged several times. For the

Y

OUR EXPERT Christian Cawley has gained weight during lockdown, mostly from spending too much time with Raspberry Pis. He hopes to lose weight with some extra micro:bit projects.

Enjoy a Doom experience like never before by installing it on your Raspberry Pi without emulation.

Raspberry Pi, arguably the best option is Chocolate Doom, which can be installed in the terminal using sudo apt install chocolate-doom

While the game engine is now installed, at present there is nothing to play. You’ll need the data files, weapons, maps and graphic assets which are available as packaged WAD files. Many different WADs are available, from packages that recreate the original game to WADs that introduce whole new ways of playing Doom. To install on the Pi, change to the /usr/ games directory. cd /usr/games

Next, use wget to grab the WAD from the original shareware version of the game, which by chance offers the first episode for free: sudo wget http://www.doomworld.com/3ddownloads/ ports/shareware_doom_iwad.zip

Finally, unzip it: sudo unzip shareware_doom_iwad.zip/

This will create a file called DOOM1.WAD. While the game is ready to play, you’ll still need to configure Doom. Start by launching the setup tool: chocolate-doom-setup

Make sure you set up Doom’s controls.

52     LXF268 October 2020

With this, you can configure the display, sound, keyboard, mouse, or your chosen gamepad or joystick. There is even the facility to start or join a network game. Key options you might use here include opening Configure Display and pressing A to view the advanced options. Select ‘Save screenshots in PNG format’ to get

www.linuxformat.com


TUTORIALS TUTORIAL Prey

ESPANSO

Expand text easily Shashank Sharma is all for conservation of energy, so he’s mighty excited about Espanso, which helps him write more by typing less. hether we’re executing your favourite commands, frequently accessing certain directories, websites, or signing off email messages, we do a lot of repetitive typing during the course of the day. A lot of this effort can be saved by using text expansion tools such as Espanso. Espanso is an Italian word meaning ‘expand’ – and that’s precisely what the tool does. It lets you create a list of keywords or snippets which you can associate with longer words, expressions or even sentences. Any time a configured keyword or snippet is encountered, Espanso automatically replaces it with the text. Released under the GPLv3, this minimalist utility also supports just about all graphical applications such as email clients, browsers and so on. It also has extensive support for the command line and can be used to execute custom scripts, expand keywords into frequently used code snippets, and more.

W

OUR EXPERT Shashank Sharma is a trial lawyer in Delhi. An avid Arch user, he’s always on the hunt for discount geeky memorabilia.

EXPANDING ESPANSO In addition to creating custom triggers, you can also install extensions to expand Espanso’s feature set. These extensions, called packages, provide additional functionality. You’ll find a number of packages at https://hub.espanso.org. To install a package, you need to run the espanso install packagename command. For instance, you can run espanso install basic-emojis or espanso isntall all-emojis to install the emoji packages. Once installed, you’ll be able to insert emojis by using their name, such as :smirk:. :grin: and so on (while enjoying the irony of writing a word in order to create a picture). Install the arrows package with the espanso install arrows command if your writing involves drawing of arrows. You can now create a right-arrow with \rarrow, a tick with \check and so on. Each package has its own page describing how to install it and the functionality it adds to Espanso. There are also packages that can help you with Excel formulas, or adding French and German accents when writing. The html-utils-package will appeal to those who write a lot of HTML code. Once installed, you’ll be able to use :style instead of typing <style></style>, or :head instead of <head></head>. All packages are installed in the ~/.local/share/espanso/packages directory. Each package is placed in a different directory within this packages directory, with a package.yml file of its own. You must restart Espanso with espanso restart every time you install a new package, or edit the config file for a package.

54     LXF268 October 2020

Refer to the documentation on the website to learn about different types of matches, how to efficiently organise config files, and more.

The project provides a Snap package for effortless installation, but there’s also a DEB package for Debian and Ubuntu and derivative distros. If you use Arch, you can install it using the AUR package. The documentation on the project’s website lists all its dependencies such as libxtst6 , libxdo3 , xclip and libnotify-bin . You’ll find these in the software repositories for most distributions. Once installed, you can then download the Espanso tarball and move the extracted script to a directory in your $PATH : $ wget -c https://github.com/federico-terzi/espanso/ releases/latest/download/espanso-linux.tar.gz/ $ tar zxvf espanso-linux $ mv espanso ~/.local/bin

Now all you need to do is launch Espanso with the espanso start command. Espanso automatically

creates a configuration file called default.yml in the ~/.config/espanso/ directory. You can edit the config file in any text editor of your choice, but running the espanso edit command automatically opens the config file in the default editor. Whenever you make changes to the config file, Espanso automatically reloads the config file so that the changes can take effect. You can also manually restart Espanso with the espanso restart command. Once you start Espanso, the utility continually runs in the background waiting to catch trigger words so that they may be replaced. You may, however, want to occasionally disable Espanso so as to avoid expansion. By default, the Left-Alt key is configured to toggle the utility: double-press Left-Alt to disable Espanso if it’s running. You can then enable it by again pressing the Left-Alt key twice. If you wish to change this default

www.linuxformat.com


TUTORIALS Organise your projects Credit: www.mindforger.com

MINDFORGER

Organise your ideas, projects and plans Nick Peers reveals how to use MindForger to help plan everything from your next shopping list to major home improvement projects. re you the kind of person who takes a scattergun approach to project-management? Do you struggle to stay on top of everything from an upcoming class project to recording gift ideas for someone’s birthday? Then MindForger could be just the tool you need. The program enables you to organise your life – whether work, personal or a combination of both – into notes and notebooks, which can be adapted to a wide variety of needs. Notes are written in the universal markdown format and can be assigned various properties to make them easy to find while steering you towards getting tasks completed within a set time. The tool is free and open source, and armed with this tutorial, you’ll be up, running and getting on top of your messy life in no time.

A

OUR EXPERT Nick Peers is dreaming of a new, more powerful server setup. MindForger can do the planning… now all he needs is a lottery win..

Editing notes in MindForger 1

4

5

3 6 Quick-fire search Type your terms in here to search across all notebooks or the selected notebook.

1

Outline view Each individual note is listed here, complete with tags and other useful information you’ve supplied, such as importance or urgency ratings.

2

Associations When Mind>Think is selected, MindForger will make suggestions based on the currently selected keyword.

56     LXF268 October 2020

If you’re running Ubuntu 19.10 or earlier, you can install MindForger via its own repo: $ sudo add-apt-repository ppa:ultradvorka/ productivity $ sudo apt update $ sudo apt install mindforger

At time of writing (version 1.52.0), we were still waiting for support for Ubuntu 20.04 to appear via the repo route. If it’s still not available when you read this, just download and install the .deb file from https:// github.com/dvorka/mindforger/releases. You’ll need to update this manually going forward.

First run

2

3

MindForger’s Outline view enables you to view all the notes that make up a single notebook.

Quick-fire formatting You can type markdown text by hand, of course, but the Format menu provides easy shortcuts to format selected text.

4

Markdown editor Like all good markdown editors, MindForger’s editor uses syntax highlighting to help you format your text correctly.

5

Editor controls Click Preview to bring up a preview window next to the editor to display the effects of your changes in real time.

6

Launch MindForger from its Launcher shortcut. You’ll open in Notebooks view. MindForger has three levels of organisation: Repository Folder>Notebook>Notes. Repository folders are actual folders, inside which individual notebooks reside as separate Markdown (.md) files. Each notebook is then broken down further into notes, which basically reside within the notebook’s file as individual sections, but which show up in MindForger’s interface as separate notes. The way MindForger organises information makes it possible to easily separate work from pleasure, or even limit yourself to working with a single notebook at any one time. Choose Mind>New followed by MindForger Repository to select a suitable directory on your hard drive, or select Markdown File to create a single notebook. You can then switch between recently opened folders and files via the Mind>Remind menu, or choose Mind>Learn to manually load a folder or file as

www.linuxformat.com


TUTORIALS Create a bibliography Credit: www.onlyoffice.com

ONLYOFFICE

Quickly put together a slick bibliography

Putting together accurate, searchable bibliographies is rarely a simple job. Kseniya Fedoruk reveals how to do it with less effort, using ONLYOFFICE. reating bibliographies, or searching and managing publication references is probably not an everyday task for those who are working with documents online. Nevertheless, if you’re writing a research paper, a book or something to be studied in academic circles, then as a rule you’re required to include a bibliography or a list of references that have helped you to put together your article. This job can be done manually, but it’ll take up a lot of your time. The easiest way to create a bibliography easily and quickly is to use dedicated applications that can perform this task automatically and within seconds. ONLYOFFICE is an open-source web-based office suite that provides you with advanced online editors for text documents, spreadsheets and presentations that are compatible with OOXML formats (.docx, .xlsx, . pptx). The suite includes a range of editing, formatting and styling tools along with multiple collaborative features. With the pre-installed add-ons, also known as plugins, as well as with the capability to create and add you own plugin, you’re able to implement extra functionality. In this case we’re talking about three

C

OUR EXPERT Kseniya Fedoruk is a documents expert working at ONLYOFFICE, she lives to make your documents the best looking things on the planet!.

easy-to-use reference management plugins: Mendeley, Zotero and EasyBib.

Bibliography management ONLYOFFICE’s online editors enable you to create bibliographies and manage references through special plugins. The biggest advantage of such tools is that you can add a bibliography or a list of references while editing your document – there’s no need to switch between several applications. The aforementioned plugins – Mendeley, Zotero and EasyBib can also handle bibliography management.

Configuration of the plugins Before using the Mendeley, Zotero and EasyBib plugins in ONLYOFFICE, you need to create an account in the service of your choice and connect it to the editors. To configure the Mendeley plugin, run it from the Plugins tab in the editors. You need to go to http://dev. mendeley.com/myapps.html, where you’ll see a form to fill in, using the link provided in the plugin interface as a redirect URL. When you’re ready with the form, press

CREATING A BIBLIOGRAPHY

1

Run the plugin

All three plugins work in a similar way. To insert a bibliography in your document, you need to follow several steps. To create, upload or open a document, access the editor, switch to the Plugins tab and click a plugin icon.

60     LXF268 October 2020

2

Find the reference

Next, search for the desired written source (book, journal article or website,   for example) by author, title or year. You can either select the required citation style in the drop-down list or simply type to search for it.

3

Add the bibliography

Select the correct language (this option is available for the Mendeley and Zotero plugins). Insert the bibliography by clicking the corresponding button. The bibliography list will begin where you put your cursor.

www.linuxformat.com


TUTORIALS Amiga emulation Credit: https://fs-uae.net

FS-UAE

Relive running a HDDequipped Amiga 1200 Les Pounder reveals how to install a hard drive in a virtual Amiga 1200, enabling him to relive the glory days of the 1990s Amiga scene. ack in 1989 Tim Burton’s Batman movie was in the cinema, and advertising campaigns were in full swing to promote the Caped Crusader. At Commodore, its marketing team had signed a deal with Warner Bros. Pictures and Batman was to be on the Amiga. The Amiga 500 “Batman Pack” was our introduction to the Amiga and it started a life-long love for the machine. But the Amiga 500 was not the first machine. That honour goes to the Amiga 1000 as used in 1985 by Andy Warhol to digitally alter a photograph (look up the floodfill bug – Ed) of Blondie lead singer Debbie Harry. The Amiga 500 was the machine that made the biggest impact on the 16-bit home computing scene. With its 512KB of RAM and a 68000 7MHz CPU, the Amiga 500 was much more than a games machine. It was a competent office computer, with printers and floppy disks on which to save our work. It was a music creation tool using sound tracker tools and virtual mixing desks, it was an artist’s studio where they could create paintings, animations and 3D digital art via the mouse and a myriad of aftermarket add-ons. The Amiga was also a television workhorse, capable of mixing live television with graphics created on the Amiga. The Amiga was expensive, retailing for around £399 in 1990, but that was far cheaper than an IBM PC compatible of the era. What the Amiga had that the PC didn’t were custom chips that handled various aspects of the computer. “Gary” controlled the floppy drives, “Denise” handled video data, “Paula” handled audio playback, serial ports, mouse joystick and floppy drive control. These chips were cost-reduced over the life of the Amiga and replaced with other named chips in future

B

OUR EXPERT Les Pounder is associate editor at Tom’s Hardware and a freelance creative technologist. He blogs about his discoveries at bigl.es.

YOU NEED Linux! Amiga Kickstart ROMs Amiga Workbench 3.1 disk images

FS-UAE is a pleasant way to emulate an Amiga, take your time to learn the interface in order to get the most from your Amiga!

62     LXF268 October 2020

On power-up the Amiga has a boot screen instructing the user to insert a disk. On later Amigas this was animated.

models. What made the Amiga interesting? What can we do with it and is it still in use today? Let’s find out…

Emulating the Amiga Amiga hardware comes in three conditions. Pristine re-capped (capacitors replaced and the board serviced) machines that see their cases returned to original colour by retro-bright (a bleaching solution). It can also come as hacked/modded hardware with extra boards and cards added to power up the Amiga for the 21st century. Finally, it can be a loft/barn/garage find that sees the Amiga battered and filthy and in need of restoration. Whatever form it takes, Amiga hardware is expensive and so emulation is a great way to get interested. For Windows users there is Cloanto’s Amiga Forever. An emulation suite that provides all of the files necessary to emulate many models of Amiga and a range of applications. For around €50 we can pick up the premium edition with three DVDs of software and videos. Raspberry Pi users can install Amibian (www. amibian.org), which is a full Amiga-centric distro for the Pi. All you need to bring is your Kickstart ROMs and disk images for an instant hit of nostalgia. There are other emulators for Windows, Linux and macOS such as FS-UAE (Win-UAE for Windows) that provides a friendly and expansive means with which to experience the Amiga. And this is where we start our journey – emulating an Amiga 1200 on our Ubuntu machine.

Installation To emulate an Amiga we shall use FS-UAE, available from https://fs-uae.net/download. Download the

www.linuxformat.com


TUTORIALS Analogue synthesisers Credit: https://amsynth.github.io

AMSYNTH

How to recreate the Doctor Who theme Mike Bedford makes use an analogue synthesiser simulator to generate one of TV’s most iconic and recognisable themes. stablished in 1958, the Radiophonic Workshop was created, according to the BBC, to produce incidental sounds and new music for radio and television. It was known for its pioneering work in electronic music and music technology. Just two years into the Workshop’s existence, Delia Derbyshire, who had recently graduated from Cambridge with a degree in music and mathematics, joined the BBC as a trainee assistant studio manager. Within a couple of years she’d been assigned to the Radiophonic Workshop. It was here that she famously produced the Doctor Who theme tune, which had been composed by Ron Grainer. Delia had to use a mix of equipment including laboratory instruments like signal generators, in-house designed and built electronic circuits, and reel-to-reel tape recorders. Bizarrely, Delia even used metal panels, specifically blanking plates from 19-inch instrument racks, plucked by hand, to create the twang of the Doctor Who base line. To produce different notes, the sound was recorded on a tape recorder and played back at different speeds to alter the frequency, and further electronically manipulated to subtly alter the fundamental sound.

OUR EXPERT Mike Bedford likes to play around with the maths of sound. It shouldn’t come as a surprise – music is mathematically based, after all.

Introducing amSynth Here we’ve concentrated on the original Doctor Who theme, but it’s changed many times over the years. If you fancy creating something different, therefore, you have plenty of options to choose from and you’ll easily find online recording of all the main variants.

We’ll be using a real-time open source software synthesiser called amSynth, which is similar to classic analogue synthesisers of the 1970s, including the Minimoog and the Roland Juno-60. First install it on your PC and fire it up. Now click the Audition button towards the right-hand edge of the toolbar (which is a green forward-pointing arrow in some versions) and you’ll hear a musical note. What’s more, just by chance, unless they’ve been changed since the version we used, the default settings produce a sound that isn’t a million miles from what we need for the bass line of the opening few bars of the Doctor Who theme. A key component in generating this sound is a ring modulator. You don’t need to understand the inner workings of this electronic circuit to follow the following instructions but, if you do want a better appreciation of the underlying principles, take a look at the explanation in the box entitled Understanding Ring Modulators (opposite page). And finally, before moving on, note that,

66     LXF268 October 2020

Credit: Ville Hyvönen, CC BY-SA 2.0, http://bit.ly/lxf268ville

E

Analogue synthesisers like the Minimoog revolutionised music in the 60s and 70s. Today the same functionality is provided by software synths.

although amSynth has rotary controls, the user interface is linear so, to change any setting, click the control and adjust by moving vertically. Pressing the Audition button gives us access to just a single note and there’s limited scope within amSynth to change that note. What we need, therefore, is to connect a MIDI piano keyboard to amSynth. If you have a real MIDI keyboard then that can be used, but a software solution involves using the Virtual MIDI Piano Keyboard (called VMPK in repositories) and you also need a utility to wire its MIDI output to amSynth’s MIDI input – we used the ALSA Sequencer (aconnectgui in repositories). Note that with VMPK’s default settings, when you use the keyboard it’ll play notes through its own internal audio generator and so you’ll have to tell it to route its output to amSynth. To do that you’ll have to define the necessary routing in the ALSA Sequencer and also, in VMPK, select MIDI Connections from the Edit menu and then choose ALSA from the MIDI OUT Driver menu. Now you’ll be able to play notes on VMPK and hear them via amSynth. Try it out, noting that the sound of the notes will now be very different to how VMPK sounded before you wired it through to amSynth.

Create the bass line With everything connected up, we can now start to make some music and we’re going to start by generating the introductory base line. Fred Welsh,

www.linuxformat.com


BACK ISSUES

BACK ISSUES

MISSED ONE?

ISSUE 267 September 2020

ISSUE 266 Summer 2020

ISSUE 265 August 2020

Product code:

Product code:

Product code:

In the magazine Learn how to protect your stuff with our ultimate guide to backing-up; discover open source gaming engine Godot; get the low-down on LibreOffice 7.0’s new features, and learn how to schedule tasks in the terminal. Plus privacy-centric distros rated!

In the magazine We see what’s new in the latest version of Mint, narrow down the best IDE for your programming adventures, show you how to code the arcade classic Pong, manage tasks using Zenkit To Do, and speak about the Open Mainframe Project with John Mertic.

In the magazine We check out the latest show-stopping distros that are packed with advanced features and tools, show how to code Pac-Man games in Python, design and publish eBooks, create stop-motion animation on a Pi, and explore modern browsers.

Digital download highlights Endeavour OS 15 and KaOS 2020.07 (64-bit only).

Digital download highlights OpenSUSE 15.2 (64-bit) and Grml 2020.06 (32- and 64-bit versions).

Digital download highlights Linux Lite 5.0 and Pop!_OS 20.04 (both 64-bit versions).

ISSUE 264 July 2020

ISSUE 263 June 2020

ISSUE 262 May 2020

Product code:

Product code:

Product code:

In the magazine We reveal why the latest version of Ubuntu is better than ever before, show you how to code a top-down arcade shooter, improve your audio recordings with Audacity, simulate your own circuits and give you an insight into open source processors.

In the magazine Discover how you can bring your old hardware back to life with 32-bit distros, and code an old-skool platformer. Plus, secure your cloud backups, solve mazes using graph algorithms and learn new video-editing skills with the very capable OpenShot.

In the magazine We show how to keep your Linux system safe, from protecting your data to rocksolid login solutions. There’s advice on how to construct an FM radio receiver, make the most of systemmonitoring tools, and a look back at over 20 long years of Linux Format!

Digital download highlights Fedora 32 Workstation and Manjaro 20 (both 64-bit versions).

Digital download highlights Mint Debian Edition 4, antiX 19 and Bodhi Linux 5.1 (all 32-bit versions).

DVD highlights Manjaro 19.0.1 (64-bit) and IPFire 2.25 Core 141 firewall distro (32- and 64-bit).

LXFDB0267

LXFDB0266

LXFDB0264

LXFDB0263

LXFDB0265

LXFDB0262

To order, visit www.magazinesdirect.com Select Single Issues from the tab menu, then select Linux Format. Or call the back issues hotline on 0330 333 1113 or +44 (0)330 333 1113 for overseas orders.

Quote the Product code shown above and have your credit or debit card details ready 70     LXF268 October 2020

www.linuxformat.com


THE BEST NEW OPEN SOURCE SOFTWARE ON THE PLANET

HotPicks

Alexander Tolstoy is heading towards an Indian summer in his Mother Russia, with a feast of great hot open source picks.

LibreOffice Pinta Basilisk Boop-GTK HDCK QtFileExplorer Prelockd Destination Sol Matchimals.fun digiKam GSConnect OFFICE SUITE

LibreOffice Version: 7.0 Web: www.libreoffice.org ne of the most successful and best-known open source software has recently seen a major release. Of course that’s LibreOffice, a must-have software for Linux productivity workstations and the closest rival to the commercial Microsoft Office. In July there were some controversial rumours about labelling the 7.0 release as the ‘Personal Edition’, but shortly after developers the Document Foundation reverted their decision and left the branding intact (only updating the splash screen with stunning artwork). If you go to the ‘About’ dialogue, you’ll see that even the limitation to ‘individual use only‘ has also gone, which should further reassure plain mortals. LibreOffice 7.0 brings sizeable changes, both visible and less obvious. These include padded numbering in Writer (first numbers use 0 as a prefix), better autocorrection with respect to typographic rules in nonEnglish languages, honouring case-insensitivity flags by regexp-capable functions in Calc, and many more. As usual, you’ll need to be a regular LibreOffice user in order to notice lots of the introduced changes, improvements and speed-ups. Different people use this software in their own manner and for different tasks. LibreOffice is a complex and massive suite, and while we commonly think of it as Writer plus Calc, there are LibreOffice users that do publishing layouts and vector graphic artwork in Draw and prepare presentations in Impress. Draw is particularly worth trying if you enjoy vector images, as it is a powerful alternative to Inkscape. In LibreOffice 7.0, Draw has more cool effects, such as Glow and Soft Edge, semitransparency support for text and more. Anyhow, whatever your workflow in LibreOffice, the new release is the recommended update. Another good reason for that is performance improvements throughout the suite’s many parts. For instance, opening a spreadsheet with a large number of embedded images is now a lot snappier than it used to be. Saving and exporting should be faster too.

O

www.techradar.com/pro/linux

LibreOffice remains friendly and faithfully yours, without imposing any limitations on usage.

Exploring the LibreOffice interface 1

4

2

3

5 Classic toolbar Each part of the suite shares a similar toolbar, with essential features available with a simple click.

Helpful sidebar The Draw app shows this by default, but you can also use the sidebar mode in other LibreOffice apps (View > User Interface).

Working area This is a cell grid for Calc, a document page for Writer, a canvas for Draw, and a slide for Impress.

Status area Word count, page number, current language, dimensions — this thin panel along the bottom of the window is always at your service for each app.

1

2

Configurable interface Right-click on a toolbar handle and choose ‘Customise toolbar’ to add or remove buttons, change their order and so on.

4

5

3

October 2020 LXF268     71


9000

CODING ACADEMY CODING ACADEMY Reservoir Bunnies

PYTHON

Create a 2D shooter Putting the shooter into top-down shooter, Calvin Robinson brings us another game programming tutorial: Reservoir Bunnies. e’re going to have a go at creating our own 2D shooter. We’ll be using Python for this tutorial, so make sure it’s installed and updated, along with the PyGame module. pip3 install pygame should get everything set up. We’ll need some image and sound resource files which can be downloaded from the LXF archives website, along with a complete copy of the source code for reference. Launch Python IDLE and select File > New File to create a new document in the Script window. It’s important to type code in the Script window, rather than Shell, because it’s then editable and saveable. We’re going to start off by importing PyGame, since this module provides a lot of game mechanics that we’ll want to tap into. We’ll also initialise our game world ( init ) and set the screen resolution:

W

OUR EXPERT Calvin Robinson is a former Assistant Principal and Computer Science teacher with a degree in Computer Games Design and Programming BSc (Hons). Twitter.com/ CalvinRobinson.

import pygame from pygame.locals import * pygame.init() width, height = 640, 480 screen=pygame.display.set_mode((width, height))

Now that we have a working game environment, we’ll need to start adding things to it. Let’s begin with our player character. Loading in image sprites is one area PyGame comes in very handy: player = pygame.image.load("resources/images/dude. png")

The next logical step would be to replace our resources with your own custom creations. A good place to begin would be altering the colours of our images in Gimp.

Iteration in Python enables us to essentially loop parts of our code. We have two methods of doing this, with either a counting loop or a conditional loop. Let’s set up a conditional loop to keep running through our game code. Our first loop will take care of a few things: firstly, clearing the screen before we do anything else; then we’ll draw screen elements – that is, our player character (starting at x, y coordinates 100,100); next we’ll update the screen; finally we’ll implement an additional conditional loop to check if the player has clicked the ‘X’ to close the game window, and if so, we’ll close everything down accordingly: while 1: screen.fill(0) screen.blit(player, (100,100)) pygame.display.flip() for event in pygame.event.get(): if event.type==pygame.QUIT: pygame.quit() exit(0) Pygame.quit() shouldn’t be necessary these days, as

78     LXF268 October 2020

Nothing much to see yet, but it’s a start!

the interpreter should automatically call it while being shut down; however it’s best practice to include this to prevent the game from hanging. Hit F5 or use Run > Run Module to test. We should have a game environment with a black background and a bunny sprite near the top-left corner of the window, and not much else, but at least we should be able to close the window and quit the game. Let’s add some scenery to our environment. In the resources pack we have sprite images for grass and a castle. Import them after we load our player image: grass = pygame.image.load("resources/images/grass. png") castle = pygame.image.load("resources/images/castle. png") We’ve now got variables grass and castle set up,

with sprite images loaded into them through the PyGame module. Next, we’ll need to draw them in our environment. We’ll need to tile the grass image if we want it to fill the entire window. Place the following code before the code we implemented to draw the player on our screen. We’ll loop through both the X and Y axes, to cover the entire resolution, using two loops – one nested within the other. Then we draw the castles on the screen: for x in range(width/grass.get_width()+1): for y in range(height/grass.get_height()+1): screen.blit(grass,(x*100,y*100)) screen.blit(castle,(0,30)) screen.blit(castle,(0,135)) screen.blit(castle,(0,240)) screen.blit(castle,(0,345 ))

Again, hit F5 to save and run, and we should see much better scenery, with green grass and a few castles to the left of our player character. Firstly, let’s implement some gameplay mechanics for the bunny, our player character. We’ll need to

www.linuxformat.com

Profile for Future PLC

Linux Format 268 (Sampler)  

You can subscribe to this magazine @ www.myfavouritemagazines.co.uk

Linux Format 268 (Sampler)  

You can subscribe to this magazine @ www.myfavouritemagazines.co.uk