Thursday, June 4, 2009

Multiple running instances of nm-applet! OH NOES!!!

I've always had the notion that wifi support on Linux just plain sucks. And perhaps that's because the few times I have tried to make it work has turned into a tedious exercise of setting SSIDs, whatever keys and what not, not to mention the multitude of security options from WEP to WPA. I've also never particularly bothered with trying to improve my wifi solution on Xubuntu Gutsy install in my Acer Aspire 5920g laptop. That was until yesterday...

The weather yesterday was extremely terrible and with power failures and intermittent internet connectivity issues, I had a chat with a co-worker on how his experience was with wifi and Ubuntu. And he was being straight serious that it was a very painless affair. That perhaps got me thinking of what the bloody hell I was doing with my Xubuntu. I thought it was worth a try to dive in and see what was happening.

I remember having installed wifi-radar a while back as it was, I made a mental note of, the only way I could check for existing wifi hot spots. My friend never had a look at what his Ubuntu was using but after a short inspection he said I should be using NetworkManager.

What's strange is that I already have that running and wifi has always been a nightmare. Checking a bit further, I had noticed from Ubuntu documentation that my wireless setting did not have roaming enabled. And while this was happening, I had tried to manually run NetworkManager from commandline (Mental note: a BIG no-no! That's why this article is entitled like that).

After a reboot, I had found out that I had managed to get the wifi to spot nearby hot spots and connect to my brother's WEP-secured hot spot. I also remembered at that point I had foolishly disabled roaming when I freshly installed Xubuntu. That was real sweet to know, except I had two instances of nm-applet running (you know, the network icon on your system tray!).

After much trouble, I had realized two things. Apart from Gnome having its own startup sequence, XFCE storing my desktop sessions played a part in duplicating nm-applet. Second was that when I ran NetworkManager, it inadvertently let XFCE make a note that I needed to have it running. So, while Gnome would launch the nm-applet as planned, XFCE would start its own. Sweet to know how these problems happen.

In case anyone wonders how to fix that, check your ~/.cache/sessions/xfce4-session-* files. Open them and remove nm-applet entries inside. Save and log out without saving your session.
When you login, you should have only one running nm-applet instance (the one gnome starts).

Alright, that's all for now.

No comments: