Search This Blog

Friday, December 30, 2011

Wireless sharing with Plasma NM 0.9 (part 3)

Last Christmas I received my usual presents: bugs to solve :-/ Bug #289812 drew my attention because it looks like NetworkManager supports WPA shared connections after all. I do not know since when but that does not matter :-)

This week I pushed some changes to make Plasma NM create WPA shared connections. The changes went to both master and nm09 branches. The instructions to create the connection are the same as I described in my last post about shared connections, just change the security type in the "Wireless Security" tab:

Now the tests. Well, my two notebooks can communicate with each other when both use Gentoo Linux. When my old notebook uses Windows XP it detects the network, tries to connect but the connection times out. The Symbian S60v5 in my cellphone also does almost the same: detects the ad-hoc network, tries to connect, shows an error message about missing feature (although it does not specify which feature) and gives up faster than Windows XP.

Although my notebooks talk to each other I am not sure if the communication is really encrypted. I guess I will have to find another computer to run a wifi sniffer to check it out :-)

New Plasma NM interface

Those who use Plasma NM's master branch have already noticed that I started to push the usability changes. For now the changes are very similar to the ones I announced in my first post about usability changes:

And the screencast:

There are still more changes to come, for example: 1. Increase the height of each item in the network list (maybe two lines per item) to make it easier to tap on touchscreen devices; 2. Add a new item called "Connect to another network" to create new networks instead of using the control module; 3. Move the "<hidden network>" item to "Connect to another network"; 4. Find a new place for the "Enable Networking" checkbox, maybe move it to the control module since it is rarelly used; 5. Find a way to correctly align the elements in the GUI, QML looks much easier in this regard :-/

I saved all the comments I have received about Plasma NM GUI. I just do not have enough time to evaluate all of them, so be patient.

Update 01/01/2012: I had forgotten about a use of the interface list that is important. When you have more than one instance of the same interface (or device) it is difficult to distinguish each connection is associated to each interface. I tried to add a "Show Interfaces" button to toggle the old interface list:

As you can see it is not ready yet and of course if you clock on the "Hide Interfaces" it will look again like the first screenshot in this post. The plasmoid's height is bigger now because of the interface details tab, which is hidden, but takes up the space anyway. I will have to change the implementation to prevent the plasmoid from growing like that.

I also changed the disconnect button to "call-stop" icon, which still does not look that great but I did it for a reason: to make disconnecting easier. The old icon was small and if you do not click exactly on the icon it will show the interface details tab instead of disconnecting. I needed a bigger icon and that one was the best I could find. Actually, Plasma NM really needs new icons everywhere, there are icons that do not fit well, some are just ugly and some are not in standard KDE location. That is one of my long list of things to fix in Plasma NM :-/

Saturday, December 24, 2011

Merry Christmas

In the last weeks I have been working more in Plasma Active (PA) than Plasma NM for obvious reasons. This week I have fixed several bugs assigned to PA, some of them still needs more developement, but still it has been a productive week.

In Plasma NM front things are slow, which can be seen as a good thing if you take into account the number of reported bugs is very low these weeks. Or I am doing a good job at fixing bugs or everybody is dropping Plasma NM, I hope it is the former :-) I have fixed most the of Krazy2 issues, the remaining ones are not solvable and I have not figure how to make Krazy2 ignores them. The issues are in the .kcfg files, which are XML files. The .kcfg files used by Plasma NM include some attributes for dbus configuration that trigger Krazy2 errors. I cannot remove the attributes, so I cannot fix those issues. I have tried extending the .kcfg specification using the tags but it did not work.

Next week everybody in basysKom is going to be on vacation (me too), so I will try to make some work on Plasma NM.

Today is Christmas evening, so merry Christmas everyone.

Sunday, December 11, 2011

New job

Since last November 14 I am working for basysKom. At last a job to work with KDE :-)

I am working in the Contour project, which is part of Plasma Active. One of the things I am working on is a replacement for the shutdown dialog used in KDE. The intention is make it more suitable for touchscreen devices, like the ones that Plasma Active is target to. The current result is this:

Ok, I admit we need to improve this. Well, the fact it has only three big buttons is intentional, the less buttons the less problems to use and big buttons are easier to press. The implementation is in branch ksmserver/qml-shutdowndlg of git:// and it is made partially in C++ and partially in QML. This mini-project is being a good way to learn QML, maybe in the (not near)  future I can use what I have learnt in Plasma NM.

To implement that simpler dialog I did not have many problems. On the other hand the replacement for the current dialog has been giving me some headaches to implement all its look-and-feel, specially the button's context menu. It's  not that difficult to implement static context menu in QML, but adding items dynamically is more difficult. Another problem in the current implemenation is the lack of tab order and some other keyboard for features, such as default widget when pressing the ENTER key and label's accelerators. I have not found how to do use those features in QML, maybe because QML is target to thouchscreen and not keyboard use.

This weekend I have finished to implement all features except the keybord features:


And it works with other Plasma themes:




And here the button's context menus (notice the small triangle on the buttons):

If you want to try it you can do it in KDE SC 4.7 too. You need to compile plasmacomponents from kde-runtime master first:

git clone git://
mkdir kde-runtime/build
cd kde-runtime/build
cd plasma/declarativeimports
make && make install

Then you need to compile the branch mentioned earlier:

git clone git://
cd kde-workspace
git checkout ksmserver/qml-shutdowndlg
mkdir build
cd build
cd ksmserver
make && make install

Update 12/Dec/2012: some people asked how the dialog looks like with compositing disabled. Here it is:

Wednesday, December 7, 2011

New names for libmm-qt and libnm-qt

I am in the process of moving the Qt bindings for ModemManager and NetworkManager to The next step for that is moving them to kdereview, which I asked to do last week.

The kdereview aim is allow other KDE developers to review the source code and suggest changes. One of the changes suggested is to use more descriptive names, so libmm-qt is now called QtModemManager and libnm-qt is now called QtNetworkManager. I chose those names because they follow Qt's library name convention. I have just commited the changes to QtModemManager, QtNetworkManager and networkmanagement (only master branch) repositories.

If everything does well, the next step is move QtModemManager and QtNetworkManager to extragear and from there to

To enter extragear I had to fix Krazy2 issues in QtModemManager and QtNetworkManager first. I also tested networkmanagement repository and it has lots of issues to solve, so for the time being I am fixing those issues as well.

Saturday, November 26, 2011

Plasma NM 0.8.98

Plasma NM 0.8.98 (AKA 0.9.0_rc3) is now available.

MD5Sum: e730805567a771506cb18c0a825738ef
SHA1Sum: f46274c4cca722f37eef7418144c0c04bfe21e24


286855: Refuses to create VPNC connections without user or group info since vpnc-0.5.3 refuses to connect without them.
287531: Add some checks to prevent crash when PolicyKit denies connection editing.
287076: Report error message on VPN activation failure.
285637: Fix icons for bluetooth interface item and system tray (when the bluetooth interface is the default interface).
286424: Try to prevent gsm connection access technology change from freezing plasma-desktop for a few seconds.
285637: Fix creation of NAP/PAN bluetooth connections.
286856: Show user and group names in vpnc authentication dialog.
283204: Set Bluetooth DUN's passwords as AgentOwned by default.
286666: Do not reset username and password fields when changing Dynamic WEP's authentication method.
. Always asks secrets from user if NM requested new secrets.
286243: prevent crash when resuming from RAM.
283241: fix random crash.
. Add check for minimum openconnect version required (3.03).

The following languages have more than 80% of the strings translated:

ca cs da de el hr it lt nb nds nl pt pt_BR ro ru sv uk zh_CN zh_TW

Tuesday, November 22, 2011

NetworkManager: per device routing tables

Today Alex Fiestas told me about one problem he has and that I had long ago.

Everybody uses Internet nowadays and probably most of you know what IP address, netmask, gateway address mean. For example, my notebook is using this configuration right now:

IP address:

IP address:

Yes, two devices in the same local network, but that does not invalidate this post :-)

Although I have the same IP as gateway for my two devices the Linux kernel sees and, not alone. When there is only one active device there is no problem, but what happens if you have two, like my notebook?

Only one of those two IP address/device pairs is the default route, that is, the IP address/device pair the Linux resorts to when it cannot find the computer to connect to. Now enters NetworkManager. NetworkManager sorts devices by type when deciding which one to configure as default route. If I am not mistaken it sorts like this: wired, wifi, mobile broadband.

Now the problem:

Suppose you are connected using wlan0 only, with Kmail, Kopete, Konversation, etc up and running. Then you decide to plug the ethernet cable (eth0) and keep wlan0 also active. NetworkManager will switch the default route from wlan0 to eth0. Now what happens with the connections Kmail, Kopete, Konversation opened when eth0 was the default route? Well, if you do not have a proper routing table configuration they will stop working because the Linux kernel, by default, does not expect receiving IP packets from the old gateway's IP address/device pair anymore, only from the new gateway's IP address/device pair.

When the connections time out (in a couple of minutes or so) the Linux kernel will close them, but not before you get annoyed by seeing your connections closing in front you even though you have two, not only one, active connections.

Long ago I created a script similar to this one to solve this problem for me. I have even forgotten that I had this configuration in my notebook. If you have this same problem just do:

$ wget
$ sudo chown root:root per_device_routing_tables.txt
$ sudo chmod 700 per_device_routing_tables.txt
$ sudo mv per_device_routing_tables.txt \

Add one line per device to file /etc/iproute2/rt_tables like this:
File /etc/iproute2/rt_tables
100     eth0
101     wlan0

The first column contains the table's id, they just need to be different from each other. The second column contains the table's name. The script above assumes the table's name is equal to the device's interface name.

Finally, restart all your connections. When when NM switches the default route all existing connections will keep working.

What the script does is create one routing table for each device (one for eth0 and one for wlan0 in the example above). There is one default route in each routing table and the global default route (the one NM changes) still exists. Even when the global default route is changed the per device default routes continue intact and let the existing connections to reach the Internet using the correct IP address/device pair.

Enjoy :-)

Sunday, November 20, 2011

Installing libnm-qt in a different prefix

Some people have some problems installing libmm-qt and libnm-qt in a different prefix than /usr. Today I have finished to implement pkgconfig support and now you can install libmm-qt and libnm-qt in a different prefix:

. PREFIX="/opt"
. export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/lib32/pkgconfig:$PREFIX/lib64/pkgconfig"

. git clone git://
. mkdir libmm-qt_build
. cd libmm-qt_build
. cmake -DCMAKE_INSTALL_PREFIX=$PREFIX ../libmm-qt
. make && make install

. git clone git://
. mkdir libnm-qt_build
. cd ../libnm-qt_build
. cmake -DCMAKE_INSTALL_PREFIX=$PREFIX ../libnm-qt
. make && make install

Compiling master branch is still the same:

. git clone git://
. mkdir networkmanagement_build
. cd networkmanagement_build
. cmake -DCMAKE_INSTALL_PREFIX=/usr ../networkmanagement
. make && make install

Tuesday, November 8, 2011

Bluetooth tethering video

There is some time I wanted to create this video explaining how to create bluetooth connections in Plasma NM using Bluedevil-1.2. Here it is:

Bluetooth tethering is not exactly new feature in Plasma NM, it was added almost seven months ago, yet some people still have difficult adding connections.

Unfortunately for devices that use NAP, like iPhone, there is a bug in Bluedevil that prevents Bluedevil from dectecting the NAP service from the phone. For now you can use networkmanagement_configshell to create a NAP-type bluetooth connections. Bluedeveil-1.2 works for DUN-type connections, like it is shown in the video.

Sunday, November 6, 2011

Help KDE e.V. secure funding for a sprint with just a few clicks

Some weeks ago Lydia blogged about a German bank giving away 1000 euros for each 1000 associations who can get the most votes. Well, until eight days ago we were at postion 320, now we are at 1155, as you can see:

If the poll finished today we would be out :-( The poll finishes tomorrow, so we need the votes now. Please, read Lydia's post about how to vote and help KDE e.V., it is just a few clicks.

Just the poll page is in German, but the poll is not limited to German citizens. Anyone can vote three times using your e-mail.

I would like to thank who have voted in the last days. Unfortunately we still need more votes since the poll finishes tomorrow. In the last 24h we have lost several positions, we need to keep the pace we were before to reach our goal.

Friday, November 4, 2011

Plasma NM 0.8.95

Plasma NM 0.8.95 (AKA 0.9.0_rc2) is now available.

MD5Sum: 14f4051446a33be9bd46b34763acd760
SHA1Sum: 43df2e26acb1b96f3b5e394568a25d04036a085b


284743: fix crash after installing updates with apper.
284717: fix crash when browsing bluetooth device.
283017: fix crash after bluetooth teathering failure.

. use network.svgz as default icon path for svg icons again. Svg icons are themed, so we need to keep this filename. We will the new network2.svgz for mobile icons until the changes in network2.svgz are integrated into network.svgz.

285069: add tooltip explaining how to use wifi security's alternate subject matches in Plasma NM's wifi edit dialog.
285255: fix crash after resume from suspend.
285406: enable VPN Interface item in activating and activated connection states.

The following languages have more than 80% of the strings translated:

ca cs da de hr lt nb nds nl pt pt_BR sv uk zh_TW

PS: for the braves that use Plasma NM master branch there is a fix for a crash in bluetooth tethering support in libnm-qt. The bug does not affect nm09 branch since it does not use libnm-qt.

Thursday, October 27, 2011

New home for libnm-qt

Today I have finished to move libnm-qt and libmm-qt to To compile them do (in this order):

. git clone git://
. mkdir libmm-qt_build
. cd libmm-qt_build
. cmake -DCMAKE_INSTALL_PREFIX=/usr ../libmm-qt
. make && make install

. git clone git://
. mkdir libnm-qt_build
. cd ../libnm-qt_build
. cmake -DCMAKE_INSTALL_PREFIX=/usr ../libnm-qt
. make && make install

Compiling master branch is still the same:

. git clone git://
. mkdir networkmanagement_build
. cd networkmanagement_build
. cmake -DCMAKE_INSTALL_PREFIX=/usr ../networkmanagement
. make && make install

I must say this new Plasma NM + libnm-qt is working quite good, no big problems in the last days. I will start to port the usability changes to master branch early next month, for now there are other things that require my attention.

Monday, October 24, 2011

Plasma NM: libnm-qt working

I thought it would take me more time to make Plasma NM work with libnm-qt :-) I have just commited the last bugs fixes for the bugs I have found so far and Plasma NM/libnm-qt works. There are no visual changes, so there is no point in showing a screenshot :-P

Updating my post about the work to port Plasma NM to NM-0.9 we have:

  1. Create the new Solid's NM-0.9 backend outside kde-workspace repository so that we could change it freely without KDE's freature freeze/ABI restrictions. (DONE)
  2. Make it compile against NM-0.8.999. (DONE)
  3. Remove #ifdef COMPILE_MODEM_MANAGER_SUPPORT and #ifdef NM_0_8 from the source code. (DONE)
  4. Make everything compile/work when the old NM-0.7 backend from KDE SC 4.{6,7} is installed. (DONE)
  5. Create code to import existing NM-0.8 connections to NM-0.9. (DONE)
  6. Make it really work with NM0-0.9.0. (DONE)
  7. First Plasma NM release. (DONE)
  8. Convert code to use libnm-qt instead of Solid::Control::*Nm09. (DONE)
  9. Finish to implement libnm-qt and libmm-qt. (DONE)
  10. Apply usability changes. (IN PROGRESS)
  11. Implement the new interface types: LTE, Wimax and OlpcMesh. (IN PROGRESS)
  12. Fix "paper cuts" bugs (IN PROGRESS)
  13. Improve VPN support. (TO BE DONE)
  14. Improve support for Pppoe (DONE), Cdma and IPv6. (TO BE DONE)
  15. Improve notifications support. Hmm after some thoughts and testing I honestly do not know how to improve it. (TO BE DONE)
  16. Implement automatic proxy re-configuration. I think this should be done in NM itself to make it work with system connections and with non-KDE programs, such as Firefox, Chromium, Opera, etc. (UPSTREAM)
  17. Implement option to run scripts before and after connection's (de)activation like in WICD. I think this should be done in NM itself so that it works with system connection. (UPSTREAM)
Libnm-qt works very well in my notebook, it can be considered stable now. I may release Plasma NM 0.9.0 final (no libnm-qt) probably next week if no other important bug appears. Talking about bugs, yesterday I fixed the last crash bug assigned to Plasma NM in Now we only have one major bug (related to importing old settings from Plasma NM for NM-0.8), several normal bugs and wishes.

None of the remaining 27 bugs are related to crashes and they are mostly wishes, so please, distributions, use Plasma NM 0.8.95 instead of shipping outdated Plasma NM versions full of bugs that were fixed months ago. I also need more people testing the three releases I already made. Of course 0.8.95 is the most important one, so report bugs in 0.8.95 so that I can release a really rock solid Plasma NM 0.9.0.

Sunday, October 23, 2011

Plasma NM: master branch

I have just converted master branch to contain the Plasma NM code for NM-0.9 ported to libnm-qt and libmm-qt. The branch compiles but I have not tested it yet, I will do it tomorrow (it's very late at night here in Brasil).

Anybody willing to help to stabilize this version do the following:

1. Compile libmm-qt and libnm-qt in this order (libmm-qt is a dependency of libnm-qt). Update 27/10/2011: read new instructions:

. git clone git://
. mkdir libnm-qt/{libnm-qt_build,libmm-qt_build}
. cd libnm-qt/libmm-qt_build
. cmake -DCMAKE_INSTALL_PREFIX=/usr ../libmm-qt
. make && make install

. cd ../libnm-qt_build
. cmake -DCMAKE_INSTALL_PREFIX=/usr ../libnm-qt
. make && make install

2. Compile Plasma NM's master branch:

. git clone git://
. mkdir networkmanagement_build
. cd networkmanagement_build
. cmake -DCMAKE_INSTALL_PREFIX=/usr ../networkmanagement
. make && make install

Have fun... or not :-)

Saturday, October 22, 2011

Plasma NM 0.8.90

New version after the first release:

Plasma NM 0.8.90

MD5Sum: 25cfce5072bf0658a2b33b76d2df80b5
SHA1Sum: 9336049eb00f5e4fe7434e710eeb0bdfc22e0984

No usability changes yet. Here is the changelog:

. fix crash in the plasmoid if kded4 crashes or restarts.
. prevent crash when stopping NetworkManager.
. fix updating the last used timestamp.
283776: Make Network Manager show signal strength in system tray also for mobile broadband connections.

. make changing connection item's font on activation state change work again.
283663: fix status tray strength indicator does not update when network manager extender is opened.
283647: use QIntValidator instead of inputmask to make the pin dialog prettier.
283720: fix GSM signal strengh position in connection list and add tooltip for it.
283583: make OpenConnect VPN plugin optional.
. fix some translatable messages.

The following languages have more than 80% of the strings translated:

ast bs ca ca@valencia cs da de el en_GB es et fr hr hu it km ko lt nb nds nl pa pl pt pt_BR ro ru sl sv tr uk zh_TW

Plasma NM: what is going on (libnm-qt and libmm-qt)

As I wrote during the last Solid Sprint we are working to bring libnm-qt and libmm-qt to Plasma NM. Libnm-qt is a Qt-only  wrapper around NetworkManager's API and DBus interface. Libmm-qt is the same for ModemManager's DBus interface. Both libraries were created by Will Stephenson for NetworkManager 0.8 and ModemManager 0.4. Ilia Kats ported libnm-qt to NetworkManager 0.9 API during the Sprint. Thanks to both for working on that.

This week I have started to port Plasma NM to libnm-qt, I had to do some changes in libnm-qt and libmm-qt to allow Plasma NM to compile against it, nothing that special. There is still a long road to go, according to cmake I can compile about 31% of Plasma NM's +57K lines source code, not counting the auto-generated .cpp and .h, nor the .xml files used to generate them. Some parts of Plasma NM are going to be refactored since libnm-qt implements them itself. Fortunately, that also means Plasma NM's source code is going to shrink a bit.

libnm-qt is basically the Solid's NM backend (networkmanagement/solidcontrolfuture/solid/networkmanager-0.9) refactored to work as a public library instead of a private backend of networkmanagement/solidcontrolfuture/libs/solid/control/network*. The same is true for libmm-qt, kde-workspace/solid/modemmanager-0.4 and kde-workspace/libs/solid/control/modem*. All this means we are finally getting rid of Solid::Control classes (a goal from last year's Solid Sprint). KDE SC 4.8.0 is not going to use Solid::Control anymore, but libnm-qt and libmm-qt are going to be dependencies for any KDE program that needs to list network interfaces (kinfocenter for example). Update 23/10: removing Solid::Control::Network* now would also remove part of Wicd's support, so for now I will not remove Solid::Control until we figure out a way to support NetworkManager, Wicd and possibly Connman.

The final goal with libnm-qt and libmm-qt is to move than to NetworkManager's repository so that NM guys can help to maintain them. That is for next year, probably. We still need to get the libraries ready before that happens.

Now applications can retrieve network status (online, offline) using either kded's networkstatus module, which does not depend on libnm-qt and works for NetworkManager and Wicd, or libnm-qt.

You can find both libnm-qt and libmm-qt in git:// Be warned that sometimes I do break their ABI.

I am also going to release Plasma NM 0.8.90 (0.9.0_rc1) today. I am just waiting for the tar bal to reach Stay tuned for the announcement.

So that is what is happening in KDE's Network Management front :-)

Thursday, October 13, 2011

Plasma NM: bugs closed after 4.7.1

I almost forgot to post the bugs fixed since my last post. This list covers bugs closed after 4.7.1 until the release of 0.8.80 (AKA 0.9.0_beta1):

283204: set default GSM's "password" flag to AgentOwned to prevent the password from not being saved at all and, consequently, the secrets dialog appearing at each connection attempt.
. enable autoconnect by default for WiFi connections.
. make defaultroute overlay icon really appear over the network icon in the network list.
. improve connection sorting performance.
272181: prevents wifi security icon misplacement.
. hide wifi shared connections and item if wireless is disabled.
282584: limit connection's name to 20 characters when exibiting them in connection list.

. momentously change system tray network interface to the activating interface. Turn back to the default route interface after the activating interface stops changing state. Eventually the new default route interface will be the activating interface, but if the activating fails it will likely not.
. several performance improvements in plasmoid's startup.
. use the interface with default route to update system tray's icon.
271766: fix overlay not shown when adding plasmoid.
254070: prevent two crashes due to dangling pointers when NM stops.
. fix crash in OpenConnect when trying to connect to an empty/unset host.
. rework VPN status overlay icon.
. reimplement hover events in vpnInterfaceItem to get proper highlighting of VPN connections in the UI.
249319: fix networkmanager plasmoid icons too small when in panel.
. fix resize/paint problems when Plasma NM is used on desktops instead of panels.
282282: mark some OpenConnect secrets as NotSaved, since they are changing every session.
. save/restore "Show More" button state across reboots. Also change the default state to true (or checked), which is list all networks available.
268026: show interface details instead of deactivating the connection when clicking on an active connection.
190342: enable hover effects on system tray icon.
281962, 282085: improve error message for wrong NM version.
. add wifi's band and channel info to interface details.
. fix saving secrets for system connections (they were being marked as AgentOwned).
. detect adhoc mode when creating wifi connections with networkmanagemnet_configshell.
204170: make DSL connections (PPPOE) work. Still needs improvements.
. improve NM version dectection during compilation.
. fix crash when suspending with wifi enabled and afterwards resuming with wifi disabled.

Resuming there are 3 crash fixes, 11 bug fixes and 13 improvements. The, not yet released, 0.8.81 is going to include more small improvents and more complete translations, which are already available if you compile branch nm09 yourself.

As I stated before, master branch is going to hold the new Plasma NM development version and not the code for NM-0.8. Please update your build system to point to branch nm08 if you want to compile Plasma NM for NM-0.8. Plasma NM for NM 0.8.x is also deprecated and unmaintained, so please upgrade to NM-0.9 and Plasma NM 0.8.80 as soon as possible.

Friday, October 7, 2011

Plasma NM: first release

Yes, that is right, we have the first release of Plasma NM and from now on there is going to be regular Plasma NM releases.

During Solid Sprint I accepted the job of being KDE's Network Management maintainer. I would like to thank Alex Fiestas and Will Stephenson (former maintainer) for trusting me for this job. One of the tasks of a maintainer is releasing software, so here it is:

MD5Sum: 0ec58c1f119d0fe2be5045c6cc1dfe9c
SHA1Sum: 4c60e4cd30f69a2bc47091b7472040e0f69c4404

0.8.80 means 0.9.0_beta1 (first beta version of Plasma NM compatible with NetworkManager-0.9.x). There are translations for 49 languages in the tar ball, though they are not 100% complete yet:

ar ast bs ca ca@valencia cs da de el en_GB eo es et fi fr ga gl hr hu is it ja km ko lt lv mai ms nb nds nl nn pa pl pt pt_BR ro ru sk sl sq sv th tr ug uk wa zh_CN zh_TW

This release is basically what is in nm09 branch as of October 01 and does not contain the usability changes I have blogged about. I plan to release 0.9.0 final with most complete translations as possible. The usability changes will probably go to 0.9.1 along with libnm-qt port.

Thursday, October 6, 2011

Solid Sprint: day 3

Well, day 2 almost did not finish for some of us since Alex Fiestas, Ilia Kats and me stayed at the office and almost did not sleep.

After long ours of work we did a break by 3:00 am and Ilia Kats showed us his skills in biology. I have not mentioned it but Ilia is finishing his bachelor course in biology and started to use Linux just one year ago :-O He explained to us the research he is doing at university about protein degradation. The chat was very interesting and Alex Fiestas and me continued asking him about other curiosities we have heard about biology. In the end we had good lessons about how proteins work, how to activate and deactivate them, how they are degradated, how to measure how much time the degradation process lasts. All this to research how we get old. If Ilia succeeds maybe we will have a fountain of youth in the future :-D Ah, we also learned (in details) how our immune system works, how vaccines force our imute system to get stronger, how the HIV virus disables it, how DNA works, what happens with our chromosomes when we get older. Very interesting indeed.

Ok, turning back to the silicon beings. I almost finished to implemented the new main window. I hope you like it:

The "Enable Networking" check box and "Show More" button are now in the system tray's right click menu. "Show More" has also been renamed to "Show unsaved networks":

And now the new (unfinished) details window:

I am going to implement the new create connection's window in the next days. Since the usability changes are big I will add then slowly to keep the current code working without losing any functionality. The idea is to hide advanced features/configurations to let the most used ones visible and simpler to use by "Penny" :-)

Another big change in Plasma NM is the replacement of Solid's NM backend by libnm-qt. Libnm-qt does not bring any user visible change, but it is important for us developers. The replacement has been postponed several times and now that Ilia made it compile against our branch nm09 I think it is the time to really finish the job and incorporate it in the "official" Plasma NM. I want to move to libnm-qt before we continue with the usability changes to make my life easier. I am being selfish here for a reason: Ilia is going to start a new semester at university, which will make me almost alone to implement the most important changes in Plasma NM. I plan to finish the transition to libnm-qt next week, then I will apply the new main window changes.

VERY IMPORTANT: currently networkmanagement's master branch holds the Plasma NM version for NM-0.8. A new branch nm08 was created and it holds the Plasma NM for NM-0.8 from now on. The master branch is going to hold the new libnm-qt when I finish to port it to nm09 code. So distributions, pay attention to this change and update your package build system to point to the correct branch.

Update: my "employer", which does not use KDE and does no pay me to work on KDE, gave me a new task with a tight schedule. I will have to postpone everything related to KDE for at least 15 days. I also need to review all the feedback I have received about the usability changes. I am going to change some things to accommodate the new ideas, so probably there will be no new Plasma NM this month.

Monday, October 3, 2011

Solid Sprint: day 2

Saturday started with us continuing the discussing about the usability changes in Plasma NM. Then we started coding :-) I worked on implementing the mock-ups and Ilia Kats worked on getting libnm-qt into shape to be committed to nm09. Since the usability and libnm-qt changes are extense I think it is best for us to finish one to concentrate on the other. Doing it in parallel would not work.

I also accepted the job of being the new Plasma NM (or Solid Network Manager) maintainer. I am even going to have a e-mail :-D More on that in the next post.

Solid Sprint: day 1

Well, I must say that I like that usability study we are doing. It has already given me good ideas on how to really improve  Plasma NM GUI. I hope the users agree with the changes we are going to implement.

Today we have spent all day in the usability experiment, we already have some mock-ups (no spoil) :-) Dario and Alex have fixed a lots of bugs in the meantime. They even recorded a showcase to show you how to use one of the new Powerdevil features (more on that when they publish the video).

Tomorrow I think we are going to start coding the usability changes. Until now we have discussed the needs of our "personas" and how to fullfill them. Tomorrow we will start doing what we hackers really like: coding :-) Stay tunned.

Friday, September 30, 2011

Solid Sprint: day 0

Like a good C/C++ programmer I start to count from zero :-) Just to finish day -1 (Sep 28): after a nap to get over the sleepy feeling I met Alex Fiestas, Alex's brother, Raphael (ereslibre), and a friend of theirs to have dinner. I must say I really like Spanish food. After the dinner I and Alex were going back to the hotel and Ilia Kats approached us in the subway wagon. I have been talking to Ilia for several months but that was the first time we met, it was a good surprise. Unfortunately for us the subway closed before we could switch to the final line, so we went to the hotel by taxi. End of day -1 :-)

Day 0: Since the usability master (Björn) would arrived only at afternoon, Ilia and I tried to fix this annoying bug in Plasma NM in the meantime. In the end we found that it is an upstream bug in Qt, Ilia managed to create a workaround to prevent it. It is not perfect but since Qt4 seems "frozen" we do not see much hope to have this bug fixed, so the workaround is going to stay until we move to Qt5.

Björn arrived at afternoon as expected, unfortunately some guys did not make it to the sprint, but that is ok. Dario almost lost the sprint, but he is here and as always killing bugs like Rambo kills his enemies :-) During the rest of the day (and almost all night) and started the usability study on Plasma NM. I will not spoil so you will have to wait to see the results when we start to commit the changes.

That is all for day 0 :-D

Wednesday, September 28, 2011

Solid Sprint: day -1

Finally I got to the hotel room in Madrid, I think it is the same room I stayed last year by the view on the window. I took me 20 hours and 20 minutes of traveling to get here. My calculations was wrong by ~40 minutes (~3%). I need to improve this next time hehe. Now I need to rest (25 hours without sleeping + jet lag). Metal workers, see ya tomorrow, except for Rodrigo Belem (another Brazilian) and Ilia Kats, who must be arriving at any time here at the hotel.

Tuesday, September 27, 2011

Solid Sprint: day -2

Ok, ok, the sprint has not started yet. I am still here at home packing my stuff, checking the last details for the trip and writing the post :-D. That will be long trip until Madrid. Just to get to the airport it will take me three hours and two buses, more ~10 hours flying to Lisbon, about one and a half hour more to reach Madrid and one more hour to get to the hotel in Madrid by underground/subway. If I add the time I am going to sit waiting for buses, flights and underground it will be almost 21 hours of traveling. Last year it took me more than that because I had to wait five hours in São Paulo's airport in Brasil before flying to Madrid, now I am going to wait two hours in Lisbon.

If you follow my commits you have noticed they have been more intense in the last week. I wanted to push some fixes now and concentrate on the usability changes during the sprint. Am I exaggerating? No, there are plenty of problems to solve and things to implement in Plasma NM and also in other parts of KDE's network management too, so there will still be much to do after the sprint. Network management is not easy to work on, when you try to fix something sometimes you find another bug in the way, you try to fix that one, and another one appears. That was what happened to me and why I did so many commits in the last week :-) There is still one fix left that I wanted to do before the trip but will have to wait until I come back from the sprint. Or maybe I can fix it during all those waiting hours until Madrid.

Today I have also fixed one problem in kded's networkstatus module: it does not work if you start a KDE session with NM stopped. It also stops working if you restarts NM because it did not watch for NM DBus service appearing and disappearing, now it does :-) It seems there is another problem in networkstatus module, more precisely in ntrack support. Since I have never used ntrack and, of course, do not have it installed, I could not test if my diagnostic is really correct.

Well, the week is still starting and serveral things have happened already. It looks like a great week ahead :-D

Saturday, September 17, 2011

Plasma NM: usability changes

Solid Sprint is going to start in less than two weeks in Madrid. This time one of the attendees (Björn Balazs) is an usability guy, so we are going to talk about usability problems in the software we maintain, in my case Plasma NM. Some days ago Björn asked about the points we (the other attendees) would like to discuss during the sprint. Well, I already sent my list, which is not that extense but is not short either:

In the last months I have received several complaints about Plasma NM user interface. I have also thought about what I could change and today I decided to implement some of my thoughts in my private Plasma NM repository. What you are going to see is not a mock up :-)

For those who do not believe that is not a mock up, here is the screencast:

Those changes are not final. I am going to discuss them with Björn Balazs and the other Solid guys before commiting anything. This is post is to present and ask comments about them. Do not expect any GUI changes in Plasma NM before the end of the sprint next month.

Update: answering some questions:

  • @damian, 1. the "Enable" checkboxes are there not only for users clicking on them but also for NetworkManager daemon  to inform which features are enabled. NM can disable network, wireless and mobile brodband without user intervention, if I move the checkboxes to the interfaces tab then users will have to go to interfaces tab to see why there is no connection listed when wireless is disabled for instance. Also, mobile broadband is always disabed by default by NM daemon, so for mobile broadband connections checking the "Enable mobile broadband" checkbox is required. Well, actually if you click on the mobile broadband connection it will enable mobile broadband, so it is not required :-) But if the modem takes too much time to active itself the connection can times out and some modems, like my Sony MD300, can be activated only once by NM. After that I have to remove it from the USB port and plug it again to make another connection. In resume: keeping the checkboxes in the connection list tab saves one click in some situations. 2. I like the fact that I can access the details tab by clicking on one active connection, specially because now there is no visible way to associate one interface to one connection. Think about people who have more than one instance of the same interface type. I have a 3G modem and when I plug my cellphone I will have a second gsm interface. I can connect the same Gsm connection using either device. In this case it is usefull to get to the interface details by clicking on the connection instead of first figuring out which network interface is activated and then clicking on it. 3. I like the "Show More" button (now "Show all" checkbox) and it is going to stay there as long as I am working on Plasma NM :-P. The item is required because of the way NM work. I explain: after creating a hidden wifi connection it HAS to be activated so that NM uses wpa_supplicant's ap_scan=2 option to search for it. NM uses ap_scan=1 by default, do not ask me why, maybe to save power or to be faster, I do not know. When using ap_scan=1 wpa_supplicant does not search for hidden networks, with ap_scan=2 it does. So I need a way to ask the ssid and activate the hidden network after it has been created. It is not a normal connection because normal connections do have to be activated right after creating them. Maybe adding a new "Hidden" checkbox in wireless dialog is better, but since there are two bug entries about the complexity of creating connections I am not willing to add more widgets to connection dialogs.
  • @Anonymous, I will change Plasma NM to save the "Show More" state across restarts. Maybe I can add a option in "Manage Connections" -> Other to always show all connections. When it is activated I can hide the "Show More" button / "Show all" checkbox. "when the mouse cursor is floating over a interface of the list it should change the line of the video that says 'Connected to xxxxxxx' with 'Click to disable' if the interface is enabled & 'Click to enable' if the interface is disabled." It is good suggestion, I will see what I can do. Just keep in mind that wired ethernet cannot be enable/disabled in NM, only wireless and mobile broadband can. The "mini-icon" (disconnect button) on the interface item only appears if there is one activated connection using that interface. I do not see a need to change colors to indicate the connection state. Also, keep in mind that there are daltonian people (like me) out there who have difficulty to distinguish colors, specially in tiny buttons like that one. I prefer to show/hide the tiny button, it is more visible. OBS: although I am daltonian I can distinguish between red and green, there are several levels of daltonism, luckily for me mine is not that severe.
  • @Srk9, unfortunately NM's API does not provide means to change the default route from one network interface to another, so it is not possible for me to implement your suggestion.
  • @Anonymous, yes, there are some artifacts in Plasma NM GUI, but they are not as bad as in the youtube video, which was recorded at 15 frames per second by the way. I will use 30 fps the next time I do a screencast, I think youtube trancodes the video to 15 fps, right? Some of the "artifacts" in the video are actually Plasma effects, they look much better in real time :-). In fact, the only two artifacts that really happens in the video happen when changing the network interface used in interface details tab and when clicking on the "Show all" checkbox. The connection list is a Plasma::ScrollWidget class, which adds all items first before creating the vertical scrollbar and shrinking the visible part of the list. That is a bug (or whatever you want to call it) in Plasma::ScrollWidget triggered by the fact that all QGraphicsWidget (Plasma's widget base class) are shown by default, in contrast to the hidden default used in QWidget class used by most KDE's software.
  • @emilsedgh, allowing to select which interface details to show is already a pending implementation. You can enable notifications to show the connection state, just to go Manage Connections (or system settings -> Network Settings) -> Other -> Configure Notifications and enable "Establishing Network Connection" and "Network Connection Succeed". You can enable "Interface changed state" instead but it is more "verbose". The system tray icon also shows the connection state change, but I agree that it is really subtle.
  • @Anonymous, how is it more complicated? Main window is smaller and there are less widgets in it.
  • @Anthony Vital, thanks for the tip about Plasma::ScrollWidget, it works great. One less artifact in Plasma NM GUI :-)
  • @Anonymous, I kind of like the kickoff plasmoid.
  • @yoda, some people do not like the "Show More" button, they have difficulty to figure out what it really does :-/ So I am trying to keep it there without drawing to much attention. Plasma allows more entries in right click menu icon, I can add some more items there. I just do not know if I can add QAction's there like you suggested. Kmix is not a plasmoid so it is able to add QAction's at will, I just need to figure out if plasmoids can do the same. Update Sep 20: it can, just return the QAction list in contextualActions(). "how I'm supposed to see details of other interface?" For now it works like you described, you need to go back to the Interfaces tab and click on the second interface to see its details. I like the mockup you created, I will join the Details tab to the Interface tab like you suggested. Maybe not exactly like in the mockup but I will. I have just commited to branch nm09 the change to show interface details instead of deactivating the connection when clicking on an active connection. That already works in the youtube video and since it does not change the GUI I do not see why not commiting it now.
  • @Aaron J. Seigo, thanks, I am glad to know people like the changes :-) I plan to save the "Show all" checkox state between restarts. When ready I can change the "Show all" default to enabled and the connection list will be completely visible. Those, like me, who prefer "Show all" unchecked will need to change it only once. I think that is the best solution.
  • @BajK, I am taking the oportunity to talk in person to someone with skills in usability to assist me :-) Well, this commit partially fix your problem: the plasmoid will be shown poped up, but I do not know exactly why the background still keeps the icon's dimensions instead of the popup's dimensions. I will try to figure out why. Update Sep 20: problem fixed.

Wednesday, September 7, 2011

Common errors when migrating to or using NM-0.9

I have seen people having problems to migrate from NetworkManager-0.8 to 0.9, here are some tips to solve those problems:

  • NM-0.9 requires wpa_supplicant-0.8. You need to add the entries  CONFIG_CTRL_IFACE_DBUS=y, CONFIG_CTRL_IFACE_DBUS_NEW=y and CONFIG_CTRL_IFACE_DBUS_INTRO=y to wpa_supplicant's .config file before compiling it. Alternatively, you can patch wpa_supplicant-0.7.3 to make it support the new DBus API, which is what NM-0.9 really requires.
  • You cannot have more than one instance of wpa_supplicant running or NM's wifi support will be unstable or even not work. wicd, ifplugd, net_applet are some programs that also start wpa_supplicant, which can cause this problem.
  • wpa_supplicant have to be started with the '-u' parameter (enable DBus support) or NM's wifi support will not work at all. nmcli will return "unmanaged" for wifi interfaces when this happens.
  • NM supports most network interfaces types nowadays, you do not need to mix it with other network manager software (wicd, net_applet, ifplugd, etc). Most of the time those programs will conflict with NM and things may not work. So choose one of them and disable the others.
  • Some distributions disables NM support for one or more specific network interfaces. If you are migrating from one of the network manager software cited in the last item you must make sure NM is enabled to manage your network interfaces. Usually the file /etc/network/interfaces is reponsable for this configuration. In Gentoo, the distribution I use, the file is /etc/conf.d/net.
  • There are two versions of Plasma NM, one for NM-0.8 and other for NM-0.9. Of course, you must use the correct one for you NM installation.
  • If the message "We need NetworkManager version >= x.y.z to work, found ''" appears in Plasma NM's main window that probably means NM is not running (the version found is an empty string).
  • Make sure to use the correct Solid's NM backend for your network manager software. Solid supports NetworkManager 0.7/0.8, NetworkManager 0.9 and Wicd). Go to systemsettings -> Information Sources and make sure you are using the NetworkManager-0.9 backend.
  • There is a "Fake NetworkManager-0.9" backend introduced in KDE SC 4.7.1. That backend provides network status information to kdelibs's Solid::Networking::status() call and only network status information, which is not enough to make Plasmsa NM/nm09 work. If that backend is listed as the first in systemsettings -> Information Sources you must change the configuration to make NetworkManager-0.9 backend to be the first. The reason to introduce that backend in 4.7.1 is because kdelib's Solid::Networking API is not able to use the NM backend in Plasma NM/nm09 repository (binary compatiliby issues).
  • The shared connection feature does not work if you are running a name server (bind, dnsmasq) or a dhcp server (dhcpd) in the same computer. That is because NM needs to start dnsmasq with the correct parameters, since dnsmasq is a name server it needs to bind to port 53. If there is another process bound to that port (bind or another dnsmasq instance) dnsmasq is going to fail to start. dnasmasq is also a dhcp server, running two dhcp servers in the same computer can cause conflicts that can prevent the shared connection to work properly.
  • Sometimes reloading the wifi driver can make shared connections work.

Tuesday, September 6, 2011

Plasma NM: bugs closed after 4.7.0

Now that NetworkManager 0.9.0 was released it is the perfect time to deprecate Plasma NM for NM-0.8.x, which resides in our branch master. There are some bugs in Plasma NM that only happen with NM-0.8 and since our team is small (in number, not in spirit) we need to concentrate efforts on what really matters. New features have been added to branch nm09 only for quite some time, all Plasma NM developers use only branch nm09 AFAIK, so please migrate to NM-0.9 as soon as possible :-)

Also keep in mind that the monolithic knetworkmanager is unmaintained since early this year. Everybody should have migrated to the plasmoid version of KDE's Network Management (Plasma NM) by now. There will be no monolithic version in branch nm09 by my part. The current monolithic knetworkmanager code do not even compile because of the changes I had to do when I imported Solid's NetworkManager backend to branch nm09 months ago. If anybody wants to take the task of maintaining the monolithic version feel free to contact me. The plasmoid and monolithic versions share about 85% of code, so it is not a huge task, but since I am already busy fixing/implementing new features in Plasma NM and doing my real life work (Android, nothing related to KDE, unfortunately) I do not have the time to do it myself. By the way, if anybody knows about a position to work on something related to KDE, I can send my CV :-)

Ah, the minimum NM version required for Plasma NM/nm09 has been increased to 0.9.0 because of the fix for bug #276486, which is an upstream bug by the way.

All said here is the traditional list of bugs closed since my last post. First for branch nm09:

209464: make hidden wifi networks work. This bug used to be our most hated bug, now we need a new one :-)
249872: Show overlay icon in system tray to indicate that at least one VPN connection is active, also adds that information in systray's tool tip along with all active VPN connection's names.
281074: prevents crash when ethernet carrier goes off in wired connections.
275502: sort connection list by type, then by activation state and then by connection name (or ssid if applicable).
. fix handling of network appearance/disappearance in ScanWidget.
. fix build on Fedora 15 which doesn't have the latest NM 0.9 yet
280913: don't send empty OpenConnect secrets to NM.
259284: show band and channel in ScanWidget/details.
280873: prevents crash when configuring WEP access point using networkmanagement_configshell.
280701: treat ad-hoc connections as normal wifi connections in connection list.
. update BSSID's tooltip and what's this in wireless edit dialog.
. add support for allowing/forbidding GSM roaming.
. add support for 802.1x subject_match and altsubject_match setting introduced in NetworkManager 0.9.0.
279676, 280494: ignore other non-binary compatible backends (NM-0.8 and Wicd) to prevent crashes.
. when in WDS mode there will be several access points with the same ssid, choose the one with strongest signal instead of the first one found when selecting the BSSID.
. add option to mark the GSM PIN as "Not Required" for devices that do not have the PIN set.
. add one tooltip for the the Show More button and one for the system connection checkbox in edit connection dialog.
. make shared connections easier to setup: the "add" button in wired and wireless tabs in Manage Connection widget is now a menu button with two options: Wired / Shared and Wireless / Shared. Also, unneeded widgets are hidden in wireless dialog when adding a shared wireless connection.
. simplify wireless edit dialog.
. use the correct column when updating the LastUsed info in Manage Connection widget.
. prevents crash when disabling the bluetooth controller with interface details opened for a bluetooth device. Also adds missing method setModemCardIface to Solid's NM frontend.
. automatically adds logged username to connection's permissions when changing connection from system scope to user scope. Without this change users would have to add the login name manually. If they forget to do so then the connection will not change from system to user scope and there will be no warning or error message about that.
. make WEP key validation work.
. fix VPN settings dialogs.
. disable NetworkManager going offline notification by default.
. fix crash when creating connections with networkmanagement_configshell.
. watch for kded restarts, call FinishInitialization to activate notifications.
. allow deactivating a connection while it's activating.
. display the AP's strength in its tooltip.
. let the user decide if he wants to store his 802.1x passwords or type them in every time, add real auth dialogs for 802.1x and wireless (needed for LEAP).
. don't copy certificates for 802-1x connections to our own storage to prevent conflicts with other NM's clients (i.e. nm-applet).
. set Connections entry in networkmanagementrc file to empty after importing NM-0.8 connections. The old files are still instact in case someone needs to redo the importing process.
277889: fix crash when trying to connect to wpa.enterprise eduroam.

That sums up to 33 entries. 6 of them are crash fixes, 8 are bug fixes (including minor bugs), the other 19 are new features (including small features). So, in despite of the name "bugs" they are mostly new features.

Now for branch master:

281074: prevents crash when ethernet carrier goes off in wired connections.
280826: fix plasma Shell crush after the mobile boardband connection stoping.
280701: treat ad-hoc connections as normal wifi connections in connection list.
. when in WDS mode there will be several access points with the same ssid, choose the one with strongest signal instead of the first one found when selecting the BSSID.
. add one tooltip for the the Show More button and one for the system connection checkbox in edit connection dialog.
. simplify wireless edit dialog.
. use the correct column when updating the LastUsed info in Manage Connection widget.
. prevents crash when disabling the bluetooth controller with interface details opened for a bluetooth device. Also adds missing method setModemCardIface to Solid's NM frontend.
. remove obsolete user-name stuff from OpenVPN.
. fix loading/saving of VPN connections.
. disable NetworkManager going offline notification by default.

Monday, August 29, 2011

Slackshow, iptraf and 3G

Yesterday I presented an Introduction to Qt Programming mini-course in Slackshow 2011. Slackshow is the annual Brazilian Slackware users meeting, which this year took place in Belo Horizonte city at FUMEC faculty. Months ago one of the organizers, Renato Gravino, invited me to present a lecture and so I did :-) People at the event was very entusiastic and I think people enjoyed the mini-course. I did not take any photos, sorry. I was entertained presenting the mini-course and talking to people.

After finishing my presentation I want to the third floor to watch the final presentation about kernel driver writing. When I am not fixing bugs in Plasmas NM sometimes I also fix bugs in the Linux kernel, one of them even required me to rewrite almost half of my webcam's driver some years ago. During the question section at the end of the presentation one of the attendees asked why iptraf (or iptraf-ng for the matter) does not work with his 3G modem. Well, I have the answer for that. For those who do not know iptraf is a ncurses program to monitor network interfaces:

iptraf is not maintained anymore. Sometime ago someone created iptraf-ng (iptraf next generation), a fork of iptraf, as an alternative to keep using iptraf. Well, the fact is that iptraf and iptraf-ng do not search for USB network interfaces, which are used by several 3G modems nowadays. You need to apply this patch I created and recompile iptraf to fix the problem. Yesterday I sent the patch to iptraf-ng's maintainer, let's seen how much time it will take for it to be applied.

iptraf also requires CONFIG_USB_MON=y in kernel's configuration to monitor USB interfaces. Probably this is the default setting in most kernel's out there, but it was not in mine when I first faced this problem.

If you still use iptraf / iptraf-ng and 3G modem enjoy iptraf working with your modem :-) And thanks for Slackshow's organizers for inviting me for the event.

Friday, August 19, 2011

Wireless sharing with Plasma NM 0.9 (part 2)

In my last post about shared connections I asked how I could make shared connections easier to setup. I have received some suggestions, but some of them were not that easy to implement (drag'n drop one connection onto an interface widget in Plasma NM's main window) or still not easy to understand how to use. Then I got an idea to just add a new entry in the "Add" button, similar to when creating VPN connections. I am here to ask what you all think about this change to the connection editor:

And after selecting the "Shared" option:

You still can use the normal dialog to create wireless shared connections, but the unneeded widgets will not be hidden and the dialog will look like this:

Now the user just need to click on the OK button to finish the setup. The default configuration is to use no encryption, you still need to go to the Wireless Security tab to setup the encrytion key. You can also create wired shared connections in the same way.

The patch has not been commited yet, I want to hear your oppinions before I commit it.

Friday, August 12, 2011

Wireless sharing with Plasma NM 0.9

During Desktop Summit in Berlin some people asked me how to make wireless sharing work. Connection sharing allows to use a computer as gateway for other computers, NM does that by routing all IP packages from one network interface to the default route of your computer (yes, that is a Masquerate configuration). For example, you can configure your notebook to access Internet through ethernet cable and create a wifi shared connection to allow other computers to access Internet using your notebook's default route. Your notebook will act like an access point.

Here are the steps I use with NM-0.9:
  1. Create an ad-hoc connection:
  2. Go to IPv4 tab and change the method to "shared":
  3. If you prefer you can also use WEP encrytion, just go to "Wireless Security" tab, fill in the hexadecimal key or passphrase and click Ok:

  4. Go to the main window, click on the connection, and wait a few seconds until it is activated:

Sometimes my connection does not activate and NetworkManager shows this warning in its log:

NetworkManager[25305]: Activation (wlan0/wireless): association took too long, failing activation.

rmmod'ing the wifi's kernel module and loading it again usually solves this problem for me.

To use WPA instead of WEP in shared connections NM must change wireless card mode to "master", which is only possible when using hostapd (AFAIK). Unfortunately NM does not support using hostapd yet, so it is also not possible to use WPA in shared connections.

People also asked me to simplify the steps to create shared connections. Well, I am open to suggestions. Adding a checkbox or combobox in connection edit dialog is not a good idea. We already have too many options there, I really do not want to add one more widget to do just the only two required configuration changes (in ethernet case it is just one change) to convert a normal connection to a shared connection.

Friday, August 5, 2011

Desktop Summit 2011

I am already in Berlin. Gorgeous city and impressive too. I did not make it to c-base before 21:00 so I will have to register tomorrow :-/ Well, now let's sleep, more than 24h of traveling is exausting, specially because I do not sleep during flights, so it is also more than 24h without sleeping. Zzzzzzz

Wednesday, July 27, 2011

Plasma NM: bugs fixed after 4.6.5

Below is the list of bugs fixed between 4.6.5 release date (July 5th) and 4.7.0 release date (July 27th). If you want to read the list of bugs fixed before that read my last post bugs fixed in Plasma NM.

. Changes networkmanagement_configshell to update an existing bluetooth connection instead of adding a second one.
. Force NM to update a connection when it's name changes instead of creating a new connection file in /etc/NetworkManager/system-connections/ with the name uuid.
. Set correct uuid when updating connection.
278231: Fix problem with modem HUAWEI E220 not working without auto-connect attribute
. Fix notifications localization.
. Fix user being unable to launch configshell from plasmoid after running ManageConnectionWidget from within Plasma.
253317: Fix edit connection dialog blocks plasma.
. Fill in the file name filter in kfile dialog when importing VPN configurations so that users can know what file extensions are supported.
276406: Fix closing network manager config window before dismissing policykit prompt results in crash.

And for nm09 branch:

277889: Fixes crash when editing connections.
194099: Support for importing/exporting OpenVPN connections.
. Changes networkmanagement_configshell to update an existing bluetooth connection instead of adding a second one.
. Force NM to update a connection when it's name changes instead of creating a new connection file in /etc/NetworkManager/system-connections/ with the name uuid.
. Fix NM-0.8's connection importer which was broken since last month.
. Set correct uuid when updating connection.
. Fix show passwords checkbox in vpnc widget
278231: Fix problem with modem HUAWEI E220 not working without auto-connect attribute.
. Initialize VPN buttons only once per session in ManageConnectionWidget.
. Fix notifications localization.
. Fix user being unable to launch configshell from plasmoid after running ManageConnectionWidget from within Plasma.
253317: Fix edit connection dialog blocks plasma.
. Add support for all the options NM vpnc plugin supports.
269951277354: Port all VPN-Plugins which support this to the new secrets flags system. Add auth-dialogs for OpenVPN and PTTP. Fix some minor bugs.
271491: Calculates connection list item's height based on default font height. Minimum height is 28 pixels.
. Improves error message report when importing VPN configuration file.
219118: Add support for vpnc hybrid authentication.
. Disables hidden item until hidden essid is fully working. It seems NM-0.9 can dectect them by itself, so I think we will not need to use this in.
. Fill in the file name filter in kfile dialog when importing VPN configurations so that users can know what file extensions are supported.
. Do not "showMore" when wireless is disabled.
251214: Show error if Gsm PIN/PUK unlock fails.
246327: Add option to show network speed in KB/s or KBits/s in interface details widget.
182451: Indicate active connections in Manager Connections widget. Still does not work for VPN connections.

Recommend snapshots:

For master branch: bb6e3b82dd23f05df8d875627622195e291b5a6d
For nm09 branch: eb9a97abe1cb8dc848939514b5ead0be2a92cecc

E-sata, solid, and udisks (part 2)

In my first post about e-sata, solid and udisks I wrote about how to hack udisks to inform solid that a disk attached to a specified sata port is actually a removable disk. Udisks-1.0.3 includes a modified patch that allows to do that without applying the patch ourselves. We still need to add the udev rule to indicate which sata port is to be considered "non system internal". The udev rules is slightly diferent from the one I wrote about in my last Solid post:

File /etc/udev/rules.d/99-esata.rules
DEVPATH=="/devices/pci0000:00/0000:00:1f.2/host4/*", ENV{UDISKS_SYSTEM_INTERNAL}="0"

Change the DEVPATH to match your e-sata port. You can find it using the command:

evolucao ~ # find /sys/devices/ -name sdb

Then reload udev rules after creating/editing the file above: udevadm control --reload-rules

Now the bad news: udisks includes several attributes to a disk, among then are "system internal" and "removable". Removable means removable media (like optical discs, card readers, etc). System internal means the device is "fixed" to the computer, it cannot be removed without turning the computer off, like sata disks. E-sata is in between those two, for sure it is not system internal and technically it is not removable media according to udisks criteria too.

Currently Solid uses udisks' eject command to eject e-sata disks but since an e-sata disk is not removable media and the disk has not actually been removed (detached from the e-sata port) udisks signals that a new disk is available and kded remounts the disk right after the eject command succeeds (bug #277517).

We could use udisks' detach command instead of eject, but udisks seems to refuse to use it with devices with removable flag set to false, which is the case for e-sata disks. Anyway, sometimes we just want to unmount the partition but not turn the disk off, in that case udisks' detach command is inadequate since you will need to turn the disk off and on to use it again.

I think:  1. Solid should stop using udisks' eject command for e-sata partitions (/dev/sdb1, /dev/sdb2, etc) and use the umount command instead. 2. For the entire e-sata disk (/dev/sdb) we should use udisks' detach command, but that will only work when 3. someone fixes udisks to allow executing the detach command for all non system internal devices and not only for the removable ones.

We can do #1 right now. #2 requires some GUI to call the detach command, something that can be used in device notifier plasmoid. #3 is upstream bug :-/

When I have more time I will try to solve this, but for now I am busy and with a dead line approaching, so if someone wants to take the task to fix this problem feel free to do it.