Wifi Menu Icon

jyoung
New Contributor

Does anyone know of a tried and true way to remove the wifi icon from OS X 10.10? Our lab machines are always connected to ethernet so we don't want to give them the option of using wifi. I have a script that runs that will turn off wifi but the icon stays (networksetup -setairportpower airport off). We have tried the following with little to no success. Thanks in advance.

  1. defaults -currentHost write "/Users/labuser/Library/Preferences/ByHost/com.apple.systemuiserver" dontAutoLoad -array -string "/System/Library/CoreServices/Menu Extras/TimeMachine.menu" -string "/System/Library/CoreServices/Menu Extras/Bluetooth.menu" -string "/System/Library/CoreServices/Menu Extras/AirPort.menu"

  2. Setting a Managed Preference in JSS.

  3. This one has the most promise. It removes everything BUT the wifi. # Menu bar: hide the Time Machine, Volume, User, and Bluetooth icons
    defaults write ~/Library/Preferences/ByHost/com.apple.systemuiserver.* dontAutoLoad -array
    "/System/Library/CoreServices/Menu Extras/TimeMachine.menu"
    "/System/Library/CoreServices/Menu Extras/Bluetooth.menu"
    "/System/Library/CoreServices/Menu Extras/Airport.menu"
    "/System/Library/CoreServices/Menu Extras/User.menu"
    defaults write com.apple.systemuiserver menuExtras -array
    "/System/Library/CoreServices/Menu Extras/Volume.menu"
    "/System/Library/CoreServices/Menu Extras/Clock.menu"

6 REPLIES 6

davidacland
Honored Contributor II
Honored Contributor II

We do this with a custom config profile. OS X much prefers that to defaults writing these days.

You can get your plist setup as you need it then use mcxtoprofile to create the .mobileconfig file.

That can then be uploaded into the JSS.

Josh_Smith
Contributor III

A custom configuration profile is the best option if you want it to stay the way you set it.

I am using a plist in a .dmg and FUT FEU so that users can change it if desired, which is more appropriate for our environment.

davidacland
Honored Contributor II
Honored Contributor II

The mcxtoprofile script (https://github.com/timsutton/mcxToProfile lets you use the "--manage Once" flag so you get the functionality of config profiles but with the flexibility of MCX.

jyoung
New Contributor

Thanks for the help. We were able to get about 75% of what we needed done with mcxtoprofile. Could you possibly provide some more detail on how to remove the WiFI icon and Display icon from the menu bar? As well as disable natural scrolling from System Preferences? These are the last two major items we have been trying to address. We have tried to capture the plist that is changed with the mcxtoprofile but no luck yet. Before capturing the plist we can see that a change has been made to that plist.

We even tried to capture it from Composer but was not successful.

Thanks.

Howie
New Contributor

Related, sort of, I created a custom configuration profile to show the wifi icon. As far as I can tell the configuration profile is working, since if i remove the WIFI icon, and then kill SsytemUIServer the icon returns. However I am curious as to why I can remove the icon at all.

Not curious any more.. I opened a case with apple about this. Currently there is no mechanism to lock these settings. This is on the ever growing list of feature enhancements I have open with Apple.

nigelg
Contributor

I just move the airport.menu folder somewhere else - usually a folder called "hidden_menu_items" that I put inside /System/Library/CoreServices/Menu Extras/. It makes the menu item disappear. I do it in a script. If I want the user to regain access then I put the folder back. I also use MCX to disable Wireless but I will be implementing Configuration profiles to do this soon.