Samba quota via sparse container

Creating a sparse file, formatting it with a file system, mounting it, and sharing it.

Upgrade / update Home Assistant HASS docker container...

How to upgrade HASS Home Assistant docker container on Linux... without docker-compose...

Shred in WSL on Win10 | Secure erase on windows subsystem for linux

How to use the linux shred tool on a windows machine to secure erase an external disk. This guide assumes the WSL has already been setup.


Ubuntu as an Apple Time Machine capsule with Netatalk 3

In 2016 I wrote "Apple's TimeMachine now works with Samba SMB2. Apple also is moving to depreciate AFP which was the previously underpinned TimeMachine" Fast forward to 2020 - what a year:

  • I have finally upgraded from Ubuntu 16.04 LTS > 20.04 LTS
  • Samba was never really hugely reliable for TimeMachine in my experience
  • Netatalk is still around now at version 3
  • MacOS I'm running is High Sierra (no Catalina yet) and still has AFP

Tl;DR here is how to set up Time Machine capsule on Ubuntu upgrading to Netatalk 3, from Netatalk 2.


Linux firewall settings for Apple Airplay (Shairport / Shairtunes / Shairplay)

VS. 


The following has taken me an eternity to figure out. I use Airplay from a Linux server to Apple and other airplay devices on my network. Configuring the firewall properly for this to work has not been simple - many guides are vague and lack the specifics needed.

My actual configuration centres around Logitech's squeezeboxserver now known as logitechmediaserver 'LMS' whereby I use the following plugins:

AirPlay bridge - this enables Airplay devices to be used as if they were squeezebox devices, i.e. I can play my LMS stored music / radio / spotify on any of my Airplay devices

ShairTunes2 - this enables Squeezebox devices to be Airplayed to, i.e. I can Airplay from my iPhone/iPad/Mac etc. to any of my LMS squeezebox devices. This is an incarnation of shairplay / shairport .

For along time I have had to disable my firewall to enable my LMS device to connect to my Airplay devices and for music to flow. Once the connection is established I had to then re-enable my firewall - which is not ideal and very cumbersome. Whilst the Airplay devices always showed up in LMS and LMS client the music would just not stream. 

Here's how to configure a linux firewall with UFW to enable Airplay:

VNC Clipboard not working fix

Clipboard not working over VNC to Linux? To share clipboard over VNC if its not working (e.g. on xfce) try autocutsel.

sudo apt install autocutsel -y


Apple Script - prevent Mac OSX login items opening Script Editor at startup / login

To prevent Apple Scripts from opening the Apple Script Editor on Mac OSX login the script should be export to an application within Script Editor. The application (.app) should be added to OSX login items, not the script (.scpt).
To do this From the Script Editor menu, choose File -> Export and select “Application” from the File Format dropdown.
This is necessary because if you only save it as a script (.scpt file), when run at login it will simply open in AppleScript Editor. 
We want this to be an automated process so that the functionality runs without our having to do a thing. As an application, the script functionality will run the same as if you opened it in the editor and clicked the “Run” button.
Kudos: http://www.creativecongo.com/mac-tips-how-to-run-applescripts-at-login/

Set up ipsec VPN with Strongswan on Ubuntu with PSK for roadwarrior use

This post shows how to setup an ipsec VPN connection in roadwarrior fashion. Roadwarrior mode is where you typically have a mobile device which has a dynamic address and you want to connect back to a VPN server. This post uses a simple pre shared key to establish the VPN connection using strongswan. This is much simpler than my past openswan approach which also relied on L2TP, Pluto etc. needing to be configured. Performance also seems to be better with VPN connections establishing much faster.

Ubuntu as an Apple Time machine capsule with Samba SMB2

Apple's TimeMachine now works with Samba SMB2. Apple also is moving to depreciate AFP which was the previously underpinned TimeMachine. Since Yosemite OSX 10.10 it is possible to use samba which in my view is easier and simpler to set up. Read on...

Get BBC iPlayer working on Logitech Media Server with Squeezebox Touch & Classic


Getting BBC iPlayer to work on Logitech Squeezebox has not been simple in the last 18 months due to BBC's ongoing changes to their iPlayer infrastructure. Here's how I have it working as of February 2012 on a Logitech Squeezebox Plus and Logitech Squeezebox Classic, read on...