kevva / wifi-password

Get current wifi password
MIT License
617 stars 54 forks source link

Linux Mint - no such directory /etc/NetworkManager/system-connections/' + ssid #10

Open MaxPleaner opened 9 years ago

MaxPleaner commented 9 years ago

in wifi-password/node_modules/linux-wifi-password/index.js, I needed to change line 7 from

var args = ['cat', '/etc/NetworkManager/system-connections ' + ssid];

to

var args = ['cat', '/etc/NetworkManager/system-connections/Auto\ ' + ssid];

(the difference being /Auto\)

I appreciate that this package has taught me where this info is located. I'm not sure which other systems this fix might be needed in as well.

cixtor commented 8 years ago

@MaxPleaner I installed Linux Mint in a virtual machine and tested this, it seems that the network manager adds the word Auto\u0020 to the first "eth0" and "wlan0" it finds, so the modification you suggested is not necessary because Auto\u0020 is part of the name of your Internet connection. Assuming that the name is "Foobar" the SSID will be "Auto Foobar" like this:

$ wifi-password "Auto Foobar"

Also, at the time of writing this comment the command has already changed.