Jump to content

Nloc - network location switcher

Recommended Posts

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.




nloc network_location_name


Workflow supports autocompletion of known network locations:





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

Share this post

Link to post

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.)

Share this post

Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...