Trap for young players. Ubuntu replaces the default interpreter for /bin/sh from Bash to Dash. This was done for performance reasons, but certain scripts really don’t like this. You can easily change it back with;

sudo dpkg-reconfigure dash

Information about this can be found here. This was done quite a long time ago, apparently, but for whatever reason scripts that ultimately wind up calling the PHP 7.1 interpreter while under Dash break badly under some circumstances (resulting in PHP segfaulting).

I decided to make up a desk mount for my HOTAS, so that I could position the stick in a more natural location without having to gorilla-arm it. The design is very straightforward – it’s a drill vice with a couple of pieces of steel bracket and soft-grip vice jaws to avoid marking the desk. Total cost under $30.

If you want to replicate this, the spacing of the holes for the Warthog stick are 60mm apart, and are M4 metric screws. Remember to leave enough clearance so you can push the stick the whole way forwards and not catch your fingers on the vice anywhere.

I have an Olympus TG5 camera, which has RAW support for Darktable, but only in the very latest (currently unreleased!) 2.3.0 version. Since I have Windows, I’ll have to build Darktable directly from source to be able to manipulate it. Here’s how you can do that.

First, I assume you have Cygwin/X running. You’ll also need Vagrant installed, along with VirtualBox. With all that in place, doing the rest is pretty straightforward. Create a folder, and throw this Vagrantfile into it;

If you have the newer (model 1708) XBox One Wireless Controller, you can get it to work with a Steam Link on native Bluetooth pretty easily. But if it’s straight out of the box, the rumble motor won’t work on the controller.

In order to make it work, you’ll need a PC with Windows 10 and the Anniversary Update installed. Go to the Windows Store and install ‘Xbox Accessories’ by Microsoft.

Then, plug in your XB1 controller with a USB cable into your PC (shut down Steam first). The PC will then prompt you to update firmware on the controller. Do so. You’ll then have to repair it with the Steam Link, but once that’s done rumble functionality should work.

My sincere apologies for the Microsoft Paint drawing. The long end of the red line represents the end of the webbing that is attached to the rest of the harness, and the short end is the end that you have in your hand. The rest should be self-explanatory. Threading it this way results in the buckle pulling tight properly when buckled in, and also means the other end of the webbing can slide over the buckle properly when putting it on.

You don’t want to know how many times I put it on wrong before I figured this out. I swear that thing exists in n-dimensional space or something.

I use a RPi 3 as a secondary DNS and DHCP server, and time synchronization is important for that. Due to some technicalities with how my network is set up, this means that I need a real-time clock on the RPi so that it can have at least some idea of the correct time when it powers up instead of being absolutely dependant on NTP for that.

Enter the DS3231 RTC (available on eBay for a few bucks). The Pi Hut has an excellent tutorial on setting this up for a RPi, which I’m going to summarize here.

Configure I2C on the RPi

From a root shell (I’m assuming you’re using Raspbian like me);

apt-get install python-smbus
apt-get install i2c-tools

Then, edit your /boot/config.txt and add the following down the bottom;

dtparam=i2c_arm=on
dtoverlay=i2c-rtc,ds3231

Edit your /etc/modules and add the following line;

i2c-dev

Now reboot. If you do an i2cdetect -y 1 you should see the DS3231 listed as device 0x68. If you do, great.

Configure Raspbian to use the RTC

After rebooting, the new device should be up, but you won’t be using it yet. Remove the fake hardware clock with;

apt-get --purge remove fake-hwclock

Now you should be able do hwclock -r to read the clock, and then hwclock-w to write the current time to it.

And lastly, to make it pull time from the RTC on boot, put the following into /etc/rc.local before the exit 0;

hwclock -s

And you can then add a cronjob in /etc/cron.weekly to run hwclock -w once a week.

As part of my home DR strategy, I’ve started pushing images of all my virtual machines (as well as my other data) across to Backblaze using Duplicity. If you want to do the same, here’s how you can do it.

First up, you will need a GnuPG keypair. We’re going to be writing encrypted backups. Store copies of those keys somewhere offsite and safe, since you will absolutely need those to do a restore.

Secondly, you’ll need a Backblaze account. Get one, then generate an API key. This will be comprised of an account ID and an application key. You will then need to create a bucket to store your backups in. Make the bucket private.

Now that’s done, I’m assuming here that you have your /var/lib/libvirt library where your VMs are stored on its own LV. If this isn’t the case, make it so. This is so you can take a LV snapshot of the volume (for consistency) and then replicate that to Backblaze.

Configure the parameters above to suit your environment. You can use gpg --list-keys to get the 8-digit hexadecimal key ID of the key you’re going to encrypt with. The folder name in your bucket you use is arbitrary, but you should only use one folder for one Duplicity target. The 10G LV snap size can be adjusted to suit your environment, but it must be large enough to hold all changes made while the backup is running. I picked 10Gb, because that seems OK in my environment.

Obviously this means I need to have 10Gb free in the VG that the libvirt LV lives in.

Retention here will run incrementals each time it’s run, do a full every 3 months, ditch any incrementals for any fulls except the latest one, and keep up to 4 fulls. With a weekly backup, this will amount to a 12 month recovery window, with a 3-monthly resolution after 3 months, and a weekly resolution less than 3 months. Tune to suit. Drop that script in /etc/cron.daily or /etc/cron.weekly to run as required.

Important. Make sure you can do a restore. Look at the documentation for duplicity restore for help.

I had a problem where I couldn’t find LAN games automatically on my local network in Minecraft. Turns out that the problem was due to the interface priority on my network interfaces, and Minecraft was binding to the wrong interface!

Minecraft uses UDP multicast (on 224.0.2.60, port 4445) to advertise local games. If you have more than one network adapter on your machine (in my case, a VirtualBox Host-Only adapter), it’s possible that Minecraft has bound to the wrong adapter.

You can reveal this with netsh interface ip show joins – if you see the join on 224.0.2.60 on the wrong interface, that’s your problem. Here’s how to fix it.

Open an administrative Powershell prompt. Run get-netipinterface and review. You should see two entries for the offending adapter. Look at the InterfaceMetric value for that adapter and for the adapter you want to be the default. In my case, both were 25.

You can now adjust the interface metric for the offending adapter to be higher than the correct adapter;