Search This Blog

Monday, February 27, 2012

Plasma NM 0.9.0

Well, I would like to have fixed bug "networkmanagement's kded module crashes when opening kwallet" before this release but I have not been able to reproduce it, so I have not figure out how to fix it. I am doing this release basically to push the changes to make Plasma NM resilient to problems when contacting kded, which is the cause of "desktop freezes" bug.

Since I do not have more release candidate numbers left after rc4 I had to use 0.9.0, so here it goes:

Plasma NM 0.9.0
MD5Sum: e39fbc01166c8019104a03c03af890e4
SHA1Sum: ed5aaff8ed7d52f2541eca27f5bf15792cd97f8e7f8014c0fe9ab8e73f2cab2f

Kubuntu packages:


294777: Fix "Last Used label resets to Never after a minute".
. Use preferences-system-network as KCM icon.
. Enable/Disable OK button when prompting user for secretes, and fix WEP key validator.
293711: Add about data for kcm modules.
293691: Use localized provider's name and plan in Mobile Connection Wizard.
293045: Mark GSM password as NotRequired if it is empty.
. Add warning messages to debug possible dangling pointer.
209464: Fix wifi hidden network support.
293068: Allow creating cdma connections when no cdma device is plugged.
. Don’t show GSM Access technology in tray icon while connecting as it obscures the connecting progress bar.
290964: Fix and workaround graphical artifacts caused by upgrading to KDE SC 4.8.0.
287002, 282022, 286424: Use asynchronous DBus API in plasmoid and kded module communication.

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

ar ca ca@valencia cs da de el es et hr hu it km lt nb nds nl pa pl pt pt_BR ru sk sv uk zh_CN zh_TW

Sunday, February 26, 2012

QML'izing Plasma NM

Some weeks ago another guy from Brazil (I am also from Brazil) contact me interested in me mentoring him in GSoc. His name is Arthur de Souza Ribeiro and since Alex Fiestas had already asked me to mentor someone to implement a nicer QML plasmoid for Plasma NM I accepted the task :-) I also already wanted to try QML in Plasma NM but changing Plasma NM GUI and fixing all the other problems not related to the GUI is not being easy without help. Since Ilia Kats is also busy with his Ph.D. in biology I am a little lonely doing the Plasma NM stuff. From time to time I still receive usefull patches, so it is not completely lonely :-)

I already added my GSoc proposal to the ideas page and subscribed to, now is wait and see if the proposal will be accepted or not. Meanwhile I already passed some material for Arthur to study and pushed a commit to add a #ifdef to show a QML view instead of the current popup.

Just to make it clear: the plasmoid is the system tray icon, what you see when clicking on the system tray icon is just the plasmoid's popup. What my #ifdef does is make the plasmoid (the system tray icon) show a QML view instead of the current QGraphisWidget popup. The current QML view just shows my name :-)

Friday, February 24, 2012

New QML Shutdown Dialog in 4.9.0

After some time here is me blogging again. I have been very busy working so no time for Plasma NM and the other KDE stuff. On the other hand one of the KDE stuff is now in kde-workspace master to be released with KDE SC 4.9.0 :-D

Early this month I pushed the QML shutdown dialog implementation I did for basysKom:

The looking is almost the same as the old one, but if you program in QML you can change it. I think you can also use Qt Creator to create new themes for ksmserver.

The default theme above resides in $(kde4-config --path data --locate ksmserver/themes/default/). There are four .qml files, one .js and one .desktop there. main.qml is the most important one. Basically main.qml is the dialog and the only requirement for it is emitting the signals to actually trigger actions:

    signal logoutRequested()
    signal haltRequested()
    signal suspendRequested(int spdMethod)
    signal rebootRequested()
    signal rebootRequested2(int opt)
    signal cancelRequested()
    signal lockScreenRequested()

spdMethod is one of values of the enum Solid::PowerManagement::SleepState (StandbyState, SuspendState or HibernateState). StandbyState is rarely used nowadays but still supported.

The opt parameter in rebootRequested2 contains the index of the chosen boot option in the reboot menu (more on that later). The rebootRequested() reboots the system without changing grub's configuration. The other signals are self-explanatory.

Some important information are passed as QML properties from the C++ ksmserver to the dialog:
  • bootManager: string identifying the boot manager installed on the computer. It can be "Grub", "Grub2", "Burg", etc.
  • choose, sdtype, maysd: those are the same parameters (in the same order) used with "qdbus org.kde.ksmserver /KSMServer logout x y z" and KWorkSpace::requestShutDown(ShutdownConfirm, ShutdownType, ShutdownMode). Read /usr/include/kworkspace/kworkspace.h for the long explanation about them.
  • rebootOptions is a hash (associative array). rebootOptions["options"] is string list containing the OSs configured in grub. It is used to create the boot menu in the screenshot above. rebootRequested2 passes the index (starts from zero) of this string list as parameter. rebootOptions["default"] is the index of the current selected option in rebootOptions["options"].
  • ShutdownType and spdMethods are the Javascript versions of the enums KWorkSpace::ShutdownType (/usr/include/kworkspace/kworkspace.h) and Solid::PowerManagement::SleepState (/usr/include/solid/powermanagement.h). Added as convinience so that you do not need to use hardcoded integer values.

OBS: I think QML does not support passing other variables as default value for properties between { } like in the line:

contextMenu.append({itemIndex: spdMethods.HibernateState, itemText: i18n("Suspend to &Disk")})

spdMethods.HibernateState is equal to 4 but itemIndex is 1 when I read it. I had to use hardcoded values in shutdown button's menu to avoid this problem.

Sunday, February 5, 2012

DSL connections in Plasma NM

One of the things I would like to have working well in Plasma NM is DSL support. Unfortunatelly, I do not have easy access to any DSL provider so I cannot test the current support for DSL in Plasma NM. I do not even know if the support really works. I asked if it works in the bug entry about DSL support and only one person has answered saying it works so I assumed it does work.

Last week I was surffing the web and stumbled accross this post in a Brazilian forum (it is Brazilian Portuguese) explaining how to set up a DSL connection in Plasma NM. Basically Plasma NM really works with DSL, which is great, but there is a catch: you need to disable the auto-connect option for the wired connection that uses the same device that the DSL connection uses. Explaining: DSL works over ethernet (more common), wifi, and maybe over other devices. When the device (ethernet) is meant to be used with DSL you must disable the auto-connect feature in the wired connection associated to that device. First create a system DSL connection:

In the Ethernet tab restrict the connection to a specific ethernet device. If you have more than one ethernet device do not be afraid, the "eth0" below is just an user-friendly way to select the device, what Plasma NM really uses is the device's MAC address. If for example you have eth0 and eth1 in your system, then you restrict to eth0 but for some reason the system swaps eth0 for eth1, Plasma NM is smart enough to see that and it will automatically change the configuration to eth1.

Save the configuration by clicking on the Ok button and go to the Wired tab in Plasma NM's kcm (k control module):

Click on "Edit", the edit dialog will appear. Go to the connections's "Ethernet" tab and disable "Connect automatically" and check "System connection" to allow the system (NetworkManager) to use the connection without you need to open a KDE session first:

Save the configuration by clickling on the Ok button and try to connect. You can check if it is connected in Interface Details for the wired connection (I got this screenshot from the forum, that is why it is in Brazilian Portuguese):

Notice the "Nome do sistema" field (System name) showing "ppp0", that means the connection is really active.

For some reason nm-applet does not require changing the wired connection configuration, which sounds reasonable. But without a connection to test it will take me time to figure out how to make that work. Until then DSL users can use the configuration above.