Linux Wi-Fi Works with wicd
July 11, 2008
If you find yourself more confused than connected when you're using a Linux laptop, wicd may be the ticket.
Wireless management on Linux is a bit of a hodge-podge, especially for roaming users. NetworkManager, KWifiManager, and various other utilities that have come and gone all attempt to make managing different network connections easy. NetworkManager and KWifiManager do a pretty good job, though you often have to finick and fuss a fair bit. wicd (pronounced "wicked"), the wireless interface connection daemon, tries to do the job better, so we're going to give it a test drive.
The short story is: on a system with a single supported wireless interface it works very well. I like it better than NetworkManager, which to me is vexing; I always remove it. It's similar to KWifiManager, which I like a lot. Some differences are wicd only creates profiles for wired interfaces, while KWifiManager manages wireless profiles. But KWifiManager requires root privileges to create profiles. KWifiManager seems less picky about interfaces. I tried it on two Thinkpads: an older R32 and a newer T61. The R32 runs Debian Testing, and has an antique, onboard Prism 1 wireless interface. The T61 has the onboard Intel Pro 3945ABG wireless chipset, and runs both Sidux and Kubuntu Hardy Heron. I also have a PC Card Atheros-based wireless G interface.
KWifiManager is happy on both machines and with all interfaces. wicd, on the other hand, had problems with the ancient Prism 1 interface, and it wasn't too sure about the wireless PC Card either. There may have something about Debian Testing that it didn't like, because it performed perfectly on the T61 in both Sidux and Kubuntu.Installation
wicd is included in Zenwalk and Linux Mint, and I expect more distributions to follow.
If you're using NetworkManager, which is the default on a large number of distributions, or any other wireless connection daemon, you need to remove it. There can be only one.Initial configuration
You should first have a working wireless interface. Then make sure that none of your wireless network interfaces are configured. In Debian, Ubuntu, and all the extended Debian family, /etc/network/interfaces should look like this, because you must always have the loopback device configured:
auto lo iface lo inet loopback
wicd is also supposed to manage wired interfaces if you choose, but I had some problems with it, so I configured mine manually. So leave all interfaces that you want wicd to manage un-configured.
On Red Hattish Linuxes (e.g. Fedora, CentOS) the insanely over-complicated configuration file structure means it's easier to use a graphical network configurator, like system-config-network. Or if you want to do it the hard way, rename your wireless /etc/sysconfig/network-scripts/ifcfg-eth* file to /etc/sysconfig/network-scripts/ifcfg-eth*.bak.
Figure 1. Click for a larger image.
Somewhere in your applications menu should be a nice wicd icon, or you can launch it from the command line with /opt/wicd/gui.py. I don't know why anyone would want to type all that, but now you know what it is. If you want a simple launch command like wicd you'll have to create a Bash alias or some such. When you open wicd you'll see something like Figure 1.
If you are in range of several wireless networks, all of them will appear on this page. You can hit the refresh button to make sure you're getting all of them.
Finally, you'll need to know which wpa-supplicant driver your wireless interface uses, and select it from wicd's preferences menu. wext is a generic driver that works with a lot of wireless interfaces, but it's usually better to select the driver for your interface. You may also need to configure your wireless interface name on the Preferences page. How you do know what these are?Identifying a wireless interface
To find the name of your wireless interface:
$ /sbin/iwconfig[...] wlan0 IEEE 802.11g ESSID:"" [...]
Non-wireless interfaces will say "no wireless extensions". To figure out what your wireless driver is:
$ lscpi -i | grep wireless03:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG NetworkConnection ( rev 02 )
A Google search on 'intel 3945ABG linux' goes to the IPW3945 page, which informs us that it is deprecated and replaced by the iwlwifi project. The Preferences page does not include anything that sounds like iwlwifi, but it does have ipw, which works fine. You could also refer to this table in the wicd Wiki. If there is an easier way to get this information, I'd love to hear it. And perhaps someday wicd will automatically find it on its own.Profiles
From here it's all gravy. Every time you're in a new location, wicd will scan and locate all available networks for you. Connect with a mere click on the Connect button, and with luck a little connection icon will appear in your systray. (If it doesn't, the FAQ tells you how to fix it). If you hover your cursor over it, or click on it, you'll see complete connection statistics. The Wicd Manager interface is a bit confusing, because the Connect button does not change to Disconnect, though there is a Disconnect button up top. As you can see in Figure 1, connection status is also displayed at the bottom of the Wicd Manager screen.
Encryption key management is a very nice feature, though it still has some rough edges. If all goes well, all you need to do is select the correct type of encryption and then enter the appropriate authentication information, such as the path to your encryption key, login and password, whatever you need to do. If you can't make it work, you may need to edit the encryption templates in /opt/wicd/encryption/templates. If you're experienced with wpa_supplicant it won't be a big deal, and the best help resource is the wicd forums; you'll find plenty of help there with any encryption problems.Additional resources:
- Chapter four of my own Linux Networking Cookbook goes into detail on managing and configuring wireless encryption
Article courtesy of EnterpriseNetworkingPlanet.