Online Search Results in the Shell

Turns out, Amazon is a river!The discussion around including online search results in the workspace, and especially in the app starter, reminded me of a discussion we had some time ago about including online search in KRunner queries. First of all, I think the idea of including online search results directly in the shell is great. It’s not new by any means, but it serves value to the user, and in fact, I use it daily and would not want to miss it.

In KDE Plasma, we do that for a few years already. I recall sitting down during the Gran Canaria Desktop Summit in 2009 with Richard Moore and hacking on a KRunner plugin that includes results from Wikipedia and Wikitravel in the KRunner search results. We got that working pretty quickly, and the plugin is shipped on most installations of Plasma Desktop out in the wild nowadays, and nobody complained. How come?

Privacy by Default

First of all, we do it quite differently from the way Canonical does it in Ubuntu. Sending every search query to an online service forms a privacy problem. Especially when not using SSL encrypted HTTP requests, people around you can basically wiretap your traffic almost trivially, or intercept it using man-in-the-middle-attacks. Also, the service receives all your queries as well, not something I’d want in general. Even if I trust someone in principle doesn’t mean I have to tell them everything I do.

Finding videos on youtubeWhile we ship plugins that promote Free culture (in this case Wikipedia and Wikitravel), one could easily add support for Amazon as well, and of course for all kinds of search engines. (We do include a couple of proprietary web services in KDE, but we’d never silently send them data when it’s not clear to the user or explicitely asked for) What we, as Plasma maintainers will not accept however, is triggering these online requests on every query typed. Basically, we won’t send anything across the net without the user explicitely requesting us to do so.

Maybe we could raise some funds this way, but we think that our users are best served with a system that gets advertisement out of the way. I’m personally easily annoyed by commercial offerings which jump into my face without me asking for it, and I understand I’m not the only one.

Earning Money through affiliate programmes

A few months ago, David Faure, the maintainer of Konqueror, KIO and a lot of other important pieces in KDE got contactetd by the DuckDuckGo search engine. DuckDuckGo asked if KDE would be willing to take part in their affiliate programme. David passed this on to KDE e.V. and offered to do the necessary changes on the code side if we decide to go ahead with this. DDG offered us to receive 25% of their earnings per clicked ad when the user searched through Konqueror (or in fact through the webshortcut). As we have already been shipping a search provider for DuckDuckGo for quite some time, it was enough to add KDE to the search query and sign a form with KDE e.V.’s banking details. That’s some free money, maybe not much, but who knows and every bit helps. The impact technically and to the user is minimal, and it didn’t require any changes to our privacy principles and setting, so ahead we went.
That means, if you feel like supporting KDE through your online search, that’s easy: Use the ddg: search provider (see below). This works starting with 4.9.0.

Online, but respecting privacy

So, offline and private by default, but how can we still include all the goodness from the Internet in your local search results, so we save you a trip to your webbrowser when we can? There are a few ways you can easily query online services from your desktop:

  • Wikipedia, Wikitravel (and other MediaWiki-based services): ALT+F2, enter “wiki $YOURQUERY”
  • Videos on Youtube: ALT+F2, enter “videos $YOURQUERY”
  • Google search: ALT+F2, enter “gg:$YOURQUERY” (use ggi: for google images, dd: for DuckDuckGo, amz: for Amazon, qt: for Qt API documentation, php: for PHP docs, many, many more are available as well, have a look at Konqueror’s webshortcuts for a full list, all of those are transparantly supported in KRunner as well)

Please have your cake, and eat it, too! :-)

12 thoughts on “Online Search Results in the Shell

  1. KDe… Just perfect! I didn’t know it the konqueror+duckduckgo program, so I’ve just learned a new way to help KDE… ;)

  2. Yes, this seems to strike a reasonable balance to me.

    I’d wager there are multitude of different ways to expose deeply integrated search and still keep the network query an explicit interaction inside the scope of a particular UI design, even if it were a vastly different design and usage paradigm to plasma.

    Firing off network queries to 3rd party search resources without explicit permission from the user, just feels wrong.


  3. in the Chakra distribution DuckDuckGo shortcut is dd and WikiPedia is wp users better lookup under systemsettings>AccountDetails>WebShortcuts and activate the ones they want or change the shortcut name.
    Some issue (or maybe not) i faced is that when searching videos: and the desired name i get youtube video results integrated into my KDE search and launch activity (or under the krunner dialog) but with gg, dd, amz, wp and all others you just see a suggestion to use this service to search with your default browser and not the actual results integrated into your activity/krunner.
    is something wrong with my distribution default settings or this is what is supposed to do?
    to better understand what i am talking about i uploaded some screenshots into this album:

    Kyriakos Brastianos

    1. “wiki $QUERY and “wp:$QUERY” are different things, the former will search online and display the results in KRunner, the latter offers to surf to a page on Wikipedia called $QUERY. The latter ones come directly from the webshortcuts, and are basically bridged into KRunner, the MediaWiki and YouTube plugins are “native” KRunner plugins.

  4. I wonder, as KRunner is basically looking more like Spotlight on the Mac, would it make sense to change the shortcut as well? I find Alt+F2 a bit of a hidden feature, while Spotlight has a much more prominent space on the desktop. The Spotlight key combination Command/Meta + space is way more accessible compared to Alt+F2.

  5. Alt+F2 is a hidden feature. KDE should stop pushing it so much (it is developer centric) and make something discoverable for all users. Also, pressing Alt+F2 is something that hurts my hand :-)
    And what normal users knows all the codes possible there? Clicking the ? at the moment here on my PC shows me the text ‘Creates characters from if it is a hexadecimal code or defined alia…’
    Can you image what a common user thinks after seeing this??

    Many people would _not_ mind automatically searching on amazon and such things, so for them a good way to not have to type wiki or amazon or whatever would be needed. Suggestion: A dropdown icon like in firefox search box, with desktop normal desktop, but with the added option of indicating via checkbuttons to automatically search different providers. I don’t mean the dropdown as now in settings, as that is much too long, just a short version with no more than 5 entries. Then in settings, people could add/remove to that list. As for settings, I have wikipedia checked, but nowhere visible I need to type wiki to use this.

    Next, instead of Alt+F2, make a plasma widget that is on the default KDE that performs the search. A setup with a lens on Ubuntu is not that bad, or overlay as windows. And as said, make sure all developor type of searches are hidden from the normal user. It is easy to say Kubuntu and others are to blame for not making the final touches, but the KDE can do better here, and give us something sane for normal as default. I rather change once some settings for myself to see more developer stuff, than having to edit kde config for every normal user I install linux for.

    1. KRunner is definitely designed as a feature for power users, and that’s OK.

      One could indeed turn the technology into something more discoverable, for example a Plasmoid, but I’d think of this as an alternative, rather than a replacement. Kickoff, by the way uses KRunner plugins for its search box, it just has most of them disabled (some whitelisted) for stability and performance reasons.

      The discoverability of the KRunner features could definitely be improved, agree.

      1. You can try with a Lens menu a la Ubuntu. The tech is there, the underpinnings are there, but the frontend is not.

      2. well, KDE Homerun Launcher does integrate Krunner
        and this is a great step ahead for the desktop, can replace Kickoff and Search&Launch palsmoid,
        so I’m expecting to see this QML menu as a default very, very soon :)

        another thing: it’s quite silly how “meta” button can’t be set as shortcut., à la unity/gnome3

        anyway, thumb up for the post

  6. The default shortcuts for duckduckgo are “duckduckgo”, “dd” or “dukgo”. Wasn’t aware of all these predefined shortcuts. Very handy!

Comments are closed.