Solved

How to set up to automatically disable Wireless whenever the Macbook connects to the wired?

Posted on 2014-10-14
2
187 Views
Last Modified: 2014-10-31
While my MacBook connects to my network cable through the Thunderbolt, I found the WiFi connection is still on. Is there a way to automatically disable the WiFi whenever the wired connection is connected?
Also, when both wired and wireless are connected, which connection is utilized? Is it the wired or the wireless, or both in the end?
0
Comment
Question by:Castlewood
2 Comments
 
LVL 16

Assisted Solution

by:Joshua Grantom
Joshua Grantom earned 250 total points
ID: 40380518
You can change the service order of networks under System Preferences > Network. Then hit the gear icon in the bottom left.

If you have Ethernet above Airport, if a wired connection is available, it will use that network before the wireless.

No need to disable wireless
0
 
LVL 29

Accepted Solution

by:
serialband earned 250 total points
ID: 40380988
Here's a site with a launchdaemon that calls a script to do that.

http://www.heatxsink.com/entry/turn-off-airport-when-ethernet-is-plugged-in-on-osx
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
    <dict>
        <key>Label</key>
        <string>com.heatxsink.jackedin</string>
        <key>ProgramArguments</key>
        <array>
        <string>/Library/Scripts/heatxsink/jackedin.sh</string>
        </array>
        <key>StandardOutPath</key>
        <string>/var/log/jackedin.log</string>
        <key>StandardErrorPath</key>
        <string>/var/log/jackedin.log</string>
        <key>Debug</key>
        <true/>
        <key>WatchPaths</key>
        <array>
        <string>/Library/Preferences/SystemConfiguration</string>
        </array>
    </dict>
</plist>

Open in new window


#!/bin/sh
ETHERNET_INTERFACE="en0"
AIRPORT_INTERFACE="en1"
DETECT_INET=`ifconfig $ETHERNET_INTERFACE | grep inet6 | tr -d '\t' | cut -d ' ' -f 1 | tr -d '\n'`

if [ "$DETECT_INET" = "inet6" ] ; then
        /usr/sbin/networksetup -setairportpower $AIRPORT_INTERFACE off
        echo "Wired ethernet detected, turning off Airport."
        exit 0
else
        /usr/sbin/networksetup -setairportpower $AIRPORT_INTERFACE on
        echo "No wired ethernet, turning on Airport."
        exit 1
fi

Open in new window

http://hints.macworld.com/article.php?story=20100927161027611

You can also use a 3rd party app to detect
http://www.symonds.id.au/marcopolo/
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
mixing mac for outlook and mac for windows 5 76
antivirus on mac 8 80
Mac users not seeing updated files on web site 3 39
How can I disable my MacBook cd dvd drive? 9 62
If you other experts are anything like me you are always looking into and testing out new features. While I was doing some research one day I ran across an app that I installed on my Mac and used as a security system. Mac OS X: SecureHome uses your …
Do you come here a lot? Are you lazy like me and don't want to go through the "trouble" of having to click your Dock's Safari icon and then having to click your Experts Exchange Favorites bookmark to get here? Well then this article is for you.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question