[X2Go-Commits] [x2goclient] 06/59: onmainwindow.cpp: manipulate PATH and append /usr/lib/gnupg2/ to it when starting scdaemon. Fixes: #882.

git-admin at x2go.org git-admin at x2go.org
Wed Jun 3 03:10:41 CEST 2015


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch bugfix/osx
in repository x2goclient.

commit 90d6b8b7cecec02b2a0e0f81ed650ca1bf39862f
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Wed Jun 3 01:36:32 2015 +0200

    onmainwindow.cpp: manipulate PATH and append /usr/lib/gnupg2/ to it when starting scdaemon. Fixes: #882.
---
 debian/changelog     |    2 ++
 src/onmainwindow.cpp |   22 ++++++++++++++++++++++
 2 files changed, 24 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 2399c15..bb4045a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -16,6 +16,8 @@ x2goclient (4.0.4.1-0x2go1) UNRELEASED; urgency=low
       for show_RichText_Generic_MsgBox() with a critical icon.
     - onmainwindow.{cpp,h}: properly handle scdaemon errors with a message box
       and close the client.
+    - onmainwindow.cpp: manipulate PATH and append /usr/lib/gnupg2/ to it when
+      starting scdaemon. Fixes: #882.
 
  -- X2Go Release Manager <git-admin at x2go.org>  Tue, 26 May 2015 21:42:09 +0200
 
diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp
index d34c6e7..b777eec 100644
--- a/src/onmainwindow.cpp
+++ b/src/onmainwindow.cpp
@@ -8334,6 +8334,28 @@ void ONMainWindow::slotStartPGPAuth()
     scDaemon=new QProcess ( this );
     QStringList arguments;
     arguments<<"--multi-server";
+
+    QProcessEnvironment scdaemon_env = QProcessEnvironment::systemEnvironment ();
+
+    QString path_env_separator = ":";
+    /* Let's hope that's really the only override... */
+#ifdef Q_OS_WIN
+    path_env_separator = ";";
+#endif
+
+    QString old_path_value = scdaemon_env.value ("PATH", "");
+    QString new_path_value = "";
+
+    if (!old_path_value.isEmpty ()) {
+        new_path_value = old_path_value + path_env_separator
+    }
+
+    new_path_value += "/usr/lib/gnupg2/";
+
+    scdaemon_env.insert ("PATH", new_path_value);
+
+    scDaemon.setProcessEnvironment (scdaemon_env);
+
     connect ( scDaemon,SIGNAL ( readyReadStandardError() ),this,
               SLOT ( slotScDaemonStdErr() ) );
     connect ( scDaemon,SIGNAL ( readyReadStandardOutput() ),this,

--
Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git


More information about the x2go-commits mailing list