Description: This is a simple shell script, that will connect to a predefined wireless network.
It's designed for use on Arch Linux, though can easily be modified for any other Linux. Please bear in mind that this is highly likely to interfere with any network manager you may have running.
It contains example lines to connect to unencrypted, WPA, WPA2 and WEP (With hexadecimal and ascii key) networks. All you need to do is comment and uncomment the various lines, input your network's name (and key if needed), run the script, et voila! You're connected.
I originally intended it to be a launcher on a panel. It makes use of sudo, so anyone can use it, but this means it needs to be launched in a terminal. I think this is the best way, since you won't know if it failed or not otherwise, so if/when you create a panel launcher for this, please make sure it's set to 'Application in terminal'
Other notes:
-If you are connecting to a WPA/2 network, you'll need to edit /etc/wpa_supplicant.conf yourself. The comments in the script also mention this, just in case.
-If you don't use dhcpcd to obtain an IP address automatically, you'll need to find out what you use, and refer to it's documentation so you know how to use it in a script.
-If you manually assign your network's IP addresses, again, you'll have to do this manually.
Ratings & Comments
0 Comments