Today I accidently figured out how to do this in Ubuntu Karmic 9.10
The simple answer is using wicd
wicd is an alternative to network manager applet. If we install wicd ubuntu karmic offers to remove existing network manager. If we proceed, ubuntu offers our user to be added to netdev group. I checked my user to be added into netdev group and then clicked forward. Done, wicd got configured. Following screenshot shows the debconf option for adding user to netdev group
Now I logged out (of course, I still use Ctrl + Alt + Backspace) and logged back in, to see a small wicd applet in place of network manager applet. Clicked it and configured my wifi settings. To ensure we are connected to wifi router even before gnome logs in, we need to check "Automatically connect to this network"
After this I checked if I am connected to network by rebooting Ubuntu Karmic 9.10. When I went to virtual console before logging into gnome and pinged google, I was able to ping it.This is it, the easy way to connect to network before even logging into gnome
Here are the screenshots
Screenshot showing how to make wicd connect to network automatically
Screenshot showing how to configure WPA passphrase in wicd