Index: nepomuksearch/queryclientwrapper.cpp
===================================================================
--- nepomuksearch/queryclientwrapper.cpp	(revision 1193800)
+++ nepomuksearch/queryclientwrapper.cpp	(working copy)
@@ -102,15 +102,18 @@
         QString type;
         QString iconName;
 
-        if (res.hasType(Nepomuk::Vocabulary::NFO::FileDataObject()) &&
-            KUrl(res.property(Nepomuk::Vocabulary::NIE::url()).toUrl()).isLocalFile()) {
+        KMimeType::Ptr mimetype;
+        if ( res.hasProperty(Nepomuk::Vocabulary::NIE::mimeType()) ) {
+            mimetype = KMimeType::mimeType( res.property(Nepomuk::Vocabulary::NIE::mimeType()).toString() );
+        } else if (res.hasType(Nepomuk::Vocabulary::NFO::FileDataObject()) &&
+                   KUrl(res.property(Nepomuk::Vocabulary::NIE::url()).toUrl()).isLocalFile()) {
             const KUrl url = res.property(Nepomuk::Vocabulary::NIE::url()).toUrl();
-            KMimeType::Ptr mimetype = KMimeType::findByUrl(url);
-            if (mimetype) {
-                type = mimetype->comment();
-                iconName = mimetype->iconName(url);
-            }
+            mimetype = KMimeType::findByUrl(url);
         }
+        if (mimetype) {
+            type = mimetype->comment();
+            iconName = mimetype->iconName();
+        }
 
         if (type.isEmpty() ) {
             type = Nepomuk::Types::Class(res.resourceType()).label();
Index: nepomuksearch/nepomuksearchrunner.cpp
===================================================================
--- nepomuksearch/nepomuksearchrunner.cpp	(revision 1193800)
+++ nepomuksearch/nepomuksearchrunner.cpp	(working copy)
@@ -115,6 +115,9 @@
 }
 
 
+#include <kmimetype.h>
+#include <kmimetypetrader.h>
+#include <kservice.h>
 void Nepomuk::SearchRunner::run( const Plasma::RunnerContext&, const Plasma::QueryMatch& match )
 {
     // If no action was selected, the interface doesn't support multiple
@@ -133,7 +136,15 @@
         url = res.property(Nepomuk::Vocabulary::NIE::url()).toUrl();
     }
 
-    (void)new KRun(url, 0);
+    KService::Ptr preferredServicePtr;
+    if (res.hasProperty(Nepomuk::Vocabulary::NIE::mimeType()) &&
+         KUrl(res.property(Nepomuk::Vocabulary::NIE::url()).toUrl()).isLocalFile()) {
+        preferredServicePtr = KMimeTypeTrader::self()->preferredService( res.property(Nepomuk::Vocabulary::NIE::mimeType()).toString() );
+    }
+
+    if ( preferredServicePtr.isNull() || ! KRun::run( *preferredServicePtr.constData(), KUrl::List(url), 0) ) {
+        (void)new KRun(url, 0);
+    }
 }
 
 QList<QAction*> Nepomuk::SearchRunner::actionsForMatch(const Plasma::QueryMatch &match)
