Posts

Programatically Adding Spotlight Exclusions

Spotlight has two types of exclusions: Volumes and Directories I’m executing everything as root here, as I assume these commands will usually be executed by some management software that has Full Disk Access and Root Access. This post is Catalina specific, since the VolumeConfiguration.plist file is in a different location on previous macOS releases. This is due to the movement of / to /System/Volumes/Data Volumes can be added and removed as exclusions from Spotlight (while not appearing in System Preferences) with a simple mdutil -i off "VolumeDirectory" Directories however are not so simple. If we try the same thing with a directory, we get the error MBP:~ dan.c$ mdutil -i off "/Users/dan.c/Desktop" /System/Volumes/Data/Users/dan.c/Desktop: Error: invalid operation. Error: unknown indexing state. The solution is to directly edit /System/Volumes/Data/.Spotlight-V100/VolumeConfiguration.plist Since defaults doesn’t allow us to read arbitrary plist f

WireGuard Kernel Module on 64-bit Raspberry Pi Kernel

The Raspberry Pi Kernel has now been updated beyond Linux 5.6, meaning Wireguard has been included in the Kernel and the below shouldn't be necessary on a recent version of Raspberry Pi OS. This guide is mostly for my own reference after an entire day of trying to figure out how to get this working. I’ve just posted it here in case anyone else might find it useful. I first needed a 64 bit kernel for a docker container, and then a couple of months later when trying to use WireGuard realised it wasn’t going to be easy without kernel headers and a 32-bit userland. After piecing together varying sources of information, the below should work at the time of posting on a Raspberry Pi 3 B+ running the latest Raspbian, and with arm_64bit=1 in /boot/config.txt . The idea here is - Download a 64 bit base image mount & chroot in Build against the 64 bit kernel Put the module in the correct folder Load the module Create a folder somewhere, I called it ubuntu mkdir ubuntu; cd ubu