LXF - 290 - July 2022
LXF - 290 - July 2022
Create your own Code your own secure How Tux was launched
open source projects filesystem commands into orbit by SpaceX
WELCOME
Open source
MEET THE TEAM
This issue’s lead feature reveals the
security
benefits of hacking in the real world, Jonni’s playing with his little bag of
open source hacking tools this
so we wondered what life hacks our issue. It should come as no surprise
contributors like to use… that they’re all open source, with
the collaborative community
development being more a way of
life for the hacking community.
Jonni Bidwell From the heights of the DEF CON
If you’re lucky enough to have a garden, don’t conferences, through to the open
waste time digging up the dandelions on your communities surrounding the big-
lawn! They’re good for the soil and will help name tools like Kali Linux, and to
grass grow. You can eat the flowers and in the general online forums, there’s an
autumn boil up the roots. Nettles and cleavers awful lot of people explaining how
are good in soups, too. Dandy. hacking works and how to use the tools. It’s in stark contrast to the
. murky mainstream media portrayal of the hacking world.
The less-exciting truth is that, for many, the best defence is
Matthew Holder an updated and patched system. As we reported in LXF288,
My life hack is home automation. Whether a Google study demonstrated that open source developers are
being alerted to appliances completing their best placed and experienced at delivering timely security fixes.
cycles, being told what bins need putting out Furthermore, all the big distros – especially the commercially driven
or the kids being able to switch the lights on ones – offer up-to-the-minute patches.
by uttering a magical incantation, I wouldn’t You might not like it, but it’s one thing Microsoft did get right was
be without it! Now to make sure it works reliably 24/7… forcing security updates. Its big failure, however, was offering its
customers an open way to upgrade out of date operating systems,
but then its inability to enable users to upgrade is somewhat
Nick Peers inevitable due to its proprietary nature. Windows 7 (the 12-year old
I mix bokashi bran (widely available from OS) still accounts for 12 per cent of online Windows users. That’s
eco stores and online outlets) with my food more people than those running Windows 11.
waste. Not only does it reduce odours and It’s a blessed relief having access to the latest releases. This
speed up the decomposition process, it is something that open source users don’t have to worry about
means that I can safely compost a wider on the whole, and it’s why every issue we can offer a packed
range of foods, including cooked meats. assortments of tutorials like Portainer, Commodore 16 emulation,
FreeCAD, packaging software and commercial-scale CMS systems.
It’s amazing and it’s secure, so enjoy!
Les Pounder
I use serial consoles a lot, but connecting to
MicroPython REPLs on ESP32s, Raspberry Pi
Picos and a myriad of Arduino serial consoles Neil Mohr Editor
can be a chore. My solution is to use tio [email protected]
(https://github.com/tio/tio), a simple serial
console tool. I just point tio at the port and it just works.
Michael Reed
Spelling numbers is a useful technique to
create a long password that’s easy to Subscribe
remember. “sixfivefourXx” is “reasonably”
strong and easy to type. It’s also easy to pass
& save!
on to another person. The uppercase and
lowercase letters at the end are also easy to remember and
On digital and print
increase the strength of the password. – see p16
SysLinuxOS 11.3 22
Distros that take the kitchen sink approach
don’t really appeal to Mayank Sharma who
enjoys owning a dishwasher… until, of
course, he finds one that does.
Q4OS 4.8 23
Neither a big KDE user nor a fan of
Windows, and yet Mayank Sharma can’t
resist the charm of this KDE distro and
ROUNDUP IN DEPTH
its Windows installer.
Linux in space!
Shattered Pixel Dungeon 25 52
The only certainties in life are death, taxes From a shaky
and middle management, and Neil Mohr start, Linux is
knows which two are the least painful of now blasting off
those to deal with. in the tricky
astronautics
arena. Mike
Bedford takes a
look at its
Full-featured CMS 26 successes and
Michael Reed takes a good look at five what its future
heavyweight professional content could be in a
management systems that are all open galaxy that’s not
source and completely free. far away at all!
Pi USER TUTORIALS
DRIVERS
F
or over two decades the Linux long term, because the kernel
community has watched from the doesn’t allow two drivers for the
sidelines as Nvidia offered market- same hardware. In a blog post
leading GPU and compute performance, but only (https://bit.ly/lxf290gnome)
through a proprietary driver stack. Yet ever since Christian Schaller outlines how over
AMD moved to an open source driver with much the coming years Mesa (the kernel
success, the pressure has been growing on graphics driver) Nivida and Nouveau
Nvidia to do the same. Finally the company has will have to be designed to work
decided to do the smart thing and transition to together, which will pay dividends all
an open source kernel driver. round. Nouveau can access enhanced features Initially, Nvidia’s support is only for
There have been indications in recent years currently blocked while Nvidia gains day-one Turing and newer GPUs that are
that Nvidia was finally succumbing to pressure kernel update access and more. running in data centres.
and developing open source components. Such A transition like this doesn’t happen over
signs include an Nvidia Tegra driver in early 2022 night. Given the complexity of the subject, the
and being more helpful towards the open soure
SOFTWARE OPINION
R
ichard Hughes, a maintainer of GNOME As for LVFS, Richard is now looking towards
software (among other things) “the next 50 million updates”, and highlights how
highlighted in a blog post that the Linux fast LVFS has been growing since its launch, with Frederic Danis
Vendor Firmware Service (LVFS) has now it now “we regularly ship more than 2m updates is a senior software engineer
delivered a remarkable 50 million updates. LVFS a month.” A large part of this growth, according at Collabora
(https://fwupd.org) is a secure portal for to Richard, is thanks to Google. “The tech giant
uploading and distributing firmware updates. has been an amazing partner in encouraging
As Richard explains in his blog (https://bit.ly/ vendors to ship updates on the LVFS and Over the past two
lxf290gnomeblog), “Just seven years ago shipping fwupd in ChromeOS.” years, Bluetooth audio
Christian [Schaller, director for Desktop, Richard also hints at “super” secret things support has steadily grown
Graphics and Infotainment at Red Hat] asked me coming, while also promising to “push the in PipeWire and has become
to ‘make firmware updates work on Linux’ and ecosystem towards transparency, open source a featureful, stable,
we have a thriving client project that respects and respecting the user’s privacy.” Thanks to the conformant, open source
both your freedom and your privacy, and a LVFS portal, using Linux on a range of devices is Bluetooth audio stack
thriving ecosystem of hardware vendors who easier and more user-friendly than ever. implementation.
consider Linux users first-class citizens.” Testimony to that is the
Richard’s blog post also fact that Bluetooth A2DP
celebrated the release of audio has now been
fwupd 1.8.0. This is an open- qualified on the Steam
source daemon that’s used Deck using PipeWire and
for installing firmware WirePlumber. This means
updates. It’s well worth that it’s now able to pass the
checking out the release conformance test suite from
notes at https://bit.ly/ the Bluetooth SIG and will
lxf290fwupd for a full rundown of what’s new in LVFS is a portal that enables hardware manufacturers to work against other qualified
the latest version of the daemon. securely upload firmware for their products. implementations.
Of course, development
doesn’t stop here. There are
LAPTOPS still several things to fix and
new features to support as
the industry moves forward.
R
azer is known for its powerful laptops comes with Lambda software, such as PyTorch Bluetooth 5.2. This profile is
aimed at gamers and creatives. One and TensorFlow, and Ubuntu 20.04 is preinstalled. meant to improve battery
of its latest laptops, the Tensorbook, The device isn’t cheap: prices start at $3,500 life, enable audio
combines Razer’s trademark style and power, (around £3,000), and if you want to pay extra to broadcasting to multiple
and comes with Linux preinstalled. dual-boot Ubuntu and Windows then the cost devices and also support
The specs are certainly impressive, with an rises to $4,999 (around £4,000). hearing aids.
Intel Core i7-11800 CPU, Nvidia GeForce RTX It’s certainly a stylish-looking laptop, but as Supporting this new
3080 Max-Q graphics card, 64GB of DDR4 Tom’s Hardware points out (https://bit.ly/ profile requires work
RAM and 2TB SSD storage, along with a 1440p lxf290tomshardware), Razer sells similar- underneath PipeWire,
resolution screen with a 165Hz refresh rate. If specced laptops for less. If you’re looking for a in BlueZ, but until that’s
those look like the kind of specs you’d usually laptop that runs Linux, while also offering ready we can also use LC3
see in a gaming laptop then you’d be right. incredibly powerful components for machine- on the A2DP profile and be
However, rather than gaming, this is designed learning tasks, then you can check out the prepared for LE Audio when
for machine-learning tasks – something the Tensorbook from Lambda’s own website at the rest of the stack
RTX 3080 GPU does particularly well. It also https://bit.ly/lxf290tensorbook. is ready to support it.
OPINION PATENTS
A
fter years of pursuing a predatory twist, with patent lawyer McCoy Smith, the
Keith Edmunds patent lawsuit against GNOME’s founder of LexPan Law (www.lexpan.law) filing a
is MD of Tiger Computing Ltd, Shotwell software, the US patent office re-examining proceeding against RPI’s patent,
which provides support for has moved to strip Rothschild Patent Imaging where he pointed out that the patent was not for
businesses using Linux. (RPI) of its patent rights. In 2019, RPI went after a new invention (which often happens with
GNOME, claiming its software infringed on its patent trolling). The US Patent Office agreed
Patent No. 9,936.086. with McCoy’s argument, so any claims against
A would-be client put Despite the valiant efforts of the open-source the patent have been cancelled and it can no
in a request: “Can you give community, which helped raise $150,000 to help longer be used for future claims.
us a gold disk so that we can defend the project against the claim, in the end The success in targeting the patent directly is
create more servers?” Now I the GNOME Foundation settled with RPI. This certainly encouraging. The expectation is that
needed to tell them that, was a disappointing development, especially for future patent trolls will be put off from targeting
unfortunately, they’re asking people who feared that it could encourage other open source projects, especially after RPI’s initial
the wrong question. patent trolls, but there’s been an encouraging success against GNOME.
In case you’re unaware, a
“gold disk” was a CD image
that was used to create
multiple, very similar
systems. This approach had
SERVICES WEB BROWSERS
numerous disadvantages:
the software versions were
baked into the CD; changes
to the configuration meant
GitLab moves Firefox hits 100
creating a new CD; and
so on.
Surely there’s a better
to AlmaLinux Mozilla celebrates version
100.0 of its famed browser.
way? As it happens, yes Development comes after
M
there is. Far more flexible, ozilla recently celebrated the 100th
far more powerful these
CentOS 8 enters End of Life. version of its open-source web browser,
days is a configuration Firefox. After 17 years, Firefox remains
R
management system. I’ve ed Hat’s controversial decision to End one of the most popular browsers, despite
mentioned them before, but of Life (EOL) CentOS 8 in December Google Chrome’s dominance, and as the Firefox
if you have more than one 2021, in favour of CentOS Stream (see team state in a blog post celebrating the release
Linux server then you LXF274) continues to have ramifications, with (which you can read at https://mzl.la/3kWIxID),
should be using something GitLab (https://about.gitlab.com) the latest that using its web browser “contributes directly
like Puppet, Ansible or Salt high-profile project to switch to an alternative. to a better web, keeping it open and accessible
to manage them. In a blog post (https://bit.ly/lxf290gitlab to all.” Firefox 100.0 brings an improved Picture-
So why was the request move), it’s been confirmed that the platform for in-Picture mode, with wide support for video
for a gold disk the wrong software development and delivery has moved captions, better spell checking and installation
question? Because instead to AlmaLinux (https://almalinux.org/). DJ process. This new version looks to be great for
of asking for help to solve Mountney, engineering manager, Distribution media, with HDR video support on Mac, and
a problem, it’s asking for Build at GitLab, explains. “With CentOS going hardware-accelerated AV1 video decoding.
help to implement a poor, EOL, we needed to choose a build platform to
pre-determined solution to replace our Centos8 build machines,” going on
the problem. to say that “We needed a ‘boring’ solution, and
Each time you think, AlmaLinux was asked for by our users.”
“Surely there’s a better While we’re unsure how happy the AlmaLinux
way?”, then take a deep team will be with the software being labelled
breath, sit back and relax. ‘boring’, this shows just how unpopular Red Hat’s Firefox has hit version
It’s 99 per cent certain that move has been. “AlmaLinux is very excited to 100, and brings some
there is. This is, after be the stage to GitLab’s rockstar,” said Jack decent media-playing
all, Linux. Aboutboul, community manager for AlmaLinux. features with it.
Distro watch
OPINION
PLAN FOR
What’s down the side of the free software sofa? THE FUTURE
FEDORA 36
Fedora 36 is now available to download, which comes
with GNOME 42, and now most applications have been
ported to GTK 4. It also includes Ansible 5, which the
release announcement (https://bit.ly/lxf290fedora)
claims will make “maintenance easier and allows you to Matt Yonkovit
download only the collections you need.” Fedora Server is the head of open source
has also been updated, and the Cockpit tool now offers strategy at Percona
a module for administering NFS and Samba shares,
making it easier to share files over a network. Fedora is a hugely popular distro, and
version 36 has now been released. What were the leading
technologies of 2002? Linux
was only 11 years old, the
PROXMOX VE 7.2 cloud was in its infancy, and
A new version of this Debain-based distro has been iPhone and Android would
released as a ‘Virtual Environment’, and comes with an Proxmox VE 7.2 brings numerous updates not exist for another five
updated kernel (to 5.15.30) and ZFS support. It’s now to the virtualisation platform. years. While some of the
based on Debian 11.3 and features various package developments we have today
upgrades. This open-source virtualisation project makes might have been predictable,
it possible for you to run virtual appliances and virtual there are others we could not
machines, and you can find out more about the distro at know. Twitter, for example.
https://bit.ly/lxf290proxmox. So how can we look 20
years into the future and see
what the world of open source
and data will look like?
We have to look at which
platforms will continue to
TAILS 5.0 grow. PostgreSQL has a
Tails, the popular Debian-based live DVD/USB distro strong argument to be that
which aims to offer complete anonymity when using the platform. It isn’t beholden to
internet, has a new version that’s available to download. any one vendor that supports
It’s the first version to be based on Debian 11, and how it develops, which should
various tools have been updated. Furthermore, new ensure longevity. And it’s used
OpenPGP tools have been included – including within multiple companies’
Kleopatra, which replaces the OpenPGP Applet. For a The Amnesic Incognito Live System offerings and products too,
full rundown of the new version, check out the release (better known as Tails) makes it possible which should keep the
announcement at https://bit.ly/lxf290tails. for you to browse the internet in developer base interested too.
complete anonymity. Why should this matter to
us? The role of data in
businesses is only going to
grow. Social media and online
businesses use the data we
EXTIX 22.5 create to build their products.
ExTiX 22.5 is available to download, and is now based Open source is critical in how
on Ubuntu 22.04. As usual, the ISO image is all those systems will be put
impressively small – just 1.34MB, which enables it to together, as well as ensuring
run from your PC’s RAM for incredibly fast performance. that the voice of the user gets
If you want to create your own live installable Ubuntu heard in that process. Picking
22.04 system, you can do it using Refracta Snapshot in the right platform for this, like
a process the team claims is “so easy that a 10-year old So easy a 10-year old can use it, is a saying PostgreSQL, can help.
child can do it.” We’re not too sure about that, but you you don’t often attach to Linux tools. PostgreSQL can be the
can find out more at https://bit.ly/lxf290extix. database development
interface of choice for the
next 20 years, if we make it
more accessible, and
listen to users.
KERNEL WATCH
OPINION
OPEN
NVIDIA
Jon Masters summarises the latest happenings in
the Linux kernel, because someone has to…
L
inus Torvalds announced that the used to require loading a huge binary blob into
5.18 kernel, still under development the kernel, wrapped with a small shim to
at the time of writing with Release massage the interface between the two. Getting
Jon Masters has been involved Candidate (RC) 6 being out for testing, “out of the box” support was challenging to
with Linux for more than 22 years. “seems to be quite well-behaved” and was on impossible, depending upon the Linux distro.
track for release. He noted that 5.18 was on Things began to improve slightly a decade
Rather surprisingly I can track to be “one of the larger releases in ago with the release of the “Nouveau” drivers,
happily write about the numbers of commits”, coming close to the which are in upstream Linux today. This is a
release of an actual open source size of 5.14. While he was still “expecting the clean room, reverse-engineering effort of the
graphics driver released by other shoe to drop”, it seemed likely the final proprietary drivers done by the community.
Nvidia. This has been a long time release was not far away. We’ll have a full To that end, it’s amazing how far the “out of
coming. I don’t expect to say this summary of the new shiny 5.18 kernel the box” experience has come from a graphics
often (I’d love to be proven features in the next issue. point of view. It’s possible today to buy a system
wrong), but kudos to Nvidia for Nvidia opens up its graphics drivers... a with an Nvidia GPU and actually have Linux
the engagement with open
little. Rare is the historical occasion in which distros boot on it without having to jump
source. That said, it’s not as
“open source” and “Nvidia” have been used through too many hoops. All of that is thanks to
“open” you might assume, but
it’s still a dramatic improvement positively in a sentence together. For many Nouveau. But for all that positive news, there
upon where we were. years, Nvidia has faced the ire of kernel remained no means to drive Nvidia’s CUDA
When you think about it, it’s developers (famously including Linus GPGPU stack, nor achieve certain functionality,
less surprising that Nvidia would Torvalds and a certain finger) because of its without installing the proprietary driver.
do this now. It’s finally getting lack of interest in working with the open And this is how it seemed things would
more competition (from Intel, source community. It was, then, shocking to remain. Until in May Nvidia announced an “open
which know how to do open see an announcement come out of the blue source” driver... sort of. The reason for using
source graphics drivers), the that Nvidia is opening up its drivers. quotes is that, while the driver is actually open
“crypto” market is tanking, and
Nvidia GPUs, of course, are dominant source (and even under a suitably compatible
there are emerging opportunities
among gamers, enthusiasts and datacentre licence), it appears simply to remove much of
in edge and HPC that would be
much better served by providing consumers alike. They have singularly fuelled the proprietary blob out of the kernel and into
open source drivers for users. much of the growth in high-end gaming, firmware. The kernel thus makes calls that are
Those deploying large machine learning, and even “crypto” mining still wrapped, but in a slightly different manner.
HPC clusters are likely to be over the past decades. But for nearly all of While this isn’t to everyone’s taste, it’s still
unimpressed by needing to also that time, using an Nvidia GPU has come with tremendous progress. There may yet come a
deploy a giant proprietary binary a certain amount of pain. The Linux drivers day in which official upstream drivers are
blob into their kernels. offered by the company aren’t upstream, and supported by Nvidia.
I must confess to only having
used the proprietary Nvidia
driver on very rare occasions,
mostly on principle. In fact, this
ONGOING DEVELOPMENT
kept me from buying its
hardware for a long time, and Preparations for the upcoming Linux Kirill A Shutemov (senior Linux software
consequently meant that I didn’t Plumbers Conference (LPC) continues. engineer at Intel) posted updated patches
play with technologies like CUDA This year’s conference returns once again to implement support for “unaccepted”
until they were already quite to having an in-person (hybrid) component memory. These are part of many different
mature. I would be quite and will take place in Dublin on 12-14 patch series in aid of enabling confidential
surprised if there are people who September. Among the sessions being computing technologies such as Intel TDX
haven’t felt a need to ultimately
prepared is a miniconference dedicated to and AMD SEV-SNP.
touch those proprietary drivers,
RISC-V, which Atish Patra announced. Confidential computing protects virtual
such is their reach, but this move
could even drive sales.
A lengthy thread took place on the subject machine instances from being analysed by a
Perhaps this is also a reminder of debugging VirtualBox with the 5.18-rc1 (malicious) hypervisor. Enabling it requires
of the value served in staying kernel. While the original bug reporter that memory by specifically “accepted”
strong and sticking to core was likely incorrect in their analysis or by a virtual machine and handed off to it,
principles. The community assumptions, it was an interesting read. but this can be costly. Kirill’s solution was
pushes back for years, and Search for “Changes in kernel 5.18-rc1 leads to add support for late binding this process
adding GPL_ONLY kernel to crashes in VirtualBox”. in his patches.
symbols may have made
the ultimate difference.
Q SluggiSSH forwarding
I occasionally use X forwarding
over SSH to run remote graphical
programs on the local display, like this:
$ ssh -Y user@hostname someprogram
The graphics seem to update more
slowly these days. I spend too much
time waiting for displays to redraw. I also
have a problem sometimes when the
connection drops or I close my laptop’s
lid, forgetting that this suspends it. This
causes the remote program to terminate,
losing any work I’ve done.
Is there a way to speed up X
forwarding, and is there a way to make Xpra runs remote programs on X without the delays that often afflict X forwarding.
WRITE TO US Save the earth! and disposal of consumer items. Rather than Bob
Please include a 32-bit EFI in upcoming Linux keeping a 20-year old Dell Thinkpad ticking over, which
Do you have a distributions. Cubic and UCK seem to be obsolete to is a hundred times less efficient than a modern system.
burning Linux- newer distributions. 600K of data can free up a load
related issue
that you want to
of kit that’s out there – energy-efficient stuff that Blocked pipes
can operate on 5V. Save the planet. Do your bit. I’ve used OpenVPN for years on a small device at
discuss? Write
to us at Linux Tony Thomson home. It’s great to be able to log into my home
Format, Future devices when away and also access them when on an
Publishing, Quay Neil says… unsecure Wi-Fi connection.
House, The Not meaning to be negative, but there’s a reason these Now I know this next bit is probably frowned upon
Ambury, Bath, tools don’t support 32-bit Ubuntu any more: 32-bit but hey. I’ve also used NordVPN to try and get iPlayer,
BA1 1UA or email Ubuntu doesn’t exist as such. There’s no impetus for but I’ve had mixed success with this.
lxf.letters@ desktop or server distros to support 32-bit and no Following your article in LXF286 on VPNs I set up a
futurenet.com. amount of badgering is going to change that. VPN using Linode on a UK system in London and
Just maintaining 32-bit kernel support is going to be installed OpenVPN Active Server, which went without
tricky enough, never mind an entire distro ecosystem. a hitch. I set up one user, installed OpenVPN on my
The Linux kernel has reasons for supporting 32-bit Android phone and used the generated profile. This
embedded systems, but again even the industries that worked too. However, on testing with a couple of DNS
use these are failing to provide resources to support Leak Testing tools, one showed no leak, but the other
32-bit. If you want a full read on this issue try this LWN showed leaks. Trying to play iPlayer in Firefox on my
article: https://lwn.net/Articles/838807. phone failed – “Outside UK” – so I was spotted!
I think it’s admirable to keep kit going for as long as Do you have any tips on making my VPN server
possible, and certainly we’ve covered how refurbished more likely to succeed? Should I use any particular
systems can provided computer access to people who DNS servers, firewall settings, routing or what?
otherwise would miss out. If saving the planet is your Francis
aim there are far more environmentally impactful issues
that need to be addressed, such as world-wide Neil says…
governmental policy changes on the use of fossil fuels Glad you liked the VPN article. It’s something we’ve not
really touched on before, but seems a popular topic,
although it’s hard to achieve fully as you’ve
discovered. I’m not sure “frowned upon” is quite the
right term. The BBC states clearly iPlayer can only
be watched from within the UK, unless you
download content for offline viewing.
Hard to say what the leaking is from. Possibly
IPv6 issues? Try disabling that or ensure OpenVPN
is tunnelling IPv6. Old cookies can cause issues and
if your IP doesn’t match the physical geolocation
data. WebRTC being a culprit is mentioned a lot,
though Jonni did cover how to disable this in
Firefox. Enter about:config in the address bar, and
set media.peerconnection.enabled to false.
Oddly, one of the
most recently Archimedes screw
made 32-bit
processors is
I can only imagine that Les Pounder is firmly
the Russian- stuck somewhere in the past. To update this
designed Baikal. article perhaps he should have spent more time
Helpdex
SUBSCRIBE
to Linux Format and get your
PowerKick
YOUR
GIFT!
wireless charger
WORTH
£50 t, Product features
iss ou The PowerKick wireless power bank
Don’t m e now!
subscrib delivers functionality and convenience.
Charge your devices wirelessly or via
cables (USB-A or USB-C)
Built-in kickstand enables you to keep
your device in landscape or portrait
orientation while it’s charging
Suction cups secure PowerKick to your
phone for consistent charging
10,000 mAh lithium polymer battery
Fast charging capability.
SUBSCRIBE NOW!
www.magazinesdirect.com/lin/a45k
Call 0330 333 1113 and quote A45K
16 LXF290 July 2022 www.linuxformat.com
Save money today! SUBSCRIBE
Terms and conditions: Offer closes 30 June, 2022. 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 not available with a digital subscription.
The full subscription rate is for 12 months (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 to Friday, 9am to 5pm UK time or email [email protected]. 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.
T
he Ryzen 7 5800X3D is
SPECS architecturally identical to the
Socket: AM4 standard Ryzen 7 5800X, using
Process: TSMC the same Zen 3 processor design, and
7nm FinFET therefore the same chiplet setup that’s
Cores: 8 made AMD’s recent generations of CPU
Threads: 16 such world-beaters. That means you’re
Clock: 3.4GHz getting the same eight core, 16-thread
(4.5GHz boost) layout in a single chiplet (so no potential
Cache: 512KB inter-chiplet latency issues), but a slightly
L1, 4MB L2, slower clock speed because of a
96MB L3 necessarily lower voltage.
Unlocked: No AMD is gambling on that lower operating
GPU: N/A frequency being a small price to pay in
Memory: terms of gaming when it comes to bumping 96MB of cache
128GB max, up the total L3 cache on offer from 32MB can store a lot
of config files.
DDR4-3200, to 96MB. How does that all fit in, you ask?
two-channels, Using a new 3D packaging technique,
ECC support the 5800X3D’s compute chiplet, the Core Complex Die The Ryzen 7 5800X3D is a drop-in upgrade for the
PCIe: v4.0 (CCD), has a new hat. It’s a hat made of a lot of cache majority of existing AMD Ryzen chipsets, and that
20 lanes which is roughly half the areal size of the chip it’s sat on makes it an easy path to improved performance for a
TDP: 105W top of, but contains twice the amount of L3 cache. good number of AMD users. The Zen 4 processors
AMD has been up front about the fact that the 3D arriving this year, on the other hand, require a new
V-Cache in the Ryzen 7 5800X3D has no impact on motherboard, DDR5 memory and possibly a new PSU.
productivity tools, marketing the chip as a specific That’s a huge plus for the AMD chip, but it still faces
gaming processor – although this is complicated on competition from within. Mostly because AMD’s Ryzen
Linux because it doesn’t appear to help Proton/Wine- 5000-series prices have dropped significantly in recent
based games, at least at the moment. Where is does months. For example, the 12-core, 24-thread Ryzen 9
offer significant increases are with machine-learning 5900X is £50 less and would suit desktop users better.
loads and why the V-Cache is employed on AMD’s EPIC That’s one of our favourite ever AMD CPUs, and its
7x73X HPC range. In general, the Ryzen 7 5800X3D gaming performance is still damned impressive. It’ll also
either essentially matches or outperforms the Ryzen 9 deliver incredible multi-threaded compute power, and
5950X. There are also a few times where the new Ryzen we’re sure it’ll still look like a great chip in a couple of
CPU outperforms the standard Core i9 12900K. years and a few CPU generations down the line.
This is a technically elegant, efficient CPU that
Power demands delivers mostly on its promises. It can’t beat Intel’s
Under full CPU load, running a x264 video encoding hulking brute of a Core i9 12900KS in the frame rate
benchmark, the Core i9 12900KS demands 77 per cent war, but it still offers the majority of AMD users an
more power than the Ryzen 7 5800X3D. Looking at the easy upgrade path and for a fraction of the price
relative power draw while gaming of the two chips, the and power demands, too.
Ryzen CPU offers much lower power draw; the Intel chip
delivers 23 per cent higher average frame rates, but
with 47 per cent higher power consumption.
VERDICT
One thing about the 5800X3D, however, is that it’s a DEVELOPER: AMD
hot chip. Admittedly the 12900KS will happily hit 101°C WEB: www.amd.com
under full core load, but at 93°C the new eight-core PRICE: £410
Ryzen CPU runs much hotter than the 16-core 5950X.
It would be easy to dismiss the Zen 3-based FEATURES 8/10 EASE OF USE 9/10
5800X3D in the face of new Zen 4 CPUs arriving before PERFORMANCE 8/10 VALUE 7/10
the end of the year, but it’s because of that this new chip
has a place. The AM4 platform is going to be effectively A technically impressive processor and a fitting epitaph for
retired once Zen 4 releases with a new LGA socket this the AM4 era of AMD’s Ryzen CPUs. It can certainly accelerate
year. But, given that five-year heritage, there are going your machine learning, if that’s what floats your boat.
to be a lot of existing AMD users sitting on an AM4
system they might want to upgrade, but don’t want to Rating 8/10
go through the process of replacing the entire setup.
T
urnKey Linux is a godsend
IN BRIEF for anyone who has spent
The TurnKey hours preparing a server,
Linux project cobbling together the necessary
produces a components to deploy network
set of pre- accessible software or web apps.
integrated The project produces an extensive
appliances to set of appliances that you can use
quickly deploy to roll out a new server application
all kinds of in no time.
popular open The self-contained appliances
source web pack in a fully functional instance
apps. All of a web app with just enough
appliances are components of an OS to power that
available in program. Their distro of choice is
several formats. Debian, and the latest version of The LAMP Stack includes PHP/Python/Perl support for Apache2 and MariaDB, along with
The bare metal the appliances are built around the Webmin for configuration, and Adminer for database administration.
images are latest Debian 11 Bullseye release.
available for In fact, according to the release notes, virtually all the However, for the latest release the developers have
64-bit machines changes in the latest release have been to the software decided to publish only ISO and AWS EC2 images. They
only, with powering the appliances, rendering them mostly explain that their current priority is to update all the
experimental invisible to the users of the appliances. appliances to the new version 17 platform, and between
support for the For instance, one key change is the move to Python 3 the two builds they can target a fairly large number
Raspberry Pi 4. for much of TurnKey’s build infrastructure, including of their customers. This is because the ISO can be
The memory several tools in the TKLDev appliance, which is useful for deployed across multiple platforms, and the AWS EC2
requirements of TurnKey Linux developers or for anyone interested in images deployed through TurnKey Hub are the project’s
the appliance building a TurnKey Linux system from source. primary source of revenue.
depend on the In fact, when version 17 was first announced, the The developers reckon that putting up the other
number of project launched just two appliances built on the new builds wouldn’t take much time when all appliances
users it needs base: TKLDev and Core. TurnKey Core is the base have been migrated to the version 17 platform. They
to support. operating system which all appliances are built on. also acknowledge that one of the biggest features they
It’s also used as a convenient starting point for custom had pencilled for version 17 is support for UEFI, but had
builds since it includes all the essential components to rule it out because of time constraints. They had also
and conveniences to help manage web apps. hoped to have an IPv6 APT repository for the v17.0
A couple of weeks after the initial announcement, the release, but now plan to make it available after all
project put up another 10 appliances built on the new appliances have been bumped to the new release.
version 17, including several base appliances such as In the same vein, they’ve also had to push back the
LAMPStack, LighttpdPHPFastCGIServer, node.js and plan to migrate TKLBAM to Python 3. This is because
more, which can be used to deploy all sorts of web apps. it’s an integral part of the project, and required a
In addition to upgrading the upstream software in the considerable amount of testing.
appliance, the new version 17 releases receive a slew of
bug fixes and some new user-requested features.
To this end, the new release includes a new Webmin
VERDICT
version (v1.990) and a number of changes to make the DEVELOPER: Jeremy Davis
TurnKey appliances more IPv6 friendly. For instance, the WEB: www.turnkeylinux.org
project has updated individual Webshell tunnel config to LICENCE: Various
support IPv6. It’s also updated its custom backup and
migration tool TKLBAM to ensure it supports the most FEATURES 9/10 EASE OF USE 9/10
recent version of the Internet Protocol. PERFORMANCE 9/10 DOCUMENTATION 8/10
Turn on your heel TurnKey appliances is the perfect blend of convenience and
TurnKey appliances are available in several formats customisability to appeal to all kinds of users and use cases.
depending on the hardware you want to deploy them
on. These can range from bare metal to virtual Rating 9/10
machines, and various cloud platforms.
T
he premise of Rolling Rhino
IN BRIEF Remix is simple. Replace
The distro looks Ubuntu’s stable release
like just another repositories with its development
Ubuntu clone, branch, and you’ve got a sort of a
with little visual bleeding-edge rolling release distro.
customisations. Executing the idea into a stable
However, the distro however, takes some doing.
real difference The idea came from Ubuntu
exists under the developer and former Canonical
covers. Although employee Stuart Langridge, who
it starts off as a wrote the Rolling-Rhino script to
regular Ubuntu transform an Ubuntu release
release, a into a rolling release composed
couple of of packages from Ubuntu’s
post-installation development repositories. The The distribution offers a wonderful option for anyone to track the development of the next
tasks transform Rolling Rhino Remix project then Ubuntu release without having to fiddle with the daily installation images.
it into a rolling took those scripts, and extended
release distro them with a couple of custom tools to create the distro. mode to familiarise themselves with all its options, after
that fetches Since the distro is based on packages that are being which the individual options can be toggled.
packages from developed, the developers state that Rolling Rhino In addition to these, the distro also ships with an
the Ubuntu Remix is best used by Ubuntu devs or experienced Arch User Repository (AUR)-like package manager
development Ubuntu users who prefer tracking Ubuntu’s progress – called Pacstall, which has been tweaked to integrate with
branch. even if it comes at the expense of some instability. Rolling Rhino Remix. Refer to the documentation for
using the tool to flesh out your installation with all kinds
Get rolling
SPECS
of open source and popular proprietary packages. While
The project offers an ISO image, the latest (at the time you can use snaps or flatpaks as well, we suggest you
CPU: 2GHz of writing) being 2022.05.03, which has been created install programs via Pacstall, since the distro will update
Memory: 2GB from an Ubuntu Daily Build. It identifies itself as Ubuntu them whenever you use the rhino-update script.
HDD: 25GB and has all the hallmarks of a standard Ubuntu build, Despite its rather experimental nature, the distro
Build: 64-bit except for the custom Rolling Rhino Remix wallpaper. performed well in our limited test. The only time it
only Once installed, you’re supposed to run the rhino- misbehaved was when we interrupted the rhino-
init script, which modifies the installation by altering update process, which took some CLI sorcery to fix.
the /etc/sources.list file, after which it’ll automatically While getting started with the distribution doesn’t
pull the latest updates from the devel repositories. take much effort, and is well documented, the
You wouldn’t notice much difference on the outside, developers advise new users to stay clear. However,
unless the developers have introduced a radical new the project is easy to approach and we’d encourage (do
feature or altered the appearance of the distro. However, we?!?–ED) all Ubuntu users to take it for a spin, even if
the installation is a completely different one now, and only inside a virtual machine, in order to experience this
can’t be maintained using the traditional means. This radical new approach to Ubuntu.
means for tasks such as updating the installation, you’ll
have to ditch the apt-get upgrade command and
instead use the project’s custom rhino-update script.
VERDICT
Among other things the tool will also fetch the latest DEVELOPER: MrBeeBenson and others
kernel directly from the Ubuntu mainline repository. WEB: https://rollingrhino.org
While, you don’t need to use the rhino-init script LICENCE: Various
ever again once the installation has been converted, the
developers suggest you use rhino-update weekly to FEATURES 7/10 EASE OF USE 6/10
pull all the new changes from the devel repositories. PERFORMANCE 7/10 DOCUMENTATION 7/10
The third custom script, rhino-config has just been
rewritten in Rust and enables users to tweak some If you’ve ever wondered how Ubuntu would work as a rolling
important aspects of the rhino-update script. For release distro, Rolling Rhino Remix is your best bet.
instance, you can use rhino-config to disable pulling
the mainline kernel, switch between using snaps and Rating 7/10
flatpaks. New users can use the script in the interactive
SysLinuxOS 11.3
Distros that take the kitchen sink approach don’t really appeal
to Mayank Sharma… until, of course, he finds one that does.
S
ysLinuxOS’s developer is
IN BRIEF a system integrator who
SysLinuxOS is wanted an all-on-one
a specialised solution to help him put a system
distro designed through its paces. To that end,
for system the distro offers a plethora of
integrators and networking tools and utilities to
system admins help system integrators evaluate
to give PCs a and assess a PC. SysLinuxOS gets
thorough its tools from Debian, and the latest
shakedown. edition of the distro is based on the
Designed by Debian 11 Bullseye release.
a system The distro is available in two
integrator, the editions. One uses the Mate
distro is full of desktop, while the other ships with
tools and the Gnome desktop. Both ISOs SysLinuxOS is a Swiss Army Knife for system integrators and system administrators, and a handy
utilities to help weigh over 4GB and are available all-in-one Live distro for anyone else.
verify that every only for 64-bit systems. You can dd
component is the ISO on to a USB to thoroughly vet a computer from of documentation. The project has a forum board, but it
working as the Live environment. That said, the distro does include is mostly a ghost town, although the developer has been
expected. The the Calamares installer to help you anchor SysLinuxOS quick to respond to the odd question posted there.
distro comes in on to a computer. Note, however, that the distro Furthermore, besides the brief introductory details that
two installable balloons to take up just under 16GB on the hard disk. are in English, the majority of the documentation, such
Live mediums: A majority of that space is taken up by all the tools as the distro’s blogs, are in Italian.
one that’s based and applications that have been squeezed into the That said, given the distro’s target audience, the lack
on the Mate distro. Being an experienced system integrator himself, of documentation shouldn’t affect take-up. The distro is
desktop, and the developer is also confident that his distro includes well put together and the tools work without a hiccup.
the other on all the tools that one requires on the job. Furthermore, Most of the included tools are well documented by their
Gnome. he claims that all the tools in the distro are pre- respective projects. The distro just brings them together
configured to work straight off the bat. in a well-integrated package.
For starters there’s all kinds of web browsers as well In our tests, SysLinuxOS performed well inside virtual
as remote desktop clients and video-conferencing machines as well as on real hardware, irrespective of
programs. The inclusion of these network tools, along whether it was running from a Live environment or
with office productivity software, makes SysLinuxOS a from the hard disk. Of course, documentation is an
wonderful option even for the average desktop user who important part of any open source project, but we’ll let
can use the distro as a fully usable Live environment. SysLinuxOS slide because it’s a specialised distro and
as such it’s designed for people in the know. Equally
One for all importantly, the distro didn’t really throw up any curve
System and network administrators would appreciate balls that forced us to refer to its official documentation
the inclusion of stalwarts such as Wireshark, Angry IP or ask for help on the forums.
Scanner, Packet Sender, Packet Tracer and more. There’s
also a serial port terminal emulator that admins can
use to configure, troubleshoot and communicate
VERDICT
with all kinds of devices with a serial interface, such as DEVELOPER: Franco Conidi
microcontrollers and routers. There are also some tools WEB: https://syslinuxos.com
for computer forensics and ethical hacking including LICENCE: Various
disk imagers, and offline and online password crackers.
In addition to these specialised tools and utilities, the FEATURES 9/10 EASE OF USE 8/10
distro also includes mainstream open source everyday PERFORMANCE 9/10 DOCUMENTATION 4/10
desktop programs such as LibreOffice, VLC and GIMP,
together with a whole gamut of Mate desktop utilities. Don’t let its lack of documentation stop you from taking the
The inclusion of these everyday utilities helps distro for a spin, especially if you’re an experienced user.
SysLinuxOS pitch itself as a daily driver for power users.
On the downside, as it is with most one-man distros, Rating 7/10
the one weak point that plagues SysLinuxOS is the lack
Q4OS 4.8
Neither a big KDE user nor a fan of Windows, and yet Mayank Sharma
can’t resist the charm of this KDE distro and its Windows installer.
any distros try to do many
IN BRIEF
A Debian-based
M things in an attempt to
appeal to a large number of
desktop distro people, but end up failing to
that ships two impress. Q4OS is a welcome
editions, one exception, in that the distro caters
for older 32-bit for three distinct sets of users.
machines, which Q4OS’ 32-bit edition, for older
uses the computers, comes with a curated
lightweight set of programs to help you get
Trinity desktop the most of your aging workhorse.
environment On the other hand, the main 64-bit
that began as a edition of the distro rocks the
fork of KDE 3.5 KDE Plasma desktop and uses
desktop. The customised tools to tune the
main 64-bit desktop for everyone from those Q4OS’ strength are its custom tools that reduce common administration tasks into a series of
edition uses new to Linux to experienced users. clicks, making them easier to new Linux users.
the latest KDE One of the unique aspects of the
Plasma desktop. distro is its Windows installer that you can use to install of the variations in the list (Synaptic for Trinity, Plasma
The current Q4OS alongside an existing Windows installation Discover for KDE), the existence of LibreOffice in the
Gemini series without worrying about things like disk partitioning. Trinity version doesn’t make sense to us, especially
is a Long Term The installer supports Windows 8, 10 and 11, and in light of better-suited options such as AbiWord.
Support release can work with SecureBoot as well. Other customisation options in the welcome
that’s supported The latest 4.8 release of the Debian-based long-term screen include the ability to install additional desktop
for five years. support distro bundles the recent Debian Bullseye 11.3 environments, including lightweight options such
update. The project offers four download images. Newer as Xfce and Budgie, as well as full-fledged ones like
64-bit machines can grab separate KDE and Trinity Cinnamon and Gnome. You can also use the welcome
SPECS images in Live and install-only options, while the 32-bit screen to change the default application launcher.
CPU: 300MHz Trinity image is available as an install-only download. In terms of documentation, the Q4OS project offers
Memory: The Live images are installable and use the distribution- ample information to help new users get started with
245MB independent Calamares installer for the purpose. their installations. In addition to the user-centric
HDD: 3GB information there’s also several pieces of administration
Build: 32- Quite a show and developer-oriented documentation for the more
and 64-bit The distro boots to a welcome screen, which is one of advanced users. If you get stuck you can take your
the specialities of the distro, and can help users flesh support queries to the fairly active forum boards.
out their installation without much effort. If you haven’t yet tried Q4OS we’d strongly
Out of the box, the default Q4OS installation is pretty encourage you to give it a shot. While the distro will
bare bones, with hardly anything except a web browser. appeal to KDE users, the Trinity edition that adheres
One of the customisation options in the welcome screen to the classic desktop makes for a useful option for
is the desktop profiler that you can use to transform running inside a virtual machine.
your installation with a single click. The profiler lists
multiple options, a couple of which will fetch and install
all kinds of desktop productivity tools, while a third will
VERDICT
install just enough components to help you build your DEVELOPER: Q4OS dev team
installation from scratch as per your requirements. WEB: https://q4os.org
Note that while the distro does enable you to view LICENCE: GPL and others
information about the packages bundled in each
profile, it doesn’t give you an estimate of the size FEATURES 8/10 EASE OF USE 8/10
of the download when installing a profile. PERFORMANCE 8/10 DOCUMENTATION 8/10
The distro also uses its own custom application
centre that you can use to install various mainstream A solid distro that offers enough conveniences to appeal to
programs. The number and type of program varies new Linux users without side-lining experienced ones.
based on the edition, with the Trinity version hosting
about a dozen, while the full-fledged KDE Plasma Rating 8/10
edition listing over 50. While we agree with some
ON SALE
NOW
VERDICT
DEVELOPER: Shattered Pixel
WEB: https://shatteredpixel.com
PRICE: £7.12
Rating 9/10
Roundup
ProcessWire 3.0.184 WordPress 5.9.3
Joomla! 4.1.2 Drupal 9.3.9 Ghost 4.43.1
Michael Reed
installed his first
CMS in the early
2000s. Well, he had
to do something
with his free
50MB of storage.…
Full-featured CMS
Michael Reed takes a good look at five heavyweight professional content
management systems that are all open source and completely free.
HOW WE TESTED…
Get installed
Is the installation routine a helping
hand or more of a slap in the face?
e installed all of the CMSes locally on to an Ubuntu
Support and
community
Help for using the CMS and what
to do when we hit difficulties.
hether you’re installing the CMS, making content,
Extra features
Does one CMS have any niceties
that the other systems lack?
host has built-in subscription features. Posts can be
Extensions
Beyond the defaults, to what degree
can you add features easily?
xtensions can be a lifesaver when there’s an additional
The verdict
Content management systems
e’ve decided that WordPress is the overall winner of this
ALSO CONSIDER
If you don’t want to host a CMS yourself, consider hosting – but apart from that, it’s not difficult to use.
packages that include automatic setup. In fact, https:// Typo3 (https://typo3.org) has been around for quite a while.
wordpress.com offers free WordPress hosting that includes In fact, it predates WordPress by a few years. We decided not to
automatic setup of a WordPress site that you can customise. look at it this time because it’s aimed at large organisations
Similarly there’s Ghost (Pro) https://ghost.org/pricing. rather than individual users. Textpattern (www.textpattern.
For people who like editing files, Grav (https://getgrav.org) is com) is a venerable open source CMS that concentrates on
worth considering. It doesn’t have a post editor – you add simplicity over frills. It aims to give you a substantial amount of
markdown formatted text files into the appropriate directories control over the HTML and CSS that makes up your site.
INSTALL PARROT
Hacking 101
Starting with the humble ping command and moving
on to some stealthy network recon activities…
lmost 10 years have passed since the involves sending an ICMP packet to a host (or hosts
In just a few
seconds EtherApe
had sniffed the
traffic from a
sizeable chunk
of Future Towers’
review network.
Capture the broadcast flag as they flow through your network. And from those
One of the lesser-known ping features is the broadcast packets we can collect source and destination
flag, and that’s what we’re going to leverage to do the addresses. We’ll use the EtherApe tool to do this,
network recon. As we hinted earlier, this enables not just which rather pleasingly draws hosts in an ellipse as
one machine to be pinged, but a whole subnet. Try the they’re discovered in real time, as well as showing the
following command at home, replacing the first bits of traffic flows between them. You’ll find EtherApe in the
the IP address as appropriate (255 is a ‘reserved octet’ Applications menu under the Pentesting>Information
that denotes the broadcast address, in this case Gathering section.
everything from 192.168.0.1 to 192.168.0.254):
INTRODUCING NMAP
Parrot comes with a handy GUI front-end with a prefix size of 24. If you like binary Advanced menu, then you can save it in
that saves you learning (at least until the that’s all the addresses which match the the default user’s home folder and it’ll
next page) Nmap’s lengthy command first 24 bits of the (32-bit) IPv4 address. still be there on reboot. Otherwise don’t
line syntax. You’ll find it under Pentesting Now hit the Start button and the worry because it’s easy to regenerate
>Information Gathering>Nmapsi4. background terminal will jump into life this list later.
There’s an option to run it as root, but while the scan completes.
don’t worry about that for now. When it’s done save the list of
From the welcome screen select discovered IPs using the button at the
Discover a network, then specify a CIDR top. We’ll analyse these further over the
address and prefix length. To scan the page. If you set up USB persistence as
256 address beginning with 192.168.0, described earlier, and booted using one
for example, use the address 192.168.0.0 of the Persistence modes from the
e’ve seen how the humble ping command open a terminal and do it manually. To start, just enter
There are a
huge number of
tools carefully
categorised within
the Pentesting
menu. Nmap here
will be our first
port(scan) of call.
We can use Nmap to perform OS and service version machine. Out of curiosity, we thought we’d investigate
detection too, though sometimes this results in the UPnP server running on our router:
guesswork if it encounters unknown fingerprints. Our $ nmap -p 5000 -A --script vulners 192.168.0.1
router, the previous scan results suggest, might have a We were simply aghast to find this in the output:
web control panel running on port 80, and a UPnP server | vulners:
running on port 5,000. Change those numbers below to | cpe:/a:miniupnp_project:miniupnpd:1.9:
suit your situation. Running ...
$ nmap -A -p80,5000 192.168.0.1 | EDB-ID:43501 7.5 https://vulners.
told us that the web server was Lighttpd and the other com/exploitdb/EDB-ID:43501 *EXPLOIT*
was MiniUPnpd. That your router has so many services | CVE-2017-8798 7.5 https://vulners.
running (and there may be others hiding behind port- com/cve/CVE-2017-8798
knocking protocols) isn’t necessarily a worry in itself. Looking at the links told us this was an integer
We’ve only scanned the LAN interface, in other words signedness error in versions 1.4-2.0 of the MiniUPnP
from the inside. If there were so many ports open from client, and that vulnerable systems could be exploited by
the outside, that would probably be cause for concern.
Modern hacking,
ethics and statistics
Read about the largest DDoS in history and how honing
your hacking skills might help you prevent the next one…
gerund and an infinitive walk in to the Linux A big part of hacker culture is Capture The Flag (CTF)
Armitage is a GUI
for Metasploit.
To use it make
sure you start
the Metasploit
Framework from
the System
Service menu.
Amiberry v5.0
Les Pounder loves the Amiga – he even started his journalism career with
custom “disk magazines” on the school playground.
ini retro computers and consoles are enjoying a
IN BRIEF
Amiberry is a
M resurgence of late. Case in point? The Nintendo
Mini NES and the A500 Mini, a licenced
free Amiga miniature Commodore Amiga 500. In effect the A500
emulator that Mini is an Arm-powered Linux machine, so can’t we just
brings the build our own? The answer is yes. Step forward Amiberry
Commodore Amiberry is an optimised Amiga emulator for multiple
Amiga to the Arm-based single board computers. We tested Amiberry
Raspberry Pi. on a 8GB Raspberry Pi 4, but there are versions for the
CREDIT: Codemasters
From the Raspberry Pi 3 and 32-/64-bit OSes. Installation was
comprehensive simple, if a little involved. Downloading the Amiberry
and densely release from the website, extracting the contents to a new
packed menu directory and then installing the required dependencies
we can create was easy. The “gotcha” issue was the latest Raspberry Pi
custom, and OS (April 2022) using the KMS driver. Amiberry requires
expensive FKMS (Fake KMS) to run and in the past we would just Playing Cannon Fodder on our virtual Amiga 500 transported us back
Amiga “dream enable this in the Raspberry Pi Configuration tool, but not to the 1990s, when the floppy disk reigned supreme.
machines”. At any more. All it took was a quick edit to our config.txt file
the other end of to enable FKMS, a reboot and we were in business. colours to 256 (AGA chipset) and setting a custom
the scale we can resolution. Then we dropped into the Amiga Shell and
quickly fire up Create a custom Amiga tried to remember a few commands from our youth.
an Amiga 500 Amiberry’s user interface is densely packed, but if you The Amiga was known as a games machine, and the
and play the just want to set up a quick game, then the Quickstart pinnacle of compatibility was the Amiga 500. We created
best games of menu should have you covered. If you want to create a new configuration: an Amiga 500 with 1MB of Chip RAM
the era, all from your ideal Amiga setup then you can tweak your RAM, and a Kickstart 1.3 ROM. We loaded Cannon Fodder and
a Raspberry Pi. CPU, ROMs and expansion cards all from the menu. our muscle memory kicked in as we fought the baddies.
When you have your machine as you want it, you can USB joypads/joysticks are supported and these can be
save it as a custom configuration, ready for use. configure for use with games.
We tested this feature by making our own Amiga 1200 Installing games to the hard drive is a tricky task. Some
with 8MB of Fast RAM, 2MB of Chip RAM, a 68030 CPU games come with installers, such as The Secret of Monkey
and a 100MB IDE hard drive. With Amiberry we can create Island, but others require a patch. WHDLoad is the patch
virtual hard drives (hardfiles, HDF) This setup would have and with this we can patch a game to run from the hard
run into the thousands, but today it costs us a Raspberry drive. Amiberry supports WHDLoad, so we can build an
Pi 4. We booted to the operating system (Workbench 3.1) archive of games on our custom Amiga.
and proceeded to install the OS to the hard drive. So who is Amiberry for? People like us, who grew up in
After 10 minutes of disk swapping (press F12 and then the era of the Amiga and want to reminisce without
go to the Floppy menu to change Amiga disk images, developing tennis elbow from swapping disks. Sure, we
ADF) we rebooted the machine and booted from our can go out and spend £120 on The A500 Mini, but with
fresh Workbench 3.1 hard disk install. We then spent a Amiberry and a little patience we can make our dream
little time tinkering with the OS, bumping the display Amiga come true.
VERDICT
DEVELOPER: Blitter Studio
WEB: https://blitterstudio.com/amiberry
LICENCE: GPL-3.0
SPEC
owered by the RP2040, a chip that’s beating the
SoC: RP2040,
P current chip shortage, Servo 2040 wears its
purpose on its sleeve. Designed to control up to
dual-core Arm 18 servos, and work with up to six analog inputs, this is a
Cortex M0+ serious board backed up by a well-crafted software library.
133MHz Servo 2040 is a densely packed board. It’s slightly
Memory: longer and almost double the width of a Raspberry Pi
264kB of SRAM Pico. The 18 servo outputs feature three pins for each
Storage: 2MB output. The pins are the Signal, Voltage and GND
of QSPI flash connection, and servos tend to have colour-coded
GPIO: 18x servo, connectors to show orientation. The headers are typical
6x analog 2.54mm pitch and we can easily connect 18 servos,
sensors, Qw/ST creating noodles of servo cables across your bench. The 2040-based board is your go-to choice for servo control.
Stemma QT/ We tested the Pimoroni Servo 2040 using
Qwiic connector MicroPython and CircuitPython. Pimoroni has created a work – the I2C pins weren’t detected. An issue has been
Unsoldered: new version of its MicroPython release, which provides raised and hopefully this will be fixed in the future.
3x analog support for Servo 2040. The MicroPython modules for We scanned the list of Stemma QT devices supported
inputs, I2C, Servo 2040 are well documented and robust. by Pimoroni’s MicroPython build and noted that the
Debug, 5V, 3V3, For our MicroPython test, we chose to use Pimoroni’s BME688 was there. We connected and wrote a test script
Boot, Reset version, which also supports CircuitPython libraries. to confirm that we could obtain the temperature, proving
Extras: V/I We wanted to test a few Stemma QT devices with that the QWST connector was working to spec.
sensing, MicroPython and this seemed like a great fit. We ran This quick win fuelled our need to prove that Servo
6x WS2812/ through Pimoroni’s examples, testing single and multiple 2040 could work with more Stemma QT boards, so we
NeoPixels, boot/ servos. Everything went extremely smoothly. downloaded a beta version of CircuitPython 7 for the
user button, Servo 2040. The info page stated we could only control 16
reset button Practical experiments servos versus MicroPython’s 18 – an acceptable loss. We
PSU: USB-C 5V, We tested a series of cheap SG90 plastic geared servos tested a series of CircuitPython examples and everything
screw terminal and found that Servo 2040 was able to control each of worked as expected. It was only when we tested our
10A max them with a high degree of accuracy. We also tested an continuous servos that we noticed they never stopped.
Size: 62x42mm MG90S servo, a higher quality metal servo, and this also CircuitPython handles this type of servo a little differently
worked well. These two servos have only 180 degrees of and, with a tweak to our code, we were good to go.
movement so we installed two LEGO-compatible We tested the QWST connector with an MPR121,
continuous servos. They work in a similar manner to a installing the dependencies and tweaking some example
DC motor, but are slower and more precise. Our code so that touching the MPR121 inputs controlled two
continuous servos also worked with no issues. servos. Everything worked – it looks like CircuitPython is
To take the tests further, we connected a 10K Ohm a viable alternative to MicroPython for this board. Note
potentiometer and one of the analog inputs. Using a little that the MicroPython release is from Pimoroni and, as
maths and Servo 2040’s API, we created a crude speed such, it has a much more granular level of servo control.
controller for the continuous servos. CircuitPython is much more of a general purpose
We also connected an Adafruit MPR121 capacitive alternative. If you need Stemma QT/Qwiic and can afford
touch board via the QW/ST connector and loaded the to lose two servos, then go for it.
corresponding Python dependencies (Adafruit Bus and
the MPR121 module) and changed the I2C pins to match
those of the Servo RP2040. Sadly we couldn’t get this to
VERDICT
DEVELOPER: Pimoroni
WEB: https://shop.pimoroni.com
PRICE: £24
SENSORS
YOU NEED
blue plastic cage) the first pin is VCC that connects to underlying GPIO module, enabling Python to work with
the 3.3V pin on the Raspberry Pi. The next is a data the GPIO. Then we import the DHT11 module, and finally
Any Pi output pin – this connects to GPIO14 on the Raspberry we import the sleep function from the time module.
model Pi. Finally, we have a GND pin that can connect to any import RPi.GPIO as GPIO
The latest GND pin on the Pi. If you’re using a DHT11 with no import dht11
Pi OS onboard resistor then you’ll need to connect a 4.7K from time import sleep
DHT11 Ohm resistor from the DHT11’s VCC pin to the data The next three lines will reduce the verbosity of the
temperature output pin, effectively pulling the pin high. This is fiddly, output from the GPIO module. Then we set the GPIO to
sensor so make sure to buy a DHT11 with a resistor. use the Broadcom (BCM) pin numbering system. This
3x female Power up your Pi and open a terminal .Now you’re is the default used by the Raspberry Pi Foundation’s
to female ready to install the DHT11 Python library using the pip documentation. We then ensure that the GPIO is
jumper wires package manager: cleaned up and ready for use.
DS18B20 $ pip install dht11 GPIO.setwarnings(False)
temperature When the install is complete, close the terminal and GPIO.setmode(GPIO.BCM)
sensor open up the Thonny Python editor. GPIO.cleanup()
4.7K Ohm Next we create an instance that connects our Python
resistor code to the DHT11 on pin GPIO14.
(Yellow instance = dht11.DHT11(pin = 14)
Purple Red To constantly read the DHT11 we use a while True
Gold) loop and in there we create an object, result, that will
Breadboard store the data read from the DHT11.
3x male while True:
to female result = instance.read()
jumper wire If the data stored in the result object is valid we use
Code and the print function to print the temperature and humidity
diagrams at in a sentence. Note that we use %.1f as a placeholder to
https://bit. format drop in the data stored in the tuple at the end of
ly/lxf290- Three wires is all we need to connect the DHT11 to our Raspberry Pi. the line. The tuple contains the two values of
sensors Buy a DHT11 with a built-in resistor – they’re much easier to work with. temperature and humidity.
Project 2: DS18B20
The DS18B20 is our favourite temperature sensor. It
comes as either a bare component, or encased in a
waterproof sleeve with a metal probe. The DS18B20 can
sense temperatures between -55 and 125°C with ±0.5°C
accuracy from -10 to 85°C. It can’t detect humidity, temperature = sensor.get_temperature()
unlike the DHT11, but for temperature-based projects, Print the temperature to the Python shell. We use a
this is the sensor to use. formatting trick – %s – to format the temperature data The DS18B20
Wiring up the DS18B20 is a little more involved. The into a string. Finally, we pause the code for one second needs screw
bare wires of the sensor need to be inserted into a before the loop repeats. terminals for
screw terminal (one terminal per wire). The screw print("The temperature is %s celsius” % breadboard use,
otherwise the
terminal is then inserted into a breadboard. Next, we temperature)
fragile wires will
need to use a 4.7K Ohm resistor with the breadboard. time.sleep(1)
break. Another
Connect one leg to the red wire (VCC) and the other Save the code as ds18b20-test.py and click Run to approach is to
to the yellow wire (data out). This will pull the data pin start the code. The Python shell should soon fill up with use ferrules.
high and ensure there’s a good data connection. Now temperature data. Place the DS18B20 between your These add a
connect the GPIO of the Pi to the screw terminals via fingers, or if you have the waterproof model, dip the end sheath over
the breadboard. Because the screw terminal inserts into in a glass of ice cold water and watch the temperature the wires and
the breadboard, we can use the male to female jumper rapidly drop. Both of the sensors used in this tutorial mechanically
wires to make connections. We connect the 3.3V pin to are often under £5 from eBay, or even cheaper from clamp the
the red screw terminal, then connect any GND to the AliExpress if you can wait for delivery. Grab some and DS18B20 wires
in a rugged
black wire screw terminal. We then connect GPIO4 of add them to your next project. As a bonus, we’ve
enclosure.
the Pi to the yellow screw terminal. created a project, ds18b20-dht11-combine.py, that uses
Power up your Raspberry Pi and open a terminal both of the sensors at once.
from where we can install the DS18B20 Python module.
For this we shall use w1thermsensor .
$ pip install w1thermsensor HAVING FUN WITH SENSE HAT
Next we need to enable the one-wire interface. Go to
the main menu and click on the Raspberry Pi icon, then Raspberry Pi’s Sense HAT are packed with sensors including a
go to Preferences and select Raspberry Pi temperature sensor. Sense HAT features a combined temperature
Configuration. On the new screen, click on Interfaces and humidity sensor, accelerometer (measuring forces) gyroscope
and then enable the 1-Wire option. Click OK and reboot (orientation) and a magnetometer (magnetic forces such as magnetic
the Raspberry Pi for the changes to take effect. north). Because the board is a HAT, it’s designed for easy use, on top
Open up the Thonny Python editor and in a new file of the Raspberry Pi GPIO. This does cause a small problem: your
we’ll build a quick test script. temperature data will be incorrect. The temperature sensor, located
We start by importing two modules. The time library on the top right of the board, will detect the heat of the HAT, which is
will be used to slow the pace of the code. We then directly above the CPU, RAM and PCIe chip of the Raspberry Pi 4. You
import the W1ThermSensor class from the can move the Sense HAT off the Raspberry Pi using a breakout board,
w1thermsensor module. but this is more wires and complexity. For simple projects, the DHT11
import time and the DHT22 can’t be beaten. We only need three wires and a little
from w1thermsensor import W1ThermSensor Python code to make the most of our sub-£5 purchase.
Create an object, sensor, which is used to connect The Sense HAT does pack a lot of fun into the board. Along side
our code to the DS18B20. It’s also much easier to type! the sensors we have a joystick that can be mapped to act as a
sensor = W1ThermSensor() keyboard, and we have a matrix of 64 RGB LED. The corresponding
Next we create a whileTrue loop to constantly check Python library is also a joy to use, making short work of reading data
the temperature. and displaying it on the LED matrix.
while True:
ESPHOME
Credit: https://esphome.io
SPHome is a project that comes under the As described in the boxout (bottom right),
this device (see screenshot, right) and automations can The data from the
microcontroller
be created using the information.
can be seen within
Because this is a simple project, from the Home Assistant
integrations page, select the device associated with and can be used
the ESPHome project and there will be an overview for dashboards
page displayed. This page will contain a switch that as well as
automations.
corresponds with the LED output on the microcontroller.
Selecting the switch will turn the LED on. Deselecting
the switch will turn it off again. An entity will also be
available for the physical switch on the microcontroller.
Selecting this will cause the LED to light, but also cause
the binary sensor in Home Assistant to change state.
TASMOTA VS ESPHOME
Tasmota and ESPHome accomplish within Tasmota is via a web GUI, whereas manage the devices. This central
largely the same task. Both projects ESPHome requires YAML syntax to be management capability is useful because
provide a means of running firmware on written to create configurations, which it enables all devices to be updated at the
some microcontroller devices that can be are then cross-compiled to run on the same time. Both products provide a
controlled from the local network. microcontroller board. means to update the firmware via the
ESPHome originally used the MQTT Tasmota communicates with Home wireless network, which is convenient.
protocol to communicate between itself Assistant via the MQTT protocol and is Overall, Tasmota is probably the easier
and Home Assistant, but a number of capable of running in a completely of the two systems to become familiar
releases ago an API was developed to standalone manner, whereas ESPHome with because it provides the web GUI,
provide more seamless communication requires some level of communication while ESPHome is probably the more
between the two projects. Configuration with the ESPHome server component to adaptable project to use.
VIDEO
$ libcamera-hello The angle bracketed IP address field will need to be A model well car
which is the equivalent of a “hello-world” application. replaced with the appropriate IP used by the PiZero2W. provides sufficient
space to hold
The screen will fill with camera-related details and After some connection negotiation information is
the Pi camera
then display a preview window of the camera image. The displayed on the screen, a video window was presented system with a
duration that the image is displayed can be altered from to display the streaming content. external battery
the command line. The new camera software library An attempt was made to use some of the VLC pulled behind.
uses third-party libraries to interpret command-line commands listed in the documentation with little
options. The options are chosen to reflect those used success. A week later a disclaimer on the camera
in the legacy camera software. documentation website suggested a recent version of
The online camera documentation provides detailed VLC had problems with playback. They recommended
explanations and examples of use. The source code for using ffplay, a software tool from the ffmpeg suite, until For all things
the software is available under a BSD 2 clause licence. VLC resolves the issues. Raspberry Pi
The goal is to enable users to customise libcamera- The PZ2W with the camera was installed in one well Camera here
based applications to suit their own requirements. car and then enclosed in a hollowed-out container box is the official
The libcamera-hello command generates an error to hide the installation. The battery pack was installed in manual link
message if used from an ssh session connection. That a second well car and also enclosed in a hollowed-out https://bit.ly/
makes sense because the preview window can’t be container box. A cable to carry power from the battery lxf290camera
displayed over the connection. During the development to the camera system was also fitted.
of the article, the author used the wrong screen to enter There are two final real-world observations. The
commands. Discovering that the root cause of the error streaming video on the laptop stuttered if both the
message was pilot error and not hardware related was PZ2W and the laptop were using a wireless connection
embarrassing, to say the least. to the same router. If the PiZero2W used wireless and
the laptop was hard-wired the streamed content
Second stop: Config suffered no degradation. Second, with a fully charged
In addition to the camera ribbon cable installation, the battery pack and the PZ2W streaming video, with a
rail car-riding PZ2W required some other connections laptop connected to display the stream, the PZ2W
that are shown in the circuit diagram (left). With the camera system operated for 11 hours.
PZ2W installed in the HO-scale model well car, there There you have it folks – a Raspberry Pi Zero 2 W
wasn’t sufficient space to gain access to the USB micro with a camera riding the rails on an HQ-scale model
B power connector. In order to provide DC power, the train layout. Future improvements are pending, once a
battery power cable was connected to GPIO header pins new book on using ffmpeg to stream content arrives in
4 and 6. Pin 4 would normally output power. It can also our virtual mailboxes. Hey, maybe there’s a future Linux
source power. In this use case pin 4-inputted power Format tutorial in that as well? Until next time keep your
from the battery pack carried in the trailing well car. Pi idea oven warm.
It’s never good practice to just turn the power off on
a Raspberry Pi without performing an orderly shutdown
of the operating system. The Off_Trigger button shown OUT WITH THE OLD, IN WITH THE NEW
in the diagram when pressed applies a ground to pin 15.
A Python script monitoring the pin takes care of the Raspberry Pi is transitioning from a legacy camera software
shutdown sequence. stack based on proprietary Broadcom GPU code to an open-source
Section 2.8 Shutdown Button of the GPIO Zero stack based on libcamera. The latest Raspberry Pi operating system
1.6.2 Documentation package (see https://gpiozero. images named Bullseye and onward will contain only the libcamera-
readthedocs.io/en/stable) has all the details required based stack.
to establish the Python script to perform the shutdown. The Pi camera documentation site indicates it might be advisable
Two commands were used to set up the PiZero2W to to stay with the older OS and the legacy Raspicam software stack
stream video to a host laptop. From the command line because it performs better on the Raspberry Pi Zero devices. The
on PZ2W enter the following: software offloads more to the graphic processor unit and is less
$ libcamera-vid -t 0 --inline --listen -o tcp://<SERVER. dependent on the Arm cores.
IP>:<PORT> Considering the Pi Zero 2W is hosting quad-cores the author
From the command line on a Ubuntu 18.04 laptop: decided to ignore the recommendation and use the libcamera
$ ffplay tcp://<SERVER.IP>:<PORT> -vf “setpts=N/30” software stack hosted in the OS to stream video.
-fflags nobuffer -flags low_delay -framedrop
Credit: NASA
IN SPACE!
From a shaky start, Linux is becoming much more
established in astronautics. Mike Bedford looks at
its success to date and its future prospects.
hy do astronauts use Linux? terms, how they’ve influenced the
Credit: NASA/JPL
RAD750s cost US$200,000 each – so we can barely
imagine how much they cost to develop.
The bottom line, therefore, is that manufacturers
bring out a new radiation-hardened chips infrequently,
and most chips never spawn a radiation-hardened
variant. This is a further reason for the antiquity of
computing hardware in space, and hence the scarcity of It might only have touched down in 2021, but the Perseverance Martian rover’s main processor is
Linux in the heavens. But things are changing here, as based on the venerable PowerPC 750 processor. No wonder it doesn’t run Linux.
we’ll see when we look at the so-called Spaceborne
supercomputer on the ISS. to experiment-specific applications and international
partners. Some of these are Windows and some are
In Earth orbit Linux of various distributions.”
Although much-reported stories suggest that all the Onboard the ISS are Honey, Queen and Bumble.
laptops on the ISS migrated to Linux back in 2013, Collectively, these free-flying robots form the Astrobee
reality is more nuanced, as we learned when we spoke system. Their job is to help astronauts reduce the time
to spoke to Dan Duncavage, system manager of NASA’s they spend on routine duties, leaving them to focus
ISS Avionics and Software Office. “As you can imagine, more on the things that only humans can do. NASA
the station contains many computational devices,” he
Credit: NASA
long-term manned missions, for example to Mars.
The Spaceborne Computer is a commercially
available supercomputer designed and produced
by Hewlett Packard Enterprise (HPE). It includes
HPE Apollo 40-class systems with a high-speed
interconnect, running an open-source Linux operating Laptops onboard the ISS run a variety of operating systems, with Linux
system. According to HPE, the Spaceborne Computer empowering the crew’s interface to the core avionics systems.
contains compute nodes of the same class as Pleiades,
one of NASA’s premier supercomputers. Shuttle took astronauts and supplies to the ISS,
As an alternative to using radiation-hardened alongside the Russian Soyuz and a few other launch
processors, a software solution was developed to vehicles. For a short while, America had to hitch a ride to
mitigate negative impacts of radiation on reliability. the ISS on the Russian launch vehicle, but then, in 2012,
During high-radiation events, the electrical power the forces of capitalism came into play. Space was no
consumption and, therefore, the operating speed of longer the sole domain of government-owned space
the computer system was lowered, with the aim of agencies. Now, the ISS is also supplied by launches by
determining if such systems can still operate. The SpaceX and Northrop Grumman Space Systems. And
conclusion was favourable. During its demonstration the SpaceX Dragon spacecraft and its Falcon launch
These floating mission, the Spaceborne Computer performed more vehicle are especially interesting.
robots on the ISS than one trillion calculations per second (one teraflop) Where NASA leads, SpaceX follows, you might think.
form the Astrobee for 207 days without requiring a reset. But that isn’t a valid assessment, and the choice of
System. They
assist the crew
While we’ve not yet seen Linux employed in NASA’s operating systems is a case in point. For while NASA’s
with basic tasks, mission-critical jobs, even that’s changing, and the ISS forthcoming SLS launch vehicle uses a proprietary
and run Linux. is a beneficiary. Until it was retired in 2011, the Space Boeing operating system in its flight control computer,
and the Orion crew exploration vehicle uses a real-time
operating system called Integrity-178B from Green Hills
Software, it appears that SpaceX is firmly in the Linux
camp. But this is no ordinary Linux, and certainly not
Credit: NASA/Shane Kimbrough.
Further afield
It would be great if we could tell you that a Linux-based
computer is on board the Pioneer 10 and 11 spacecraft,
which have now left the Solar System and are heading
Credit: NASA/JPL/Caltech
for the stars. But we can’t. The first of these probes was Seen here
undergoing a final
launched just four months after the launch of the first
inspection prior
ever microprocessor, Intel’s 4-bit 4004. Needless to say, to launch, the
the Pioneers carried computers made from individual Ingenuity drone
logic chips that probably didn’t even have an operating is now operating
system. However, Linux can be found beyond the on the Red Planet
thanks to its Linux-
confines of the Earth, about 278 million kilometres based computer.
beyond in fact, and it took over six months to get there.
The Jet Propulsion Laboratory in California is
responsible for NASA’s missions to Mars and beyond. To
get a view of the changing face of Linux in space
exploration, we spoke to Tim Canham, senior flight
software engineer at JPL who explained the motivators been problematic applying it to modified kernels that
and detractors to increasing the use of Linux in space. are provided by board vendors. The fairness algorithm
First the success stories. “Linux has had two and underlying I/O make it hard to guarantee timing.”
prominent uses here at JPL recently: the Mars Ingenuity We can imagine that his second reason might cause
helicopter and the Perseverance Rover EDL camera a few hackles to be raised, though. “Fair or not, there’s a
system,” Tim was pleased to tell us. “Both systems were perception that since Linux is based on a lot of open
considered technology demonstrations and weren’t source contributions, it’s difficult to know or reasonably
critical to the survival of the Rover, but Linux has assess the quality of the code that comprises the kernel,
performed well in both cases.” drivers or other apps running in the distribution.”
Given the fact that Linux is excluded from some But things are changing, as Tim explains. “The role of
space projects because of the antiquity of the Linux is still evolving and different organisations have
computing hardware, one reason for its inclusion on different risk postures related to usage, but I think for
Ingenuity makes a refreshing change. The Martian NASA, Linux can find a niche in areas where it has
atmosphere is more than 100 times thinner than advantages: data processing and operation of fight
Earth’s, and this places huge demands on the design of hardware in non-critical contexts. Linux brings
an aircraft intended to fly on the planet. As well as enormous open-source advantages that can speed
larger-than-usual rotors, keeping the weight to an development and take advantage of software already
minimum was critical, and this brings us to the available in the community. I also think there’s a chance
computing hardware. An ARM-based Qualcomm to deploy Linux in a compute environment where
Snapdragon 801 based computer system was chosen to hypervisors can separate the real-time domain from the
meet these strict requirements and, yes, you’ve guessed processing domain.”
it, Linux was chosen because the VxWorks operating So while Linux hasn’t turned space exploration on its
system that would normally be used by NASA in such head, changes are taking place. And you can take some
applications wasn’t available for the Snapdragon chip. comfort in the fact that Ingenuity, the first aircraft ever
So why are these applications the exception rather to fly above the surface of an alien world, is a Linux-
than the rule? Except for the legacy nature of the powered miracle of astronautical engineering.
computing hardware often used in astronautics, what’s
held back the application of Linux? Tim suggested a few
reasons, starting with a concern about real-time INTRODUCING CUBESATS
performance. “Flight software typically has hard
software deadlines that have to be met to guarantee the Space exploration might have evolved to use commercial service
survival of the spacecraft. If the operating system can’t providers such as SpaceX, but further democratisation of space
make guarantees that those deadlines can be met, it research is just a pipe dream, you might think. But you’d be wrong.
can’t be used. CubeSats are tiny satellites, measuring just 100mm across and
“Linux isn’t primarily designed as a real-time weighing no more than 1.33kg. They can cost as little as £38,000
operating system. Linux has real-time patches to the to build and, because they can be launched from the ISS or as a
mainline kernel that improves the performance, but it’s secondary payload alongside more mainstream satellites, they can
be launched for not a lot more. As such, they’ve formed the basis of
Credit: www.rawpixel.com/image/2229601
student projects, often with funding from bodies like the ESA, and
have even been built by groups of enthusiasts – for example,
amateur radio societies.
Although Linux isn’t universal in CubeSats, given that the open
source philosophy is key to much of the CubeSat community, it’s
no surprise that Linux is a common choice, alongside the likes of
FreeRTOS. The open source approach goes well beyond the operating
system, and it isn’t even restricted to the software. Open hardware
processor boards are common. You can find designs for components
such as thrusters, and there have even been complete open source
satellites, including a design by the Libre Space Foundation. What’s
more, there are networks of open source satellite ground-stations
and, reportedly, if you have access to a 3D printer you can build your
SpaceX’s flight control computers aboard craft like this Crew Dragon own ground station for just a few hundred pounds.
operate under Linux, in a marked departure from NASA’s approach.
SLIDES
Credit: https://github.com/maaslalani/slides
Making presentations
from the command line
Although renowned for concocting far better excuses than cocktails,
Shashank Sharma is quite adept at making presentations.
lides uses markdown language to create a navigate into the slides directory and then run the go
PORTAINER
Credit: www.portainer.io
ocker is a fantastic tool, enabling you to run all manage all the instances of Docker across your network
Stay up to date
Portainer also makes it easy to update your containers
when new images are released. Simply select the
container under Containers to go to its dedicated page,
then click the Recreate button – this will recreate the $ docker run -d -p 8000:8000 -p 9443:9443 --name
container using its current configuration. Just be sure to portainer --restart=always -v /var/run/docker.sock:/
flick the ‘Pull latest image’ switch on before clicking the var/run/docker.sock -v portainer_data:/data portainer/ Take the time
Recreate button for a second time. portainer-ce:2.11.1 to familiarise
Although it’s a Docker instance, Portainer can’t be Portainer should restart – aside from having to log yourself with all
updated in the usual way. Keep an eye out for the ‘A new back into your account again, you should find everything of Portainer’s
version is available’ prompt on the navigation sidebar. works as it did before. features and
settings by
Click this to discover what the latest version of Portainer
bookmarking
is (2.11.1 at time of writing), then back up your current Work with users and teams https://docs.
profile by visiting Settings under Settings, scrolling One final tip: if you plan to share access to Portainer with portainer.
down and clicking Download backup to save the file others, be sure to make use of its users and groups io. Choose
(in tar.gz format) to your hard drive – just in case. function – you can allocate individuals their own log-ons ‘Portainer
Once done, open a Terminal window and issue and restrict access to specific environments, and Community
$ docker stop portainer && docker rm portainer choose whether to make them a standard user or grant Edition’ and
$ docker pull portainer/portainer-ce:2.11.1 full administrative access. Users can also be made you’ll be shown
Substitute 2.11.1 with the latest build number. members of ‘teams’, and by taking the time to set these the current
Finally, repeat the command you used to create your elements up you’re able to restrict both access to and version’s
documentation.
first Portainer instance, again updating 2.11.1 with the management of individual containers through the
latest build number: Portainer web interface.
YAPE
Credit: http://yape.homeserver.hu/index.htm
80 FOR L=1 TO 2000: NEXT L This creates a pause between colour changes. By using
The final line, 90, clears the screen and returns us to 1 to 100 we roughly have 1/10th of a second (100ms)
a text-only format. between each colour change. Increase the 100 to 1000
90 GRAPHIC 0,1 for one second.
To start the code type RUN and press ENTER. The 30 FOR T=1 TO 100
code will draw a series of circles/ellipses on the screen, Lines 40 and 50 iterate the two for loops. The value
each time moving the starting point further around the of T controls our delay between colour changes, and the
screen. Run the code a few times and you’ll see that the value of I is the border colour.
shape of the circles/ellipses changes. This is because 40 NEXT T
they’re based on a random number. 50 NEXT I
Because this is our last BASIC project, let’s end on When you’re ready, type RUN and press ENTER to
another classic of the era. Changing the colour of the start the code. Note that the screen will flash, so take
border is a level up from “Hello World” and the C16’s care if you or anyone watching suffer from photo-
COLOR command makes short work of this task. We sensitive seizures. The border will change colour and
will create a for loop that will iterate over all 16 colours, end on a “light green” which looks more yellow to this
then sneakily use another for loop to pause the code author’s tired old eyes.
between each colour change. There is no PAUSE, SLEEP, The Commodore 16 may not be as well known as the
WAIT command so our for loop will keep the CPU busy Commodore 64, but it’s still an excellent machine to
for a few cycles before moving on. practise your BASIC coding exercises.
If you’re carrying on from the previous BASIC project
then you’ll need to clear the memory. Playing games
NEW The Commodore 16 may not have seen the success of
Line 10 is the start of our for loop. We instruct the the Commodore 64, but it had a decent selection of
loop to iterate 16 times, which is one loop for each of games for it. Graphics and sound were handled via the
the available colours. TED (Text Editing Device) chip, which is unable to
The CPU, TED and
10 FOR I=1 TO 16 produce sprites (unlike the C64’s VIC-II) and sound is
PLA chips run hot,
and replacement This time, on line 20, we use the COLOR command limited when compared to the mighty SID. Don’t let that
chips are hard to to set the border (4) to the colour (1). We could change put you off because there are still some great games.
come by. Adding (4) to 0 (Background), 1 (Character) or 2,4 (Multi- Looking back to our childhood, we can remember one of
just £6 worth colour). Our demo will stick with just the border (4). the games from the C16 starter pack: Punchy. Loosely
of heatsinks will
help keep your
20 COLOR 4,1 based on Punch and Judy, a British seaside puppet
chips cool. Line 30 and we use a for loop to keep the CPU busy. show for children which has some questionable moral
lessons, the game sees the player navigate single
screens of obstacles and traps. The platforming
element is basic and timing is often critical. Think Pitfall
but with a dash of British “comedy”.
Elsewhere, Vegas Jackpot simulates a fruit machine/
one-armed bandit where our goal is to win £100
(remember, this was the 1980s) by gambling our stake
on a series of chances. The game is simple, the music
and sound effects are basic but very nostalgic, but it has
a charm all of its own. Great fun in short bursts.
Our final game to test was Mission Mars, also known
as Cavern Raider on the VIC-20. You play a pilot,
navigating their way down a long and dangerous cavern
on Mars. There are spaceships, traps and exceedingly
tight passages to navigate. This is a difficult game and
you’ll die many times. Each death triggers the longest
Quote the Product code shown above and have your credit or debit card details ready
SUBSCRIBE!
Don’t wait for the latest issue to reach your local store –
subscribe today and let Linux Format fly straight to you.
Faster, cheaper and with DRM-free archive access!
3 GREAT
WAYS TO
SUBSCRIBE
Print, digita
l-only,
and print+d
igital
bundles!
DEBREATE
Credit: https://antumdeluge.github.io/debreate-web
text UI to interact with Git. It’s available in the standard time selecting Replaces as the
Ubuntu repositories; however, on 20.04 (the current category, and lazygit <= 0.33 .
LTS) it’s on version 0.27.4, where the latest release from So we’ll keep our up-to-date
the project’s GitHub account is v0.34. And downloading version of this program until
the release tarball and peeking inside, we see that we’ve something later and greater
only got three files to worry about: the README, the comes out in the repos. With
LICENSE, and the executable itself. these two things in place, click
We’ll start by creating a .DEB package for lazygit, so the right arrow to move to the
our Ubuntu machine(s) will have the latest and greatest. next step.
Debreate (https://antumdeluge.github.io/debreate-web) The Files screen (right) is
is a graphical application that represents a great way to where we’ll pick the actual
start your packaging journey. You can install it from the files to be included in the
standard repos using the following command: package, as well as where they should be placed when Add the necessary
executables and
$ sudo apt install debreate the package is installed. As mentioned, the archive from
other necessary
As you launch the program for the first time you’ll be lazygit’s GitHub page only contained three files: the files to your project
greeted with an intro screen (including a link to a executable, the LICENSE, and the README. We’ll place on Debreate’s
YouTube tutorial), then quickly shown the first screen in the program file in /usr/bin, and the two others in /usr/ Files screen.
the main interface, titled Control (see screenshot, left). share/doc/lazygit. The Files screen guides us through
Package: give the package a name, consisting of lower the process of picking each file to be included from the
case letters, numbers, “+," “-," or ".” symbols. panel on the left, choosing where it should be placed on
Version: we’ll use the upstream version of lazygit for install in the Target section to the right. Click that right
this, adding a “-1” for our first build, for a result of 0.34-1. arrow once you’ve placed all the files that your program
Maintainer: put your own name here. requires.
Email: likewise, your address. There’s a couple other screens we don’t need for this
Architecture: select the appropriate option from this simple package, but are as follows:
dropdown, probably “amd64”, possibly “arm”, or “all”, Scripts: Debian packages support scripts to be run See how the
meaning it’s processor-independent. before install, after install, before removal, and/or after control files are
put together
Section: this is the category where the package will removal. You can either enter the script content directly
by opening an
reside within a larger repository. You can take your cue into this window, or link executables to run instead.
existing .DEB
here from similar or related programs. Since lazygit Changelog: this is good practice when actively file. They’re
helps us use git, we’ll place it in the same VCS (Version maintaining a package – you can put something here. archived
Control Systems) section. Copyright: again, you should generally include this, with the ar
Priority: according to the Debian/GNU FAQ, this and Debreate has some built-in templates to help. command, so
should be set to Optional. Menu Launcher: as a terminal application we’ll skip at the terminal
Short Description: the description of the package in a this, but we could set this up, because Debreate has the following
software manager like the Software Centre or Muon. fields to even enable us to select which terminal it will extract their
Long Description: this longer description will display should launch. contents: ar -x
<package file>.
in a detailed view, such as when a package is selected in Finally, we arrive on the Build screen (see overleaf).
Most desktop
a software manager, or by using apt-cache show . You know what to do when you see those wrench and
archive tools
You’ll notice an optional field titled Source in the hammers crossed... click that button, and watch will open these
Debreate window. This is normally required in Debian Debreate create your package. If you kept the ‘Check as well.
control files when the package will be compiled from package for errors with lintian’ option checked and it
source. But since we’re merely packaging up a binary does find some errors, you can go back and check
file, we can skip this. your input on prior screens. But some of these aren’t
Once you’ve filled out all the above fields, select important for personal use. Provided the package
File>Save from the main menu to save your progress generates, you can see if it will install and run correctly
as a Debreate project, then click the right arrow button with the usual commands:
to proceed. This will bring you to the page titled
Dependencies and Conflicts. Here you’ll detail what
other packages need to be present, as well as those that SOURCE-BASED INSTALLATION
should be absent. We can sneak a peek at the Ubuntu
version of the package with the following command: The original install system was to download the source code, compile
$ apt show lazygit it and run it. Subsequent processes such as make install would
This reveals it only requires git itself. So add this as a place all the compiled resources in their proper locations. But another
dependency as follows: valuable method for building from source is by compiling the source
In Dependency/Conflict Package Name, enter git . packages. In Debian-based distros you can compile and install the
Enter nothing in the Version field because any version programs from their source code using a command such as:
of git will do for us. sudo apt-src --build install <package name>
The Depends button should already be selected For most people there’s little value in compiling these source
within Categories. packages. However, being able to compile software from source in
Click the plus button to add this as a dependency. general is a useful skill. And you don’t need to be a developer to do it.
However, we’re not done yet. Because lazygit exists If you become comfortable with the old-school make ; make install
in the repos (in Ubuntu, at least), we want to make sure process, the chances of you not being able to use a given program
our obviously superior version doesn’t get overwritten because it’s “not available” dwindles to almost nothing.
by an update. We’ll add another entry to this page, this
sha256: af5ebfc1658464f5d0d45a2bfd884c935fb607
a10cc021d95bc80778861cc1d3
url: https://mirrors.edge.kernel.org/pub/software/
scm/git/git-2.36.0.tar.xz
x-checker-data:
type: html
url: https://mirrors.edge.kernel.org/pub/
software/scm/git/
version-pattern: git-([d.-]+).tar.xz
url-template: https://mirrors.edge.kernel.org/
pub/software/scm/git/git-$version.tar.xz
Save this in your working directory as a YAML file,
with the value of the app-id field as the name (in the
example above, com.example.lazygit.yml ). Let’s
explore what’s going on in this manifest file for a bottom right) how Flatpak fetches the source for Git, Once you get
far enough into
moment. The first four lines are specifying the Flatpak’s then compiles it. Next step is to install it. Unlike native the Flatpak
name ( app-id ), as well as which runtime ( runtime and packagers, the process doesn’t actually generate an hierarchy, things
runtime-version ) and SDK ( sdk ) it’s using. After that archive file. Instead, you can install it by pointing Flatpak start to look like a
comes the command it will provide, in this case lazygit . to the build directory you created with the previous tiny, self-contained
Linux system.
Following this comes a directive ( finish-args ) that command. To install it just for the current user, you can
provides the application access to the user’s home use the following:
directory (--filesystem=home). $ flatpak-builder --user --install --force-clean ./build
Flatpak supports the concept of modules, which are com.example.lazygit.yml
logical subdivisions it will assemble into the package. The --user flag here, like with the standard flatpak
These might be different parts of a software stack (for command, installs the program just for the current user.
example, the database component for a business Adding --force-clean will also clear out the existing
program), or your main program as well as other helper contents of the build directory, for a sparkling new build.
applications (the Obsidian notetaking app, for example, Note in the output shown in the screenshot mention of
includes modules for Git and Pandoc). The first module the Cache; Flatpak won’t build files that haven’t
listed is lazygit itself. We’ll specify an assembly type of changed, so in this case everything was already done.
“simple” ( buildsystem ), because we’re not actually Finally, change into a Git-controlled directory in
compiling the executable, just packaging it. For this your home folder, and run your application with the
reason the next lines ( build-commands ) will merely following command:
copy the files we placed in the working directory into $ flatpak run com.example.lazygit
appropriate places in the Flatpak. Note Flatpaks use the Once again, if the Lazygit UI fires up then you know
/app prefix which, along with other metadata such as that your build is good (enough for your own personal
the app-id, system architecture and current package use, anyway)!
version, dictates where it will live on the system once Learning how to package applications is a worthwhile
installed. The screenshot (above) shows a typical exercise even if you’re not “formally” a developer. As
Flatpak file layout within the /var/lib/flatpak directory. with all things Linux, you’ll at least learn something
Finally, the last lines of the stanza (sources) catalogues along the way. You may even develop some utility out of
what we’re including, and what it is. While Flatpak’s creating your own packages, perhaps as a way to easily
builder does support grabbing and extracting archives, get them installed on all your systems.
for the purposes of this article we’ll simply use the files Yet in addition to all this, it will give you a little
we already have. appreciation for the effort of all the hard-working
But this alone won’t suffice. Remember how in volunteer packagers that go through a process much
Debreate we had to specify a dependency on git? more involved than the above to make sure that your
Well the Flatpak will require access to git too, but favourite programs are just a simple click or terminal
unfortunately won’t have access to the host system’s command away.
executables to get it. Fortunately, the Obsidian team So thanks to all the packagers out there… because
already did this work for us. Grab their Git module this author sure doesn’t want to have to do this by hand
settings from the Obsidian Flatpak’s manifest for the 4,000 packages and counting on his system!
(https://github.com/flathub/md.obsidian.Obsidian/
blob/master/md.obsidian.Obsidian.yml, lines 27-46),
and drop those right into our file.
The manifest complete, all that’s left is to do the
actual assembly. From the working directory, run the You can see not
following command to build it: only your binaries
$ flatpak-builder ./build com.example.lazygit.yml being copied,
but your source
The output should hopefully show a successful build, being compiled in
and you can explore the build directory to confirm. Note the output from
at the beginning of the process (shown in the screenshot, flatpak-builder.
FREECAD
Credit: www.freecadweb.org
reeCAD is a CAD (computer aided design) to work on in this month’s tutorial, and ranging all the
4 Body of work
In FreeCAD, the ‘body’ is the object that the 3D elements
are attached to, and you can have more than one body
in a design. Having established that, this is a good point
to summarise what we’re going to do over the course of
this project. We’re going to attach a kind of 2D technical
FreeCAD has a lot of toolbars… a surface of the model. The moveable, editable drawing, called a ‘sketch’, to the body and then extrude
1
You might want to move them around to constraints are shown in red. it to make a 3D box shape. Following this, we’re going to
make sure that they’re all accessible. add another sketch to the top face of this box and use
The Combo view
The Workbench menu 5 You’ll move freely between the Model
that to hollow out the inside of the box.
2 Enables you to switch workbenches. tab to obtain an overview of your work-in- Follow the next suggestion in the Tasks tab by
progress model, and the Tasks tab to carry selecting Create sketch. Again, you could have done this
The Constraint toolbar out your next action. by clicking the Create a New Sketch icon in the main
3 These tools make it possible for you to toolbar. When you create your first sketch, you’re asked
limit the movement of different elements. The 3D navigator
6 Use this feature if you want an exact view
which plane you want to attach the sketch to. In our
The Workbench area such as ‘top’ or ‘right’ or to reorientate yourself case, we’re going to work as if we have a piece of paper
4 This is where you draft out a 2D view of if you’re lost. spread out flat on a table in front of us.
The Sketcher
FreeCAD will automatically switch to the Sketcher
workbench. As before, you should notice the available
tools in the toolbar area change to reflect the change
in workbench. Don’t worry if, at this point, the various
toolbars of the different workbenches look
overwhelming; you’ll soon learn to find your way around the rectangle around with the mouse. Before we can We’ve padded the
because similar operations are grouped together. employ a sketch in the other parts of FreeCAD, we must sketch to 30mm to
add some height.
Now we can place our first element into the sketch: eliminate all degrees of freedom so that each element
We need to round
a rectangle representing the outline of the object that can’t move in any way, and we do this by the use of the corners next.
we’re designing. In this case, hover over the tools until what’s called Constraints.
you find the one with the tooltip that says Create
Rectangles and click it. Click in the main window area Constrain the rectangle
to lay down a start point, move the mouse and click First, left-click an empty area of the drawing to make
again to fix the opposite corner of the rectangle in sure that nothing is selected. You’ll have to get into the
place. At this point we don’t have to be specific about habit of doing this because the FreeCAD Sketcher uses
measurements; we’re just laying down the basic shape. sticky selection. All of the constraint icons are grouped
If you look over at the Tasks tab, there’s a sub- together and you need to find the Constrain Horizontal
window called Solver messages and a warning that the Distance icon that looks like a capital letter ‘I’ on its side.
object is, for the moment, unconstrained and we have Click this and then click the top edge (the technical
four DoF (degrees of freedom). This is because we term for straight line) of the rectangle. In the dialog that Don’t forget to
haven’t told FreeCAD what the dimensions of the pops up, specify a length of 95mm. save! FreeCAD is
rectangle are. You can test this by moving the points of Whenever you’ve finished using a particular Sketcher a reliable piece
tool such as a Constraint, you can discontinue it by of software, but
it’s complex.
right-clicking in the main window area. Do this and have
Add a number
a go at moving the rectangle around with the mouse.
to the filename
You’ll see that you can alter the rectangle’s height and from time to
even move the rectangle around, but can no longer alter time so that you
its width because of the constraint we’ve added. The can step back.
solver window now tells us that we have gone from four
down to three degrees of freedom.
Left-click an empty area of the drawing to deselect
everything. Specify the height of the rectangle by
selecting the Constrain Vertical Distance icon in the
toolbar and then clicking one of the vertical edges of the
You’ll be spending quite a lot of time in the FreeCAD Sketcher. We’ve rectangle. Specify a length of 65mm and click OK. Right-
laid down a rectangle and then constrained its dimensions. click in the main window to deselect the Height
Constraint tool. We can now no longer change the Now that we’re viewing the sketch in the Part Design
dimensions of the rectangle, but its overall position isn’t workbench, it should be represented as a flat 3D
Multiple yet locked in place. rectangle. Let’s add some substance to it by extruding
selection in If we click the text in the solver telling us how many it. Click the yellow Pad icon. Immediately, the object
the Sketcher degrees of freedom are left, the four corner points of becomes a 3D dimensional solid because it now has
tool can be a the rectangle will be highlighted green. Any of these can some height to it. In the sidebar dialog, specify a length
bit unwieldy. still move in the x- and y-axis, and this is the problem. of 30mm because we want that to be the height of our
Always click There are a few different ways of locking the rectangle object. You should now have a solid block in the middle
a blank area in place, but the simplest is to lock the bottom corner of the main window.
first before of it to the origin (centre point) of the sketch. This is
beginning your
selections.
the red dot at the intersection of the major lines on the Round the corners
Then, click one
backdrop. This also introduces us to multiple selection Let’s round the corners to make our box a bit more
element after in the Sketcher. attractive. In the Combo View>Model tab in the sidebar,
another to Left-click an empty area of the sketch to deselect all. click the little triangle next to the Pad object to open it.
multiple-select. Left-click the origin of the sketch and then left-click the The sketch that we created is still in there, so double-
bottom corner of the rectangle. Locate the Constrain to click it to open it. Click a blank space to fully deselect
Coincident icon in the toolbar and click it. This should everything. To round the corners of our box, locate the
lock those two points together, giving us a constrained Fillets tool in the toolbar and click it. Click two edges
sketch. Once this is done, it’s time to take our sketch that are connected together by a corner. An arc will now
into the 3D world, so click Close in the Tasks tab. be added between those two lines, which gives us a
round corner. Now repeat the procedure for the other
three corners.
One slight problem at this point: replacing the
corners with arcs has removed some of the constraints
because we had used corner points for them, but we’ll
fix that in a moment. Before that, we’ll constrain the
corner arcs so that they’re consistent. To do this, locate
Because of the the Constrain Arc or Circle tool in the toolbar and click it
rounded corners, with nothing selected. Click a corner arc. In the dialog
we measure height that pops up, input 8mm as the radius. Now do the
from the first
points of the
same for the other three corners.
upper and the
lower edge. Boxing clever
As we said, there’s a slight change to how we constrain
the edges of the box, now that the corners are curved.
ADDING PILLARS Click a blank space to deselect all. Click the start point
of the topmost edge and then on the start point of the
From the main Part Design screen select the model’s interior floor, bottom edge. As before, use the Constrain Vertical
and click the Create Sketch icon. Use the Exterior Geometry tool so Distance tool to specify a distance of 65mm between
that you can access geometry from another sketch. What we’re after these two points. Because the top and bottom lines of
in this case is the four arcs that make up the corners of the outer the rectangle are parallel it makes no difference to the
walls. Once these are clicked, each presents a point that’s the centre width of the box that those points are no longer in the
of the arc. On these, create a circle by first clicking the centre point of corner of the box. Using this method, the overall width
the corner arc. This constrains the centre of the circle. On each of and length of the object is exactly the same as if we had
these, constrain the radius to 6mm using the Radius Constraint tool. been able to specify the line lengths as before.
As ever, FreeCAD enables us to move back and forth between Constrain the start points of the left and right
different stages of our design. Back in the Part Design window, add a edges of the box in the same way, using the Constrain
5mm pad to the sketch to raise the pillars up. Consider going back Horizontal Distance tool. We now have one more
into the sketch and adding another concentric circle to each of the constraint to add before the sketch is fully constrained.
pillars to make the screw holes. Click the first point of the bottom edge of the box and
then click the origin point of the sketch and use the
We’ll add some pillars with mounting holes to the corners of the inner part of our box. Back in the Sketcher tool and here we’re creating the interior of the
box. Pull the constraint labels out of the way if needed.
Consider adding holes to the box. Select a side panel, create a new
sketch and use the Pocket feature again. We exported the model as an STL file and imported it into Blender to render it
PHOTOPRISM
Credit: https://photoprism.app
Set up picture-perfect
online photo storage
In a flurry of paranoia, David Rutland expels Google Photos from his life and
sets up self-hosted photo storage on the semi-official Linux Format VPS.
Docking around
As usual the first thing you need to do is pick out a
domain name for your photo stash. As we’re all about
imagination (and don’t want to shell out an addition - “ ~/Pictures:/photoprism/originals ” Face recognition
fiver), we created a subdomain at photos.lxf.guru. to the directory you want you want PhotoPrism to use is powered by
TensorFlow and
Point the DNS A record at the IP address of your VPS instead. for example: is very good at
and visit https://dnschecker.org. Type the domain name - “ ~/my-photo-stash:/photoprism/originals ” its job. There are
in the search box, and select ‘A record.’ When the map Still in this section, you will want to uncomment the 431 pictures of
shows a majority of green ticks, log into your VPS with following line: the author and he
looks fabulous in
$ ssh user@your-vps-ip - “ ~/Import:/photoprism/import”
every single one.
Make sure the system is up to date with sudo apt This means that you’ll be able to create a directory
update and sudo apt upgrade . called import in your home directory, and PhotoPrism
If you’ve been following this tutorial series from the will, unsurprisingly perhaps, import any photos it finds
beginning, then you’ll already have everything you need in there. If you’ve just downloaded multiple gigabytes of
to get PhotoPrism up and running. If not, refer to the archives from your Google Photos account, this is where
tutorial in LXF282, and then come back. you’ll want to put them.
All done? Great. In the environment section, change the Admin
The PhotoPrism developers recommend using password from the default insecure password. It’s
docker-compose to set up and manage their software, probably a good idea to change the database password
and who are we to argue? while you’re at it.
From your home directory, type: Other highlights of environment include the site URL,
$ wget https://dl.photoprism.app/docker/docker- the site title the site caption, and the site description.
compose.yml We set the URL to photos.lxf.guru; the site title to The
You’ll want to edit the file to make it work on your Unofficial Linux Format Photo Archive, the caption to
system, so run: Where all our Linux Photos Live, and we left the site
$ nano docker-compose.yml description blank, because frankly, we were running out
to open it up for editing. of ways to say the same thing.
The first thing you’ll notice is that PhotoPrism’s Finally, move down to the database section of the file
docker-compose file is an absolute monster. It runs to and replace the passwords with the ones that you
146 lines in total, and enables you to configure virtually changed earlier.
everything. You can explore most of these options later. At the top of the file, there is a handy list of
For now, head down to the Storage section of the file. commands to administer your PhotoPrism instance
You’ll see that PhotoPrism has assigned a number of while it’s running. However, because many of these are
directories to itself. By default, it’ll store original photos available through the web interface, we’re not going to
in your Pictures directory. If you plan on using the bother with them right now. You’ll also find an
Pictures directory for other purposes, change this line: exhaustive range of options – from database type to
OF THE
POP!_OS
System76 developer Michael Murphy shares his Pop!_OS insights with
Linux Format’s self-proclaimed top Pop fan Jonni Bidwell.
eaders in the US who are on We hit up System76 software engineer these have since vanished. It’s a different
a lot of research that was ignored by C at the time it Pop was launched in 2017, when Ubuntu abandoned
was designed. its Unity desktop in favour of Gnome. Its own website
“Both of these languages peaked a long time ago. (https://pop.system76.com) describes Pop as “an
It’s reckless to continue developing new projects with operating system for STEM and creative professionals
them. There’s an absurd amount of money that’s been who use their computer as a tool to discover and
invested into trying to work around some of these create”. And we don’t dispute it. Since its inauguration
design flaws in compilers, and no matter how much it’s gone from strength to strength, introducing a new
research goes into these efforts the end result isn’t good tiling window mode, a helper for managing TensorFlow
enough. There’s perhaps an even greater amount of installations, a bespoke power scheduler and more.
money lost trying to resolve common bugs and
vulnerabilities caused by its use. We need to be more Linus Tech Tips and Pop!_OS
honest about its usage and consequences. Even Yet Pop has also made headlines for somewhat less-
Microsoft acknowledged that 70 per cent of its fortuitous reasons. Back in September, famed Youtube
vulnerabilities are caused by it. channel Linus Tech Tips (LTT) took on a challenge to
“Many people might answer that memory safety is use Linux as a daily driver. The result didn’t exactly
the main reason to use Rust, but it’s a side-effect of reflect glowingly on Pop!_OS, because Linus (not Linus
three features in Rust that are beneficial in more ways Torvalds) at one point tried to install Steam, and due to
than memory safety alone. These features are the a bug was met with Apt wanting to remove a whole
aliasing XOR mutability rule, the ownership model, and bunch of important system packages. Apt had the sense
type markers.” Okay Michael, you might need to explain to realise this may be unwanted, but its defence at the
these for us. Use the box (below) for your answers. time was to issue a prompt requiring the user to enter
the phrase “Yes, do as I say!”. Duly, Linus did as the
prompt said, and duly his system was hosed.
Michael explained how things went south. “The issue
happened because of a Systemd update pushed to
Launchpad that had only built and published the amd64
packages. Steam depends on the i386 libraries from
Systemd, so it wasn’t possible to install. At the time, we
depended on Launchpad for our system repository, but
Launchpad recently started blocking i386 builds of
packages unless the packages were on an allowlist. Up
until that point, Systemd packages we published were
on that allowlist, but we backported a newer version of
Systemd whose version wasn’t permitted.
“We noticed the issue immediately after and had it
fixed within an hour. What we didn’t know was that LTT
was livestreaming installing it at this moment. Rumours
started spreading about a Pop incident because the
System76 makes
beautiful Linux PCs, such
livestream was private and would be public in a week.
as the Thelio Mira pictured Once it had gone public there was a never-ending
here with its Launch keyboard. stream of accusations and demands for us to fix this
techradar.com
THE BEST NEW OPEN SOURCE SOFTWARE ON THE PLANET
HotPicks
CherryTree Sherlock Simple Keylogger Siren
MediaInfo Mechvibes yt-dlp Eternal Lands
Mayank Sharma
After slaving, er, scribbling
for Linux Format for over a
decade, Mayank Sharma
likes to think of himself as
LXF’s man Friday.
Speed Dreams Snap Backup ugrep
NOTE-TAKING TOOL
CherryTree
Version: 0.99.47
Web: www.giuspen.com/cherrytree
In addition to
OSINT TOOL displaying the
websites where
the username was
Web: https://sherlock-project.github.io
The keylogger
KEYLOGGING TOOL will record all
keystrokes,
including the arrow
All operations
AUDIO PLAYER in Siren can be
controlled from
the keyboard using
Version: 0.10
Web: www.kariliq.nl/siren
The project’s
TAG DATA VIEWER website hosts an
online variant of
MediaInfo that
A
re you the curious type? Then you can use
MediaInfo to view all kinds of technical details
about your media files, along with the tag
information for many audio and video files.
MediaInfo supports popular video formats, including
Matroska, WebM, DivX, XviD, AVI, WMV, QuickTime and
Real, as well as lesser-known or emerging formats. The Similarly, if the file is made up of multiple chapters then
cross-platform tool has both a command-line interface the tool will also display all relevant information about
and a graphical interface to display the information. the chapters as well.
The tool first displays data about the file’s container MediaInfo supports various views. The default is
such as its format, the format profile, codec ID, bitrate, the Easy view that collates the information and
date of encoding and other general details. This is displays it as meaningful information. Advanced
followed by details about the video, including the name media manipulators can switch to a different view
of the format, codec ID, aspect ratio, frame rate, bitrate, to show all the information in excruciating details. You
stream size and more. Next up, similar type of details can also export the displayed information in various
are displayed about the audio such as the format of the formats including plain text, CSV, HTML and more.
stream, its codec id, sample rate, channels, bit depth, as The tool has binary packages for virtually all popular
well as the language of the stream. distros such as Debian, Ubuntu, Fedora, OpenSUSE,
If your file has subtitles, MediaInfo will also display and Linux Mint. Furthermore, the project also produces
relevant details such as the language of the subtitles, Flatpak, AppImage and a Snap for the program, making
and number of included elements, or lines of text. it fairly easy to install in your distro.
KEYBOARD SOUNDS
Mechvibes
Version: 2.3.1
Web: https://mechvibes.com
ot everyone will have experienced typing on a
Version: 2022.04.08
Web: https://github.com/yt-dlp/yt-dlp
t-dlp is a fork of the popular youtube-dl script Interestingly, you can also mark or remove sponsor
ROLE-PLAYING GAME
Eternal Lands
Version: 1.9.6
Web: www.eternal-lands.com
ternal Lands (EL) is a multiplayer, online role-
RACING SIM
Speed Dreams
Version: 2.2.3
Web: www.speed-dreams.org
BACKUP UTILITY
Snap Backup
Version: 6.4.0
Web: https://snapbackup.org
ne of the reasons why many people fail to take
Ugrep includes
ADVANCED GREP built-in help, for
instance, ugrep
--help regex will
Web: https://github.com/genivia/ugrep
G
rep is one of the oldest Unix commands. In
addition to fixed search terms, it can also
search for patterns with wildcard characters. can apply search patterns in ugrep excluding negative
Virtually all Linux distros ship with the GNU variant of patterns. They let you, for example, ignore matches if
grep, which extends the features of the original grep in they occur in comments.
some places, most notably, allowing recursive searching Ugrep supports archive types including CPIO,
in directories. JAR, PAX, TAR and ZIP, compressed with all common
Ugrep is a faster, user-friendly variant of grep that methods (BZIP, GZ, LZ and XZ). In addition, you can
uses new match algorithms for ultra-fast operations. use filters to prepare data in special formats in
It’s written for advanced users who can appreciate and advance. For example, PDF documents can be
make good use of its rich set of features and speed. converted to text with a filter, before ugrep performs
For all intents and purposes, ugrep is a drop-in the search.
replacement for the standard GNU grep utility, and also The latest version of ugrep introduces a new option
supports all its options. It can match Unicode patterns that opens a query text-based user interface (TUI)
by default in UTF-8, UTF-16 and UTF-32 encoded files, that searches files as you type. The output can be
as well as match across multiple lines with \n and \R sorted by name, best match, size and time, and can
regex patterns. be exported in CSV, JSON, XML and other formats.
Moreover, ugrep can find approximate pattern Linux users can build ugrep manually following the
matches with fuzzy search, and can search with Google- instructions on its website. However, it’s also available
like Boolean query patterns, which can also be applied in the repos of some mainstream distros such as
to files as a whole. Another useful feature is that you Debian, and Ubuntu.
RUST
Code read/write
system file tools
So, you woke up today wanting to know how to use file input and output
calls to code system tools in Rust? Then Mihalis Tsoukalos can help.
Let’s take this knowledge and implement the The logic of copy.rs is found in the following statements:
functionality of the wc command line utility in Rust. let read_bytes = input_file.read(&mut buf).unwrap();
This tool can process multiple files and create a if read_bytes!=buf.len() {
summary at the end. The core functionality of cont=false
wc.rs can be found in the next for loop: }
for line in file.lines() { The previous code states that we should keep
let my_line = line.unwrap(); reading the input file using a buffer and that we should
total_lines = total_lines + 1; stop the process when the bytes that were read are
total_words += my_line.split_whitespace().count(); smaller than the buffer size, because in that case it
total_chars = total_chars + my_line.len() + 1; means that there’s nothing more to read from the input
} file. The entire code of copy.rs is surprisingly small for
What the previous code shows is how to count the such an important and powerful utility. We print a .
number of lines, words and characters of the input file. each time we write to the output file in order to keep
Calculating the number of lines when reading a file line track of the progress of the utility.
by line is straightforward and requires updating a As you might have observed from the presented
counter ( total_lines ) each time a new line is read. code in this series of tutorials, the core functionality
The number of words in a line is found by splitting of almost all utilities is implemented in just a small
the line in words based on the whitespace characters collection of statements. However, most of the
and counting the number of words. The number of remaining code is about making sure that we obtain
characters is calculated using the length of the line plus a valid input and identify potential error conditions.
one to include the newline character at the end. Reliability is important in systems programming. Next
The screenshot (below right) shows part of the code month’s Rust tutorial is going to discuss working with
of wc.rs. The logic and the flow of wc.rs is heavily based UNIX processes and signal handling
on the code of byLine.rs. Apart from the code example The help page of std::io can be found by visiting
presented earlier in this section, wc.rs has three https://doc.rust-lang.org/std/io. The most widely used
additional variables for updating the total number of aspects of std::io are the Read and Write traits, which
lines, words and characters of all files that have been provide the most generic interfaces for the reading and
read so far. If wc.rs has to process a single plain text file writing functionality.
only, then no summary is printed at the end.
Additionally, notice the use of the count() method
instead of len() to calculate the length of a line. This
happens because the output of the len() function and
the output of the chars().count() function might not be
the same when dealing with text files that contain
Unicode characters. For an ASCII file, their output
should be the same. Bear in mind that if you want to
allocate a buffer to store a given string, the len()
function is the correct choice. This screenshot
shows the Rust
Copying a file code of wc.rs,
which implements
In this final section we’re going to write a utility that the functionality of
copies a file by reading it in small chunks using a buffer. the wc UNIX utility.
NODERED
Use Home Assistant
NodeRED devices
NodeRED is a graphical programming language that’s ideally suited
to IoT, electronics and home automations, reveals Matt Holder.
odeRED is an open source graphical username and password established during the setup
Matt Holder programs can access input and output devices in the Go with the flows
has worked in IT real world. Using this library, the NodeRED system can NodeRED has a large number of Nodes available as
support for over a use real-world data to perform tasks. NodeRED uses the standard and these enable Flows to be built consisting
decade. He’s has terminology of Flows to represent programs, while of input, output and other actions. For our first example,
always tried to Nodes are added to the canvas to build flows. the diagram (bottom left) details a Flow, which takes the
utilise Linux This article will focus on both the NodeRED value from a switch and increments a counter based on
alongside the integration with Home Assistant and how it can be the switch being pressed. When the counter increments,
other installed used to create powerful automations based on many a log message is reported, which details the new value.
systems. different data sources as well as its usage from within An LED is also flashed whenever the switch is pressed.
Raspberry Pi OS. First of all, Raspberry Pi OS will be The simple circuit diagram (right) shows what’s required
used. This can be installed by using the Raspberry Pi to enable this Flow to work as expected.
Imager tool. Download and open the GUI (www. Stepping through this Flow from left to right, the first
raspberrypi.com/software) and select which Node is from the Raspberry Pi palette (at the bottom of
memory card the image should be written to: the toolbox) and is the RPi-GPIO In node. Drag this to
$ sudo bash <(curl -sL https://raw.githubusercontent. the canvas and double-click to open the options. Select
com/node-red/linux-installers/master/deb/update- the pin to be used (this example uses 13 or GPIO27) and
nodejs-and-nodered) select Pulldown from the resistor options.
$ node-red admin init The second blue Node is of type RPi-GPIO Out. Edit
When running the latter command, follow the the options and set the pin to 11 or GPIO17. Select the
prompts in the wizard to set options. Once a username Initialize Pin State button and then set the value to high.
and password has been set, enable the service: A Flow containing these two Nodes would turn on the
$ sudo systemctl enable nodered.service LED whenever the button is pressed. The first yellow
Finally, reboot the Pi. When logged in again open a Node is of the Switch type. Drag this Node to the canvas
browser and visit http://<YOUR_IP>:1880. This web GUI and open the options. Leave Property set to msg.
can also be visited by another device on the network – it payload and in the box below add the value of 1.
doesn’t have to be the Pi itself. Log in using the Next, drag the Counter node to the canvas. The
default setting should be fine. The final Node to drag to
the canvas is the green Debug node. Open the options
and change the Output box from msg.payload to msg.
count. Once all Nodes are added to the canvas and the
This shows how a flow can turn
options set, they can be joined together. Drag from the
on an LED when the switch dot on the right-hand side of one Node to the left of
is pressed. Also, a counter is another and this joins the output of one to the input of
incremented and output shown another. Join the Nodes together so that they resemble
in the debug panel.
the breadboard circuit diagram (page 96).
FAST VIRTUAL
The #1 open source mag
MACHINES
Email [email protected]
EDITORIAL
Editor Neil Mohr
Black-hoody editor Jonni Bidwell
Art editor Efrain Hernandez-Mendoza
Operations editor Cliff Hope
Group editor-in-chief Graham Barlow
Group art director Jo Gulliver
Editorial contributors
Michael Bedford, Neil Bothwick, Sean Conway, Dave
James, Matthew Hanson, Matthew Holder, Jon
Masters, Nick Peers, Aaron Peters, Les Pounder,
Virtual life makes everything Michael Reed, David Rutland, Mayank Sharma,
Shashank Sharma, Mihalis Tsoukalos
Cover illustration magictorch.com
LXF291
Design director Brett Lewis
Commercial finance director Dan Jotcham
Printed by Wyndeham Peterborough, Storey’s Bar
Road, Peterborough, Cambridgeshire, PE1 5YS
Distributed by Marketforce, 5 Churchill Place, Canary
will be on sale Wharf, London, E14 5HU www.marketforce.co.uk
Tel: 0203 787 9001
Tuesday Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries.
GNU/Linux is abbreviated to Linux throughout for brevity. Where applicable code
28 June printed in this magazine is licensed under the GNU GPL v2 or later. See www.gnu.
org/copyleft/gpl.html. All copyrights and trademarks are recognised and respected.
Disclaimer All contents © 2022 Future Publishing Limited or published under
licence. All rights reserved. No part of this magazine may be used, stored,
2022 transmitted or reproduced in any way without the prior written permission of the
publisher. Future Publishing Limited (company number 2008885) is registered in
England and Wales. Registered office: Quay House, The Ambury, Bath BA1 1UA. All
Software KVM information contained in this publication is for information only and is, as far as we
are aware, correct at the time of going to press. Future cannot accept any
responsibility for errors or inaccuracies in such information. You are advised to
contact manufacturers and retailers directly with regard to the price of products/
services referred to in this publication. Apps and websites mentioned in this
Don’t build barriers. Instead, create a cross-platform, software- publication are not under our control. We are not responsible for their contents or any
other changes or updates to them. This magazine is fully independent and not
affiliated in any way with the companies mentioned herein.
If you submit material to us, you warrant that you own the material and/or have
based KVM for sharing keyboards and mice everywhere! the necessary rights/permissions to supply the material and you automatically grant
Future and its licensees a licence to publish your submission in whole or in part in
any/all issues and/or editions of publications, in any format published worldwide and
on associated websites, social media channels and associated products. Any
material you submit is sent at your own risk and, although every care is taken, neither
Future nor its employees, agents, subcontractors or licensees shall be liable for loss
Raspberry Pi OS face-off or damage. We assume all unsolicited material is for publication unless otherwise
stated, and reserve the right to edit, amend, adapt all submissions. All contents in
this magazine are used at your own risk. We accept no liability for any loss of data or
damage to your systems, peripherals or software through the use of any guide.
Notes: fear the Tux-knife of doom!
What should your Pi be running? We test a host of Pi distros We are committed to only using magazine paper derived from
responsibly managed, certified forestry and chlorine-free
manufacture. The paper in this magazine was sourced and
to see which is the most delicious filling for your Pi dish. produced from sustainable managed forests, conforming to
strict environmental and socioeconomic standards. The
manufacturing paper mill and printer hold full FSC and PEFC
certification and accreditation.
What’s with Web 3.0? Future is an award-winning international media group and
leading digital business. We reach more than 57 million
Discover how open source is at the heart of the next web international consumers a month and create world-class
content and advertising solutions for passionate
consumers online, on tablet & smartphone and in print.
revolution and how blockchain technology is driving it all.
Clone machine
We’re going clone mad down here at Linux Format Towers – now
we’re playing with Clonezilla for fast, easy system duplication. Future plc is a public
company quoted on the
London Stock Exchange
Chief executive Zillah Byng-Thorne
Non-executive chairman Richard Huntingford
!ǝǣƺǔˡȇƏȇƬǣƏǼȒǔˡƬƺȸ Penny Ladkin-Brand
(symbol: FUTR)
www.futureplc.com Tel +44 (0)1225 442244
Contents of future issues subject to change – there might be too much Steam Deck distraction going on!