I have a pair of Bluetooth headphones that I have successfully paired with OS X. When I connect them I can select "Use Headphones" to switch the routing of audio from the headphone jack to the BT headphones. When I turn off the BT headphones, the audio is automatically routed back over the headphone jack.
The question is, how do I configure the audio to automatically route to my BT headphones when they connect? This is a headless box so I won't be able to select "Use Headphones" every time.