Sunday, March 15, 2009

NetworkManager settings not shared/specified?

Dear lazyweb, please prove me wrong.

I've been having a quick look at how NetworkManager is implemented and from what i see the public DBUS API is only for querying, not editing there. The edition of new networks et al is to be provided by a separate NetworkManager service that has no common API. This has two consequences to me:
* Users that edit/create connections under KDE don't see them under Gnome/Xfce/wathever and viceversa
* You can not write a desktop agnostic program that needs to modify/create networks as you don't know who you have to talk to <-- This is specially ugly

13 comments:

Rafa said...

Erm... are you into porting knetwormanager to kde4? That'd be sooooo cool... ;)

Albert Astals Cid said...

Not really, i'm just trying to code something that works both on top of knetwormanager and gnome-network-manager (or whatever it's called) and well, it seems that's not possible at all

Unknown said...

Honestly, network-manager has lost me. Wicd is so much better, especially when dealing with WPA2 and some universities's networks. I would love to see a KDE integration of wicd

Anonymous said...

Actually Dario Freddi (AKA drf) is working on a plasmoid frontend to wicd. It should be almost working, as he's going to release it soon.

Kevin Kofler said...

@Rafa: The successor of KNetworkManager for KDE 4 is here. It's still in playground, but it mostly works.

Rafa said...

@tmafcerqueira: can't wait to try it out!
@Kevin: does knetworkmanager depend on KDE trunk, or 4.2?

Rafa said...

Actually what I miss the most in Linux is having a "Location profile" like in MacOS, so with just 1 click I can change my whole network settings depending on where I am...

Will Stephenson said...

Albert: the NetworkManager*Settings DBUS API provided by the user (and system) policy services is of course standard and so is common to any desktop environment.

To write a desktop agnostic config tool you should use org.freedesktop.NetworkManagerSettings.Connection.Update()
to modify an existing connection. I don't know how to add a new connection purely over DBUS. Of course, this relies on the NetworkManagerSettings implementing Update() correctly - Network Management does not yet, since the KCModule and the KDED module communicate settings via KConfig.

Ping me on IRC if you need any more info...

Everyone else: http://userbase.kde.org/NetworkManagement may be illuminating.

Will Stephenson said...

Oh and I should say that the contents of the a{sa{sv}} that Update() takes are where the fun and games begin. I have tried to specify them in the .kcfg files in Network Management (at the URL given by Kevin Kofler) but there are subtle dependencies between groups and elements enforced by the NetworkManager daemon that are only specified by the code of the daemon and the clients. Have a lot of fun...

Unknown said...

@Rafa
I think that knetworkmanager supports profiles (changing the network settings with just one click). You have to configure different profiles and then you can just change them. In wicd, when you configure the network, the configuration is bound to the SSID (and probably to the mac address of the router, too, as there can be different routers with the same SSID). I really recommend that you give it a try

Anonymous said...

@Rafa: regarding "Location Profile" you might have success using SCPM on openSUSE, you can very easily change profiles and with them any settings, not only network.

xpete said...

@Rafa
Please check this:
https://bugzilla.novell.com/show_bug.cgi?id=483196#c1
and post a comment.

Rafa said...

@anonymous & @xpete: I'm not a SuSe user. Well, I have it installed in one machine, but it's a desktop so I don't really need wicd or networkmanager :) Fortunately, seems that someone (maybe one of you) already posted a comment there.

@tmafcerqueira: from what you said, I guess wicd won't solve the problem, since profiles are categorized by SSID, and what I need are global profiles for both wired and wireless settings. Anyone I wanted to try it, but debian packages are giving me some strange dbus errors... I'll look at them later. Anyway I'm also be waiting for knetworkmanager to become stable, so I can compare both :I