0

I'm trying to build a script that auto connects to a given network (providing ESSID and Passphrase) and I want to store them, so when ever it's not connected, It searches for the given network, connects.

The problem is that I know there is like a de facto uniform way of saving the known networks as Network Manager does, but I can't find it explicitly.

I want to save any kind of network and the script will determine the method of connection (if wpa_supplicant or iw-tools, should I use netctl)

So the question is: Where can I find this documentation? or What would be the best way to do it (System or User level)?

Or if there is a tool that allows me to connect to any network with approximately the same procedure?

I'm using Arch <- This is a Meme

But I'm interested on this script working also with FreeBSD.

  • Why do you need a script to do this? All the Linux/Unix OS's I can think of do this already if you check that option in the networks setup. – Michael Prokopec Jan 30 at 18:25
  • I want to integrated with dmenu and i3blocks so the on click events on the i3blocks component, launches a the dmenu script that is runned by this script that I'm trying to write. I want to move away from the NetworkManager Applet. – ekiim Jan 30 at 19:03
  • OK, I understand a little better now. – Michael Prokopec Jan 30 at 19:45
  • I've been checking right now, If I do it with netctl, it's easy, but It won't work in FreeBSD (because netctl doesn't run, not that I know off) – ekiim Jan 30 at 20:00
  • Welcome , The Known AP should be set (stored) under /etc/wpa_supplicant.conf, see 31.3.4.1.3.1. WPA-PSK you need a configuration file wpa_supplicant.conf, the wpa_supplicant and dhclient command to connect. – GAD3R Feb 5 at 11:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.