Search This Blog

Saturday, November 15, 2014

Installing Plasma 5 on Gentoo Linux: problems and fixes

Yesterday I removed my Plasma 4 installation and installed Plasma 5. I know it is not ready for production yet but, you know, I am a KDE developer and want to contribute to improve Plasma 5 :-)

I used Gentoo's live ebuilds to install Frameworks 5 and Plasma 5's master branches. After some... several... ok, many hours compiling things Plasma 5 was installed and then I had my first surprise: I need kwallet 4 installed to import my secrets into kwallet 5, but I had uninstalled it before start compiling Plasma 5. Solution: compile kwallet 4 :-/ and try again. However, it was not that simple.

I used to use kwallet 4.14.2 (Gentoo's unstable version) but I installed 4.12.5 (Gentoo's stable version) without kdepimlibs installed. There are two problems with what I did: 1. kwallet uses a different file format when compiled with kdepimlibs installed. Since it was not installed kwallet 4 failed to open my wallet with "Unsupported file format version" error. Desperation started growing into my heart (my secrets, my precious secrets...). Looking at kwallet's source code (I love open source programs for allowing me to do that) I noticed that I needed to recompile it against kdepimlibs. So I did and... it did not work, the same "Unsupported file format version" error message appeared. 2. Looking into kwallet's git log I noticed that the file format's version changed between kwallet 4.12.5 and 4.14.2. I recompiled kwallet 4.14.2 and then kwallet 5 was able to import my old wallet :-). Tip of the day: do not uninstall Plasma 4 before importing your wallet. For Gentoo users that be a problem since akonadi-server's ebuild is configured to prevent compiling both qt4 and qt5 versions and akonadi-server is a dependency to compile kdepimlibs. I had to force (emerge --nodeps) Gentoo to compile kdelibs, akonadi-server, kdepimlibs and kwallet ebuilds to solve this problem.

With my wallet imported I though I had finished with that. However, Google Chrome did not list/show any of my secrets. The problem: Chrome uses the old dbus names org.kde.kwalletd and /modules/kwalletd instead of org.kde.kwalletd5 and /modules/kwalletd5. At least for now I decided to recompile kwallet 5 to use the old names, it works. Maybe we should add a command line option to make kwallet5 to also register those old names for backward compatibility.

After configuring my personal options in systemsettings my Plasma 5 desktop looks as productive as my old Plasma 4 desktop, which by the way I completely removed after fixing the kwallet issue. I still miss some applications such as Amarok, Digikam, Superkaramba (I created four applets for it that I would like to keep using). Two others, kdialog and polkit-kde-agent, are already ported to Plasma 5 but there is no ebuild for then, so I created the ebuilds and installed them. The kdialog ebuild still needs tweaking though.

polkit-kde-agent is necessary to allow Plasma NM to read secrets from system connections, which are stored in NetworkManager. It is a important program not only for me but for anybody that uses Plasma NM. After compiling it it did not work at first (always crashing). I had to apply this patch from reviewboard to fix the crashes.

To replace Amarok I recompiled Vlc to enable its qt plugin, which is already ported to Qt5 but Vlc compilation system insisted in using Qt4's include and libs even though it detected Qt5. For that reason when g++ tried to find QtWidgets' includes it failed. QtWidgets does not exist in Qt4. My solution was to export those two variables before compiling Vlc:

export QT_CFLAGS=$(pkg-config Qt5Widgets --cflags)
export QT_LIBS=$(pkg-config Qt5Widgets --libs

Sorry to the bashism in the line aboves, but it makes things shorter :-P

Vlc works, but crashes everytime it quits, not a big problem except that it never saves may playlist :-/ I still can press Ctrl+1 to make it load the first directory in the recent used list. I had to tweak my qdbus script to make my global shortcuts for play previous/pause/play next song to work with Vlc. Now it works almost as Amarok, except for the fancy features such as tablatures, lyrics, playlist sorting that I used to use from time to time. For the time being it will suffice. By the way, what is happening (or not happening) with Amarok? The lastest release was more than a year ago. Will it be ported to Plasma 5? Is there a Plasma 5 replacement for it?

One feature I missed since yesterday was the hability to select "shutdown computer" from leave dialog. Being the one that ported the old QWidget based shutdown dialog to Qml I expected the new dialog to be located in /usr/share/apps/ksmserver/themes/default, but now it is located in /usr/share/plasma/look-and-feel/org.kde.breeze.desktop/contents/logout/Logout.qml. Plasma 4's shutdown dialog theme is still in /usr/share/apps/ksmserver/themes/. After digging into ksmserver and libkworkspace's source codes I figured out that using kwrapper5 with ksmserver prevents shutdown and restart buttons from appearing in the shutdown dialog. The problem is that org.freedesktop.ConsoleKit.Manager.CanStop always return false when ksmserver is started through kwrapper5. I had to edit startkde script to do not use kwrapper5. OBS: I am using sddm and consolekit.

There are some random crashes here in there, but Plasma 5 is usable for what I need. Now I am ready to start fixing Plasma 5 issues :-)

Wednesday, November 5, 2014

NetworkManagerQt is out

Bugs fixed in NMQt

. Add workaround to properly update IpInterface.
339652: Add IPv6 configuration for VPN connections (needed for OpenVPN).
. Remove IPv6 setting from cdma/gsm connections since NetworkManager does not support this configuration.

Thursday, August 28, 2014

LaKademy 2014

Hi again,

I am a bit absent from blogging due to personal issues. Fortunately, I am on vacation from my real life work since last weekend then I am going to have more time for one of the things a like most: working with KDE software and friends :-)

As you may know the Latin-american KDE meeting (LaKademy) is happening right now in São Paulo city, more precisely at Free Software Competence Center of IME-USP [1] and I here too. After a long time I am back to São Paulo city for more time than just taking connection flights hehe.

Yesterday was the first LaKademy's day and we had some presentations for the general public. During this second day Sandro Andrade is presenting his Qt programming course. In the next two days we will have hacking sessions on KDE software and as Plasma Network Management maintainer I am interested in making networking easy for KDE users.

Although I have not been pushing that much commits to network management repos [2] I used to do years ago I am still working on some improvements for the new Plasma NM, mostly non-visual changes though. Jan Grulich, Björn and Thomas Pfeiffer are doing a great job on Plasma NM's GUI so this task is in good hands.

My yesterday's LaKademy presentation was about what I am doing in Plasma NM and NetworkManager for that matter. Basically I am working on improving Eduroam support in Plasma NM with these two tasks:

  1. Passing more error information to the user so he/she can know if the problem is with his/her login, password, certificates, or with the local or the remote infra-structure, etc. With this information in hand the user can contact the correct person to solve connection issues, being the local network administrator or the network administrator of his/her university, who with Eduroam may not be the same person.
  2. Importing configuration file to make creating Edurom connections easier. Eduroam uses WPA2 Enterprise and as such its connections requires several technical details to be filled before you can use it. Check this connection dialog for my test Eduroam connection for instance, too many details:

The aim for task #2 is importing a xml file that contains all the information above, well, except the password, of course. There is already configuration importing support for OpenVPN and VPNC connections in Plasma NM, so this will be the third connection type that Plasma NM will suport that. This implementation may be used for other WPA2 Enterprise connections as well.

To implement task #1 I have been digging into wpa_supplicant and NetworkManager souce code in the last months (during my spare time). I already have a patch that gets the data from wpa_supplicant and now I am implementing code to set up the correct structures in NetworkManager. The code is generic and the result can be used by other NetworkManager clients as well, of course. When the patch is ready I am going to send it to NetworkManager's developers for reviewing.

[1] USP stands for University of São Paulo, the biggest and one of the most important Brazilian universities.

[2] there are networking code in plasma-nm, libmm-qt, libnm-qt, kdelibs, and kde-runtime repos and also in (the already deprecated) networkmanagement repo.

Saturday, July 5, 2014

NetworkManagerQt is out

After a long time here are some news on what is going on with NMQt:

. NMQt is going to be part of Frameworks 5 so this may be the last release on its own.

. We are still working on making NMQt ready for KF5, so it may not appear in the next version of KF5 just yet.

. Plasma NM is going to be part of kde-workspace and as you may know NMQt is a dependency for Plasma NM. Plasma 5 release is approaching and since we may not get NMQt ready for KF5 in time we decided to ship a snapshort of NMQt with kde-workspace so that Plasma NM compiles. In the future we will remove the snapshot and rely on the NMQt in KF5.

Bugs fixed in NMQt

. Avoid crashes when NetworkManager is restarted.
. Respect external CMAKE_CXX_FLAGS values.
331771: Add a workaround to always get updated IPv[46]Config.
. Properly update and notify about changed reference accesspoint.
. Bump required version of NetworkManager to
. Emit signal after available connection is removed instead of before.
. Bump soversion to indicate different binary application interface (ABI) than the previous releases ( to be precise).

Wednesday, April 23, 2014

Plasma NM

Plasma NM

SHA256Sum: 51f4f4d82d2475338f90bea7177d8cec92c9635809f4d5764c815e4ca3a6d33c

This may be the last Plasma NM 0.9.0.x release. If you have not moved to Plasma NM 0.9.3.x please do it.


. Port commit 947f56f1cd21a72fa0f88e1c42ac8c19e23864d0 from plasma-nm to fix building with openconnect >= 5.99. There are still some missing bits to fully support openconnect 5.99 tough.
331151: fix crash when retrieving NetworkManager's state.
. Add OpenSwan VPN plugin. Thanks Jan Grulich for this patch.
328189: Add more help information about VPNC's DES encryption setting.
317568: Fixes Plasma NM forgets 802.1x settings as soon as the dialog box is closed.

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

bs ca ca@valencia cs da de el es et fi fr gl hu ia it kk km ko lt nb nds nl pl pt pt_BR ro ru sk sl sr sr@ijekavian sr@ijekavianlatin sr@latin sv tr uk zh_CN zh_TW

Also read some very usefull information about how to use and avoid problems when using Plasma NM in my past posts page.

Saturday, February 15, 2014

ModemManagerQt and NetworkManagerQt: new releases

New versions of ModemManagerQt and NetworkManagerQt are out, respectively 1.0.1 and The changes are short, just some bugs fixes and small new features.

In ModemManagerQt:

. fix a crash when ModemManager is restarted.

In NetworkManagerQt:

. add workaround for wrongly updated ActiveConnection property.
. update doxygen documentation.
329260: avoid conditional jumps based on uninitialized values.
. add device property to WirelessNetwork.
. backport PrimaryConnection, ActivatingConnection and Connectivity properties.