Jump to content

Nloc - network location switcher


Recommended Posts

Posted (edited)

Nloc - network location switcher for Alfred

 

I use the OS X  `network locations` feature quite often. It allows me to comfortably switch between networks, without setting the proxies, DNS and other parameters every time. So I wrote this workflow to do it even faster.

 

Usage:

 

nloc network_location_name

 

Workflow supports autocompletion of known network locations:

z71wioc.png

 

 

Download:

Up-to-date workflow bundles can be downloaded here.

 

NOTE: Due to changes in security policy on OS X 10.8, system _will_ ask you for your password after executing the workflow.

OS X 10.7 system won't ask for your password since it doesn't require the `networksetup` command to be executed with super user privileges.

Edited by Temikus
  • 4 months later...
Posted

For 10.8, there is a workaround. If you put in the sudo command before the `networksetup` command, then it can work seamlessly without needing a password as long as you follow the instructions that I pasted below (it's part of a commented bash script I wrote).

# If you want to avoid putting in a password, then make sure that the
# sudo variable below is uncommented. AND add the following line
# to /etc/sudoers (sudo nano /etc/sudoers) -- type in your pword at the prompt


# USER ALL=NOPASSWD:/usr/sbin/networksetup


# "USER" needs to be replaced with your username (or the username of anyone
# who uses Alfred2 and this workflow.)
  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...