mrodalgaard / alfred-network-workflow

Show and change your network settings
MIT License
261 stars 18 forks source link

Popup window asking for account username/password appears upon choosing a WiFi network #2

Closed Jyqft closed 5 years ago

Jyqft commented 8 years ago

First of all, this is a great workflow. Thanks for making it.

This popup window keeps appearing whenever I choose a WiFi network. It's a hassle to keep on inputting account details every time you want to switch WiFi networks.

I just tested the command networksetup -setairportnetwork en0 <SSID> <SSID Password> in Terminal—I typed my SSID and SSID Password myself—and it didn't prompt me for my account details. It looks like the security 2>&1 >/dev/null find-generic-password -ga "$1" part of the code in ap.sh is the one causing the account details popup window to appear.

Is it possible to modify the workflow such that selecting a WiFi network would not display the popup window and just proceed with the next steps? Similar to how you can just click the WiFi menu bar item and pick the SSID you want and not get prompted by the OS for your account details.

Thanks.

mrodalgaard commented 8 years ago

Hi @Jyqft,

I am aware of the popup when switching access points. The problem is (and also why security is used) is that I do not want the user to type in the access point password every time he/she selects a new wifi. security 2>&1 >/dev/null find-generic-password -ga "$1" extracts the password from Keychain. I am looking into using AppleScript to change wifi instead, hopefully without inputting the password.

Thank you for the feedback. If you want to contribute; try to change access point using AppleScript or similar without using root or inputting password and share you solution or create a pull request.