diff --git a/src/util/helpers.cpp b/src/util/helpers.cpp
index cb61cdb..ddffb84 100644
--- a/src/util/helpers.cpp
+++ b/src/util/helpers.cpp
@@ -84,10 +84,22 @@ bool checkPermissions()
// endless loops of calling the same non-working (kde|gk)su(do) binary again and again.
if (!suCommand().isEmpty() && !args->isSet("dontsu"))
{
- if (QProcess::execute(suCommand(), QStringList() << args->allArguments().join(" ") + " --dontsu") == 0)
+ QStringList argList;
+
+ const QString suCmd = suCommand();
+
+ // kdesu broke backward compatibility at some point and now only works with "-c";
+ // kdesudo accepts either (with or without "-c"), but the gk* helpers only work
+ // without. kdesu maintainers won't fix their app, so we need to work around that here.
+ if (suCmd.startsWith("kde"))
+ argList << "-c";
+
+ argList << args->allArguments().join(" ") + " --dontsu";
+
+ if (QProcess::execute(suCmd, argList) == 0)
return false;
}
-
+
return KMessageBox::warningContinueCancel(NULL, i18nc("@info",
"You do not have administrative privileges."
"It is possible to run %1 without these privileges. "