-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmacOS-Start-StadiaFix.sh
32 lines (27 loc) · 1.61 KB
/
macOS-Start-StadiaFix.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/sh
#
# yourfuneral
# Stadia on the Mac works best when AirDrop is disabled and AWDL is disabled as well. Heres a script that disalbes the settings (so you don't have to use an app) and another one that will reenable the settings.
# This script should be run with sudo permissions
# There's a fair bit in here that could be considered overkill and it will change system settings.
# If you have any of these values managed via JAMF or have a config manager that manages these settings, this script probably won't change the settings or if it does change settings, they will be reverted after a reboot.
# There's probably a better way to do this.
#
### Variables and Prerequisites
loggedInUser=$( scutil <<< "show State:/Users/ConsoleUser" | awk '/Name :/ && ! /loginwindow/ { print $3 }' )
uuid=$( /usr/sbin/ioreg -d2 -c IOPlatformExpertDevice | awk -F '/IOPlatformUUID/{print $(NF-1)}' )
###
# Disable AirDrop completely
defaults write /System/Library/User\ Template/English.lproj/Library/Preferences/com.apple.NetworkBrowser.plist DisableAirDrop -bool YES
###
# Disable AWDL
ifconfig awdl0 down
###
# Disable Handoff
# I'm not sure if this actually has much to do with interference and likely could be removed
defaults write "$loggedInUser/Library/Preferences/ByHost/com.apple.coreservices.useractivityd.plist" ActivityAdvertisingAllowed -bool no
###
# Disable Location services
#
# You can run that command with "read" instead of write to verify the settings and it will show as 0. 1 Will show if it is enabled.
/usr/bin/defaults write /var/db/locationd/Library/Preferences/ByHost/com.apple.locationd LocationServicesEnabled -int 0