From 92363401919186f2c45c145755081c2bf879bcd1 Mon Sep 17 00:00:00 2001 From: tpearson Date: Thu, 1 Sep 2011 19:28:30 +0000 Subject: [PATCH] Do not change home directory when using kdesudo This improves system responsiveness and brings the actual behaviour more in line with what is expected git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kdesudo@1250814 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kdesudo/kdesudo.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/kdesudo/kdesudo.cpp b/kdesudo/kdesudo.cpp index 41209be..bfeee46 100644 --- a/kdesudo/kdesudo.cpp +++ b/kdesudo/kdesudo.cpp @@ -59,6 +59,7 @@ KdeSudo::KdeSudo(TQWidget *parent, const char *name,const TQString& icon, const bool realtime = args->isSet("r"); bool priority = args->isSet("p"); bool showCommand = (!args->isSet("d")); + bool keepCurrentHome = true; bool changeUID = true; bool noExec = false; keepPwd = (!args->isSet("n")); @@ -219,7 +220,12 @@ KdeSudo::KdeSudo(TQWidget *parent, const char *name,const TQString& icon, const { if (changeUID) { - *p << "sudo" << "-H" << "-S" << "-p" << "passprompt"; + *p << "sudo"; + + if (!keepCurrentHome) + *p << "-H"; + + *p << "-S" << "-p" << "passprompt"; if (!runas.isEmpty()) *p << "-u" << runas;