Showing posts with label Wireless. Show all posts
Showing posts with label Wireless. Show all posts

Tuesday, February 23, 2010

Wireless just works better with WICD than Gnome Network Manager

As I mentioned in my post about getting Ubuntu to start your wireless connection before login, Gnome Network Manager has to be uninstalled so that Ubuntu will rely on your /etc/network/interfaces file to start up your wireless connection. This worked great for me and my Ubuntu laptop until I started having to take my laptop away from home and use other wireless networks. In order to connect to other wireless networks, I would have to set my /etc/network/interfaces file so that my wlan0 interface relied on dhcp instead of static settings. I would then have to re-initialize my networking settings and then use the command-line to scan for dhcp requests on my wireless interface. This was no good!

To remedy the situation, I discovered another graphical network manager called WICD. The version in the Ubuntu repositories was actually a bit buggy, so I went directly to the WICD launchpad website and downloaded the latest release (version 1.7.0). I've tested it out at home and away and I can now say that it works quite nicely. WICD allows Ubuntu to start up my wireless connection before the Login screen. It also allows me to connect to other wireless networks despite the settings in my /etc/network/interfaces file.



As you can see above, WICD puts an icon in your system tray with a green indicator bar that tells you how good your signal is. If you hover your mouse over the icon it tells you what network you're connected to, what percentage signal strength you have, and what your IP address is.



Above is the window that pops up when you left click on the WICD icon in the system tray. As you can see, the window contains information about all available wireless network SSIDs in your vicinity, how strong the signal is to those networks, and what type of encryption (if any) protects each network. You can click on the properties button for any network that you want to connect to if you have to put in a wireless encryption key. The screen that pops up follows



Once you're ready, you can click on the Connect button and you're on your way!

Setting Up WICD

As I mentioned above, I first installed WICD from the Ubuntu Repositories. I think this forced my computer to install all the appropriate dependencies so that the newer version could work. When you download the newer version, extract it to whatever directory you want. Then, open up your terminal, navigate to the directory with the WICD setup files that you just extracted, and type in sudo python setup.py install. Now, when you restart your computer, you should see WICD in your system tray ready to do your bidding.

Tuesday, February 9, 2010

Start your wireless connection before Ubuntu login

Recently I started asking myself how I could get Ubuntu to forge its wireless connection (with WEP encryption) to my router without having to log-in through the GUI. I noticed that the default way of logging in through the GUI and then having a wireless connection available was limiting for two reasons: (1) If I wanted to be able to connect to my openSSH server then I needed to be logged in, and (2) If there was something wrong with the GUI and I had to log-in through the command line then I wouldn't have internet access.

So I started looking around on the net. Most pages that I found showed messageboard threads suggesting modifications to the /etc/network/interfaces file. This is the file that is supposed to tell your Linux system what to do with your network interfaces at boot-up. I tried to modify it so that my wireless card would start-up with a static IP at boot-up, but no matter how I changed this file, nothing worked.

Finally, I decided to ask a question on ubuntuforums. I found out that Gnome Network Manager, the program in Ubuntu which manages all your wired and wireless network connections, works terribly with the settings in the /etc/network/interfaces file. In other words, if you want Ubuntu to start your wireless connection at bootup instead of after login, you have to get rid of Gnome Network Manager!

So, on the advice of chili555 from ubuntuforums, I got rid of Gnome Network Manager by typing in sudo apt-get remove --purge network-manager and modified my /etc/network/interfaces file to look like the following (SSID and WEP key changed for privacy):

auto lo
iface lo inet loopback

auto wlan0
iface wlan0 inet static
address 192.168.2.11
netmask 255.255.255.0
gateway 192.168.2.1
wireless-essid MYSSID
wireless-key 12345678912345678912345678

iface eth0 inet dhcp


Now, every time I start my computer, my wireless connection is available before login so that I can login to my openSSH server or go to the command-line without logging in to the GUI!