Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I move around from the office and elsewhere quite a lot. When I'm in the office, I need a static IP, elsewhere I don't. I have network locations set up, but it's extremely tedious opening up Network Preferences to change it essentially every day.

Ideally I'd like an app where I can just select from the taskbar menu, like I can with Wireless networks, or a way to apply the IP config whenever I connect to that specific network.

I've found paying apps, like Sidekick, which are massive overkill (I don't want to shell out £20 for an app I'll only use one function of), I just want a tiny utility. Is there such a thing?

share|improve this question

3 Answers 3

up vote 2 down vote accepted

You can do that with Network locations. You can defined for example two profiles: work (fixed IP) and home (DHCP).

As you said chancing the location from System Preferences is tedious. However you can do the same from the  menu:  > Location.

enter image description here

share|improve this answer
1  
Oh wow, I didn't know that was there, that's much more useful! –  fredley Oct 15 '12 at 10:05
    
Yes, and it's out of the box ;-) –  Maverik Oct 15 '12 at 10:06
    
Amazing that stuff like this doesn't come up in Google searches! –  fredley Oct 15 '12 at 10:07

Check out something called ControlPlane. I've been using it for a while now and it can automatically change a whole array of settings from networks to printers on your mac depending on where you are like sidekick, but its free and so much better.

Lifehacker and Mac AppStorm featured it not long ago.

share|improve this answer

I found an applescript solution that does what I need. I've tweaked it a bit from the original, but it provides a one-button solution for switching my network location.

Here's the code I used:

tell application "System Events"
        tell network preferences

                set activeLocation to the name of current location

                set allLocations to the name of every location
                copy "Quit" to the end of allLocations

                set deleteFromList to {activeLocation}
                set changeLocations to {}
                repeat with i from 1 to count allLocations
                        if {allLocations's item i} is not in deleteFromList then
                                set changeLocations's end to allLocations's item i
                        end if
                end repeat

                if (text of choiceLocation) = "Quit" then
                else
                        do shell script "scselect '" & (text of choiceLocation) & "'"
                end if
        end tell
end tell

Exporting this from AppleScript as an Application, and pinning it to my app bar gives me a one-button Network Location Switcher.

share|improve this answer
    
Please explain the solution you found, so that this answer can exist autonomously and will still be valid even if your link ever goes dead. –  Gerry Oct 15 '12 at 9:10
1  
@Gerry I've expanded a bit, the code is not copyrighted so I've just copied it all over. –  fredley Oct 15 '12 at 9:13

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.