Linux

Adventures with Artix

Artix is a low-resource Linux that can be configured to run well on old, low-powered computer hardware. In this article, I describe my first attempts at setting it up.

Categories: general computing, Linux

Extending the bash 'cd' command in Linux

The built-in cd command in the bash shell is not as smart as it could be; but it's a little fiddly to extend its functionality.

Categories: Linux

Command-line hacking: Assigning folder icons to directories

How to use basic Bash constructs, along with the Gnome gio utility, to assign folder icons to a set of directories.

Categories: Linux, command-line hacking

Command-line hacking: calculating the phase of the Moon

How to use Bash shell arithmetic, along with the 'date' utilty, to calculate the phase of the Moon on a particlar day.

Categories: Linux, command-line hacking

Command-line hacking: displaying news headlines in the manual viewer

How to use tools like curl and xsltproc to retrieve news headlines from the BBC, and display them using the manual viewer

Categories: Linux, command-line hacking

Command-line hacking: paced breathing

Using a Linux Bash script to generate audio/visual cues for timing paced breathing exercises.

Categories: Linux, command-line hacking

Command-line hacking: querying an Internet radio database

Using Linux command-line utilities to query an on-line database of Internet radio stations.

Categories: Linux, command-line hacking

Command-line hacking: extracting audio metadata (tags)

How to use Bash shell techniques to extract metadata (tags) from various audio file formats.

Categories: Linux, command-line hacking

Command-line hacking: displaying system temperature

Using simple file and string handling techniques in the Bash shell.

Categories: Linux, command-line hacking

Command-line hacking: creating a tide table

How to use Bash shell arithmetic to create a simple tide table

Categories: Linux, command-line hacking

Command-line hacking: displaying a weather summary

How to use tools like curl, sed, and groff to retrieve a weather forecast from the BBC, and format it for the terminal.

Categories: Linux, command-line hacking

Command-line hacking: timezone conversions

Using 'date' and 'timedatectl' to build a utility to help with scheduling meetings in different timezones.

Categories: Linux, command-line hacking

Why the Linux console is so awesome

We've all gotten so used to graphical desktops that we're losing sight of how much can be accomplished on Linux using only a console. This is a shame, because efficient console-only operation is possible on a computer that would otherwise be fit only for landfill, and on modern high-efficiency devices with limited computing power.

Categories: Linux

Using media keys in a Linux console application

Mapping keyboard keys to key codes on Linux is well-documented for the graphical desktop. But what about console applications on embedded Linux systems? There's not much documentation in this area.

Categories: Linux, C, embedded computing

Container from scratch: building a Linux container from the ground up

Containers have become increasingly important for Linux developers and administrators. A number of frameworks like LXC, Docker, and Podman are now available to automate the management of containers. However, all these frameworks rely on similar kernel features, particularly control groups, namespaces, and virtual networks. This article demonstrates how to build a functional container from first principles, using only simple command-line tools. It's objective is to make clear all the details that the more sophisticated tools conceal.

Categories: Linux, containers

Why you can't rely on system calls to obtain limits, when running an application in a container

The notion of resource limits (on memory, CPU, etc) has never been very well-defined, and the use of container-based deployment makes the situation worse. This article describes why, and what can be done about it.

Categories: Linux, containers

Yet another Darktable/Lightroom comparison

Darktable isn't supposed to be an alternative to Adobe Lightroom, but many people hope to use it as one. After all, Darktable's (free) pricing is very appealing. Here are my views on whether a move to Darktable makes sense.

Categories: general computing, Linux

You be the linker -- building Hello, world from scratch, in hexadecimal

This article describes how to write a trivial program for Linux using no compiler tools at all, but entering machine language directly in hexadecimal. Because we can.

Categories: software development, Linux

Making a Java JAR file self-executing (on Linux)

A quick-and-dirty way to make it possible to execute Java JAR files at the prompt, without needing to invoke the JVM.

Categories: software development, Java, Linux

Using the FreeType library to render text nicely onto a Linux framebuffer

Writing graphical applications for minimal and embedded Linux systems can present a challenge. One of the problems is producing nicely-rendered text without the facilities that a graphical desktop would provide. This article describes how to use the FreeType library to render text to the Linux framebuffer.

Categories: software development, C, Linux, embedded computing, Raspberry Pi

Are Flatpak, et al., saving or drowning the Linux desktop?

Desktop Linux will take off next year -- or so people have been saying for years. Do desktop containerization technologies like Flatpak make this more, or less, likely?

Categories: Linux, containers

Extracting software from the Raspbian repository, for assembling a custom Linux image for the Raspberry Pi

Using the official Raspian repository to assist the construction of a custom Linux for embedded applications is quick and convenient, compared to building everything from source. However, this approach has certain hazards.

Categories: Linux, Raspberry Pi, embedded computing

Using ImageMagick to generate anti-aliased bitmap fonts for a microcontroller's LCD display

This article describes how to generate and use compressed, anti-aliased font data, for use in a microcontroller application.

Categories: C, Linux, embedded computing, Pico

Creating an animated score for demonstrating musical compositions on YouTube, etc

Animated musical scores are quite common on YouTube, for educational and promotional purposes. This article explains how to create one, using OpenShot and other Linux tools.

Categories: Linux, music

Conway's Game of Life in 3D perspective

Implementing a program to run Conway's cell population simulation, using a 3D perspective view on the Linux framebuffer.

Categories: software development, C, Linux

A Linux storage management cheat-sheet

This article outlines, with step-by-step examples, how to carry out the most fundamental Linux storage management tasks: partitioning a disk, creating a filesystem, setting up swap space, managing a logical volume management (LVM) storage pool, and configuring a RAID mirror.

Categories: Linux

Using the Linux framebuffer in C/C++ -- just the essentials

The absolute minimum information needed to start using the Linux framebuffer as a graphical display in C/C++ applications.

Categories: software development, C, Linux, embedded computing

Using the Linux framebuffer in C/C++ -- just the essentials (part 2)

This article continues my original framebuffer just the essentials article, by describing how to handle less straightforward framebuffer configurations.

Categories: software development, C, Linux, embedded computing

More like Windows every day

The ease of installation and use of modern desktop Linux distributions comes at a price. I review a couple of low-complexity alternatives to mainstream Linux distributions: Alpine and Devuan.

Categories: general computing, Linux

Making a Raspberry Pi bootable SD card from a root filesystem

You've created a custom Linux installation for the Raspberry Pi. How do you turn that into a bootable SD card image that can be distributed?

Categories: Linux, Raspberry Pi

Converting push-button events to keyboard events in the Raspberry Pi

The Raspberry Pi has a bunch of GPIO pins we can use to connect push-buttons. But how do we interface push-buttons to an application that expects only keyboard input?

Categories: Raspberry Pi, electronics, Linux

Rolling your own minimal embedded Linux for the Raspberry Pi -- part four: audio

This article is part of a series on building a customer Linux installation for a Raspberry Pi-based appliance. It explains how to install and set up the minimum software to get audio playback working.

Categories: Raspberry Pi, Linux, embedded computing

Rolling your own minimal embedded Linux for the Raspberry Pi -- part one: booting to a root shell

This article is part of a series on building a custom Linux installation for a Raspberry Pi-based appliance. It explains how to make a bootable SD card with Pi firmware, a Linux kernel, and a shell. It's about as minimal as a Linux system can be.

Categories: Raspberry Pi, Linux, embedded computing

Rolling your own minimal embedded Linux for the Raspberry Pi -- part two: early initialization

This article is part of a series on building a customer Linux installation for a Raspberry Pi-based appliance. It explains how to obtain and install fundamental utilities for use in a system with a read-only filesystem, and no package manager.

Categories: Raspberry Pi, Linux, embedded computing

Rolling your own minimal embedded Linux for the Raspberry Pi

Introducing a series of articles on building a custom Linux installation for the Raspberry Pi, for appliance applications.

Categories: Raspberry Pi, Linux, embedded computing

Rolling your own minimal embedded Linux for the Raspberry Pi -- part three: services and remote access

This article is part of a series on building a customer Linux installation for a Raspberry Pi-based appliance. It explains how to set up a system which hitherto only boots to a root shell, to a network-aware installation with service management.

Categories: Raspberry Pi, Linux, embedded computing

Rolling your own minimal embedded Linux for the Raspberry Pi -- part five: X

It's entirely possible to run simple, X-based applications in an appliance-based Linux installation: you just have to dispense with the graphical desktop and all its baggage. This article explains how.

Categories: Raspberry Pi, Linux, embedded computing

Using flash memory as non-volatile storage on the Pi Pico microcontroller

The Pi Pico is an impressive microcontroller for its size and cost, but it lacks specific non-volatile memory. This article explains how to use the program flash ROM for that purpose.

Categories: software development, C, Linux, embedded computing, Pico

C-to-parallel IC

Make an auxiliary LCD display for a computer that displays data sent to it over a USB connection. Ready-made devices of this sort are widely available, but it's more fun to build your own.

Categories: software development, C, Linux, embedded computing, Arduino

Sorting files and directories on a FAT-formatted USB memory stick

Many portable and automotive media players accept USB memory sticks or SD cards containing audio files. Very often, these players have no sorting logic, and display files and directories in the arbitrary order they appear in the filesystem. This article describes how to sort a FAT filesystem using Linux utilities, to make playback more convenient.

Categories: hifi, Linux

Making simple stop-motion animations using Linux and a DSLR camera

Creating stop-motion animated movies using a DSLR camera and some basic Linux tools. It won't rival Pixar, but it's something to do with your kids on a rainy Sunday afternoon.

Categories: science and technology, Linux