Posted on 02-11-2015 06:54 AM
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.
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"
Setting a Managed Preference in JSS.
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"
Posted on 02-11-2015 06:58 AM
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.
Posted on 02-11-2015 07:44 AM
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.
Posted on 02-11-2015 08:03 AM
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.
Posted on 02-13-2015 11:15 AM
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.
Posted on 04-12-2015 10:30 AM
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.
Posted on 04-13-2015 03:21 AM
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.