[X2Go-Commits] [x2goclient] 178/257: src/pulsemanager.cpp: insert PULSE_SERVER and PULSE_COOKIE variables into environment as used by PulseManager.

git-admin at x2go.org git-admin at x2go.org
Mon Nov 28 16:06:01 CET 2016


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

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

commit 142d1e89d3f1af884f87c0e3a24085aff9e6ba46
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Thu Jun 2 04:23:05 2016 +0200

    src/pulsemanager.cpp: insert PULSE_SERVER and PULSE_COOKIE variables into environment as used by PulseManager.
    
    Otherwise we won't be able to start binaries like paplay.
---
 debian/changelog     |    3 +++
 src/pulsemanager.cpp |   13 +++++++++++++
 2 files changed, 16 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index ef0b294..f3c10ce 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -302,6 +302,9 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium
     - src/pulsemanager.cpp: actually only play startup sound if debugging is
       enabled.
     - src/pulsemanager.cpp: don't insert stray newline into config.pa.
+    - src/pulsemanager.cpp: insert PULSE_SERVER and PULSE_COOKIE variables
+      into environment as used by PulseManager. Otherwise we won't be able to
+      start binaries like paplay.
 
   [ Bernard Cafarelli ]
   * New upstream version (4.0.5.3):
diff --git a/src/pulsemanager.cpp b/src/pulsemanager.cpp
index 78fed24..539b85b 100644
--- a/src/pulsemanager.cpp
+++ b/src/pulsemanager.cpp
@@ -144,6 +144,19 @@ void PulseManager::start_generic () {
     connect (pulse_server_, SIGNAL (finished (int)),
              this,          SLOT (slot_on_pulse_finished (int)));
 
+    env_.insert ("PULSE_SERVER", "127.0.0.1:" + QString::number (pulse_port_));
+
+
+    QString clean_pulse_dir = pulse_dir_.absolutePath ();
+
+#ifdef Q_OS_WIN
+    clean_pulse_dir = wapiShortFileName (clean_pulse_dir);
+#endif /* defined (Q_OS_WIN) */
+
+    QString tmp_auth_cookie = QDir::toNativeSeparators (clean_pulse_dir + "/.pulse-cookie");
+
+    env_.insert ("PULSE_COOKIE", tmp_auth_cookie);
+
     if (debug_) {
       // Give PA a little time to come up.
       QTimer::singleShot (3000, this, SLOT (slot_play_startup_sound ()));

--
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