RSSAmplifier

Blog

Posts on Leo3418's Personal Site

Recent content in Posts on Leo3418's Personal Site

leo3418.github.ioRSS feed ↗41 posts

Latest posts

Enable Wi-Fi by Default on OpenWrt

On routers with an Ethernet port, OpenWrt has Wi-Fi disabled on the first boot
“for security reasons.” 1 To enable Wi-Fi, users
need to first connect a device to the router via Ethernet, so they can access
the router in a wired manner and change its configuration to set up Wi-Fi. 
 This is more inconvenient than most routers’ stock firmware. These routers
come…

Create an External-Facing IPv6 Subnet on OpenWrt

Some home Internet users have a need to expose some devices on their home
network to the Internet and meanwhile block external access to other devices.
For example, some users may wish to allow external access to their home server
and prevent their smartphones and workstations from being accessible from the
Internet. To achieve this goal, these users can create a subnet exposed to…

Using MultiOS-USB to Create Multiboot USB Drive

A multiboot USB drive allows its user to boot different ISOs without erasing
the drive. Before I was aware of it, I had been using traditional bootable
USB drive creation tools like Rufus , which would require rerunning the tool
and erasing the drive every time I would like to boot a different ISO. A
multiboot USB drive does not have this limitation. If I want to boot…

Slipstream Windows NT 4.0 SP6a into Installation Media

Microsoft has once released official Windows installation media with a service
pack integrated, such as Windows Vista with SP1 and
 Windows XP with SP2 . The process of integrating a service
pack into the installation media is called slipstreaming . By using such a
slipstreamed media, users need not install the slipstreamed service pack
separately after they have installed…

Trim Linux Kernel Configuration

Many Linux users who prefer to compile their own kernels definitely want to
reduce kernel compilation time and minimize the on-disk footprint of compiled
kernels and modules. Achieving these goals is commonly done by trimming the
kernel configuration, which entails disabling kernel configuration options that
the user does not need. Users can disable options for software features…

SSH-ing into Kobo Clara BW E-book Reader's System Software

I recently bought a Kobo Clara BW e-book reader. While I was copying my
e-books to it, I accidentally found that its system software came with an SSH
server, which, once enabled, allowed me to explore some internals of the e-book
reader’s software as well as hardware. 

 
 The Purchase 
 
 Since I just purchased this device, I feel that this post would be…

Trying Out the Ptyxis Terminal Emulator

In my years of using GNOME, I have been using GNOME Terminal, and it has served
me well. There has been a newer GNOME Console; while it has a few nice new
features, it lacks a small feature that GNOME Terminal has and I depend on, so
I have stayed with GNOME Terminal. Now, a third terminal emulator option for
GNOME, Ptyxis ( TIK-sis ), has appeared. I tried it out
recently and…

Set Up a Custom Gentoo Binary Package Host

Gentoo is a GNU/Linux distribution where users themselves can easily build
software packages for the entire operating system from source code. For a long
time, building packages on their own was the only choice Gentoo users had
because Gentoo only distributed the scripts (i.e. ebuilds) to build the
packages, not the packages’ ready-to-run, pre-built binaries like on…

Build the Same LaTeX Input File Differently According to Command-Line Options

You might have encountered situations where you would like to produce different
versions of the same document or create several related documents from a single
source, such as: 
 
 
 All your document versions have exactly the same content, but each version
is formatted differently. Example: In parallel with a standard version
of your document, you might also want to…

Framework Laptop 13 with AMD Ryzen 7 7840U

Framework Laptops are a series of laptops designed with
user repairability, configurability, and upgradability in mind. After two
years of launching exclusively models using Intel Core processors, Framework
started to ship laptops with AMD Ryzen processors, which are what I looked for
since I had heard of Framework. So, I purchased a Framework Laptop 13 with AMD
Ryzen 7 7840U,…

Minimize Steam When Launching a Game Shortcut on Windows

The recent Steam client major update has brought predominant user interface
changes as well as a regression in user experience: if the Steam client is not
running, and the user launches a Steam game from its desktop or Start menu
shortcut, then the Steam client window will show up before the game launches;
prior to the update, Steam would start minimized in this case, thus the…

Avoid Creating `-9999`-only Gentoo Packages

Some Gentoo packages provide a special 9999 version; by convention, the
ebuild that bears the 9999 version is a live ebuild , which builds the
package from its “live” sources in the project’s version control system (VCS)
repository – e.g. a Git repository – instead of “non-live” sources in a
 .zip or a .tar.* archive. The project’s…

Installing Gentoo via Asahi Linux on an Apple Silicon-based Mac

When Apple launched Macs with Apple silicon, people speculated that a
revolution in desktop computing had started. I saw on Reddit a GNU/Linux user
claimed that GNU/Linux distributions should start to worry about the potential
transition from x86-64 to ARM64 and do something about it to survive. What
they might have not realized was that common software packages that…

Using New Feature While Maintaining Backward Compatibility in Hugo Templates

In the recent v0.109.0 release of Hugo, a new .Ancestors 
page variable was added to make it easier to implement a breadcrumb
navigation template .
The new variable’s usefulness is clearly shown by how the example breadcrumb
template in Hugo documentation has been simplified and become easier to
understand, as presented below (code modified for readability). It is…

Run Windows 98 in Vanilla DOSBox

As a DOS emulator, DOSBox is theoretically capable of running DOS-based
versions of Windows, like Windows 3.1, 95, and 98. Certainly, the
 compatibility list on DOSBox official website classifies
Windows 3.1 and 95 as supported ; but for Windows 98, it is just rated
 runnable – even lower than the intermediate
 playable tier. Perhaps for this reason, most people would…

Gentoo Configuration Guide: Full Disk LUKS2 with GRUB and systemd

This collection is a tutorial which provides instructions to set up LUKS2-based
full disk encryption on a Gentoo system using GRUB as the bootloader and
systemd as the init system. In particular, setting up LUKS2 for use with GRUB
is especially tricky, and this tutorial addresses any intricacies there. 
 This tutorial aims to support both new Gentoo installations and existing…

Use Git to Manage Kernel Sources on Gentoo

Gentoo offers its users a wide array of Linux kernel packages in the
 sys-kernel/* category, each of which may install the kernel in a different
way. In particular, the sys-kernel/*-sources packages (such as
 sys-kernel/gentoo-sources , sys-kernel/vanilla-sources ) install only the
kernel’s source code and do nothing else. This is suitable for users who
prefer to compile…

Refine Gentoo on Windows Subsystem for Linux

This article covers some information that can help perfect a Gentoo
installation on Windows Subsystem for Linux (WSL) to maximize its
performance, improve its interoperability with Windows, and even unlock new
system capabilities. 
 Originally, I had been planning to write a full Gentoo on WSL installation
tutorial during September of the last year, but that tutorial was only…

GSoC 2021 Final Work Products

As this year’s GSoC has come and gone, it is time to compile a retrospective of
all the work I have done for my GSoC project. In a nutshell, the bulk of my
project was executed as I had planned in my original project proposal; some
additional deliverables and enhancements not outlined in the original plan were
made, while a few planned and relatively trivial deliverables were…

An ebuild Testing Solution for ebuild Repositories

Common package managers implement the concept of software repositories to
allow the set of packages installable from the package manager to be expanded.
On Fedora, there is RPM Fusion and Copr repositories created and maintained by
users. Arch Linux users are fond of the AUR, the canonical repository for
user-submitted packages. On Gentoo, there is GURU, which is kind of…

Finding Leaf Packages Faster: Optimization for In-degree Computation in Dependency Graph

Dependency is a concept that appears often in software engineering. In the
 previous article for my GSoC project, I discussed build
systems and package managers, both of which apply the concept of dependencies.
A build system usually allows programmers to define different tasks in
building a project and let each of them depend on other tasks, hence dependency
relationships are…

Introducing ebuilds That Build Kotlin Core Libraries from Source

Since the last blog post regarding my GSoC project was posted, I moved on to
the next part of the project: improvements on the Kotlin ebuilds in the Spark
overlay created during last year’s GSoC, namely
 dev-java/kotlin-common-bin and dev-lang/kotlin-bin . As shown by the -bin 
suffix in the packages’ names, these are packages that simply install the
Kotlin library…

Properly Handling Process Output When Using Java's `ProcessBuilder`

Another mysterious disappearance of me from my personal website has happened
after the previous one in last November. The reason is the same: I had been
quite busy. But unlike last time, I do not think that the things which kept me
busy in the past month were futile. I spent significant amount of time helping
students in a software engineering course for which I was a…

Gentoo Configuration Guide: systemd

As of now, the Gentoo Handbook, which is the official Gentoo installation
guide, mainly focuses on steps to install a system based on OpenRC instead of
systemd. After all, as a project mainly maintained by Gentoo developers, it
would be a surprise if Gentoo did not introduce OpenRC as the distribution’s
init system with primary support. For people who want to use systemd…

Gentoo Configuration Guide: GNOME on systemd

Getting a perfect GNOME configuration on Gentoo is not hard but is tricky. In
other words, it would be a piece of cake once you have done it, but it is not
easy to get it right with only one shot for the first time. The GNOME Guide
on Gentoo Wiki is a good resource and is enough for a
barely functional GNOME installation, but there are plenty of rooms for
improvements, like…

MC Forge Mod Dev Blog: Adding a Configuration GUI - 1.16 Version

The very first blog post for this series covered how I created
a configuration GUI screen for a Minecraft Forge mod targeting Minecraft 1.14.4
and above, despite the fact that the related framework and library classes have
been removed from Forge, and the core developers have decided that it should
never be added back . I am extremely disappointed to see
LexManos, the leader of…

A Patchy System -- Applying Patches with Portage to Fix Upstream Bugs

For many free software projects, there is usually some delay between the
initial annoucement of a bug fix or an enhancement and the moment when you
finally get the software update that ships it. As a user, you need to wait for
the patch to get reviewed and accepted by the project, wait for the change to
be tested and integrated, wait for the new version containing the change to…

Create a CPU Frequency and Temperature Monitoring Bash Script for Linux-based Systems

This post will show you a way to monitor CPU frequency and temperature on
Linux-based systems without aid of any programs or packages that are not
commonly preinstalled on major GNU/Linux distributions. No extra hardware
drivers are required: the magic is done merely by a short Bash script in just a
few lines that only relies on mechanisms provided by the Linux kernel…

MC Forge Mod Dev Blog: Migrating to Minecraft 1.16

It is no longer news that Minecraft Forge has stable Minecraft 1.16 support, as
the first recommended build for 1.16.x, which is Forge 34.1.0, was released in
September 2020, very soon after I published the previous blog post for this
serires about an update to my mod project. Development of
Forge for Minecraft 1.16.x already had significant progress when the update for
my mod…

My Gentoo Hands-on Experience

It has been six weeks since I published the last post on this site. Myriad new
topics and ideas to write about have accumulated in my drafts for new articles,
but I was too busy to find enough time for converting them into high-quality
articles I have been endeavored to deliver. Now, as I finally have got some
free time, I want to talk about one of the things I did during the past…

Use Btrfs on Fedora Installed from a Raw Image

Fedora is moving to Btrfs for its default file
system on its “desktop variants” in Fedora 33. This change is welcomed by some
users because of some benefits Btrfs is offering. Other Fedora variants still
default to ext4, although users may elect to use Btrfs during system
installation with the Anaconda installer. But for non-desktop-variant raw
image distributions…

USB Issue on Raspberry Pi 4 Running Fedora - Complex Solution

In the previous post we looked at
a very simple solution to fix the USB ports on Raspberry Pi 4B 4GB/8GB RAM
models running Fedora, which involves a trade-off between the USB ports'
functionality and the amount of RAM available to the operating system. This
post will give you another solution that takes more steps but no longer limits
available memory to 3 GiB. 
 As said in…

USB Issue on Raspberry Pi 4 Running Fedora - Simple Solution

When Fedora runs on Raspberry Pi 4B 4GB/8GB RAM models, the USB ports might not
be working out-of-box as of Fedora 32 and Linux kernel 5.8. In this post, I
will introduce a very simple solution to this problem that only requires you to
add one line to a configuration file. 

 
 Notes and Caveats 
 
 
 
 If you are using the 2GB model, then rest assured - the…

MC Forge Mod Dev Blog: Adding a Configuration GUI

Minecraft Forge had been shipping a configuration GUI framework which mods
could use to provide customization options, but the framework has been gone
since Minecraft 1.13. This post describes how I created a mod configuration GUI
without using that framework by directly using APIs of Minecraft. 
 The procedure shown in this post is applicable to Minecraft 1.14.4 and 1.15.x.
I…

Perform Manual `dnf history undo`

My choices of GNU/Linux distributions are Fedora for desktop computers and
CentOS for servers. Both of them feature DNF - Red Hat’s package manager
front-end for RPM, which is the primary reason I use these distributions.
Although one might argue that it is slow, DNF is very clear on not only what it
will do for an action but also what it has done : it maintains a history…

Install Raspberry Pi's `vcgencmd` on Fedora

This post is a continuation of my previous
one about setting up a cluster of
Raspberry Pis running Fedora. After I got the cluster to compute something,
 @ColsonXu , the cluster’s owner, asked me if
I could monitor the CPU temperature of each Raspberry Pi by running this
command: 
 $ /opt/vc/bin/vcgencmd measure_temp
 
 The vcgencmd 
program 
is…

Set Up Fedora on a Raspberry Pi Cluster

First and foremost, I would like to thank
 @ColsonXu for giving me this opportunity to
play with some Raspberry Pis. He had got a few Raspberry Pi 4’s and built a
cluster with them for computing purposes, but there was nothing to compute
until the morning when @mrdarcychen found
 an article about running Rosetta@home on Raspberry
Pi 
from Fedora Magazine, and…

Use `grep` as a Substitute for `cat`

I came across a fascinating and educative article, Unix Recovery
Legend , when someone posted
a link to it on Reddit. The article presents a story of the writer, Mario
Wolczko, and some other colleagues attempting to recover a system partially
destructed by rm -rf / . 
 The rm command was interrupted before it scraped off directories like /usr ,
but it was too late to save…

Use Cygwin's Shell or Git Bash in Windows Terminal

Recently, Microsoft has made the first stable release of Windows Terminal, a
new terminal program for Windows 10. Windows Terminal allows you to add and use
multiple shells, like Windows PowerShell, the old command prompt, and any shell
in your Windows Subsystem for Linux (WSL) environments. It also provides way
more features and customization options than the old Windows console…

Share GTA V Game Files Between Steam and Epic Games

After Epic Games announced that it would give away free copies of GTA V for a
week, many people started to claim this gift on that game platform. Even some
existing GTA V players who have already purchased the game on Steam had decided
to get another free copy so they could have two or more GTA Online accounts. 
 It appears that if you have already installed GTA V via Steam, you…

Restarting This Personal Site

I have been planning to repurpose my personal website on GitHub Pages as a blog
for jotting down how I play around with different technologies. When I try
something new, I usually spend some time reading tutorials, help articles, and
blog posts about it. But of course, my reading is not limited to a single
resource; instead, I often combine knowledge and steps across…