Tag Archives: plasma

Another story of a patch, or of bugs, investigation, and fixing

As others, bigger members in the KDE community say, “nobody will do it for you, and therefore they will”. The patch from the title comes from such a story.

Let’s give some background first: I’m really a heavy activity user, especially when working. My home PC has about five activities, my work one 3, and I managed to compartimentalize the various “topics” that each activity does pretty well.

After an update a couple of weeks ago from the latest code from KDE git, I started noticing weird behavior. Activities would not start when stopped, and there was no way of getting an application on a single activity. As I had set up KWin rules, that made things even worse.

Like many KDE users before me, I found myself in front of a bug.

We got a problem… what to do?

What to do, indeed? First of all, I opened a bug report. There’s no way a KDE developer can find a bug if it occurs only to me if I don’t tell him/her. And since emails and IRC communication tend to get lost, it’s always better to use the bug tracker. However, my initial report was very sloppy, as I didn’t know what was the cause. There was no way it could be useful for Ivan (the kactivities library’s developer).

Hunting the beast

So first, I tried to investigate more about the conditions of the bug. What would trigger it? Why sometimes it seemed not to appear? I tracked it down to KWin’s handling of activities: setting up fresh activities meant that they worked, but only if it was restarted. I thought about pinging Martin, KWin’s maintainer, but I was not sure it was the right cause. As the bug made my activity usage worthless, I had two options: put up with it, or do some of the dirty work myself.

I chose the latter.

I have been learning C++, and while I’m not even close to being able to do something in Qt/KDE, it was enough for me to plant some debug information in KWin and in kactivitymanagerd, the activity manager daemon. After about two hours of tests and recompiles (remember, I’m quite inexperienced!) I found that KWin was not getting the lists of activities correctly from kactivitymanagerd.

But it was working before, wasn’t it? Exactly when, though? In that moment, I remembered that git offered a tool that would help me: git bisect. About thirty minutes later I found the commit causing the regression I was seeing. I then added all the information to the bug report. Not content, I also asked a few other people to reproduce it.

The solution

One of these was Aaron himself, who confirmed the issue and then brought it up to Ivan’s attention. With the information he had, he was able to find the cause and commit a possible fix to KDE’s git repository.

So what’s the conclusion of this? I doubt this would have happened without actually doing some of the dirty work myself. This does not mean you really need to go to these lengths when doing a bug report, but when you encounter one, try to give as much as information as possible: as you could see, my initial hypothesis of KWin being the culprit was not correct. If you file detailed bug reports, not only the developers will be able to fix the bugs faster, but it will also make their lives considerably better.

FOSS is all about collaboration and sharing: sharing my time to investigate an issue and helping the developer fix it made the software better for those that will use it tomorrow, or in the next version. And this is also possible thanks to the strength of the KDE community.

Screensavers and the KDE Workspaces – your opinion is needed

Recently in the Plasma mailing list, KDE developers have discussed a new screen-locking implementation that could be added to the upcoming 4.8 release of the KDE Workspaces. The first reason to do so was to solve some security constraints of the existing implementation. As an added bonus, screen locking should be also more aestetically pleasing.

There is however a trade-off: such implementation would mean that screensavers that rely on X (also called X screensavers) would not be compatible. The current plan is to have a fallback mechanism if a user has a screen saver configured, and remove the support for X scrensavers entirely by 4.9. It is the intention of the developers to ultimately provide a way to make screensavers with QtQuick (QML) and in a way that they could be shared via GHNS (e.g., places like kde-look.org). 
That said, this looks like a large change because existing functionality will change or be removed. Hence, to quote KWin maintainer’s Martin Graesslin,

We are not sure how our users would react if we remove the X screen savers and replace them by a new solution. We would like you to contribute and share your opinion. Tell us why you need screen savers and how you would think about if the currently used screen saver could no longer be used.

And how to gather your opinion? Through a poll. A poll has been opened in the KDE Community Forums by Martin himself to gather opinions on this upcoming change. Please jump in and let the developers know what you think!

Interesting plasmoid: Drop2Tag

While browsing around kde-look.org, I’ve stumbled upon a nice little Plasma scripted widget, and I’m publishing this to have it get more exposure.

A good part of the KDE community knows at least little about Nepomuk, and its ability to attach semantic tags to your files – basically words that describe the file, be it an image, a text document, or anything you’d like. For example, you could tag all the photos from your vacation with the name of the place you’ve been. After that, you can recall tagged files by accessing the nepomuksearch://hasTag:TAG_NAME url in Dolphin or Konqueror (there are more advanced uses, but I won’t cover them here), where TAG_NAME is your tag.

Up to now, the usual way to tag files was to either select them in batch and add a tag, or do them individually, then click “Add tag”, then select the tag or create a new one. It was kind of laborious, although not too complicated. And that’s where Drop2Tag comes in.

Drop2Tag in plasmoidviewer

Drop2Tag stays in your desktop, configured for one of your Nepomuk tags. Then, you just need to drag files to it to have them automatically tagged. Also, clicking on the big Nepomuk icon will open your file manager with the nepomuksearch://hasTag URL with the selected tag. Neat.

The plasmoid is written in Python (I’ve taken a look at its source) and despite being very early in development, it already does the job very nicely – I have put one on my “Graphics manipulation” desktop activity to tag photos and images. A nice addition would be to select the tag from the plasmoid itself, rather than using the configuration option – it would make things much more flexible. Perhaps a Plasma.ComboBox would do the job here.

In any case, I’d like to congratulate its author (nik3nt3) for a job well done.

The next iteration of the Plasma FAQ – call for help

A few may know that I more or less maintain the Plasma FAQ page on KDE’s UserBase. Given the rapid advance of Plasma between KDE versions, each time a new version is out a new FAQ needs to be made, as the content rapidly becomes obsolete. For 4.3, unfortunately, I’m not sure I’ll be able to put a new version up in time for the 4.3 release.

The reason is mostly practical: it takes a bit of work to collect and add information, and currently my free time is limited due to a rather heavy workload and some other commitments. As UserBase is a wiki, I thought I could ask the KDE community at large if I could get some help in having a new version ready before release.

The big advantage is that you don’t need any special coding skills, just a knowledge of Plasma and being able to run 4.3 (RC2 at this stage). I have already made a skeleton page: people can edit bits of information, removing outdated items and adding new ones. Also, Aaron’s excellent screencast can be used to see which new features are in Plasma.

If you have wondered how to help KDE without being able to code, this is a good opportunity to do so!