Search This Blog

Friday, July 15, 2011

Some clarifications about Plasma NM usage

I was reading this blog post and felt that I had to explain some things to Plasma NM users. Firstly, the easiest way to add a wifi connection is by clicking on the tray icon, then on the connection name, fill in the encryption key (if necessary) and click Ok. Three clicks, the same number as MacOS like the other blog's owner described.

When you click on the tray icon and there is no wifi connection configured the "Show More" button is automatically toggled:



Clicking on my home network:


Writing encryption key and set it to connect automatically:


And after clicking on Ok button:



Here you can see that the "Show More" button is not toggled anymore because now there is a wifi connection configured. This is done to prevent the connection list to be crowed. You can always list all APs available by clicking on the "Show More" button.

One obvious problem in the connection list is that it is not sorted in any way. I already tried to solve this problem but I will have to refactor some internal classes before I can implement it efficiently. Toggling the connection list is CPU intensive because the way it is implemented.

Quoting same statements from the other blog:

"You connect not by clicking on an available network, you do it by clicking network manager."

This is not true, you can click on the available network too. The bug that prevent it from working was fixed three months ago. What must be your problem is that your distribution, OpenSuse, includes a very old Plasma NM snapshot from November of last year in OpenSuse 11.4. There have been dozens of bugs solved since then, including that one. If you want to use a more up to date Plasma you must upgrade your OpenSuse packages or compile Plasma NM by yourself. Honestly I prefer to compile it, it is easy and even today OpenSuse and other distributions are a bit slow to catch up with all the bugfixing that is going on in Plasma NM. For instance, the packages in the link above are more than two months old now, if you take into account there have been two KDE SC releases during that period that is a bit old.

If you want to compile Plasma NM by yourself do the following:
  1. install git, make, g++, cmake, qt devel libs, kdelibs devel, kde-workspace devel, NetworkManager devel and their dependencies.
  2. Execute: git clone git://anongit.kde.org/networkmanagement.git
  3. mkdir networkmanagement/build
  4. cd networkmanagement/build
  5. cmake -DCMAKE_INSTALL_PREFIX=/usr ..
  6. make
  7. make install
  8. That is it.

If you want to use the NM-0.9 execute 'git checkout nm09' before step #5.

"Later, to finish the process, I need to hit OK a couple of times and then I get back to the desktop. But I am not connected yet. I need to go back to the Wireless icon on the system tray and now I am able to see the new connection I added through the prior steps. Once I click on it, the setup will finally end by connecting to the wireless network."

You did not checked the "Connect automatically" checkbox. NetworkManager will not connect automatically without that. I wrote NetworkManager because it is NetworkManager daemon and not Plasma NM (nor nm-applet) that triggers the auto-connection process. Only the manual connection process is triggered by NM's clients (Plasma NM, nm-applet, etc). Some people have already complained about the connection editing process, but I do not plan to change it anytime soon.

One user commented in the other blog: "I also still have problems with knetworkmanager/plasmoid, mostly because of creating new connections. for example I am still unable to create "system connections", because that checkbox is greyed out, and there is no possibility (perhaps except login as root) to activate it."

This is not a Plasma NM bug, it is your distribution that disabled "system connection" checkbox. We have nothing to do with it. Ubuntu is one distribution I know that does disable the "system connection" checkbox.

Another user mentioned the fact that kwallet asks for password to open it. Well, you can disable kwallet's password and that is it. But what would be cool is if kwallet is opened when user logs in kdm. Well, someone is working it: KDE bug about single sign-on. Unfortunately things are too calm in that bug entry. I hope the guy that has been working on that bug has not given up.

Another problem we from Plasma NM face is the fact the NetworkManager specification lacks some details that are crutial to make things work properly, specially with VPN. NetworkManager thoroughly tests all connection parameters and invalidades the connection if one check fails. The problem is that there is no documentation about the tests. The only way we can know for sure which setting is allowed in a connection is reading NetworkManager's source code, which is not easy to read. After several times having to resort to reading NM's source code I can say I am getting used to it. Two weeks ago I even sent a patch to NM mailing list to partially fix this nasty bug. Now I just need NetworkManager's maintainers to apply the patch or improve it and finally fix the problem that prevents Plasma NM nm09 to change connection secrets (encrpytion keys, passwords, etc). We follow NM-0.9's specification but it seems NM daemon does not when it calls the secret agent to save the old secrets instead of the new ones. If you are wondering why this problem does not happen with nm-applet, I also would like to know why. The fact that nm-applet and NetworkManager share the same developers makes things easier for nm-applet, of course.

Plasma NM still have several bugs to fix and features to implement. We are working on them when possible, some are more easier to fix so they are being fixed first. From time to time we implement a new feature in the nm09 branch, if it is easy to backport it we backport it to master, where NM-0.8 code is. I know, we need to move the NM-0.8 code from master to a nm08 branch, someday we are going to do it.

By the way, last Wednesday was my anniversary :-D in the International day of Rock, oh yeah!!! hehe.

29 comments:

Unknown said...

Yeah way to tell em! Personally, I've been quite happy with Plasma-NM.

I thought people knew not to bitch about issues without trying the latest stable version first... O_o

Oh and congrats on your anniversary.

Anonymous said...

Thanks for all your work on Plasma-NM, Lamarque. It is very much appreciated by all KDE users!

Anonymous said...

Thank you for your work on Plasma NM. Its 0.9 branch has improved considerably after the initial fallout and it's very usable right now. I am quite happy, though I am not a VPN user (yet).

Keep up the great work, we really appreciate it!

Anonymous said...

openSUSE users can open YaST > Sofware > Software repositories > Add... > Community List > KDE Updated apps. (http://download.opensuse.org/repositories/KDE:/UpdatedApps/openSUSE_ + your distro version and update their plasmoid-networkmanagement package from there.

If you want even more recent packages, you can get them at playground.

BTW. Are there actually any pnm releases or are distros expected to take some snapshot and hope it works?

Aurélien Gâteau said...

I agree with you, except for the "Show More" button. It needs to go.

What happens right now is that whenever the applet can't find the network I am looking for, I click the "Show More" button just in case it makes the network I am looking for appear. I have witnessed others doing that and I don't think it is the expected behavior.

I understand the need of ensuring a recently used network stands out among the list of available networks. I would suggest instead to introduce a separator in the list instead. Something like this:

* RecentlyUsedNetwork1 [=====]
* RecentlyUsedNetwork2 [===__]
----------
* NeverUsedNetwork1 [====_]
* NeverUsedNetwork2 [==___]
* NeverUsedNetwork1 [=____]

Lamarque said...

@shocklateboy @Anonymous, @Mutlu thanks.

@kdeatopensuse, distro are expected to take snapshots and hope it works, at least for now. I also hope it keeps working with NM. I do not have all the network interfaces to test all the source code and since NM's specification is not complete sometimes we implement something that NM does not expected and things break. Fortunately, there have been very few problems like that with NM-0.8. With NM-0.9 that is still a problem for some VPN connection types and more recently to change secrets.

By the way, since Plasma NM implements a vital feature for KDE you could take a new snapshot each time KDE SC is released. Users already expect a new Plasma NM when KDE SC is released. And I am working hard to make things work, if they are not is because of lack of time or information about how things are supposed to work. Help is appreciated.

One last thing, where exactly is the directory for Plasma NM in http://download.opensuse.org/repositories/? Looking at it I easly found the packages with the old snapshot from November of last year (http://download.opensuse.org/repositories/KDE:/Distro:/Stable/openSUSE_11.4/i586/) but not the new packages.

@Aurélien Gâteau, as I said the "Show More" button is there to not crowd the connection list. For non-wifi users like me (I also use 3G) that is very usefull, otherwise my 3G connection would appear among teens of non-interesting AP names. I like your idea for sorting the connection list, I need to think about how to implement it. Sorting different connection types requires several lines of code just for the sorting function. The fact the list is stored in a QHash does not help. If you are a programmer you must know hashes are not easy to sort effitiently.

Anonymous said...

I think it would make sense if you could recommend snapshots. Taking them when KDE SC is released is not precise, the day it is released, the day it is tagged, the day RC1 is taken… If you'd recommend a certain snapshot then distros would have something to rely on rather than take a snapshot and hope they are lucky. And you would get less avoidable bug-reports to deal with. You know pnm best, so if you do not know which snapshot would be best – who should? :)

To find the packages available via the buildservice it's easiest to use the software search:
http://software.opensuse.org/search?q=plasmoid-networkmanagement&baseproject=openSUSE%3A11.4&lang=en&exclude_debug=true

As you will see there is not only one repo though most repos share the same pnm version.

The openSUSE version in the repos below has nothing to do with the version of the source tarball used for the packages in that repo but just against what distro they were build. So openSUSE_11.3 and openSUS_11.4 will share the same source tarball within a repo but the packages are e.g. build against different versions of NM, i.e. those versions shipped with the regarding distro version.

Regarding the pnm version in repos:

There is the version that was officially shipped with the last openSUSE release in KDE:/Distro:/Stable/.

If there is an official (security/major bug)update a more recent version might be in http://download.opensuse.org/update/

Those are the official packages, i.e. supported by openSUSE and if there is an issue with those an official update is possible after one filed a bug at bugzilla.novell.com or notified the KDE devs at openSUSE.

Next there are repos with unofficial packages, i.e. users can use them but they are served as-is.

Each major KDE release has its repo, i.e. http://download.opensuse.org/repositories/KDE:/Release:/45 46 47 etc.

There is a repo for unreleased major KDE releases, i.e. currently 4.7 RC 2: http://download.opensuse.org/repositories/KDE:/Unstable:/SC/

And there is a repo for the KDE version that is going to be part of the next openSUSE release, currently 4.6 because 11.4 shipped 4.6 but it will change to 4.7 soon. That repo is what openSUSE KDE devs work on mainly. KDE:Unstable and KDE:Release are more community-driven but openSUSE KDE work on those as well KDE:Release shares a lot of packages with KDE:Factory.

And finally there is Playground which includes untested and unreleased snapshots. http://download.opensuse.org/repositories/KDE:/Unstable:/Playground/

Al ist with all repos can be found here:
http://en.opensuse.org/KDE_repositories

If you see an issue with the openSUSE packages of pnm, please do not hessitate to write an email to the KDE mailinglist at openSUSE, i.e. opensuse-kde@opensuse.org or drop-by on IRC #opensuse-kde. Look out for the nicks cartman and Bille/wstephenson, those two are the main KDE devs at openSUSE.

HTH!

Aurélien Gâteau said...

@Lamarque: I have been thinking a bit more about that "Show more" button. I think part of the problem with this button lies in the fact that its label does not give an indication as to why a network would appear in the "Show more" list.

If I understand it correctly, in "show more" mode, all connections are listed whereas in "not show more" mode, only recently used connections are. Is this correct?

If so I suggest either:
- replacing the button with a combo box with two entries: "Show Recently Used" or "Show All"
or
- removing the button and replacing the title with two horizontal radio labels: "Recently Used Connections" and "All Connections".

Still, I believe getting rid of the button and grouping recently used connections at the top would look more streamlined.

I agree sorting connections is not easy if they are kept in a QHash, is it complicated to change that? On the other hand, I don't think one will ever get more than two or three dozens of connections, so the way the connections are stored shouldn't have a perceptible performance impact at sorting time.

Prometheus said...

Regarding the list of accounts problem. “Currently” the left hand side of the plasmoid is occupied by some interface overview features.

So maybe it is a good idea to list the available connections in the left hand pane, the configured connections in the right hand, and convert the show more button into a button (or multiple) which toggles between connection lists and the interface overview features.

So instead of a show more button you'd have a show interfaces button.

Lamarque said...

@kdeatopensuse, I started to post the bugs fixed in Plasma NM as a indication for others, specially distribution packagers, of what were fixed. The posts are near each KDE SC release because people tend to follow them, so it is logical for me to do the same. Well, I can also add the exact commit number I recommend to use, that would make things precise.

I use only branch nm09 now and most development is going on only there. The master is basically in maintainance mode, only bug fixes, no new feature added. You can use the current master since there will be few changes in it in the next months. I have fixed most of the crashes I could reproduce, so it can be considered stable.

@Aurélien Gâteau, "Show more" indicates it will show more items in a connection list, so it will show more connections :-) And no, you got it wrong, when it is toggled it shows more wifi access points. To be precise it shows the APs that have not been configured yet. There is nothing to do with recently used connections.

None of your two suggestions reflect how the "Show More" button works. "Show All" is Ok, but we should change the text change the button is toggled and "Show Less" fits better to "Show More".

I do not like to have tens of connection names that I do not care about listed in the main window. I prefer Plasma NM to show only the ones I configured. If i want to list all other connections one click does not seem that difficult to use.

The problem to sort the connection list is not only the CPU time. To sort a hash you need to store it a temporary structure (array, linked list, binary tree, whatever). The big problem is that the list is in constant updating (items are added and removed constantly), if one of the items is removed during sorting there will be a crash. That kind of situation is the source of several crashes in Plasma NM I have fixed this year. I need to refactor the internal classes to prevent them from happening.

@Prometheus, I do not plan to change the GUI anytime soon.

Anonymous said...

It would have been interesting if we could force the refresh of the connection list.
Indeed, sometimes when going to the connecvtion list, my wifi connection ( from my mobile ) doesn't appear.

Lamarque said...

We receive the list items from NM, if it not refreshing then it is probably a incompatibility between M and your wifi card.

Aurélien Gâteau said...

"""
@Aurélien Gâteau, "Show more" indicates it will show more items in a connection list, so it will show more connections :-) And no, you got it wrong, when it is toggled it shows more wifi access points. To be precise it shows the APs that have not been configured yet. There is nothing to do with recently used connections.

I do not like to have tens of connection names that I do not care about listed in the main window. I prefer Plasma NM to show only the ones I configured. If i want to list all other connections one click does not seem that difficult to use.
"""

It is not about being difficult, it is about bringing confidence in the software. Right now this button puts the user in a state of doubt: he has no idea why a particular connection would be listed in "show more" or "not show more". Removing the button would fix that, and with a separator in the list you would still get the connections you care about listed first.

I understand you are probably not going to get rid of the two modes, though, but at least the user interface should be changed to express the used criteria. If I understand it correctly (second try!), the criteria to appear in "not show more" mode is not "recently used" but rather "used at least once". Is this correct? If so, it is probably too long to fit as separate radio buttons unless you are willing to put each on its own line. Turning the button into a combobox with two items: "Show all connections" and "Show connections used at least once" would work, I think.

Lamarque said...

I am not goint to change the GUI anytime soon. Period.

Petz said...

Could you please tell me what plasma theme you use and where I can find those gorgeous window decorations? :)

Thanks in advance

Lamarque said...

I have gathered parts from other themes to create that one. There are parts from Oxygen (task manager's theme), Elegance (most of the theme is from this one) and Kaleban (system tray's theme). The icons are the old colored icons (you just need to rename the directory /usr/share/apps/desktoptheme/default/ for them to be the default icons). I also gathered icons and widgets from other themes but I do not remember from what themes.

The window decoration is Aurorae/FormaN.

You can search for the themes using Get Hot New Stuff button in systemsettings -> Desktop Appearence -> Desktop Theme

Petz said...

Thank you very much. :)

Ben said...

>I am not goint to change the GUI anytime soon. Period.

The feedback from Aurelien was too constructive to be thrown away...

Explaining the GUI is good but making the GUI more intuitive would be welcome. There's obviously a problem with the "Show More..." button which confuses the users. A simple change would help many users, just keep it in mind and do not take the suggestions as a critisism :)

Lamarque said...

@Ben, I already wrote in the post that I am not going to change the GUI. What you both are doing is insisting that I should change it now. I am not going to do it for a number of reasons: I did not creat it; I am not the responsable for it, talk to Sebas if you want changes in the GUI; I see more important things to solve in Plasma NM; I already did more than I should have, the time I spent in Plasma NM already did damages in my plans for this year; I am not going to do things I do not see really necessary now. Feel to implement the changes yourself and send the patches to git.reviewboard.kde.org. If the implementation does not cause too much troubles I can commit them.

I do see the suggestions as criticism, the GUI is not my work. Even after I wrote twice the "Show More" button is about if the connection is configured by the user he still insisted it had something to do with "most recently used". It has not, you can configure a connection and never use it, it will still be shown when the "Show More" button is not toggled because what matters is wether the connection is configured or not. The discussing was going into circles, which is not productive, adding a combo box in the main window is a really bad idea too. Since I already made my decision and I am not the reponsable for the GUI it is useless too.

Ben said...

I think that none of us asked you to perform a change now or later, it is just a discussion about usability.

It is fine of course if you do not perform the change. The amount of work you are doing for Plasma NM is very much appreciated!

I guess, it is just a matter of communication. If you talk about the GUI (that's actually the topic of your blog), some people will offer some help and provide a constructive discussion. If you do not wish to discuss it, the clarification about responsabilities is needed :)

Anyway, you have clarified it, thanks! Great that the Plasma-NM is getting so much care and hopefully Sebas or other people will take care of the GUI :)

Unknown said...

Thank you Lamarque for your response to my blog post. This problem that I had was something I filed as a (BUG) as you can tell from the title. I simply wanted to show that for someone who knows little about the internet connecting to it through NM could be daunting. Would you say that there are simpler ways to get connected to the internet through NM? Can some steps be slimmed down and made more clear cut?

Aurélien Gâteau said...

@Lamarque: I didn't want to criticize your work and I am sorry if I hurt your feelings, that was not intentional.

I know you did not create this GUI (I contributed a bit to PNM in the past), but judging from your quite impressive activity on this component I assumed you had basically taken over its maintenance, that's why I thought you would be interested in some feedback and suggestions regarding the GUI.

Did I got it wrong one more time when I said the criteria for a connection to appear in "not show more" mode is "used at least once"?

I will see if I can find some time to work a bit on it and propose some patches. Rest assured your work on PNM is very much appreciated.

Lamarque said...

@Andy the procedure I described in the post is only three clicks long, I think that is pretty easy. For 3G connections a button to launch the Mobile Connection Wizard appears in the KNotification window, you just need to click on the button and the wizard will guide you to the process. Ethernet is automatic because NetworkManager automatically install a DHCP connection for ethernet connections. Only VPN is difficult to setup because you need to fill several details and Plasma NM imports only .pcf files (VPNC configuration files) for now. I do not see why you think it is that difficult to create a connection. Besides, when you comment a software you should use the latest version. At least one of the problems you mentioned in your blog was solved months ago.

@Aurélien Gâteau, sorry for being rude. You did not hurt my feelings, I just do not see that much need to change the GUI and since I did not create it and have other things more important to fix than the "Show More" button I prefer not to touch it. I am not the official maintainer, Will Stephenson and Sebas are. I am doing my work because I wanted to fix some bugs in Plasma NM, since nobody has complaint so far I keept doing it.

"Did I got it wrong one more time when I said the criteria for a connection to appear in "not show more" mode is "used at least once"?"

Yes, you did. You can configure a connection in the connection editor without never using it and it will be listed when "Show more" is untoggled. If you delete the current connection in the connection editor the connection will not be listed anymore because it is not configured anymore even though it is the latest used connection.

scroogie said...

Honestly, I find the new UI to be perfectly intuititve. I had no problem at all to understand it when using it for the first time.

About the "show more" discussion: I think it makes sense like it is. Let me give you my situation as an example. First time I used it, I saw all wireless networks around here. Then I clicked on my own SSID, entered my credentials, and was happy. Afterwards, only this SSID shows up. How can it not be clear that this dialog shows the configured networks then?
I actually think this is one of the most streamlined processes in KDE. As the referred-to blog entry is based on a bug, its not relevant. Even the point about KDE Wallet is mood, considering that in a normal environment you will get the Wallet first-time assistant that explains the whole thing.

trotil said...

And what about "clone mac address"???stil mising?

Anonymous said...

I don't quite get why some distributions seem to be unable or unwilling to upgrade certain packages. I get that (since they are not rolling release distros) they are afraid of introducing major new versions of certain programs. But KDE's NM has always been in a lot of flux and your information policy is among the best for any F/OSS program out there. So they should be aware of the state of things and take care of it.

Anyways, it works really well for me and I strongly feel that the many changes that you have introduced over the past months are really the way to go. :) So thank you for your work! You're awesome. :D

toddrme2178 said...

@ Mutlu: The problem is, as has already been discussed, distributions are uncomfortable upgrading to a random svn or git revision. Without some knowledge about which revisions are safe to use and which aren't, they feel they are risking introducing major regressions.

Lamarque said...

@scroogie, thanks. The idea to automaticaly toggle the "Show More" button when there is no AP configured came from an user who filled a bug in bugs.kde.org.

@trotil, cloned MAC address is already implemented in nm09 branch. Some new features are only available in nm09 branch.

@Mutlu, thanks.

sancelot said...

Do you really think an airplane mode checkbutton is needed on my desktop ????!!!!