autoconnecting wlan on startup without gnome / network

Wirelesnas AntenI usually boot up my ubuntu box with gnome, but sometimes I want to play UT (on a bare x server) or I just want to use my laptop as a server. In those cases I don't boot into Gnome but into the terminal. But the problem is Gnome manages my wireless network card. So no Gnome, no connection.

Some months ago I started searching for a solution for this. I found several options like guessnet, whereami, et cetera. I first tried whereami. But that wasn't a success. I required to much configuration and didn't really felt polished at all.

I stumbled upon guessnet last week. I found it in a thread on ubuntuforums. I installed it and after some fiddling with it, I couldn't get it to work properly. I asked some questions on the forum (nobody answered). So I had to solve it myself. After some trial and error, I managed to come up with a working configuration.

Sorry about the indenting not working. It's this stupid highlighting plugin that does not behave properly.

My original "/etc/network/interfaces":

CODE:
  1. auto lo
  2. iface lo inet loopback

My working config:

CODE:
  1. auto lo
  2. iface lo inet loopback
  3.  
  4. auto wlan0
  5. mapping wlan0
  6. script guessnet-ifupdown
  7. map default: none
  8. map autofilter: true #Look for wlan0- interfaces
  9. map timeout: 9
  10. map init-time: 9 #For slow drivers
  11. map verbose: true
  12. map debug: true
  13.  
  14. iface wlan0-home inet dhcp
  15. test wireless essid USR5464
  16. wireless-essid USR5464
  17.  
  18. iface wlan0-tim inet dhcp
  19. test wireless essid Tim_online closed
  20. wpa-psk 234243242342424
  21. wpa-key-mgmt WPA-PSK
  22. wpa-proto WPA
  23. wpa-ssid Tim_online
  24.  
  25. #If all else fails: pick an open network
  26. iface wlan0-open inet dhcp
  27. test wireless open
  28. wireless-essid any
  29. wireless-mode auto

In the configuration above, the Tim_online network uses wpa security. WPA2 is available too if you want to. Just search the net for it. The interface sections are ordinary /etc/network/interfaces configurations. Except for the "test" statement. This is guessnet specific.

I installed the newer package from Debian unstable. Just to make sure it wouldn't work due to some obscure bug.

The only drawback is that the network applet in Gnome doesn't show the wireless connection anymore. So I can't see what network I'm connected to. For that I have to fire up the terminal (iwconfig).

If you have some questions about it: just leave a comment.

0 comments ↓

There are no comments yet...Kick things off by filling out the form below.

Leave a Comment