Wireless connection at logon
I'm a Newbie and I'm wanting to know if it's possible to have a automatic script to connect to my home wireless connection after it has failed to locate an ethernet connection (and before logon).
If so, what details should be in the script and where should the script be placed? Thank you for any assistance you may provide. |
Depends on your distro, but basically you need to set it up before you can connect to the internet. Look for an application, usually under network in your menu, to help you get it set up. You may also need some firmware to be able to use it.
|
Thank you for your response.
My Bad. In the future I will start my message with my distro: Slackware Linux 14.1. Hardware: No name laptop with 8GB RAM,512GB SSD partitioned for Windows 7, two NTFS drives, one swap drive and Slackware drive with LILO boot screen. Network Adapter: Realtek PCIe GBE Family Controller Network Adapter: Atheros AR9002WB-1NG Wireless Network Adapter The "Realtek PCIe GBE Family Controller" I presume to be the ethernet adapter and the "Atheros AR9002WB-1NG Wireless Network Adapter" would be the one that requires the script. Now, I'm confused about whether I should modify "/etc/rc.d/rc.wireless", "/etc/rc.d/rc.wireless.conf", "/etc/rc.d/rc.inet1", "/etc/rc.d/rc.inet1.conf" or some other file... |
The use of "/etc/rc.d/rc.wireless"and "/etc/rc.d/rc.wireless.conf" is deprecated in Slackware 14.1.
You specify that you want to do this before login, which is a little unusual. Most people are happy to login and then set the network interface that they want to use using NetworkManager or wicd (or the command line equivalents nmcli or wicd-client). To achieve your aim, I would add the configuration options for the wired and wireless interfaces to /rc/rc.inet1.conf and then edit /etc/rc.d/rc.M and specify the wired interface as the one that you want to start. Code:
# Initialize the networking hardware. Code:
if ! ifconfig | grep -q eth0 ; then |
Thank you for your response.
It appears to work but when I run Firefox, any website that I try to connect with just display the "whirling circle" in the tab... I think I will abandon this road and be content with using the wicd-client. |
The "whirling circle" suggests that the browser is not able to resolve addresses. You may need to run 'dhcpcd' so that DNS resoulution is properly setup.
You should check the contents of /etc/resolv.conf. |
Thank you for your response.
I've already restored the script files to their original versions and trashed my edits. I would like to thank you for your time and effort but I think I will go with your suggestion: "NetworkManager or wicd (or the command line equivalents nmcli or wicd-client)." |
All times are GMT -5. The time now is 12:43 AM. |