iMac Target Display mode, bluetooth keyboard and mouse

When using an iMac as a secondary monitor for a macbook pro (target display mode), it is more comfortable to use the iMac’s keyboard and mouse rather than the MBPs, however this is not straight forward.

ProTip: When using the linux tool ‘nc’ in a cron job, remember to use the -d flag to prevent it from trying to read from standard input.