Macs, Modularity and More

Disabling Bluetooth Assistant on OSX

In a
recent conversation
with Denis Roy, we discussed
how to disable the Bluetooth search assistant that occurs on headless Macs,
or on Macs with no keyboards attached (kiosk displays, etc).

Since I couldn’t find an obvious search post for how to disable this easily
(and remotely) I thought I’d write it up so that others can more easily
Google find it.

Firstly, the setup assistant is supposed to be helpful, particularly because
Mac Minis particularly are o ften set up with a remote keyboard. Since all
Macs have bluetooth enabled, allowing users to connect a keyboard automatically
is a benefit for first-time setups.

Of course for remote or headless Macs, this can get in the way, particularly
if you are testing UI code.

There’s an option in the Bluetooth settings in the System Preferences app
that allows you to turn these options on or off:

Setting this is OK if you have a mouse connected (or via Remote Desktop),
but if you have many macs (such as a test farm) to set up, this is not
something that scales well.

Fortunately, the same thing can be done with a few lines of shell script: