Friday, September 26, 2008

How to set up wireless in Hardy Heron ubuntu

In this post I shall tell you how I got wifi to work on an Aptiva desktop with an Atheros wireless card on a brand-new installation of Hardy Heron 8.04 Ubuntu Linux. But first, I am compelled to recap all of the bad and failed advice I found on the web:
  1. Just use Network Manager, and you're all set.
    I found this to be a most annoying experience. Network manager seemed to keep forgetting my ESSID and key after I had typed it in. I'd do the network start thing, or reboot the computer, and still no wifi. Frankly, Network Manager didn't work on ubuntu version 7.04, either.
  2. Try Network Manager, and if that doesn't work, try this advice regarding the Windows driver ...
    This is horrible advice. It has folks going to try something hard (like locating the CD's with your Windows drivers) and unnecessary (Network Manager is broken, you should use other means).
  3. Go download this program ...
    Helllloooo! We're talking about a way to connect to the internet! How is someone supposed to download anything?!
  4. Edit your interfaces file by typing sudo gedit /etc/networking/interfaces
    This was obviously typed by an experienced user of ubuntu. Someone so experienced that he forgot that Hardy Heron (the kubuntu version at least) does not "come with" the gedit application. This won't work for a new install.
It seems that anyone can give advice on the internet, (uh, including me!)

So here's my advice. First of all you will want to edit the file /etc/networking/interfaces as root or as superuser. In Hardy Heron, this can be done by right-clicking on the file, as shown in this screen grab below. You can click on the image to see it full size.

Now, edit the file to look like this. Note that the double-spacing is not required (or helpful). I needed to insert double spaces in order to get the file to look properly in my browser:

auto lo

iface lo inet loopback



auto ath0

iface ath0 inet dhcp

wireless-essid [insert your wireless essid]

wireless-key [insert your wireless key]

Then, open a Konsole or command window, and type:
sudo /etc/init.d/networking restart

And now you should be all set.

No comments: