NetworkManager with alternate desktops

I use Xmonad. Its simple, its light-weight, and it just works most of the time, i haven't seen it broken between updates. Essentially, the usual set of reasons why we all stick to some piece of software that works. And I've realised lately, that i've been using less of the Gnome Software Stack. For instance, I gave up on using Evolution for gnus,  gnome-terminal for urxvt and so on.

But there is one thing that i love to use from the Gnome stack though, and it is Network Manager. Network Manager has improved so much, and the current version works well and is quite reliable. The downside to using Network Manager though is that it is tightly integrated with the Gnome Stack(viz. ConsoleKit, PolicyKit, understandably so.

So with SLIM as my login manager and Xmonad as the window manager, there are some problems that i enounter from time to time. The latest one being not able to connect to any new wireless networks (debian/testing). Looking at /var/log/messages, i found:

         ** (nm-applet:1715): WARNING **: Failed to add/activate connection: (32) Insufficient privileges.

I figured that it must be a consolekit/policykit problem. I remember from when i was making the move to Xmonad, that i had to launch using 'ck-launch-session', so i modified the login_cmd entry  /etc/slim.conf to:

         login_cmd           exec ck-launch-session /bin/bash -login /etc/X11/Xsession %session

And in  ~/.xsession file i run:


And after i logged out and logged back in, Network Manager is back in action again.

Alternatively, one could create a file /etc/polkit-1/localauthority/50-local.d/org.freedesktop.NetworkManager.pkla containing:

And make sure that the user you intend to provide access to is in the netdev group. The above file gives permission to everybody in the netdev group. Personally, I prefer the former, since I think it is the "right way"[TM] to achieve what i want to. But again, this is Linux, and there is no one way to do anything. So feel free to chose what you prefer doing.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s