LXF - 287 - April 2022
LXF - 287 - April 2022
LXF - 287 - April 2022
Alexander Tolstoy
Subscribe
For me, this question just hits the spot! I’m all
in for building things from source, whether it’s
& save!
another HotPicks candidate or something for On digital and print –
myself (or both). And this includes the Linux
kernel. Naturally, I avoid compiling large
see page 16
projects such as LibreOffice or Firefox because it may take far too
long on my humble desktop machine.
BUILD THE
REVIEWS
KERNEL
It’s the new Q6600 of the processor
world, which is also Dave James’ greatest
compliment ever! Discover why this should
be your next desktop CPU.
ArchLabs 2022.02.12 20
Mayank Sharma has a soft spot for new
Arch-based distros, and this time around
he’s found one that tickles his fancy and
has a fine selection of desktops.
Slackware 15 22
He’s no masochist… until there’s a new
Slackware release, when Mayank Sharma
puts himself through all kinds of pains to
relive the good ol’ days.
Pi USER TUTORIALS
CODING ACADEMY
SECURITY
Linux malware
grows by 35% Crowdstrike highlighted a worrying
rise in malware that targets Linux
Malware aimed directly at Linux systems devices in 2021.
D
uring 2021 malware targeting Linux take over a device. Some variants targeted
devices increased by 35 per cent. The Docker servers with the open 2375 port, which
majority of malware instances involved gave attackers root access to the machine
IoT (Internet of Things) devices caught up in without the need of a password.
DDoS (distributed denial of service) attacks. Meanwhile, Mirai is a form of malware that’s
IoT devices encompass a range of gadgets. been gaining increasing popularity after its
Many of them are internet-connected and run source code was published. It uses brute force
some form of Linux distribution. People who buy attacks against weak protocols like Telnet to gain
a smart fridge, for example, may not know the access to devices. It’s also spawned a growing
security implications, which makes them number of variants that target different
attractive targets for hackers looking to create protocols. These variants include Sora, IZIH9
DDoS attacks, as they ‘recruit’ a large number of
IGNORANCE IS NO DEFENCE
low-powered devices to perform such attacks.
According to a Crowdstrike report (https://
SECURITY OPINION
A
serious new vulnerability has been and CentOS, then it’s likely you are), you should
found in polkit’s pkexec application, patch your system immediately. Cyberark, a
which is installed by default in many security firm, has also released the PwnKit- Michael Meeks
Linux distros. Due to its popularity, and the fact Hunter tool for Debian and Ubuntu (https://bit. is general manager at
that it’s used to control system-wide privileges, ly/lxf287pwnkit-hunter) that will help you Collabora Productivity
the vulnerability has resulted in a major security determine if your system is affected.
issue for millions of Linux systems. The fact that this vulnerability has been
Its discovery by researchers at Qualys (you hanging around for so long is worrying, and Collabora Online
can read the announcement at https://bit.ly/ as The Stack reports (https://bit.ly/ (COOL) 21.11 has arrived. It
lxf287qualys) has got a lot of people concerned, lxf287thestack), security researcher Ryan Mallon packs online collaborative
with US National Security Agency (NSA) claims he pointed out the vulnerability back in document-editing goodness
cybersecurity director Rob Joyce writing on 2013. With the vulnerability now more widely into an easy-to-obtain
Twitter (https://bit.ly/lxf287tweet) that the reported, hopefully it’s taken more seriously, and update. We packed another
vulnerability “has me concerned. Easy and other potential vulnerabilities within the default year of rendering and
reliable privilege escalation preinstalled on apps that come with our distributions are interoperability development
every major Linux distribution.” thoroughly investigated. into the LibreOffice
According to researchers, this vulnerability Technology core. COOL
has been included since the first release of itself brings a swathe of
pkexec in May 2009, and any local user can UX improvements.
exploit this vulnerability to obtain full root One piece I worked on is
privileges. It didn’t take long before PwnKit performance: profiling and
exploits using the vulnerability emerged. optimising our client-side
If you’re running a system that’s vulnerable Javascript to make the
(and because pkexec is included in almost all Ubuntu is one of the mainstream Linux distributions that’s experience slick and
major distros such as Ubuntu, Debian, Fedora affected by the PwnKit vulnerability. smooth. Previously, we
thought any interaction
issues were caused by
PRIVACY network latency or by
excessive server-side work.
However, after doing end-to-
S
enators in the US are once again first emerged in 2020, but was dropped thanks we got a big step-change in
pushing for the EARN IT act to be to a vocal backlash from privacy campaigners. slickness. Other big wins
made law. If passed, the act would It’s a shame that a group of senators are once were background document
bring in sweeping internet regulations that again trying to push this through, but hopefully saving, accelerated multi-
some fear would give third-party companies the fact that it’s been defeated before means it user editing, and a mature
and the government access to the private will once again fail. diagramming component.
messages of civilians. It could even lead to Internet users’ privacy in the UK is also under Another improvement
penalties for companies that offer end-to-end threat, with the Conservative government again was exposing some dialogs
encryption, which would affect messaging proposing an online safety bill that would require and our sidebar tool palettes
services like WhatsApp, Signal and iMessage. people to confirm their identity, via documents via JSON. Re-using
The EARN IT act also focuses on Amazon, such as credit cards or passports, when LibreOffice’s welded widgets
with creators of the act accusing the company accessing adult content. The government is gave us faster, ‘web native’
of not properly scanning content it hosts on also threatening websites and social media controls in the browser.
Amazon Web Services. With many websites networks with severe punishments if they host With homeworking the
using AWS, this could mean that large swathes prohibited content. new norm, full-feature
of the internet are scanned by government- While we all want to see a safer internet, document collaboration
approved software such as PhotoDNA, which privacy advocates are concerned about becomes vital. Why not
integrates with law enforcement databases. government overreach on what can and cannot reclaim and secure your
The Electronic Frontier Foundation explains be accessed online, and how people are identified documents with the
the act at https://bit.ly/lxf287earnit. The bill when browsing the internet. latest CODE release?
OPINION LAPTOPS
F
ramework’s innovative laptop, which firmware covers how the laptop handles low-
Keith Edmunds comes with a modular design that level functionality, according to the Framework
is MD of Tiger Computing Ltd, enables you to swap out and replace team, such as “power sequencing, keyboard
which provides support for various parts, now has open source firmware. and touchpad interfacing, and controlling the
businesses using Linux. As Framework announced in a blog post LEDs in the system.”
(https://bit.ly/lxf287framework), the team It’s great to see Framework open source its
has published its Embedded Controller (EC) firmware, making its laptop a more attractive
It’s mostly a firmware for the Framework Laptop on GitHub purchase for many people. Since its launch, the
straightforward task to find (see https://bit.ly/lxf287embeddedcontroller), device has enjoyed growing support for a range
out what software powers which is based on the chromium-ec EC firmware of distros, with Fedora 35 working out of the
a web server. A simple created by Google for Chromebooks. box with full hardware support for its unique
examination of the returned Framework’s firmware is shared under the features. However, as with all firmware, care
headers will often display BSD 3-clause license that enables anyone to should be taken when modifying it, because it
the version of Apache, and modify, share and repurpose the code. The could damage the device if not done properly.
frequently the version of
PHP, too.
A well-known site that
I recently looked at was
SOFTWARE SOFTWARE
running Apache 2.2 and
PHP 5.4. The headers gave
the exact versions, but
we don’t need them. The
FreeCAD Project LibreOffice 7.3
Apache website states that,
“No further evaluation of
Association formed Community now out
security risks will be New legal non-profit New features in the latest
published for 2.2.x releases”
after December 2017.
association set up in Belgium. version of the office suite.
As for PHP, even the most
A T
recent version of 5.4, 5.4.45, major milestone has been passed for he Document Foundation (TDF) has
was released over six years FreeCAD development, with the non- announced a new version of LibreOffice
ago ,with security support profit FreeCAD Project Association (https://bit.ly/lxf287tdfblog).
ending at the same time. (https://bit.ly/lxf287fpa) being set up in LibreOffice 7.3 Community brings a number of
This website is a high Belgium. The aim of the association is to protect new features and fixes that are primarily aimed
profile e-commerce site, and FreeCAD’s existence as a free, community-owned at making the switch from Microsoft Office to
it’s running software with project, and will help raise funds and act as an LibreOffice much smoother for new users.
known, published official body. It won’t be used to rule over or own Interoperability between the suites has
vulnerabilities. More than FreeCAD, but to help communicate with other been improved, including the performance of
that, it’s telling anyone who projects and third parties. LibreOffice when importing Office files, such as
takes the time to look that FreeCAD (https://freecad.org) is an open- .doc, .docx and .xlsx. Change tracking has been
it’s doing so. source 3D modeller, primarily used for designing changed to better work with Microsoft docs, and
Life is busy. We all have a real-life products and objects. It’s a popular free LibreOffice’s Help tool has been improved, and
to-do list with items on it alternative to AutoCAD for architects, and the again focuses on making the software as
that we’re never going to formation of this association has been warmly welcoming as possible to ex-Office users.
cross off with a permanent received by its users. According to The Document Foundation’s
marker pen. But if you’re blog post, LibreOffice 7.3 Community’s new
responsible for public-facing features were developed by 147 contributors,
Linux systems and you don’t while 641 volunteers have helped create
have a process for ensuring localisations for 155 languages – and the latest
they’re kept up to date… version launched in 120 language versions,
well, you might want to more than any other software, according to
put fixing that a bit FreeCAD is a popular 3D modelling tool that doesn’t cost TDF. You can download the latest version from:
nearer the top. around £2,000 a year, unlike AutoCAD, https://bit.ly/lxf287libreoffice73.
Distro watch
OPINION
TRUST ME?
What’s down the side of the free software sofa?
KERNEL WATCH
OPINION
MEASURE
THE PULSE
Jon Masters summarises the latest happenings in
the Linux kernel, because someone has to…
L
inus Torvalds announced the release The pkexec binary includes a bug in its main
of Linux 5.17-rc4 (Release Candidate function. Every C program has a main function,
4). The RC was named Superb Owl and it’s called with an argument count, and an
Jon Masters has been involved in honour of the US Super Bowl annual array of strings representing the arguments. The
with Linux for more than 22 years. American Football game, which is often first argument to any program is usually the
misspelt. The name is meaningless as name of the program, but POSIX (one of the
I enjoy following technical far as the kernel is concerned, and is only main Unix standards) allows for argc to be zero,
discussions on Twitter. In referenced in a single place, but Linus does with no arguments passed to a program. Polkit
the pandemic era, when we can’t like to use it for running gags. assumes, however, that it’s always called with at
meet up so easily at conferences, There was recent coverage on the Hacker least one argument, so it skips past that entry in
this is a good way to keep in News website claiming 5.17-rc2 had been the list. If the list is empty, pkexec performs an
casual contact with a number of released as I Am Satoshi (a reference to the “out of bounds” access beyond the end of the
folks, as well as to gauge the anonymous Bitcoin creator). That turned out argv argument array.
“pulse” of what’s happening in to be a fake joke commit by kernel developer Beyond the argument array per spec is
the broader community, beyond
Matthew Garrett (@mjg59) that, thanks to a the environment array, the place where the
the Linux Kernel Mailing List
GitHub quirk, could be confused as coming environment variables such as PATH is stored.
(LKML), or any one specific Linux
distro or project list. There are from an official clone of Linus’s tree. pkexec will filter out “dangerous” environment
many talented folks who you can variables that might be used to compromise
interact with directly, including That Polkit vulnerability security, but unfortunately the buggy code in
numerous developers. Another month, another security vulnerability. question enables an attacker to overwrite the
One of those I enjoy following This month’s fun comes in the form of a bug environment, restoring a dangerous entry such
is Alyssa Rosenzweig. She’s in the Polkit library used to manage the as LD_PRELOAD, which can be used to replace
perhaps most famous for her interaction between privileged and non- certain library functions to be used by the more
work leading the Panfrost privileged binary with attacker ones. At that
privileged processes. Polkit (once known as
project, which develops Open
PolicyKit) includes pkexec, which can be used point, it’s game over pretty quickly. As a
Source drivers for Arm’s Mali
GPUs (used in many phones
similarly to sudo to run another binary as a consequence of this bug, and to stop the next, a
and other devices, but with a different user. It’s what powers most of the discussion has started about how to safely
proprietary closed source driver). pop-ups you’ll see on a Linux system when change Linux zero argument behaviour in a
In addition to Panfrost, she’s asked to enter an admin password. manner that doesn’t break compatibility.
known for reverse engineering
the GPU in Apple’s M1 processor
and writing a driver from scratch ONGOING DEVELOPMENT
as part of the Asahi Linux project.
All this, and she also won an
The Linux Plumbers Conference is the a per socket, sysfs attribute interface for
award in 2020 as an Outstanding
premier “by the community, of the applications to perform... provisioning.” It’ll
New Free Software Contributor.
Recently, Alyssa published
community, for the community” event be interesting to see how it plays out, and
another awesome blog post on for those working on the lowest levels of what kinds of features can be enabled by
the Collabora website, titled Linux distributions, the kernel, and related providing the right certificates under Linux.
Writing an open source GPU projects. Fingers are crossed for 2022 to see A flurry of activity has been happening in
driver – without the hardware, in a return to an in-person element, with the the RISC-V community. A proposal to ratify
which she describes the process event slated for 12-14 September in Dublin. the official ABI (Application Binary Interface)
she followed to reverse engineer A call has already gone out for proposals used by the SBI (Supervisory Binary
the Arm Valhall GPUs (Mali-G57 to host microconferences during the event, Interface) management firmware to provide
and G78) by using a combination
and Jorg Rodel has already drafted a certain services to an OS was recently made.
of analysing a (locked down)
proposal covering Confidential Computing. SBI does such things as bring CPUs online,
phone to understand how the
hardware behaves, writing a
David E Box posted updated patches or send messages between CPU cores
driver, and then leveraging a tool implementing support for Intel Software (known as IPIs) to perform certain
known as drm-shim to test that Defined Silicon, which is described as “a housekeeping functions. As part of that
driver prior to being able to post manufacturing mechanism for work, Palmer Dabbelt noticed that the kernel
purchase a laptop featuring the activating additional silicon features. code intended to make calls into the SBI
hardware. It’s yet another really Features are enabled through a license wasn’t being linked correctly and is in the
nice write-up by someone activation process. The SDSi driver provides process of cleaning it up.
who’s making an impact
in the community.
Q Learning curve
I’m new to Ubuntu Linux and
to obtain that information:
$ dpkg -S /usr/bin/find
We haven’t mentioned booting a live
distro because that involves leaving your
trying to learn its commands and You need to give the full path for a current environment, although you could
concepts, but don’t know how can I get reliable search. You can get that with the run a live distro in a virtual machine, saving
instructions to utilise commands I’ve which command. There, that’s three the installation step. That may well be
learned. I wish there was a website like commands you’ve learned already! the best way to do this because you can’t
vimgenius.com break a live distro – everything resets when
for other Linux you reboot it.
commands as
well, such as find,
grep, locate, etc,
Q Why are we waiting?
Since yesterday, when shutting
but I couldn’t find down the system takes a break of about
anything. Can 90 seconds before finally quitting.
you help? This is on a five-day old installation of
David Roberts openSUSE Tumbleweed.
I have a second Tumbleweed
installation on the same machine which
Reading man pages doesn’t take as long. On my old PC
online can be a lot with verbose booting and shutdown
easier than in a
terminal, thanks to the
there were some rare instances where
addition of hyperlinks a message like “waiting for a stop
and an index. job (service?)” appeared with a timer
SUBSCRIBE
Sign up today and get your
PowerKick
YOUR
GIFT!
wireless charger
WORTH
£50 t, Product features
iss ou The PowerKick wireless power bank
Don’t m e now!
subscrib delivers functionality and convenience.
Its clever suction cups secure the
charger to a smartphone or other
device while charging.
The built-in kickstand props the device
up in either landscape mode for video
viewing or portrait mode for video
conferencing, all while charging.
Indicator lights provide information
on the status of device charging,
as well as the current charge of the
10,000mAh lithium polymer battery.
SUBSCRIBE NOW!
www.magazinesdirect.com/lin/a26b
Call 0330 333 1113 and quote A26B
16 LXF287 April 2022 www.linuxformat.com
Save money today! SUBSCRIBE
Terms and conditions: Offer closes 30 April 2022. Offer open to new UK subscribers only. Pricing is guaranteed for the first 12 months and we will notify you in
advance of any price changes. Please allow up to six weeks for delivery of your first subscription issue (up to eight weeks overseas). Your gift will be delivered
separately within 60 days after your first payment has cleared. Gifts only available to subscribers on the UK mainland. Gift not available with a digital subscription.
The full subscription rate is for 12 months (13 issues) and includes postage and packaging. If the magazine ordered changes frequency per annum, we will honour
the number of issues paid for, not the term of the subscription. For full terms and conditions, visit www.magazinesdirect.com/terms. For enquiries please call
+44 (0) 330 333 1113. Lines are open Monday to Friday 9am to 5pm UK time or email 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.
ON SALE
NOW
T
he easy approach to this review
SPECS would be to dismiss the Intel Core
Socket: i5 12400 as one of the least-
LGA1700 interesting processors from the 12th Gen
Process: Alder Lake generation of CPUs. Yet if we did
Intel 7 10nm that, we’d be dismissing one of the best
Cores (P+E): mainstream chips ever made.
6+0 The first clue is the Alder Lake
Threads: 12 silicon goodness beneath that broad
Cache: 18MB heatspreader, but there are no hybrid cores
L3, 7.5MB L2, here. Instead, it’s packing six of Intel’s
480KB L1 Performance Core; Efficient cores are
Clock: 2.5GHz nowhere to be seen. This single core
(4.4GHz turbo) performance is right up there with the best
Unlocked: processors around. Intel Thread Director
Complicated tech is scheduled to hit the Kernel 5.17, but
GPU: UHD this processor won’t need it.
Graphics 730, The Core i5 12400 still represents a full Want six of Intel’s
24 EU, 300MHz platform upgrade, mind. It requires a new Performance
Cores? You got it!
(1.45GHz Max), chipset and socket (a really big new
OpenGL 4.5, socket!). The LGA 1700 is a hefty
OpenCL 2.1 component, but is also finally available on boards Even without the Core i5 12400’s overclocking chops,
Memory: 128GB outside of the hyper-expensive, hyper-reality swathe of we’d be hailing this as the best budget CPU for an age.
max, No ECC, Z690 DDR5 boards as the B660 chipset is here, and if Intel has continued its aggressive push into the
2-channel you go for a DDR4 memory-supporting version it’s very mainstream market, aiming to squeeze AMD out of the
Memory speed: affordable. You also get PCIe 4.0 support from the running even when it’s starting to claw back its lead
DDR5 chipset, too, for those speedy new SSDs. right at the very top of the CPU stack, too. Do we really
4800MT/s, And in reality good, low-latency DDR4 kit will still need DDR5 and PCIe 5.0 on a budget build? Not a jot.
DDR4 hand any current DDR5 module its bottom bits thanks Throw in this BCLK overclocking and you’re looking
3200MT/s to super lax timings on even the most expensive, most at a chip reminiscent of the classic Intel Q6600, the old
PCIe lanes: 20 speedy of kits housing the new memory technology. school (Intel Celeron 300A, surely? – Ed) overclocking
(16+4, 2x8+4) heart throb. When you can have the Core i5 12400
Base power: High achiever running at a stable 5.2GHz, it hoses the best of Intel’s
65W In straight CPU performance terms it’s mighty previous generation of CPUs and practically matches
Max power: impressive, too, offering great single core performance the best of this generation.
117W and still pretty meaty multithreaded prowess despite The Intel Core i5 12400 is an outstanding CPU. It’s a
dropping the E-Cores. What really highlights the power £200 processor that belongs in your next budget PC
of the Golden Cove microarchitecture is how the Core i5 build. It offers performance on par with the best of the
12400 compares with the best CPU of the 11th Gen last generation, and when paired with the right board
range. Almost across the board the i5 tops the i9. Only can deliver unprecedented overclocking prowess.
in heavily multi-core focused applications do the extra
two cores of Core i9 11900K come into play.
Alder Lake is rightly castigated as being one hot,
VERDICT
hungry chip design, but in this mainstream form it’s DEVELOPER: Intel
impressively low maintenance. At stock speeds it only WEB: www.intel.com
peaks at 72W, with a paltry 44°C as its maximum PRICE: £200
temperature under our AIO cooler.
One side note: this isn’t a K-series processor – so no FEATURES 10/10 EASE OF USE 9/10
official overclocking – but it does reach 5.2GHz without PERFORMANCE 10/10 VALUE 10/10
breaking a sweat. The rumour is that an oversight in the
CPU microcode gives latent support for base clock Even without the unprecedented overclocking potential
overclocking (BCLK OC). Motherboard manufacturers inside the i5 12400 we’d be heartily recommending that this
are seemingly taking advantage of this and adding in chip forms the basis of your next budget PC build.
non-K series specific settings to their boards with
external clock generators. This isn’t official and it could Rating 10/10
be removed at any point by Intel, but there you go.
ArchLabs 2022.02.12
Mayank Sharma has a soft spot for new Arch-based distros,
and this time around he’s found one that tickles his fancy.
O
ver the years, the ArchLabs
IN BRIEF distro has deviated
Originally considerably from its
inspired by origins. It now suits users who
BunsenLabs, want to exploit Arch’s famed
the distro began customisability to build their
to bring over installation from scratch, but with
the concepts some added conveniences to
of the popular minimise the time it takes to
minimalist deploy a pure Arch system.
Debian-based ArchLabs caters to users who
distro on top of aren’t afraid of the command line,
an Arch base. but want to run a desktop distro
However, over without spending a lot of time to
the years the compile everything from scratch.
distro has Unlike some of the other popular ArchLabs has customised all of the desktops it bundles. This is its rendition of the Deepin DE
changed Arch-derivatives, the 64-bit only
considerably distro doesn’t boot into a Live environment. Instead, driven repository, helping them resolve dependencies,
and is best its install-only medium takes users to its text-based before retrieving and building them.
described as a installer dubbed AL-Installer. It’s fairly straightforward to The Arch project doesn’t recommend using AUR
Arch distro for navigate and includes all the conveniences of a modern helper scripts, and instead suggests users build all their
the experienced distro installer, without the bloat. packages manually. However, baph didn’t throw any
Linux user. The installer helps users navigate through the errors, and helped us install everything from office
various installation steps, and offers plenty of options. suites to games without any issues.
SPECS
For instance, the installer includes various popular If we have to be picky, the one issue we’d like to flag
partitioning tools, but also extends the option to doesn’t exist in the distro, but rather in the project –
CPU: 1.4GHz automatically partition the disk, which is useful if you namely documentation. The project has just enough
Mem: 1GB only want ArchLabs as the sole distro on the machine. documentation to help new users familiarise themselves
HDD: 15GB The installer also offers bootloaders, shells and a with the distro, but there’s not enough of it to help first-
Build: range of kernels. There’s the vanilla kernel on which the timers orient themselves with the ways of ArchLabs.
64-bit only developer has applied a few patches. Then there’s the Although ArchLabs is designed for users who’ve
long-term support (LTS) kernel, and a security-focused clocked enough mileage with Linux to be able to find
kernel with patches to mitigate exploits. These will be their way around the distro, we think the project needs
handy if you want to use ArchLabs to host servers or an updated ‘getting started’ guide for the mere fact that
critical applications. If you want to run your ArchLabs it’s metamorphosed into a completely different beast
installation as a regular desktop, you can use the Zen than what it eventually set out to be. The distro has
kernel that’s been optimised for everyday desktop use. been dishing out releases for half a decade now, and has
Similarly, the installer gives the user the ability been covered extensively. However, much of the
to choose from over a dozen different desktop information out there isn’t relevant thanks to the
environments and window managers. There’s distro’s constant evolution.
everything from heavyweight desktops like Gnome, and
Deepin, to lightweight ones like Xfce, and LXQt, and
barebones window managers like Sway and JWM.
VERDICT
DEVELOPER: Nathaniel Maia & Matthew Dobson
Chemical attraction WEB: https://archlabslinux.com
In its first release of 2022, the distro has added a new LICENCE: GPL
custom window manager christened dk. This is
described as a list-based tiling window manager, much FEATURES 8/10 EASE OF USE 9/10
like dwm, bspwm and xmonad. PERFORMANCE 9/10 DOCUMENTATION 7/10
Based on Arch, the distro inherits one of the best
package management systems in the game. It Want an easy-to-install Arch-derivative with minimal
supplements this by rolling in its own Arch User bloat and maximum choice? Then consider ArchLabs.
Repository (AUR) helper script dubbed baph for Basic
AUR Package Helper. AUR Helper scripts enable users Rating 8/10
to search for packages published in Arch’s community-
UBOS Linux
Mechanisms for simplifying the installation of popular web tools are like
snake oil. Or so thought Mayank Sharma, until he came across UBOS…
U
BOS is a distro that helps
IN BRIEF reduce the amount of time
As its name required to set up and
states, the maintain common network
UBOS distro is programs and services. Essentially,
designed to put UBOS automates much of the
you in charge. administration, reducing actions
An Arch such as deploying complete web
derivative, the tools, securing the connection with
distro simplifies SSL certificates and more, down to
the rollout and a single command.
management of You can use the distro on a
popular web variety of physical, virtual and cloud
tools. The distro hardware. Deploying it is as simple
is available for as uncompressing the downloaded
64-bit PCs, all image for the target platform, and UBOS can deploy web applications on Tor, complete with a .onion hostname. However, the
editions of the writing it to a USB disk, or attaching documentation suggests this deployment option is currently broken.
Raspberry Pi it to a virtual machine.
including the UBOS is based on Arch Linux, and its impressive Similarly, the distro makes it just as simple to
Zero, as well custom rollout and management utility, ubos-admin, un-deploy the web tools, and also back up all data
as virtual bank on Arch’s famed package management system to from individual tools, or from all the deployed ones,
machines, extend much of these conveniences. Using the utility and restore them just as easily as well.
containers, you can deploy popular content management systems You can also use the distro to check for upgrades to
and cloud. including WordPress, phpBB, Nextcloud and several your web programs. When it finds one, the distro will
others with a single command. automatically display an “upgrade in progress” message
Once the distro is up and running, the ubos-admin on your deployed websites, take a temporary backup,
createsite command takes you through an interactive un-deploy the tools, fetch the upgrades, before
setup process, which involves entering the name of the redeploying the tool after the upgrade, then restore
program you want to deploy. The process shouldn’t tax all the data, and make sure it’s imported properly.
those who are experienced in rolling out network All with a simple ubos-admin update command.
software. The inexperienced can go with the default UBOS does a wonderful job of removing all the
options, which will work for most deployments. deployment and administration complexities.
The installed software can be accessed from Furthermore, its support for traditional as well as single
the IP address of the UBOS device it is installed on. board, and virtual computers, makes the distro suitable
Furthermore, UBOS devices use mDNS to advertise for a wide variety of use cases. The only real drawback
itself on the local network for easier access. is its peculiar mechanism for fleshing out the web
UBOS also offers multiple options to add SSL to your programs, which also means its users can access only
deployed web tool. If you only plan to use the tool inside a handful of supported add-ons. However, the distro
the local network you can secure the connection using a makes sure it offers all the popular and useful ones, to
self-signed certificate. ensure its advantages outweigh the drawbacks.
If your site has an official domain name and a public
IP address, UBOS can just as easily fetch and install a
LetsEncrypt certificate. It’ll also ensure the free
VERDICT
certificate is renewed automatically before expiration. DEVELOPER: Johannes Ernst
WEB: https://ubos.net
Off-centre LICENCE: Personal Public Licence
The one oddity about deploying web tools through
UBOS is fleshing them out. Virtually all web tools enable FEATURES 8/10 EASE OF USE 9/10
users to customise them by adding plugins and themes PERFORMANCE 8/10 DOCUMENTATION 8/10
from within the respective apps’ administration console.
However, when deployed with UBOS, users will have to One of the best ways to deploy and administer popular web
specify the add-ons they want to install during the tools that’s designed to suit a wide number of use cases.
interactive command-line setup process. If you’ve
already deployed your web tool, you can rerun the setup Rating 8/10
process to redeploy the utility with any new accessory.
Slackware 15.0
He’s no masochist… until there’s a new Slackware release, when Mayank
Sharma puts himself through all kinds of pains to relive the good ol’ days.
ne of the unique aspects that differentiates
IN BRIEF
of users who are still using Slackware, and continue
Slackware was
O Slackware from the other distros is its glacial
pace. Even as the distro is actively developed
to do so.
Another important change that helps catapult
created by behind the scenes, it doesn’t put out releases as often as Slackware to the modern Linux desktop is support for the
Patrick some of the current crop. PAM library. Starting with this release, the distro also
Volkerding and So while most modern distros, such as Ubuntu and moved away from ConsoleKit2 to elogind that helps run
had its first Fedora, release every six months or so, Slackware follows software that depend on systemd while running on distro
release almost the “release when it’s ready” philosophy. No surprise, that doesn’t use it, like Slackware, which still uses its
three decades then, that Slackware 15 is the distro’s first major release in custom System V-based init system.
back, in 1993. over a decade. In fact, the distro last had a stable dot
This makes the release back in 2016 (v14.2, in case you’re wondering). Into the workshop
distro one of the And what were the devs up to in the meantime? Designed for experienced Linux campaigners, Slackware’s
two oldest Linux According to the release notes of Slackware 15, they charm is that it’s the most Unix-like Linux distro. It
distros that are tested over 400 different kernel versions before settling adheres to the Keep It Simple, Stupid (KISS) design
still actively on the 5.15 LTS kernel for this release, which will be philosophy, which enables advanced users to build their
maintained, with supported until at least October 2023, and going by Linux desktop or server exactly as per their requirements
the other being recent trends, most probably for quite a while longer. without any bloat and unnecessary components.
Debian. They In addition to the excellent hardware support brought Slackware takes pride in helping users exercise complete
say, “If you want in courtesy of the 5.15 kernel, including preliminary control over their installation, and everything in the distro,
to learn Debian, support for Apple’s M1 chip, the distro can now boot on from its installer to package management system is a
use Debian. If computers with the UEFI firmware. However, it still doesn’t reflection of its ethos of technical simplicity.
you want to support running under SecureBoot, but the release notes As is customary for Slackware, the latest release also
learn Fedora, hint that it might be supported in the next release. ships with two kernels. There’s the huge kernel that rolls in
use Fedora. But Another major update is the
if you want to switch to the KDE 5.23.5, which is
learn Linux, use the desktop environment’s 25th
Slackware.” This anniversary edition. Slackware 14.2
still holds true. was a rock-solid release, like all KDE
releases, but it used KDE 4.x desktop,
which was off-putting for many users,
and made the oldest surviving Linux
distro look the part.
The other desktop that ships on
the ISO is the lightweight Xfce 4.16,
which is the latest release from Xfce.
Other important changes from the
point of view of the desktop is
support for the PipeWire server for
handling audio and video streams,
hardware, and the Wayland display Slackware’s installer is replete with throwbacks to the good ol’ days. There’s even an option to
server. This is going to benefit a lot install the LILO bootloader on a floppy disk.
USABLE SLACKWARE
Most Slackware users weren’t running other distros, and isn’t advisable for However the distro has produced some
Slackware 14.2 on their machines, and production servers, it’s become a custom tools that Slackel has borrowed
were instead using Slackware’s rolling- popular method for powering desktops to give new users a pleasant experience,
release “-current” branch. This is where among Slackware users. straight from installing the distro to the
all the development takes place, until it’s Then there’s Slackel that uses the dependency resolving graphical
considered stable enough for a release, latest software from Slackware-Current, package-management tools.
at which point it’s split into the and combines them with the user- Other desktop-friendly Slackware
development branch for the next release. friendly tools from the Salix project. Salix derivatives include Absolute Linux,
While it can be considered the is based on Slackware’s stable releases Zenwalk, both of which have put out
equivalent of the Testing branch of most and has been dormant for quite a while. releases based on Slackware 15.
all the modules, and then there’s the standard generic The distro’s package management tool, slackpkg, can
kernel, which needs an initrd file to load the modules. install packages over the internet. However it lacks the
Using the generic kernel will save some memory, which ability to resolve dependencies. This can give a false sense
makes it ideal for older, under-stocked machines. Back in of achievement to new users, since the tool will install any
the day, Slackware users had to generate their own initrd packages without complaining. It’s only when you run the
from the command line, but the distro has become a little installed application that you’ll receive dependency
accommodating and now ships with a CLI tool that can missing errors. The best solution to this problem is for
build the initrd automatically. users to automate the compilation and installation
Slackware ships as an install-only DVD image that process using a script from SlackBuilds.org. Furthermore,
clocks in at around 3.5GB for 64-bit machines as well as while Slackware itself doesn’t incorporate official tools to
for the older 32-bit machines. The installer is as old school resolve dependencies, some unofficial, community-
as it can get, with ncurses interfaces, and expects you to supported software tools such as slapt-get do.
manually carve a partition for the distro. However, the For the experienced Slackware campaigners, the latest
installer selects adequate defaults, and most users can release debuts a script that helps users rebuild the entire
get through the process without much trouble. distro from source, in order to create a bottoms-up
Slackware still uses the LILO bootloader by default. You customised installation.
can use GRUB as well, but again in typical Slackware- All things considered, a Slackware release is a
fashion, this will take some doing. momentous occasion for the old timers, and Slackware 15
is as good a release as any for the young‘uns to
Inside out experience what the hullabaloo is all about. The distro
While Slackware’s installation lacks the usual bells and runs nicely from within the safe confines of a virtual
whistles of modern distro installers, the process is still machine, which is where we’d suggest new users to install
fairly straightforward. However, although the distro isn’t the distro and fiddle around with its legendary
difficult to install, if you want to do more with it, you’ll configuration prowess.
have to mess around with text files. Finally, if you run into problems, there’s an active and
For starters, the distro doesn’t ship with a graphical helpful community over at LinuxQuestions.org that you
package manager. Even if you want to use its CLI can look to for any sort of hand-holding and fixes.
pkgtools package management system, you’ll first
have to edit a file to select the mirror closest to you.
Next, you’ll have to pull down the GPG keys, refresh the
VERDICT
package lists, and install new ones accordingly. None of DEVELOPER: Patrick Volkerding
this is complicated, and becomes second nature as you WEB: www.slackware.com
spend time with the distro, but will feel odd to Linux users LICENCE: GNU GPL
familiar with the ways of the Ubuntus and Fedoras.
The veterans, though, will appreciate the FEATURES 7/10 EASE OF USE 5/10
improvements to pkgtools, which has several new PERFORMANCE 9/10 DOCUMENTATION 7/10
functionalities, such as file locking to prevent conflicts
between parallel installations and upgrades. The utility Ignore the rating; grab the ISO and fire it up inside a VM to
has also been brought up to date to work with the experience the famed dexterity of the oldest Linux distro.
sensibilities of the modern hardware, in that it now limits
the amount of data it writes to storage devices in order to Rating 7/10
avoid extra writes to SSD devices.
DETAILS
DEVELOPER: Valve Software
WEB: www.steamdeck.com
PRICE: 64GB £349, 256GB £459, 512GB £569
Roundup
Pop!_OS 21.10 Mint 20.2 Cinnamon Bodhi
Linux 6.0.0 Lubuntu 21.10 Zorin OS 16 Core R4
Michael Reed
likes all of his
alternatives to
be as alternative
as possible.
Ubuntu alternatives
Michael Reed investigates Ubuntu progenies and finds that
they each have their own take on a how a desktop should work…
HOW WE TESTED…
The default
applications
The default loadout helps to shape
the personality of a distribution.
op!_OS comes with a slim selection of essential
The Mint
Welcome
Desktop layout
We assess the
controls that you Linux Mint 7/10 Bodhi Linux 6/10
interact with all day. Green, grey and black are the dominant The Bodhi window manager is called
tones of the default Mint desktop. If you Moksha. It’s billed as a lightweight desktop
ach of the distributions has its don’t like it, themes can be changed for and it’s snappy in operation, but given that
Included extras
What additional elements does each distro have that the others lack?
y default, Pop!_OS offers a recovery partition, which is a Once up and running, it’s possible to use your phone as a
Adding software
How easy is it to add programs,
and how wide is the selection?
lthough there are many ways to add software to a Linux
Variants offered
A wide selection of variants of a distro
can greatly expand its usefulness.
or each distro on test we’re basing our comparison on its
The Verdict
Ubuntu alternatives
verall, we were impressed with what we saw. All of the
ALSO CONSIDER
Elementary OS (https://elementary.io) is an Ubuntu configured for media creation duties. Ubuntu Budgie uses the
derivative in a similar vein to the ones we’ve looked at and it’s lesser-spotted Budgie desktop as its user interface.
sold on a pay-what-you-like model. We looked at one official The distros we’ve looked at use Ubuntu as their base, but
Ubuntu derivative, Lubuntu, but there are others. Kubuntu is there are plenty of cutting-edge Linux desktops that don’t.
based on KDE as the desktop, with an appropriately alternative EndeavourOS (https://endeavouros.com) is based on Arch
application selection. Ubuntu MATE is Ubuntu with the Mint- Linux and seems to be generating a bit of heat this year.
instigated GNOME 2.0 continuation MATE desktop. Ubuntu Manjaro (https://manjaro.org) is another Arch-based desktop-
Studio is an Ubuntu edition that comes preloaded and pre- orientated derivative and one with a long history of its own.
inux, if you want to be low-level component of the operating or less mandatory there. But it’s an option
Compiling a kernel
Get straight to business and build your own Ubuntu-esque kernel
o compile your own kernel using Ubuntu package maintainer’s version. In any event, let’s get hold
Compiling kernels
will really put your
CPU through its
paces. Our laptop
got too hot to type
on (now there’s
an excuse for late
copy! – Ed).
to use ZSTD compression, you might recall, became the it breaks because a string value is required here.
default in Ubuntu 20.04. Note this is documented precisely nowhere. Finally
We can find out more about a particular option by let’s build the thing:
highlighting it and pressing F2. Doing this in the kernel $ fakeroot make-kpkg -j “$(nproc)” --initrd --append-
compression mode option tells us something about to-version="+lxf” kernel-image kernel-headers
which compression options work best on what system, Now make a cup of tea because the stock Ubuntu
as well as a considered note about who to contact kernel is rather fully featured. You’ll see files being listed
if certain options don’t work. Let’s switch to LZ4 as they’re being compiled, linked and generated. It’s
compression and see if we can spot a difference. reasonably pleasing to watch, but you may need
another cup of tea. On our XPS13 it took most of a lunch
See what’s on the SLAB hour (Who said you were allowed an hour for lunch!? – Ed)
If you like odd-sounding acronyms, have a look in the to finish up, over the course of which it got rather hot.
Choose SLAB allocator menu (towards the bottom of Even in Covid-free draughty corridors of Future Towers.
the General setup menu). Before you get dragged All going well you should see two .deb packages in
deep into the rabbit’s warren of kernel options, exit by your home directory (not the source directory): one
pressing F9 and make sure you save the configuration. containing the kernel image, and one containing the
You’ll be told it’s stored in a file named .config. headers. We’ve been careful to only do a very trivial
One slight quirk with using the Ubuntu kernel is that modification (so, only changing the compression
it’s configured by default to use Canonical’s Trusted format) for our first outing. And with good reason.
System Keys. Because these aren’t included in the These packages are going to replace the current kernel
kernel sources, the build will fail without some packages on the system. This shouldn’t really be a
intervention. We can either manually disable the keys problem since Ubuntu always has a fallback kernel on
(they’re deep in the Cryptographic Services menu), hand, but we don’t really want our first effort to result
or we can use the helpful Debian scripts: in a kernel panic. See how you fare with:
$ scripts/config --set-str SYSTEM_REVOCATION_KEYS $ sudo dpkg -i linux-*.deb
$ scripts/config --set-str SYSTEM_TRUSTED_KEYS The kernel should be installed as Grub’s new default.
This sets these to blank strings. The config program Check after a reboot with the uname -a command, and
also has a –disable argument, but if you use that here if necessary hold down Shift to bring up a boot menu.
Kernel minification
Perfection is reached not when there’s nothing left to add,
but rather when there’s nothing left to take away…
y this point the chances are you’ve already although perhaps not as large as you might think (see
DRIVER FOOTPRINTS
Space (at least the space taken up by the most space (165MB). If you examine there’s plenty else to remove too, but
the kernel) on modern hardware further you’ll see that AMDGPU is the again each component is small and
shouldn’t be a concern. The compressed largest graphics driver at around 20MB. sometimes much more critical than it
kernel image /boot/vmlinuz on our Nouveau, the FOSS driver for Nvidia sounds. So blindly removing swathes of
Pop!_OS system occupies a mere 11MB. cards is by comparison a tiny 3.4MB. So them is likely to end you up with a
And the accompanying modules, found axing whichever of these you don’t need broken, (but undeniably leaner) kernel.
in /lib/modules/5.15…/ occupies is a start to slimming down your kernel.
around 425MB. Any other Ubuntu-based Drivers on Linux are small, you might
system will have similar statistics (unless have noticed. Even AMDGPU is tiny
you’ve been tweaking things already). If compared to the equivalent massive
half a gigabyte is important to you (~450MB) download on Windows. The
(which it might be on old hardware) then difference is that very little of that
recompiling a leaner kernel (with only Windows package is ‘driver’. Most of
the required drivers) would be one way it is firmware, oh and shiny but useless
to achieve that. Naturally, that comes (if not outright annoying) gameware
with the downside that if you ever applications. So in reality removing
acquire different hardware, it won’t drivers one by one is a fairly thankless
work with the slimline kernel. exercise (the kernel configuration
Further investigating in the modules/ interface doesn’t make this easy either). The kernel sources directory gets big once you
directory reveals that the network, media It’s unlikely to liberate more than a start compiling. Here the Intel graphics bits are
and GPU device drivers together occupy couple of hundred megabytes. Of course, occupying half a gigabyte.
Popular patches
Forget trawling through configs – use a pre-rolled patchset to set the rules.
e’re always impressed by Colorado-based others like it) is that multiple nicenesses (niceties?) can
Researching Clang
Using Clang requires (at least) the clang, llvm and lld
packages to be installed. And if you’re on Ubuntu 20.04
you’ll have to work around the older (version 10 series)
in the repos. DuckDuckGo is your friend here...
You’ll be asked several more questions, and some of
them have defaults which you should probably stick to
at first. Kernel Timer frequency has been the subject of
some debate over the years, and TKG’s default of
500Hz seems to fit sensibly in the middle of the
Any excuse to feature a Pop!_OS background. They also make bespoke generic kernel default of 250Hz, and the 1,000Hz
scheduler tweaks now setting currently used by some low-latency kernels.
Finally you’ll be asked if you want to run nconfig (or
There’s a helpful installation script which we’ll run in any of the other kernel configuration interfaces) for
a moment, but do read the documentation before doing any final tweaks.
so. There’s also a config file customization.cfg that can Once again now is a good time to make a cup of tea,
influence the script’s behaviour. Like make-kpkg the as kernel sources have to be cloned, patched and
script will build DEB (or RPM if you’re using Fedora) configured. Any kernels generated this way must be
packages which can be installed like any other software. removed manually, but the script can help with that. In
See how you get on with: general, any custom kernel you build as a DEB package
$ ./install.sh install should be easy to remove, but always keep an eye on
You’ll be asked which distro you’re using (there’s a your /boot directory for ancient artefacts. We’d dearly
generic option, but in general if you choose something love to cover more kernel patches, in particular Xanmod,
close to your distro it should work). Next you’ll be asked but it looks like we’ll have to leave these explorations to
which kernel version you want to install. They’re listed you. Do let us know how you get on!
newest first, from the bleeding edge-RCs to the strong
and stable 5.4 series. We figured we’d go for a 5.16
version, because that seemed newer and shinier than
what we were currently running. You’ll then be offered a
choice of CPU scheduler (we chose Project C/BMQ)
and given a choice of compiler.
THE CLANG-ERS
Some distros, such as Alpine and language in which most of the kernel is available. Furthermore, a binary
Android, include very few GNU written) and the GNU C extensions. compiled with Clang can be investigated
components (for example, muslibc and There are technical reasons for using with advanced static and dynamic
Bionic are used, respectively, instead of Clang as opposed to GCC. First, it makes analysis tools from the LLVM suite.
the GNU C library). Most distros still use compilation for different platforms easy. These can help find bugs. And yes, using
GCC to compile their kernels, but for A binary compiled with Clang (in what’s Clang to compile the kernel can result in
many years now it’s been possible to use called the LLVM Intermediate a performance increase. As well as this,
the LLVM/Clang compiler instead. Representation) can target, after being since Linux 5.12 (February 2021) the
Android and ChromeOS do this, and processed by the appropriate LLVM kernel has supported LTO (link-time
so does OpenMandriva. LLVM (the Low backend, multiple architectures. optimisations) with Clang. This exercise
Level Virtual Machine) is a toolchain Currently, building the kernel is only enables the kernel to be optimised as a
based around C++ objects, and Clang is supported for ARM and x86 targets, but whole, instead of in the context of
a frontend to LLVM that supports C (the others (MIPS, RISC-V, PowerPC) are individual source files.
VERDICT
DEVELOPER: FLIRC
WEB: https://flirc.tv
PRICE: £13
MICRO DOT
Assemble a Micro
Dot pHAT news ticker
Les Pounder builds his own homage to the famous Times Square
news ticker, this time scaled for ants!
YOU NEED where to find the Python interpreter. We’ll need this later
when we make the file executable.
We turn on all the LED displays and then pause for
0.1 seconds:
Any Pi #!/usr/bin/env python3 microdotphat.fill(1)
Raspberry microdotphat.show()
Pi OS time.sleep(0.1)
Pimoroni We then clear the LED displays and pause for
Micro Dot another 0.1 seconds:
pHAT microdotphat.clear()
Get the microdotphat.show()
code: time.sleep(0.1)
https:// This code will write NEWS to the display. Note that
github.com/ kerning must be false, otherwise the text will be garbled.
lesp/LXF- microdotphat.write_string('NEWS’, kerning=False)
Micro-Dot- microdotphat.show()
News/ time.sleep(0.1)
archive/ Lastly for the loop we clear the displays:
refs/heads/ Crontab guru is a website that simplifies cron schedule expressions. If microdotphat.clear()
main.zip you’re already a cron guru or an aspiring admin, this is the tool for you. microdotphat.show()
time.sleep(0.1)
We now move to the main section of code and we
start by specifying the URL of the newsfeed. In this case
it’s the BBC news feed. You’re free to use any other feed,
just make sure that it’s an RSS or XML feed.
newsfeed = feedparser.parse("http://feeds.bbci.co.uk/
news/rss.xml")
Create a list called headlines . We’ll use the list to
store the top five headlines.
headlines = []
To populate the list with headlines we use another for
loop that iterates five times. Each time the loop iterates
it appends (adds) another headline, using the value of
i (an integer between 0 and 4) to obtain the next
headline. Another append is used to add a space (eight
blank characters) between the headlines. This is a hack
to add spaces between headlines as they scroll across. Micro Dot pHAT runs on all models of Raspberry Pi that use the latest Bullseye operating system.
for i in range(5):
headlines.append(newsfeed['entries'][i]['title']) Next we open a terminal, set newsfeed.py to be an
headlines.append(” “) executable file and then copy it to the /usr/bin directory
The next line is a debug step that prints the contents as newsfeed. By doing this we can call the command
of the headlines list to the shell. This enables us to see from anywhere in the filesystem.
Soldering Micro
any problems. $ chmod +x newsfeed.py
Dot pHAT’s
print(headlines) $ sudo cp newsfeed.py /usr/bin/newsfeed six displays
Convert the list of headlines into one long, string. We Run the command to test that it works, and when is a joyous
use join to link all of the list items together. you’re satisfied press Ctrl+C to exit, or just wait for it experience,
news = ' '.join([str(item) for item in headlines]) to end. but take care
These two lines are a hack because one of the $ newsfeed because the
underlying libraries for Micro Dot pHAT has a problem Our last step is to set the command to run every five screens are
with unusual characters. We noticed that ‘%’ and ‘-’ minutes. For this we’ll use a cron job, so we need to edit made of plastic
caused errors, so we replaced them accordingly. We’ve crontab. Open a terminal and type the following. If asked and can be
damaged with
raised an issue on Github and hopefully this’ll be fixed. to choose an editor, choose nano:
a hot soldering
news.replace('-’,' ‘) $ sudo crontab -e
iron. Take your
news.replace('%’,‘pc') Scroll to the bottom and add the following line: time and you’ll
Another debug step prints out the long string stored */5 * * * * newsfeed soon have a
in news . We don’t need this, but it may prove useful to Press Ctrl+X, then Y and Enter to save and exit. retro display!
debug any unusual character issues. Reboot the Raspberry Pi and now every five minutes
print(news) the latest news arrives on your desktop!
We need to know how many characters there are in
the string, so we get the length of the string and store it
in a variable. GETTING MORE FROM CRON
characters = (len(news))
We write the string to Micro Dot pHAT’s buffer, ready Let’s be honest, we don’t use Cron very much. This means that we
for display. almost always forget the syntax, and so a tool such as Cronitor’s
microdotphat.write_string(news, offset_x=0, crontab.guru is very useful. The website explains what each value
kerning=False) relates to and how we can create cron schedule expressions for every
Using the value stored in characters, we add 16 extra scenario. Want a script to run at 00:05 everyday in August? Here you
characters to the value, then multiply the value by 8. go: “5 0 * 8 *” . Need a script to run every hour, use @hourly (non-
This is a hack, based on our results, but it appears to standard, but it works).
loop cleanly. We edited Cron using crontab, specifically calling the -e argument
for i in range((characters+16)*8): to edit the file. But we can also use -l to list the user’s crontab to
Inside the for loop we use the scroll function to scroll standard output, or we can use -r to remove. We can edit the crontab
the contents of the buffer, then use show to see the with our own choice of editor. Use the one that works for you!
scrolling text. A pause of 0.01 seconds creates a Crontab is often overlooked, but it’s remarkably useful. When used
smooth scroll. For a slower scroll set it to a higher value, with a Raspberry Pi we can automate many tasks. Want a robot to
such as 0.02. connect to Wi-Fi and Bluetooth on boot? Then crontab is for you. But
microdotphat.scroll() what if you need a program to launch on the Raspberry Pi desktop?
microdotphat.show() Well, for that we need to use a desktop application shortcut. There’s
time.sleep(0.01) an in-depth guide on Tom’s Hardware (www.tomshardware.com/uk/
Save the code as newsfeed.py, then run to check it. how-to/run-script-at-boot-raspberry-pi who?–ED), which shows
You should see the news flash happen five times, then how to start and kill a script on your Raspberry Pi.
the news stories will scroll across the Micro Dot pHAT.
CASTING
HTML5 video players. Which means you’re using it every Lots of casting software is available, and
time you watch videos on YouTube. Creating (ingesting) one example is LetsView. This application
searches for “sinks” (targets) that support
video content is a bit more problematic because
MiraCast, which tend to be TVs.
encoders are either rare or expensive. However, there
are players available to do this, such as the one at
https://nageru.sesse.net. This project is still in alpha. to share, and then you can view it
Fortunately, you can create video with other protocols. on other machines.
If you’re especially interested in streaming to If you need another option, you
YouTube, you can find both API-samples on GitHub can also compile the code of the
(https://github.com/youtube/api-samples), and OBS MiracleCast project (https://
supports it natively. github.com/albfan/miraclecast).
This is a separate project that’s
One cast to rule them all still working on the Miracast
One of the earliest projects to make streaming over standard to make it Linux
Wi-Fi simple and direct between devices was Miracast. compatible. If you want to try it
The effort led to the Miracast standard. It’s still in use, out, you can download the code
although Android has dropped official support. Despite and compile it yourself.
this, you can use your Android device to stream videos The package has very few
to your smart TV and other devices. Android dependencies and so should
applications that do this are AirDroid, LetsView and compile on all modern systems.
AllCast. Many manufacturers also have added support You can even choose from three
to their software and devices. build systems: Autotools, CMake
The reason Google and Apple dropped support was and Meson. Here’s the short
that they developed their own in-house solution. Efforts version using CMake. Before you
to improve the Miracast standard are still ongoing – this start compiling, make sure you
is why it’s still in use. Many display manufacturers that have the required packages installed.
are also on the market support the standard. $ sudo apt install cmake libglib2.0-dev libudev-dev
On Linux, you can use GNOME Network Displays, libsystemd-dev libreadline-dev check libtool If you try to
which works on other desktop environments despite its Download the MiracleCast package using git (save it download a
name. The software enables you to choose which screen in any directory). library for your
$ git clone git@github.com:albfan/miraclecast.git project and
Git creates the miraclecast directory – move into it apt-get fails
and start the procedure. due to wrong
dependencies,
$ cd miraclecast
you can use the
Create a new build directory for CMake to work from
deb file. The
and move into it. dpkg command
$ $ mkdir build may permit the
$ cd build install, though
Set the environment variable that places MiracleCast you must repair
in the correct places for your system. your system
$ cmake -DCMAKE_INSTALL_PREFIX=/usr/local .. with apt-get
Compile the object files: --fix-broken
$ make install after
you’ve run
To configure your Raspberry Pi to enable the SSH server, use the Install the finished binaries:
‘Interface Option’ in the raspi-config tool. the compile.
$ make install # May require `sudo`: `sudo make install`
LINUX
FROM
SCRATCH
Part Two
Did you miss
part one? Get
hold of it on
page 62
case $(uname -m) in rest of this article also entails. However, we’re at the
x86_64) chown -v lfs $LFS/lib64 ;; point now where we’ll actually start building something.
esac
chown -v lfs $LFS/sources It’s tool time
Finally, log in as the new lfs user, create some We’ll now start building the software that will enable us
settings (the .bash_profile and .bashrc files, specifically) to build the software. LFS requires that you compile
for your upcoming terminal work (section 4.4 of the LFS some of the underlying tools that will make it possible to
book explains these in detail), and add those settings to build the LFS packages on the target system. If it
the current session: sounds confusing, consider that one of the packages is
su - lfs GCC. How could you build GCC from within LFS when a
cat > ~/.bash_profile << “EOF” compiler (GCC) isn’t installed yet? It’s a little meta, but
exec env -i HOME=$HOME TERM=$TERM the gist is we’re using the host system to compile the
PS1='\u:\w\$ ' /bin/bash tools that will let LFS stand on its own.
EOF As with the entirety of the LFS process, it’s important
cat > ~/.bashrc << “EOF” to follow the book closely and take things one step at a
set +h time. So start with the instructions for building Binutils
umask 022 (see section 5.2 of the book). Unpack the source
LFS=/mnt/lfs archive, then create a build directory and switch into it:
LC_ALL=POSIX tar xJvf binutils-2.37.tar.xz
LFS_TGT=$(uname -m)-lfs-linux-gnu cd binutils-2.37
PATH=/usr/bin mkdir -v build
if [ ! -L /bin ]; then PATH=/bin:$PATH; fi cd build
PATH=$LFS/tools/bin:$PATH Building most packages follows the time-honoured
CONFIG_SITE=$LFS/usr/share/config.site Linux compilation commands of ./configure , make
export LFS LC_ALL LFS_TGT PATH CONFIG_SITE and make install . In this case, the LFS book provides
EOF all the necessary config options, which you can study to
source .bash_profile understand in depth or simply paste into the terminal:
Are you tired of entering all these terminal ../configure --prefix=$LFS/tools \
commands yet? Hopefully not, because that’s what the --with-sysroot=$LFS \
--target=$LFS_TGT \
--disable-nls \
--disable-werror
make
make install -j1
You’ll see lots of terminal output scrolling by during
this – see this exciting stuff in the screenshot (left).
Note how it’s always prudent to keep the book open
side-by-side with your work, which should be no
surprise if you’ve built your own software before. But
provided the process ends and you don’t see anything
that looks like errors, switch over to the $LFS/tools
directory, where you should see some new entries.
Success! You’ve compiled your first LFS package!
The remainder of building the LFS toolchain is
following similar instructions to compile the following:
the GCC compiler, the Linux API headers, and the
The start of a Linux directory structure in the LFS system. development libraries GlibC/Libstdc++. You’ll then
System configurations
The last part of the book concerns putting the final Section 10.4 highlights GRUB configuration.
pieces in place to make LFS a functioning Linux system. Section 11.1, appropriately titled, “The End," has you
Some of the notable pieces of it are as follows: log the distribution in the /etc/lfs-release and /etc/
Section 9.2 details the installation of the LFS os-release files, which might be considered the
Bootscripts (see below), which sets up the SystemV- equivalent of signing a painting you just finished.
style runtimes, while section 9.6 provides steps for At this point, you can either reboot your system (if
configuring them (for example, the /etc/inittab file). LFS is going to live on the machine on which it was
Sections 9.3 and 9.4 walk you through creation of built), or migrate the system (section 8.2.3 notes that
device-related sub-systems such as Udev. cloning a system is as easy as archiving the root
Section 9.5 guides you through configuring networking directory, moving it to another machine of the same
architecture, extracting, and then adjusting config files
as needed).
Well, how did that feel? The authors of the LFS book
have put together a fantastic learning exercise for the
curious Linux enthusiast. It provides enough hand-
holding to enable those without highly technical
backgrounds to create an LFS system “just to say they
did it.” On the other hand, it also explains everything
along the way, giving studious users insight into the
inner workings of Linux that no graphical installer could
ever provide.
All that’s left is to head over to the LFS website and
add yourself to the counter (www.linuxfromscratch.org/
The LFS-Bootscripts package, as a directory listing at left with cgi-bin/lfscounter.php). So what are you waiting for,
corresponding descriptions at right. that last package to finish compiling?
FZF
Credit: https://github.com/junegunn/fzf
RELATED PROJECTS
You can assess the popularity and bindings or the fzf-marks (https:// You’ll also find several projects under
usefulness of fzf by the fact that the github.com/urbainvaes/fzf-marks) the ‘Similar implementations’ heading.
project maintains a list of related utility, which enables you to quickly These are projects that provide
projects on its Github hosted wiki create bookmarks to various directories. functionality similar to fzf. Pick (https://
(https://github.com/junegunn/fzf/ The page lists projects across many github.com/mptre/pick) is one such
wiki/related-projects). This is a different categories such as Tmux, Vim, project, although it doesn’t have the
collection of other tools and utilities that Bookmarks and Shell. Many of the listed same degree of documentation as fzf.
build on the functionality of fzf to offer projects haven’t seen a new release in While fzf is written in Go, you can also
an improved CLI experience. quite some time, but these are simple try your hand at Skim (https://github.
Consider the fzf-extras utility (https:// tools offering very limited functionality, com/lotabout/skim), which is a fuzzy
github.com/atweiden/fzf-extras), for so don’t let that deter you from trying finder with identical feature set, but
instance, which adds additional key them out. written in Rust.
ZOTERO
Credit: www.zotero.org
otero bills itself as your personal research transferring the package hosting to the Zotero
ZOTERO SYNC
If you plan on using Zotero across username and password, then click Set Once set up, wait for the initial sync –
multiple devices, share your research Up Syncing. You’ll be able to choose this may be some time depending on
online with others, or want a cloud-based which libraries to sync, whether to sync how big your libraries are. Going forward,
backup of your libraries, then you need a automatically, include full-text content however, if you leave automatic sync
free Zotero account. You’ll be prompted and what level of file syncing to perform. enabled, then the process should be
to sign up after installing the program, Zotero provides 300MB of free space, but largely seamless. If you run into trouble
or navigate to www.zotero.org/user/ you’ll have to either pay for more (from with sync, or wish to wipe your online
register and provide a username, email $20/year for 2GB) or select the WebDAV library and replace it with the contents of
address and password. option to use your own configured server your local library, return to the Sync
Once you’re signed up, navigate to – supply the URL, username and section of Preferences and switch to the
Edit>Preferences>Sync to enter your password before clicking Verify Server. Reset tab to access the options you need.
If you find the pane too cramped, click the ‘Edit in a opens a folder to its current location), and access
separate window’ button to open it in a floating window additional options.
Want to – close the window when you’re done. You’ll also find When you click the green + button to add new items,
separate handy shortcuts beneath the edit pane for adding you’ll see options for adding file attachments directly.
your research related items and tags without having to switch tabs. Doing so will either create a simple floating copy of the
material into Once your note has been created, you’ll see it’s filed file or, if it’s a PDF and Zotero is able to find additional
libraries? Make inside the reference item as a separate sub-entry. This metadata for it, you’ll have it wrapped inside an item
use of Zotero’s is also where you can attach files – either simple links or with some or all of the info fields populated.
support for direct copies – such as a PDF of a magazine article, or a You can also store references to web pages within
profiles: open video or sound file. Add these to existing items by right- Zotero. To see how to do this using Zotero’s web
Terminal, type
clicking the item in the middle pane and choosing Add connector, follow the step-by-step guide (below right).
zotero -P and
hit Enter to
Attachment followed by your choice: link to URI
create, select (enables you to link to files hosted online), link to file Organising your collections
and delete (stored on your PC or network) or stored copy of file. As your library grows, what options are there for
profiles. Each This latter option copies the file to the Home/ keeping things in order? The most obvious solution is to
profile has its Zotero/storage directory on your PC. Choosing to store use Zotero’s collections. Although they look like folders,
own settings files in this way guarantees access to them regardless of Zotero would prefer you to think of them like music
and library, what happens to the original, but bear in mind that this ‘playlists’: the items aren’t physically connected to each
enabling you option will quickly consume file space. collection, but simply linked to it via a shortcut.
to keep them After files have been attached, select one and you’ll This means that items can reside in more than one
separate.
see it also has its own space for recording text. If you collection, and by default dragging an item from one
wanted to include the full text from a Word document or collection to another using the left-hand pane results in
PDF, say, you could paste it here so Zotero can index it. it being ‘copied’ to that collection. If you’d rather move –
You can also right-click the file to view it, show it (this or transfer – the link from its current location, hold the
Shift key as you drag it. It also means when you delete
an item from a collection (select it and click Delete)
then it’s merely removed from that collection. To delete
the actual item, right-click it and choose ‘Move Item to
Trash’ instead.
The whole drag-and-drop element of collections can
make them unwieldy. A more elegant way to organise
your items is through the use of saved searches. These
effectively create a ‘smart’ collection, one whose
contents are determined by the parameters of your
saved search, and so which update automatically as
items are added, removed or changed.
To create a smart collection, choose Edit>Advanced
Search. It works like any good search tool: you can set
up multiple parameters, filter results and then once
you’ve viewed the contents of the search and
Notes can be as long or as short as you need them to be – and if space is cramped, make use of determined it fits your needs, click Save Search. Give it
Zotero’s floating editor. a title and you’ll see it appear with a folder icon and
EXPANDING FUNCTI0NALITY
As with all good open-source collections. There’s also a Zotero OCR fields between items, as well as quickly
communities, Zotero is well-supported, plugin for performing automatic text changing an item type.
especially when it comes to expanding recognition on PDFs you’ve scanned in. Finally, you’ll find dozens of plugins for
its capabilities with plugins. Visit You may also want to consider making it easy to integrate Zotero’s
www.zotero.org/support/plugins for an ZoteroPreview for adding a citation citation integration tools with other tools
exhaustive list, then click the link of one preview tab to items, and Zotero and online services, including WordPress.
to visit its homepage and download the . Metadata Import for Calibre for
xpi file to your Downloads folder. importing (and exporting) metadata
Next, open Zotero and click Tools>Add- between the two.
ons. Click Settings and choose ‘Install Perhaps the most useful plugin of all is
Add-on From File…’ Select your .xpi file Zutilo, which adds many time-saving
and then restart when prompted. tools to Zotero, all accessed via its own
Instructions for using the add-on should context menu. After installation, choose
be found on the plugin’s download page. Tools>Zutilo Preferences to configure it
Plugins worth exploring include Zotero and see what’s available (visit https://
Folder Import for importing a group of github.com/wshanks/Zutilo for a
files from a single folder while replicating detailed description of each). Highlights Zutilo adds lots of missing functionality to Zotero and
that structure within Zotero under including copying and pasting multiple should be considered an essential add-on.
XACE
Credit: https://github.com/lawrencewoodman/xAce
wikimedia.org/wiki/File:Jupiter_ACE_(restored).JPG
between a ZX81 and a hot rod and we
Quote the Product code shown above and have your credit or debit card details ready
SUBSCRIBE!
Don’t wait for the latest issue to reach your local store –
subscribe today and let Linux Format fly straight to you.
Faster, cheaper and with DRM-free archive access!
3 GREAT
WAYS TO
SUBSCRIBE
Print, digita
l-only,
and print+d
igital
bundles!
HOME ASSISTANT
Part One
Don’t miss
next issue!
Credit: www.home-assistant.io Subscribe
smart as possible
Matt Holder, who’s a bit of a clever-clogs himself, investigates the
usage of Home Assistant to make your home as smart as it can be.
enable devices and entities to be grouped in rooms of Another useful section to introduce is the States
your house. page. This is available from Developer Tools and then
The Home Skipping over a number of entries, which will be selecting the States tab. Developer Tools may need to
Assistant discussed in a further article, we come to Dashboards. be switched on from the User settings page (accessed
team provided These dashboards are used to create overview pages by selecting your name on the right-hand side).
information where many types of data can be displayed. Advanced features need to be toggled on. The States
about how People and zones can be used to track users. This tab within Developer Tools enables you to see the values
they use any doesn’t necessarily mean tracking your household’s for all entities. It’s a quick way to see when values
anonymised location using GPS coordinates, but could be used to change. However, the screen can become confusing
information detect if a member of your family’s phone is on your when there are a large number of entries on show.
that you choose
network or not. This could then trigger a notification The next item to talk about are the Lovelace
to send to them.
This can be
to welcome them home. The final section within the dashboards. These will be the dashboards used to
viewed here: Configuration panel enables general options to be display information from your smart home. For example,
www.home- changed, as well as restarting the system and viewing part of the dashboard utilised by the author is an
assistant.io/ log entries. overview of the status of the Raspberry Pi 4, which is
integrations/ On the left-hand menu, the logbook and history running Home Assistant. This is a useful dashboard to
analytics. sections can be used to view changes over time to your look at to determine if the device is overheating or is
entities. The Overview option is used to view the default having regular power supply issues.
Lovelace dashboard. There are a huge number of data types that can be
displayed in a Lovelace dashboard, a sample of this can
be seen in the screenshot (top right).
SMARTPHONE APPS
Interacting with Home Assistant via the It’s also possible to design a bedtime photograph, which can then be sent via
web browser is a pleasing experience, routine where a Home Assistant notification to your phone. In addition,
whether using a mobile phone or larger automation will switch off your lights the capability within notifications for
screened device such as a laptop. The when your phone is charging and on the user to be asked a question can be
Home Assistant team and community silent. When a smartphone app has been harnessed, so that the user can easily
also make available apps for iOS devices registered with your Home Assistant send a response back to Home Assistant,
as well as Android. These apps integrate installation the phone’s notification which can then be acted upon.
very well with the phone’s operating system can be utilised by Home Apps can be downloaded from the Play
system and enable the phone’s sensors Assistant. For example, if the doorbell Store or App Store, and once opened a
to be provided to Home Assistant to be rings a Home Assistant registered wizard can be followed to connect to your
displayed in the Lovelace interface. camera can be used to take a Home Assistant server.
CREDIT: https://imgur.com/b1wdGR7
This dashboard will contain all entities that have
been added to your Home Assistant installation, by
default. To edit the dashboard select the three dots and
click the Edit option. The first time this option is
selected for a dashboard, a message will be shown
asking whether to start with a blank dashboard or not.
Select the option and click Take Control.
At this point you’ll see an empty dashboard, which is
in Edit mode. Dashboards can contain multiple tabs or
views and each tab can have its own name or icon,
which it can be selected from. Tabs can also be set to
have different modes. To edit tab options, click the
pencil next to its name/icon.
LIBREOFFICE
Credit: www.libreoffice.org
Publishing your
Part Two
Missed Part
One? Turn to
page 62 to get
hold of it
LyX is a great
application that
combines the
benefits of a text
editor, a markup
front end, and a
When you insert a footnote, Writer adds a small number at the cursor
word processor.
position. At the bottom of the page, you can edit the footnote.
MOODLE
Credit: https://moodle.org
Installing Moodle
First up, create a new and distinctive subdomain for
your Moodle instance (We chose moodle.lxf.by, because
at this point, we’re pretty much out of clever ideas and
puns), and set a new A record with your registrar’s
DNS to point the new subdomain towards the IP
address of the VPS. You can check that the DNS
changes have propagated using the handy tool at
https://dnschecker.org. Moodle chatrooms are surprisingly good. You can add as many as them as you like – even if you
Once all the ticks are green, ssh into your VPS with are the only participant.
ssh your_name@your.vps.ip.address . Make sure that
you update and upgrade the system with sudo apt GRANT USAGE ON *.* TO moodle@localhost
update and sudo apt upgrade – this is especially IDENTIFIED BY ‘donna29mylove’;
necessary if this is the first time you’ve used your VPS. GRANT ALL privileges ON moodle.* TO moodle@ If you choose to
Now clone the Moodle git repository into your home localhost; set up multiple
directory and switch to the stable branch: FLUSH PRIVILEGES; chatrooms for
git clone -b MOODLE_310_STABLE git://git.moodle. quit; students, make
org/moodle.git Of course, your actual password should be sure that you
Then copy the newly created moodle directory and something other than ‘secretpassword’. Make a complex pay attention
its contents to your webserver directory: one and make a note of it somewhere. to what’s going
on in them.
sudo cp -R moodle /var/www/html/ You’ll need to make sure that when you type in
Bullying isn’t
Next, set the permissions so that any user can read, the URL of your Moodle instance, your Apache server limited to the
write and execute from the directory. knows how to handle the requests, so create a new conf playground, and
sudo chmod -R 0777 /var/www/html/moodle file for Apache. students might
If there’s now a security alarm whooping in your sudo nano /etc/apache2/sites-available/moodle.conf find it useful to
brain, don’t worry too much. You’ll be restricting the In this empty file enter: message their
permissions later on. <VirtualHost *:80> tutor in a less-
Moodle needs a data directory that’s situated ServerName your.domain.or.subdomain.tld formal forum.
outside the webserver directory, but with permissions DocumentRoot /var/www/moodle/
so that the web server user can write to it. Your home </VirtualHost>
directory is as good a place as any, so create the Save and exit nano with Ctrl+o then Ctrl+x. Enable
directory as follows: the new site with
mkdir moodledata. sudo a2ensite moodle.conf
Then change ownership to the web server: And restart Apache
sudo chown -R www-data:www-data moodledata/ sudo service apache2 restart
At this point, you will need to create a database with Lastly (at least for this section of the tutorial), deploy
UTF8 encoding, so sudo mariadb then: SSL certs to protect and reassure your future students.
CREATE DATABASE moodle DEFAULT CHARACTER sudo certbot
SET utf8mb4 COLLATE utf8mb4_unicode_ci; And make sure you select the option to redirect all
Enter each of these commands, which will create request to secure HTTPS access.
a user called moodle and enable it to use your new
moodle database: Moodling through the configuration
CREATE USER moodle IDENTIFIED BY While it’s possible to continue configuring Moodle
‘secretpassword’; through the terminal, the developers have created a
OFFICE TOOLS
It’s tempting to use ‘free’ external better protected if you keep them within Likewise, students (and most of the
resources to augment your class, but your Moodle walled garden. There world) may already be used to Google
almost everything that you could possibly are several plugins that enable this kind Docs. While the Moodle base install does
need is either available through the initial of functionality and either make it enable students to type directly into a
Moodle install or through the plug-ins. possible for you to stream multimedia webpage, it can be expanded to a full
Yes, it’s easy to tell students to watch from within Moodle itself, or integrate online office suite by using plugins to
videos you upload to YouTube or other with wholly hosted or self-hosted integrate with self hosted-office suites,
video hosting sites, but their privacy is solutions elsewhere. including OnlyOffice or LibreOffice.
Your course is also bereft of content at this point, students can access chats from
but what you do have is a new menu on the left-hand previous days, and who’s allowed in.
side, which shows the name of your course, and has You’ll soon discover that whatever
submenus showing participants, badges, competencies, activities you want to add are simple
grades and four topic folders. This is the default that and easy to set up.
was set up during the Add course stage. In the event that Moodle’s built-in
On the right-hand side, below the gear icon, press activities aren’t enough for you,
‘Turn editing on’ to see more options appear for each take a look at the many plug-ins
section. As with many academic activities, the obvious that are available for download at
choice is the correct one and so click Add an activity https://moodle.org/plugins.
or resource.
A pop-up will appear, showing the types of resources Managing students
and activities that can be added. There are forums, You now have a course set up to
surveys and quizzes, books, assignments, labels, your satisfaction, and in all honesty,
lessons, and many more. it’s probably a lot better than ours,
which was set up in a few hours. If
A suitable textbook you allowed students to self enrol
As the bulk of our education took place in the 1990s, via email then congratulations – you
we thought that it appropriate to give our students an now have a virtual class full of bots
out-of-date science text – choosing The Sceptical that are busy spamming the
Chymist by Robert Boyle – available from the archive at chatroom with exhortations to
Project Gutenberg (gutenberg.org/ebooks/22914). try Viagra on the cheap, Cialis,
The book name and description need to be added buckets full of sketchy nootropics,
manually, as do the individual chapters. Text and and hot singles people in your area just waiting to meet Mobile apps for
images can be pasted in using an interface which will you. The usual suspects, then. Moodle mean that
your students are
be intuitive to anyone who has used WordPress. You To add students manually, head back to Site
never more than a
can choose whether your students can mark it as Administration, then users, and Add User. Once again, push notification
complete by themselves. you’ll be invited to create a skeleton profile for them. away from the
Next, we considered that a quick quiz might be Once this is done, they can easily be enrolled on to virtual classroom.
appropriate – to discover whether our pupils found the courses. Clicking a student’s profile in the administrator
choice of a 17th century natural philosophy textbook role grants complete access to their information. If you
germane to a 21st century education. need to know how often they look at the course
Selecting Add an activity or resource from within material, their grades, or what their IP address is, this
topic 2 we were again invited to give a title and is the place to do it. You can even log in as them –
description for our quiz, then configure further options which is a level of functionality we don’t think even
including time limits, submission dates, layout, grading Google provides.
and question behaviour. Clicking the quiz title while still As well as monitoring individual students, from site
in editing mode enables you to set individual questions administration, you can set the theme, change grade
and the appropriate answers. boundaries for automatic marking, view the histories
For topic 3, we created a chatroom for students to of students, grades, courses and classes, and almost
discuss their thoughts on The Sceptical Chymist by anything else you could do in a real school environment
Robert Boyle. By this point you should find the creation – short of carving obscene stickmen into the top of a Badges can be
of course activities starting to become second nature. wooden desk, that is. an inspiration
There are the title and description fields again, along to pupils, and
awarding them
with when the chat room will be active, whether or not A+ for Moodle for random
Yes, we know the national curriculum has moved away achievements
from the old-style alphabet grade system and on to a can keep
1–9(+?–ED) model, but this is our school, and we’re students
giving Moodle an A+. motivated and
Moodle, which we bet you didn’t know was an coming back
acronym for Modular Object-Oriented Dynamic for more – even
Learning Environment, has been knocking around if their initial
since 1999, and has been honed and refined to the motivation has
point where it’s functionally perfect and almost faded. It works
for Duolingo and
infinitely adaptable.
it can work for
It has everything you need to manage online classes
you, too. You
whether you’re a traditional learning environment or you can create your
just fancy starting up a theoretical wickerwork own badges
workshop for fun. And remember: those that can, do. using the
If you’ve used WordPress or any other CMS, you should be almost Those that can’t... edit magazines (and fire troublesome Open Badge
instantly at home with Moodle. contributors – Ed). Factory plugin.
CHARITABLE
CHARACTERS
A map showing the 29
computer rooms YovoTogo
has set up across Togo.
ltruism and open source You might think that hacking on your world. Both locally, to the Emmaüs
Coeur (https://bricosducoeur.org), GiveIT, the cultural charitable repairs and education, see https://
social centers of Couëron and LinuxAzur (a group therestartproject.org) but we haven’t managed to make
advocating free software on the Côte d’Azur, see www. contact… maybe your interview will help us in this
linux-azur.org). Then over in Belgium it’s been working matter.” We sure hope so, and we’d also encourage any
with Amaury from the BlablaLinux (https://blablalinux. fixit-minded readers in the UK to donate their skills to
be) and his open source efforts. Restart and others like them.
As we write, final preparations are underway Collectif Emmabuntüs receives its hardware from a
for the 2022 Jerry Valentin event in Abidjan (https:// few different sources. YovoTogo ships equipment
jerryvalentin.org). We don’t know how that’ll go this donated by Lycée Notre Dame du Roc (www.lycee-
year, but last year’s saw further collaboration between ndduroc.com) and refurbished by Emmabuntüs.
Jerry, Emmabuntüs and the Montpel’libre group That college, like many others, regularly updates its
(https://bit.ly/lxf287dragon). hardware pool. Students constantly needing new
One major obstacle to helping the JerryClans and machines might be seen as a waste of resources, or at
associated efforts (such as Jerry Do-It-Together, times “technological overkill” in the collective’s words.
https://makingsociety.com/2013/07/jerry-do-it- Yet this provides a constant stream of computers for
together-server-connects-makers-africa/) is the cost donation. “It’s just a bargain!”, the collective tells us.
and logistical effort involved in shipping hardware. There “Mickaël and Claude from YovoTogo erase the BIOS
aren’t many (if any) associations that offer charitable passwords, disable the UEFI, and clone these machines
The opening of shipping from France to Africa. So it’s difficult for with Emmabuntüs Debian Edition Free Culture server.”
the Pogno College generously donated or refurbished hardware to get This is a spin of its distribution showcasing libre culture.
computer room there. And easier to help those closer to home. These computers can then be used offline as training
in Togo. Students
all poised to open
Asked if the collective had any plans to start tools in high schools across Togo. You can read more
terminals and operating in the UK, a spokesperson replied, “We’d like about the free culture edition at https://bit.ly/lxf287-
get hacking. to collaborate with The Restart Project (which offers free-culture-edition.
later things start to fail. It’s the same thing for the
collective, but it strives to make use of all that can be
made use of. “If a computer exhibits intermittent
hardware problems, we cannibalise it to repair others,
because we often get computers of the same type, and
we are not in the situation as a private individual who
wants to extend the life of their own equipment.”
part takes about two minutes, then the cross-platform Ventoy (featured in our
actual cloning process only takes last issue). All that’s required is to set up
between two and 10 minutes, depending the partitions, then copy across some Amaury from Blabla
on the machine”. scripts and clones. As you’d expect Linux finds a new
The next stage was the ‘semi- there’s no shortage of tutorials on how home for a good-as-
new PC in Belgium.
automatic’ key that used MultiSystem to make one (see https://emmabuntus.
CREDIT: YovoTogo
corporations which are buying from big brands like HP,
Dell or IBM. Those components are very reliable, which
is less true with those sold to individuals.”
The minimum system requirements for Emmabuntüs
Debian Edition 4 are 1GB of RAM and 80GB of disk
space. No doubt some readers will be keen to tell us
Linux can work on even more constrained hardware. The USB re-use campaign began in earnest in August
Be that as it may, Xfce and LXQt (the two desktop 2020 and also featured BlablaLinux (mentioned above)
environments featured on Emmabuntüs) both work and Tugaleres.com (a generalist site promoting Linux,
well with this amount of memory, and if people want environmentalism and more). The goal was to “federate
the machines to be useful offline, then a modicum of initiatives for reuse in order to provide Linux computers
storage will surely help. free of charge, or at low cost, to poor people, schools,
The first edition (based on Ubuntu 10.04) could etc.” Team Emmabuntüs is more than adept at getting
run on 256MB machines, but that was a long time ago. its distro on to PCs, having been at this game for some
As the collective explains: “Within the frame of our time. But no matter how quick you are with a mouse, if
collaborations with YovoTogo, JUMP or others we advise you have to install an OS manually on dozens of
them to use computers that are not too old. Our goal is machines, it’ll take a lot of time.
not to make feats by reviving very old computers, but Besides helping with the scripting, and creating a
rather to refurbish computers having the longest life series of videos about the key (see https://bit.ly/
expectancy, especially those sent to Africa.” The lxf287-youtube-usb-key) Amaury from BlablaLinux has
collective, and the organisations it partners with,
techradar.com
THE BEST NEW OPEN SOURCE SOFTWARE ON THE PLANET
HotPicks
Weather Widget 2 Fancontrol GUI Wine
DaedalOS FreyrJS Chmod-CLI Rescuezilla
Alexander Tolstoy
is back with another fine
collection of open source
tools to make more of your
time at the Linux coal face.
PLASMA EXTENSION
Weather Widget 2
Version: 2.0.4 Find out if it’s
shorts or umbrella
weather, with the
Web: https://github.com/ help of the latest
version of Weather
blackadderkate/weather-widget-2 Widget.
SYSTEM TOOL
Fancontrol GUI
Version: 0.8
Web: https://github.com/Maldela/fancontrol-gui
SOFTWARE EMULATOR
Wine
Version: 7.0 Web: www.winehq.org
t’s cork popping time again, pour yourself support for running
The built-in
DESKTOP ENVIRONMENT ‘browser’ has
bookmarks for
public demo
FreyrJS is a
MUSIC DOWNLOADER versatile, service-
agnostic music
downloader
Chmod-CLI
Version: 0.2 Web: https://github.com/
Mayowa-Ojo/chmod-cli
espite the fact that Linux-based systems are
A flash drive
BACKUP AND RESTORE TOOL with Rescuezilla
is something
that every Linux
Rescuezilla administrator
should have
within reach.
There’s no
WORD GUESSING GAME countdown in
Warble – you have
plenty of time for
Version: 1.1.1
Web: https://github.com/avojak/warble
hose unaware of Wordle may think of it as a
PLATFORMER GAME
SpaceHuggers
Version: 1.0 Web: https://github.com/KilledByAPixel/
SpaceHuggers
Efiboots
Version: 1.0 Web: https://github.com/
Elinvention/efiboots
PYTHON
Working with binary
tree data structures
Mihalis Tsoukalos explains how to construct and use binary trees for
faster searches and easier relationships (of the data sort, mind).
can be seen in the next code that’s an excerpt from the Here’s the source
code of tree.py,
insertNode() function of tree.py:
which shows how
if root.data > node.data: to create a binary
if root.left is None: tree and how to
root.left = node insert nodes in it.
else: All this is achieved
by the insertNode()
insertNode(root.left, node) function.
elif root.data < node.data:
if root.right is None:
root.right = node
else:
insertNode(root.right, node)
else:
print("Duplicate:”, node.data)
The previous code is for specifying where to put a
new node, if it does not already exist in the binary tree.
The insertNode() function first specifies whether the
current node is going to go on the left or on the right of
the current node that’s being examined. If the required
link is empty (None), then the new node is linked to that
link directly. Otherwise, insertNode() is called
recursively until we find an existing node that has the
desired/required/appropriate link empty – this is where
we’re going to link the current node. Currently, tree.py
generates no output, but this is going to be fixed in the
next section. The screenshot (right) shows the source
code of tree.py. Root node: 13
Going to insert: [13, 11, 0, 3, 16, 14, 9, 19, 15, 12, 18, 10, 17, 2, 4,
Traversing a tree 6, 5, 8, 7, 1] Linked lists
Storing data won’t be much use unless we learn how to 13 11 0 3 2 1 9 4 6 5 8 7 10 12 16 14 15 19 18 17 are popular
traverse a binary tree, which is thankfully an easy task. in computer
Traversing a tree is fundamental for two tasks: counting Searching tree elements science
the height of a binary tree and finding whether a binary Searching for a tree node is similar to adding a node to because of
tree is balanced or not. The logic of traverse.py can be a tree. The only difference is that if we find the desired their simplicity,
found in the implementation of the traverse() function: element the process ends immediately. The logic of versatility and
ease of use.
def traverse(root): search.py is found in a modified version of the
However, their
if not root: insertNode() function found in both tree.py and
linear search
return traverse.py – the name of the new function is search() . time isn’t
print(root.data, end=” “) Using search.py generates the following output: efficient when
traverse(root.left) $ ./search.py 20 2 we have lots
traverse(root.right) Going to insert: [8, 9, 4, 11, 14, 3, 13, 5, 2, 19, 12, 6, 0, 10, 1, 15, of nodes.
The traverse() function operates recursively, which is a 7, 16, 18, 17]
common practice when working with trees of any kind. Found 2
This function prints the value of the current node, which $ code ./search.py 20 21
is passed as a parameter to traverse() , before visiting Going to insert: [6, 9, 15, 1, 7, 5, 8, 16, 19, 13, 2, 18, 10, 3, 17, 12,
the left and right links of the current node, using 4, 11, 0, 14]
traverse(root.left) and traverse(root.right) , Not found 21
respectively. Running traverse.py generates the In the first program execution, the desired value (2)
following output: was found in the tree whereas in the second case, the
$ ./traverse.py 20 value (21) wasn’t found. Being able to search a tree is
LINKED LISTS
Strictly speaking, a linked list is a structure with a finite set of
elements. Each element uses at least two memory locations: one for
the data and the other for a pointer that links the current element to
Here’s the implementation of the nLeafNodes() method that the next one in the sequence of elements that construct the linked
recursively counts the number of leaf nodes (nodes without any list. This is also known as a singly (or single) linked list.
children) in a binary tree. Linked lists enable you to delete or insert elements at will.
Additionally, all operations that can be performed on any kind of
Balanced: False linked list are simple to understand and easy to code. The logic of a
The previous output shows that even a small binary linked list isn’t going to bother you, make you write too much code or
tree with just 10 nodes can still be unbalanced. With this put restrictions into your code.
in mind, imagine how easy it is for bigger binary trees to The first element of a linked list is called the head whereas the last
become unbalanced. element is often called the tail. A queue is a special kind of a linked list
Balancing a binary tree and keeping it balanced is a where each new element is inserted to one end, which is called the
totally different process that’s beyond of the scope of head of the queue, and removed from the other end, which is called
this tutorial. As a hint, given an existing binary tree, you the tail of the queue. The first thing that you should do when defining
can sort all of these values, pick the middle one and a linked list is keep the head of the list in a separate variable. The head
then start rebuilding it from scratch using that middle is the only thing that you need in order to access a linked list.
value as the root of the binary tree. Although you might
not necessarily end up with a perfectly balanced tree,
you’re going to get a much better-looking and faster You can’t beat a tree when you want to represent
binary tree. hierarchical data – this is a rare case where balancing a
tree is actually going to wipe out its usefulness. They
Counting leafs can also be used for building efficient models for real-
If you recall, a leaf node is one without any children. The life problems. Trees are extensively used in compilers
screenshot (above) shows the important source code of during the parsing phase – this is another case when
leafNodes.py, which is located in the implementation of balancing a tree isn’t helpful because we’re going to
the nLeafNodes() method. Running leafNodes.py destroy existing relations.
produces the following output: Finally, trees can be traversed in the correct order
$ ./leafNodes.py 1000 very efficiently. A major disadvantage of binary trees is
334 that the shape of the tree depends on the order that its
$ ./leafNodes.py 10000 elements were inserted. If the keys of a tree are long or
3285 complex, then inserting or searching for an element
might be slow because of the large number of
Finding the parents comparisons required. Finally, if a tree isn’t balanced,
Imagine that you have a binary tree and you want to then the behaviour of the tree is unpredictable.
find out the parent of a node. This section is going to Although you can create a linked list or an array more
show you how using the code of findParent.py. The quickly than a binary tree, the flexibility that a binary
screenshot (below right) displays all the important tree offers in searching operations might worth the
code of findParent.py. All the work is done by the extra housekeeping.
_findParent() method, which returns two values: the Binary trees aren’t the only available trees. As an
node of the parent and the node of the value that example, we can have a tree where each node has up to
we’re searching for. The code of _findParent() keeps three or four children. Generally speaking, tree nodes
visiting the nodes of the binary tree looking for the don’t usually have too many children. If we find
desired value. ourselves requiring trees with more than four nodes,
If the current node is equal to None, then the desired then we might need to reconsider our approach.
value isn’t found and the method returns (None, None) .
If the value is found, then we return the node of the
parent and the node of the value. In the case that the
value we’re looking for is stored in the Root node, then
the value of the parent node is going to be None.
Running findParent.py produces the following output:
$ /findParent.py 100 3
The core code
Parent of 3 is: 5 of findParent.py,
$ ./findParent.py 10 5 which enables
Root node does not have a parent. you to find out
the parent node
of another node
Advantages and disadvantages with the help of
Despite their usefulness, trees are not a panacea and findParent() and
shouldn’t be used without thinking about it beforehand. _findParent().
PERL
Subscribe
on page 16
connection error occurs.) Lastly, we die with an error The same basic
functionality as the
message if the HTTP response has a 4xx or 5xx HTTP
single command
status code – in other words, is an error. line, but now as
my $link_collection = $response->dom('article h1 > a'); a small script
my @issue_links = @{ $link_collection->map(attr => with explanatory
‘href')->to_array }; variables along
the way.
Finally, we have our web page to parse, and this is
where we turn what we know of its HTML source into
instructions on how to extract specific data. That
dom() method on $response retrieves the body
of the response and turns it into a Mojo::DOM object
representing the Document Object Model of the page.
By passing it a parameter it does double-duty, calling The l() function is equal to the Mojo::URL->new()
Mojo::DOM’s find() method on the passed Cascading call in our longer script. It just saves a bit of typing.
Style Sheets (CSS) selector. In this case, we’re telling it say g($base)->dom("article h1 > a") Perlbrew can
to find all <article> elements containing an <h1> Here we’re using ojo’s g() function to quickly create also switch
element with an immediate child <a> element. That a new Mojo::UserAgent, issue a HTTP GET request, between
grabs just the links to the Linux Format issues while and then produce a response object. The result goes multiple library
ignoring all the other links and other elements of the through the same chain of methods as the more root directories
page, storing it in the $link_collection Mojo::Collection verbose script: parse the DOM , then extract specific within the same
object (which is just a fancy reference to an array with elements based on a CSS selector. This is all preceded perl installation.
some convenient methods added). by Perl’s say function, which acts just like print but Check out the
“perlbrew help
with an extra newline automatically appended:
lib” command
Consult the map() ->map( sub{ l( $_->attr("href") )->to_abs($base) }
and “perldoc
One of those convenient methods is map() , which like )->join("\n")’ local::lib”.
the Perl function of the same name, we use to call code Rather than perform two loops (a map over the
on each element of the collection. Each element is itself dom() method’s resulting Mojo::Collection and a
a Mojo::DOM object, so since we’re interested in the for each over a plain array), here we’re passing an
URLs on each of these links, we look at the href attribute anonymous code reference to Mojo::Collection’s map()
using Mojo::DOM’s attr method. The result is another method to do all the work in one pass. The l() function
Mojo::Collection, so we call the to_array method on it creates a new Mojo::URL for each relative link in the
to turn it into a plain reference to an array of strings, and collection as identified by the href HTML attribute. to_
then dereference it by enclosing the whole thing in @{ } abs() then transforms the relative URL into an absolute
braces. link using the $base we set at the beginning. The
If we stopped here and printed out @issue_links , map() 's resulting collection is then joined by newline
we’d have exactly what was in the HTML source – links characters for output by say in the line above. The only
to the magazine issues relative to the particular page we thing left is a single quote to close the string passed to
started with. We need to take one last step to turn those perl’s -E command line flag.
into full URLs suitable for a web browser: We’ve only scratched the surface of Mojolicious’ web
foreach my $link (@issue_links) { client power, to say nothing of its raison d’être as a full-
my $full_link = Mojo::URL->new($link)->to_ featured framework that scales from rapid prototyping
abs($base); into large-scale MVC (Model-View-Controller) web
print “$full_link\n”; applications. Perl itself is an evolving language with a
} vast library of open source modules that developers
Yes, it’s that $base URL we started with. We loop over stitch together to solve a world of software problems.
@issue_links , setting $link each time, and build a new
Mojo::URL from it. We then turn it into an absolute URL
using $base and then print it out as a string. (The -Mojo MOJOLICIOUS OR DANCER?
one-liner at the beginning did this as a map; we’ve
turned it into a for each loop to highlight each step.) Dancer (https://perldancer.org) is another Perl web framework with
an emphasis on simplicity and modularity. It has many overlapping
The one-liner revisited features with Mojolicious, although it doesn’t include web client tools.
We can now take a fresh look at that single command You have many choices if your Dancer or other application also needs
line and translate its brevity: client functionality, from the HTTP::Tiny module packaged with Perl,
$ perl -Mojo -E ' to the venerable LWP::UserAgent (and modules written to use it such
Let’s start with that -Mojo flag. -M is just Perl’s as WWW::Mechanize), to C library interfaces like Net::Curl::Easy.
flag for loading a module from the command line, We’ve opted for Mojolicious for this article because on its own it has
equivalent to the language’s “use” statement. In a no dependencies outside of the core Perl modules. It’s also built to be
fit of cleverness, the Mojolicious authors named this non-blocking, i.e., enabling code to continue to run even when a
particular module ojo so as to spell out the subroutine isn’t finished, and this extends to Mojo::UserAgent. So you
framework’s abbreviated name. The script itself is can use the latter as a simple blocking client as this article does, and
passed as a string to the -E flag, which enables optional then expand your repertoire to keep multiple connections active at
features such as the say command. once. See “Non-blocking” under the “USER AGENT” section of
my $base = l("https://linuxformat.com/category/new- “perldoc Mojolicious::Guides::Cookbook” for a couple of examples.
issue.html");
3D game environment
Enhance your gaming world by adding collision detection and
custom objects, as Andrew Smith throws barrels at you.
objects are set up in the game world is as follows: Let’s vary things
up with a greybrick
sprite_positions=[
texture used for
(20.5, 11.5, 2), #green light in front of playerstart the walls. It’s the
#green lights in every room fourth texture to
(18.5,4.5, 2), be loaded into
(10.0,4.5, 2), the program.
(10.0,12.5,2),
(3.5, 6.5, 2),
(3.5, 20.5,2),
(3.5, 14.5,2),
(14.5,20.5,2),
ESSENTIAL
The #1 open source mag
Pi PROJECTS
EDITORIAL
Editor Neil Mohr
Kernel editor Jonni Bidwell
Art editor Efrain Hernandez-Mendoza
Operations editor Cliff Hope
Group editor in chief Graham Barlow
Group art director Jo Gulliver
Editorial contributors
Mats Tage Axelsson, Neil Bothwick, Mark Gardener,
Matthew Hanson, Matthew Holder, Jon Masters,
Nick Peers, Aaron Peters, Les Pounder, Michael Reed,
LXF288
MD, tech specialist Keith Walker
Head of art and design Rodney Dive
Design director Brett Lewis
Commercial finance director Dan Jotcham
will be on sale Printed by Wyndeham Peterborough, Storey’s Bar
Road, Peterborough, Cambridgeshire, PE1 5YS
Tuesday Distributed by Marketforce, 5 Churchill Place, Canary
Wharf, London, E14 5HU www.marketforce.co.uk
Tel: 0203 787 9001
5 April Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries.
GNU/Linux is abbreviated to Linux throughout for brevity. Where applicable code
2022 printed in this magazine is licensed under the GNU GPL v2 or later. See www.gnu.
org/copyleft/gpl.html. All copyrights and trademarks are recognised and respected.
Disclaimer All contents © 2022 Future Publishing Limited or published under
licence. All rights reserved. No part of this magazine may be used, stored,
transmitted or reproduced in any way without the prior written permission of the
publisher. Future Publishing Limited (company number 2008885) is registered in
England and Wales. Registered office: Quay House, The Ambury, Bath BA1 1UA. All
information contained in this publication is for information only and is, as far as we
are aware, correct at the time of going to press. Future cannot accept any
Easy video sharing 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
YouTube? More like BooooTube! We bring you the better, affiliated in any way with the companies mentioned herein.
If you submit material to us, you warrant that you own the material and/or have
the necessary rights/permissions to supply the material and you automatically grant
easier and more open way to share your videos online. Future and its licensees a licence to publish your submission in whole or in part in
any/all issues and/or editions of publications, in any format published worldwide and
on associated websites, social media channels and associated products. Any
material you submit is sent at your own risk and, although every care is taken, neither
Future nor its employees, agents, subcontractors or licensees shall be liable for loss
So random!
or damage. We assume all unsolicited material is for publication unless otherwise
stated, and reserve the right to edit, amend, adapt all submissions. All contents in
this magazine are used at your own risk. We accept no liability for any loss of data or
damage to your systems, peripherals or software through the use of any guide.
Notes: No space Tux this issue, it was poo pooed.
Max-out your entropy and keep dev/random topped up with the 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
most random numbers this side of a white-noise generator. produced from sustainable managed forests, conforming to
strict environmental and socioeconomic standards. The
manufacturing paper mill and printer hold full FSC and PEFC
certification and accreditation.