[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kfm-devel
Subject:    Launching scripts from media:// and such
From:       Ismail Donmez <ismail () pardus ! org ! tr>
Date:       2006-12-09 19:57:48
Message-ID: 200612092157.48902.ismail () pardus ! org ! tr
[Download RAW message or body]

Hi all,

When trying to launch a script from a CDROM double clicking in konqueror 
brings up kwrite for shell scripts. But if I put the script in $HOME and 
double click it works fine.

Is this intented? Maybe a security measure. Also attached is a patch for 
shellcmdplugin to be able to run scripts from local kioslaves.

Regards,
ismail

["local-scripts.patch" (text/x-diff)]

Index: konqueror/shellcmdplugin/kshellcmdplugin.cpp
===================================================================
--- konqueror/shellcmdplugin/kshellcmdplugin.cpp	(revision 600625)
+++ konqueror/shellcmdplugin/kshellcmdplugin.cpp	(working copy)
@@ -24,6 +24,7 @@
 #include <kapplication.h>
 #include "kshellcmddialog.h"
 #include <kgenericfactory.h>
+#include <kio/netaccess.h>
 
 KShellCmdPlugin::KShellCmdPlugin( QObject* parent, const char* name,
 	                          const QStringList & )
@@ -44,7 +45,7 @@
       KMessageBox::sorry(0L, "KShellCmdPlugin::slotExecuteShellCommand: Program \
error, please report a bug.");  return;
    }
-   KURL url = part->url();
+   KURL url = KIO::NetAccess::mostLocalURL(part->url(),NULL);
    if ( !url.isLocalFile() )
    {
       KMessageBox::sorry(part->widget(),i18n("Executing shell commands works only on \
local directories."));



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic