How to completely disable Airplay in Mac OS X I'd like to cut out AirPlay entirely.

Looking for an answer, I read
Disable AirPlay on a Mac

But it didn't really offer a direct solution.  

Here is my problem:

I have the household media room connected to an Airplay capable receiver.  Our media server is a secondary Mac that runs 24/7 for the express purpose of serving media throughout the house.  This is a headless machine that does not ever output any audio of its own, and in fact could have all audio drivers disabled and it would be perfectly fine with me.

What happens is, this machine appears to spontaneously decide that it wants to connect to the Airplay receiver, which causes my Media room to suddenly switch input sources and is seriously irritating and confusing to other members of the household.

If I could simply disable Airplay completely on this machine, then all would be well.  But I don't want to impact any other internet connectivity as I have multiple apps that need to communicate at all times in both directions to the outside internet.

Is there in fact a direct way to simply disable Airplay entirely in Mac OS X?
I have just found some help here: Disable AirPlay Mirroring. It will let you disable Airplay Mirroring (I assume that includes just the sound) by using a terminal command. It will deny the computer access to the AirPlay.app that allows Airplay mirroring.

sudo chmod 000 /System/Library/CoreServices/AirPlayUIAgent.app/Contents/MacOS/AirPlayUIAgent

Some problems are associated with this though. I've copied the article's "drawbacks" below.


  The only drawback to this method is that it locks up the menubar, which means your users won't be able to use any of the menu bar items. They're still able to adjust the volume using the keyboard, though. Logging out and back in will restore the functionality of the menubar until the user tries to use AirPlay mirroring again. I guess if your users complain about the menubar crashing, you know what they've been trying to do! To remove your users temptation of crashing the menu bar all the time, you can hide the AirPlay icon by opening System Preferences > Displays and unchecking the "Show mirroring options in the menu bar when available" checkbox. 


if you don't enjoy it afterwards and you want to fix it back to defaults without reinstalling OS X you want to do the same steps above like you did when disabling AirPlay. But instead of the 000 after sumo chmod you want to use the numbers 755

You would follow the steps, restart your iMac like before and you should have re-enabled it back