Thursday, July 16, 2009

Security and the Cloud

I was browsing through my unread tweets earlier today and I came across tweets from Evan, the CEO of Twitter. Apparently some enterprising cracker had managed to guess the passwords of several Twitter employees and gain access to their confidential documents, then sent them to a popular tech startup blog. I do not condone the actions of the cracker nor those of the writers of that blog. I think what they did was unethical and will mostly likely be detrimental to Twitter; thus, I'd rather not direct you to their site and increase their traffic. I'll be honest: I love Twitter. As much as I could easily write an entry extolling them while condemning the cracker and his cohorts, I leave that up to other concerned users. While everyone else is fixated on what this means for Twitter, no doubt focusing on its ambitious plans, the whole fiasco struck me more as a failure of cloud computing. What most people don't realize is the exploits of one fame seeking cracker not only undermined the plans and operations of Twitter, but also highlighted some problems of widespread corporate adoption of cloud computing.

The proponents of cloud computing, particularly at Google, would like us to believe that cloud computing is safe, and perhaps safer than traditional hosting solutions. They argue that your fragments of your data are distributed across several servers and in the event a single server is compromised, the attacker won't be able to retrieve your data as he will only have access to a possibly useless fragment. While this may hold true for attacks against servers, I prefer to exercise restraint when claiming cloud computing in general is safe.

The biggest strength of cloud computing is its ability to turn any internet connected device into your personal computer. Its main selling point is you can access your files from anywhere. It frees you from being restricted to a single device and its associated limitations or from the difficulty of synchronizing multiple devices. For instance, suppose your laptop/netbook is somehow irreparably damaged, cloud computing would spare you from 1) scrambling for the latest backup files, and 2) the pains of having to configure your replacement laptop. In fact, given any device can become your own personal computer, you can stop lugging around that heavy laptop with that clunky hard drive altogether.

Its biggest weakness: "you" can access your files from anywhere. Without the need to physically access a target device, your data is no longer secure once your credentials are compromised. While cloud computing may have defenses in place against attacks on servers, it has always been far easier to compromise the account of an individual user than it is to compromise an entire server. Granted, this is an issue shared with most, if not all, networks connected to the internet. However, cloud computing amplifies this problem by having all your data readily accessible from the internet.

Of course, the problem could be somewhat mitigated by a security policy that enforces requirements on password strength, as well as setting a finite time for the period of its validity. On the server end, it would help to support seamless encryption with private keys being stored locally (although this would go against the whole “any computer can become your computer” concept.)

There are other issues which I believe to be of lesser importance and will refrain from discussing in this blog but will address in another blog concerning Chrome OS in the near future.

Thursday, May 28, 2009

@replies, direct message support in a plasmoid

Felt the microblog plasmoid would be more useful if it displayed mentions and direct messages so I gave it a little love. :)

I have a couple more itches to scratch but hopefully this will be in KDE 4.4.

Friday, January 30, 2009

Multiple Actions for KRunner in KDE 4.2

I'd been meaning to blog in a quite a while but didn't quite have the time to do so. For much of December and January I had been exclusively using Ruby. It got to the point that when I finally got a little bored with Ruby and decided to resume work on KDE related projects again, it took several seconds for it to register in my brain that comments don't begin with a # in C++. Anyway, now that 4.2.0 is released I figured I could give a semi-technical discussion of what's new in 4.2.0 with regards to KRunner.

Multiple action support

As mentioned in some of my previous posts, KRunner now supports multiple actions. What does this mean for ordinary users? Well, prior to 4.2, runners (or the plugins that provide the matches for a search), could only provide a default action usually corresponding to "open". For example, given an html document match, KRunner would open it with the default viewer, in most cases the web browser. This isn't a problem if you wanted to view the file, however, if you wanted to edit it with a text editor, this behavior is not ideal. Multiple action support allows us to add another action such as "Edit" that would allow us to edit the file instead of opening it with the default browser. We could even add another action to open the file with a different browser.

Unfortunately, there are no runners included with 4.2.0 that support multiple actions. For this reason, I am bundling together two runners that support multiple actions and releasing it in The first runner is a modified desktop search runner that adds open with actions and service menu support. For those of you who were former Katapult users and grew fond of the Amarok plugin, the service menu support will allow you to play, append to your playlist, or queue any track nepomuk has found. There is a typo in the service menu desktop file though, replace amarok -e with amarok -a. You'll also need to create a script to call the correct DBus methods because the service menu contains an outdated command for the "append and play" action.

The second runner is a window management runner. It can perform any action that supported by the task manager of the panel, aside from moving a window. That means you can minimize/maximize, or shade a window, move it to a different desktop, keep it above other windows and many other actions.

For the developer seeking to take advantage of multiple action support, reimplementing the actionsForMatch method and modifying the run method are all that need to be done. For convenience, commonly used actions can be stored by the runner by calling the addAction method and the action can be retrieved by calling the action method. The run method of the runner needs to distinguish between actions and can determine the selected action by calling the selectedAction method of the match. Because it is possible that the user interface does not support multiple actions, the run method also needs to support a default action in case no action is selected.

For example given:

void FooRunner::run(const Plasma::RunnerContext &context, const Plasma::QueryMatch &match)

adding multiple action support is as easy as:

QList FooRunner::actionsForMatch(const Plasma::QueryMatch &match)
// In some cases we'd want to examine the match and choose appropriate actions based on it
// but in this example we assume all matches have the same actions
if (!action("foo")) {
addAction("foo", QIcon(), "Foo");
if (!action("bar")) {
addAction("bar", QIcon(), "Bar");
QList ret << action("foo") << action("bar");
return ret;

void FooRunner::run(const Plasma::RunnerContext &context, const Plasma::QueryMatch &match)
// Check if an action was selected
if (QAction *a = match.selectedAction()) {
if (a == action("foo")) {
// Perform the default action


Despite the fact that KRunner now comes with multiple-action support, the default interface does not expose this functionality. KRunner now comes with an alternative interface that allows you to make use of multiple actions. In order to enable it, open the configuration dialog by clicking on the wrench icon, click on the interface tab and select the "task-oriented" option.

If a match supports multiple actions, a second pane containing the actions will appear below the match pane. Press tab to switch to the action pane or click on the arrow icon on the top right portion of the action pane.

Note: Bugfixes for QuickSand didn't make it in time for 4.2.0 so the experience might not be as smooth as it could be. I missed the tagging by 28 hours. Oops. They should be in 4.2.1 though.

Friday, November 7, 2008

Runner Services

I felt the urge to see what I could do with libkonq so I played around a bit with the Nepomuk search runner last week and came out with this:

Open with actions and service menu support work with my copy of the nepomuk search runner. :) The open with dialog correctly appears, the amarok queue track action also works (but append & play doesn't because the dbus call is wrong.)

I'm still looking for more runners to add multiple actions to so if you have any ideas, tell me :D

Thursday, October 23, 2008


My apologies to everyone, I have been busy working on my thesis of late. I knew that neglecting it for too long would backfire on me sometime and for the past month I've holed myself up at home until I finished it.

Unfortunately, aside from completely wreaking havoc on my social life, which all geeks should have, it also had the nasty side effect of robbing me of time to work on anything related to KDE.

Anyway, I found a couple of free hours and I decided to fix up the 4.1 branch of QuickSand which is now in I make no guarantees about application stability for the 4.1 version as I have been unable to test it much given my limited development time. For those of you who wanted to try it out though, feel free to do so. :)

Friday, September 26, 2008

A few clarifications

I realize that my last post didn't make things clear enough for everyone to understand so let me address some questions about QuickSand.

What exactly is QuickSand?
It is simply an alternative to the spinning squares in the default KRunner interface. At its core, it is still powered by the infrastructure of KRunner.

Where can I get it?
If you read the latest commit digest, you'll see I committed it to playground. It's in trunk/playground/base/plasma/quicksand. But before you checkout the sources, let me address a related question.

Can I run QuickSand in KDE 4.1 and lower?
No. Actually, you can't even compile it using the code in trunk. Multiple action support requires two things: 1) a patched libplasma that supports multiple actions, and 2) runners that actually use multiple actions. To fix #1, there's a patch included in the directory. The patch is against trunk/KDE/kdebase/workspace. #2 is not really an issue but runners that have multiple actions can be found in playground (mediaplayer and windows directories).

Won't you release a KDE 4.1 version?
The interface itself can be run in KDE 4.1.x. Initial development occured on my stable 4.1.1 installation. I still have a KDE 4.1 branch locally. However, multiple action support requires the use of a patch which is against trunk. If enough people clamor for a 4.1.x version I could release a QuickSand version without multiple action support. (Please do not send me e-mail asking for one, a comment here would suffice.)

Are we aping GNOME Do?
No. Similarities between GNOME Do and QuickSand are due to the fact that they are both inspired by Quicksilver. If anything, QuickSand is more related to Katapult than the relatively new GNOME Do. GNOME Do and Katapult mimicked the Bezel interface. QuickSand emulates the default interface (Primer) but I think most of you will agree it looks way better.

The primary inspiration for making KRunner multithreaded was my experience getting multithreading to work properly with Katapult. Anyone remember Katapult-Fast Track? One of the comments for Katapult-Fast Track encouraged me to work on KRunner. Well, guess what... I did. :)

Recall the feature list of improvements in Katapult-Fast Track: real transparency, multiple matches per search, multiple actions per match, and multiple threads. These have all been implemented (or at the very least are in the process of being implemented) in KRunner (and thus QuickSand). All that's really left is adaptive search. Oh yeah, would have loved to do all of this for GSoC. :)

Can't you just get rid of the popup box?
The design isn't _all_ about eyecandy. Sure only having scrolling icons may look nice, but in practice it may be difficult to work with. Take the following picture as an example.

Can anyone tell me which is the match for result.h without scrolling through all items? Thought so.

I don't want to _have_ to scroll through all the items to find one particular match. Having the popup completion box makes it easy to distinguish between items with similar icons and select the desired match immediately. The popup completion box also enables interaction with the mouse. Scrolling through the items and selecting matches when the popup box is not shown can currently only be done using the keyboard.

Don't want to see the popup box? Just press escape or click elsewhere. Never want to see it? I'll add an option to hide it in the config dialog sometime soon.

Miscellaneous stuff:

A picture of text mode which I forgot to include.

And just a minor plug, I like where the Raptor menu is going. :)

Monday, September 22, 2008


Didn't get the following to Danny on time. Anyway here it is :)

Introducing QuickSand

QuickSand is an alternative interface heavily inspired by the Primer interface of Quicksilver in Mac OS X.

QuickSand differs from the current KRunner interface in several ways. QuickSand has 3 different display modes: Icon Parade, Selected Item, and Text mode. The default display mode is "Icon Parade". Instead of displaying a line-edit, QuickSand presents the user with a match pane asking the user to type something to be searched. Upon typing, the search string is displayed on the upper left corner of the match pane. If matches are found, the number of matches is displayed on the upper right corner of the match pane. The icons are of the matches are lined up horizontally in the match pane and a popup completion box is shown to guide the user in selecting the appropriate match. The user can scroll through the available matches by pressing the up and down keys (when the popup box is shown) or the left and right keys.

Hitting enter will select the match and display only the selected item. Clicking on the arrow on the upper right corner of the match pane will toggle between Icon Parade and Selected Item modes.

If the user would rather see a line edit, pressing the period (.) key will change the display to text mode. A line edit will replace the scrolling icons in the match pane.

One of the primary reasons for writing QuickSand was to provide support for multiple actions. For example a match for an open application window can have several actions associated with it. The window can be minimized, set on all desktops, etc. QuickSand supports multiple actions in the same manner as matches for a search. If a particular match has several actions associated with it, an action pane appears below the match pane with the first action selected. Pressing tab will switch to the action pane and the user can select from the various available actions in the same manner as matches.

Hopefully, QuickSand will be provided as an option in KRunner allowing users to select between the default interface and QuickSand.

Another future development would be support for actions that require objects/targets. For example given a match for a file "sshot.jpg" and an action of "e-mail to...", a possible object would be "". Support for objects would be as simple as placing an object pane below the action pane and displaying it whenever the currently selected action requires an object.