Posts in "geek"

My inner contrarian nature is always sorely tempted to adopt, I don’t know, Perl or such, as my main hackery language. Why? Because if almost no one’s using it, it must be awesome, says a broken part of my head.

Not to brag, but I just:

  • Compiled an IRC client on Mac for the first time.
  • Installed an IRC daemon on a VPC
  • …inside rootless podman
  • …with mandatory TLS via LetsEncrypt
  • …and mandatory user authentication
  • …over IPv6.

and I successfully connected the client to the server on the first attempt.

OK, I’m bragging.

We don’t need no stinking DRM

I found a book in Amazon Kindle format that I wanted to read. I couldn’t find it anywhere else, and I had some Amazon credits, so I bought it. The problem is, I don’t have a Kindle and don’t want one. I knew that Calibre has plugins to repair DRM-infected Kindle files but found that Amazon made changes to their apps last month that ruined that method. There’s a commercial DRM disinfectant for Macs that I downloaded to test, but it asked for some wild permissions and wanted me to disable SIP. LOL, no. Finally, I took to sailing the seas looking for a usable EPUB, figuring that I already bought a copy and of course it’s morally OK to seek someone else’s assistance in format-shifting my purchase to one I could use. This particular book — I learned of it from the back of a 2600 Magazine — was niche enough that it wasn’t even available that way.

I am not easily dissuaded.

First, I looked up the specs of my Kobo Libra 2 reader. Its screen is 1264x1680 at 300 DPI.

Next, I downloaded the Kindle app for my Mac. I opened the book I had just bought and adjusted the window size until the rectangle of text displayed on my screen was slightly smaller than the Kobo’s screen.

Then I wrote a Keyboard Maestro macro to take a screenshot, save it to an incrementally numbered PNG file, turn the page, wait one second for the page-turning animations to finish, and then repeat the process a few hundred times.

Now that I had screenshots of each page, I used ImageMagick to crop the Kindle app’s window decoration off them, with a script running command lines like:

$ magick kindle-001.png \
    -crop 1248x1597+342+182 +repage \
    -background white \
    -gravity center \
    -extent 1264x1680 \
    prepared/page-001.png

Finally, I combined them all into a single PDF with a command like:

$ img2pdf --imgsize 300dpi prepared/page-* --output mybook.pdf

…and tagged it appropriately with:

$ exiftool \
    -Title="My Book" \
    -Author="Jane Smith" \
    mybook.pdf

The resulting book looks good with crisp text. Although it’s a bunch of screenshots bundled together, it’s still only about 40MB in size and that’s tolerable here.

It would be nicer to have the book as a native EPUB. Since that wasn’t an option, my stubborness won and I made my own version.

It’s Friday night and I’m registering a domain, as one does.

Replacing the login and lock screens on a Raspberry Pi

My uConsole computer finally arrived after a 10-month delay. I started kicking the tires by installing fun software on it, and quickly realized it’d run better if it looked cool. Here’s how I did it.

Change the boot image

Raspberry Pi OS uses Plymouth to make show a boot splashscreen. By default, it displays the image file at /usr/share/plymouth/themes/pix/splash.png. I’m sure there’s a “better” way to do this, but I simply replaced that file with my own 1280x720 image (to match the screen’s native resolution):

$ cd /usr/share/plymouth/themes/pix
$ sudo cp splash.png splash.png-dist  # Keep a backup
$ sudo cp myimage.png splash.png
$ sudo plymouth-set-default-theme --rebuild-initrd pix

That last line rebuilds the initrd image so that the kernel will use the new image.

Photo of a uConsole with a Hackers movie-style boot screen with blue plasma flames and a yellow flame logo inside a red trapezoid.

Change the lock image

I use Wayland instead of X11, and that setup uses pi-greeter to show a lock screen. That requires editing /etc/lightdm/pi-greeter.conf. I copied my new user image to /usr/share/plymouth/themes/pix/smiley.png, which isn’t the right place to put it exactly, but has it living next to the splash.png I installed in the previous step. Then I backed up pi-greeter.conf and edited its default-user-image and wallpaper values like so:

--- pi-greeter.conf-dist        2026-06-22 18:52:53.702242786 -0700
+++ pi-greeter.conf     2026-06-22 18:55:06.519726407 -0700
[@@](https://micro.blog/@) -1,7 +1,7 [@@](https://micro.blog/@)
 [greeter]
-default-user-image=/usr/share/raspberrypi-artwork/clockworkpi.png
+default-user-image=/usr/share/plymouth/themes/pix/smiley.png
 desktop_bg=#000000
-wallpaper=/usr/share/rpd-wallpaper/RPiSystem_dark.png
+wallpaper=/usr/share/plymouth/themes/pix/splash.png
 wallpaper_mode=center
 gtk-icon-theme-name=PiXflat
 gtk-font-name=Nunito Sans 12

Note that usr/share/raspberrypi-artwork/clockworkpi.png doesn’t even exist by default, so the lock screen falls back to a boring silhouette of a person.

The same image, but showing a username/password prompt. The icon is a yellow smiley with a black patch over one eye.

Make the screen automatically lock

I’m teaching my coworkers not to trust leaving their laptops unlocked, and I have to practice what I preach. I want my screen to automatically lock if I ever forget to manually do it. That’s easy! Edit the ~/.config/labwc/autostart file like this:

--- autostart-dist      2026-06-22 19:12:18.204495749 -0700
+++ autostart   2026-06-22 19:12:12.708859097 -0700
[@@](https://micro.blog/@) -1 +1 [@@](https://micro.blog/@)
-swayidle -w timeout 600 'wlopm --off \*' resume 'wlopm --on \*' &
+swayidle -w timeout 300 'swaylock -f -p' timeout 600 'wlopm --off \*' resume 'wlopm --on \*' &

The extra timeout 300 'swaylock -f -p' locks the screen after a 5 minute idle timeout.

The same screen, but with a black password box in the middle of the display.

Ta-da!

And that’s it! Reboot and enjoy your cool graphics and slightly more secure setup.

A coworker brought a little Python-programmable rolling robot ball to the work offsite. She asked a group of us, in seriousness, if she brought it out after dinner, would anyone be able to help debug some of the code.

My friend, you have a robot. A programmable one. Around us. I guarantee that thing’ll get debugged before you take it away for the night. It might not end up with the original code, but it’ll do something alright.

I also got to introduce the word “nerdsniped”.

I bought a DM42n calculator a while ago and it’s been a fun desk toy that I admittedly have little practical need for. I’ve since updated it to use the C47 system which is the most delightfully nerdy, ludicrously powerful calculator mankind’s ever schemed up. My kingdom for a printed manual, but still!

“You wouldn’t download a laptop, would you?”

“I’m saddened that you so completely misunderstand me.”

I have, in fact, downloaded a laptop, printed it, and installed a Free operating system.

A 4.3 inch screen with a chiclet keyboard in a boxy white case displaying GNU Emacs on a GUI desktop.

I’ve spent too much of this weekend writing Ansible to make all my Raspberry Pis similar.

This might say more than I’d wish about my nerd level, and about how many tiny computers I have laying around.