Tuesday, January 27, 2015

macos - How to automatically disconnect from a wireless network, when connected to the Internet over ethernet?



I have a Retina MacBook Pro, that connects to a wireless network at work for intra- and internet access. I also regularly plug in an ethernet cable to access the same network. In my Network preferences I've ordered the USB Ethernet connection above the Wi-Fi connection, so my computer should prefer the ethernet connection. However it still connects to the wireless network, burdening our wireless router for no reason.



How do I configure my Mac to automatically disconnect from the wireless network, when it's connected to the Internet over an ethernet connection?




Related: Is there a way to stop my Windows 7 laptop from connecting to the Wi-Fi if the ethernet cord is plugged in?


Answer



Head over to this page. A guy by the name of heatxsink made a pretty handy script that will toggle your wifi on or off depending on the status of your ethernet connection.



You can add your own growl notifications pretty easily if you want. Also make sure to follow every step precisely as the script relies on filenames and locations of the files.



Other options: You can try out ControlPlane. It seems promising to fill your need for automation.


No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...