diff --git a/containments/desktop/plugins/folder/foldermodel.cpp b/containments/desktop/plugins/folder/foldermodel.cpp --- a/containments/desktop/plugins/folder/foldermodel.cpp +++ b/containments/desktop/plugins/folder/foldermodel.cpp @@ -524,7 +524,11 @@ } KRun *run = new KRun(url, 0); - run->setShowScriptExecutionPrompt(true); + // On desktop:/ we want to be able to run .desktop files right away, + // otherwise ask for security reasons. We also don't use the targetUrl() + // from above since we don't want the resolved /home/foo/Desktop URL. + run->setShowScriptExecutionPrompt(item.url().scheme() != QLatin1String("desktop") + || item.url().adjusted(QUrl::RemoveFilename).path() != QLatin1String("/")); } void FolderModel::runSelected()