mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-23 18:32:50 +00:00
kdesudo: set LANG and LC_ALL for the process
translations and command-line programs output parsing do not get along Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
bf041a724f
commit
e158808da9
1 changed files with 3 additions and 1 deletions
|
@ -177,6 +177,8 @@ KdeSudo::KdeSudo(const QString &icon, const QString &appname)
|
|||
}
|
||||
|
||||
QProcessEnvironment processEnv = QProcessEnvironment::systemEnvironment();
|
||||
processEnv.insert("LANG", "C");
|
||||
processEnv.insert("LC_ALL", "C");
|
||||
processEnv.insert("DISPLAY", disp);
|
||||
processEnv.insert("XAUTHORITY", m_tmpName);
|
||||
m_process->setProcessEnvironment(processEnv);
|
||||
|
@ -316,7 +318,7 @@ void KdeSudo::parseOutput()
|
|||
error(i18n("Your user is not allowed to run sudo on this host!"));
|
||||
} else if (strOut.contains("may not run sudo on")) {
|
||||
error(i18n("Your user is not allowed to run sudo on this host!"));
|
||||
} else if ((strOut.contains("passprompt")) || (strOut.contains("PIN (CHV2)"))) {
|
||||
} else if (strOut.contains("passprompt") || strOut.contains("PIN (CHV2)")) {
|
||||
m_dialog->setPassword(QString());
|
||||
m_dialog->show();
|
||||
} else {
|
||||
|
|
Loading…
Add table
Reference in a new issue