Puffmatic - OpenBSD Autoinstall Generator

Abstract

This article covers automatic OpenBSD installation over the network and from USB thumb drive.

First part briefly discusses the problem at hand and motivations.

Second part discusses the procedure to manually prepare images and file sets, diving in the methodology.

Third part introduces puffmatic - a script that automates above steps.

If you are familiar with unattended installation, you can skip intial discussion and jump stright to puffmatic.

If you are curious how it works, I recommend going through whole article, so you can troubleshoot if anything goes sideways.

Read more...

Emacs: Saving Sent Emails to IMAP

Emacs mail composer limitations

Emacs offers two easy-to-use methods for composing emails:

  • mail - a simple method for plain text email messages
  • message-mail - a more sophisticated option that supports multipart MIME messages

I will intentionally skip the GNUS and MH-E modes here.

Both of these email composers open a buffer with an email template, allowing for quick composition and sending with a single keystroke. They are ideal for sending a quick message while working on other tasks.

Read more...

Gtk Emacs Key Bindings

On OpenBSD, Gtk applications use Emacs key bindings by default. I find this frustrating, as I expect C-a to select the entire text.

To revert to the default key theme, I needed to modify some configuration files.

For Gtk 2, include the following in ~/.gtkrc-2.0:

gtk-key-theme-name = "Default"

For Gtk 3, make the following edit in ~/.config/gtk-3.0/settings.ini:

[Settings]
gtk-key-theme-name = Default

Now it feels better.

Read more...

Disable Beeper on Linux

I find the occasional BEEEEP coming from my PC speaker extremely annoying. My irritation is amplified tenfold by the fact that my ThinkPad's speaker is very, VERY loud.

After playing Whack-a-Mole for some time, attempting to disable the audible bell in various environments, I decided to take more destructive action.

To temporarily disable the Clangy McBangy, run the following command in the terminal:

sudo rmmod pcspkr

To prevent the speaker from loading at boot, you can blacklist the module. Create or edit the file /etc/modprobe.d/nosound.conf (or any suitable name) and add the following line:

Read more...

SSH As Ad Hoc VPN

OpenSSH is an amazing piece of software that continually surprises me.

Did you know that you can run a SOCKS proxy with just a single command?

ssh -D 9090 example.com

To configure your browser (I'm using Firefox as an example):

  • Go to SettingsNetwork SettingsManual Proxy Configuration
  • Set the browser's proxy to SOCKS v5 localhost:9090
  • Enable Proxy DNS when using SOCKS v5

Then, you can visit:

This is a software monopoly but at least it was written by people who care about security, so it's not like Microsoft's monopoly.

Read more...

Disable Touchpad When Typing

I often accidentally touched the touchpad while typing, which led to the unintended activation of various UI elements.

I generally dislike touchpads; they feel like a useless invention, much like touchscreens in cars.

After some searching, I found a useful utility that monitors keyboard activity and disables the touchpad while typing:

syndaemon

  syndaemon -i 1 -K -R -d -t -p /tmp/syndaemon.pid
  • -i - specifies the wait time after typing stops
  • -K - ignore modifier keys
  • -R - uses the XRecord extension to avoid keyboard polling
  • -d - daemon
  • -t - disables tapping and scrolling only
  • -p - creates a PID file

Since I use i3, I added the following to my i3 configuration:

Read more...