After spending lots of time debugging this issue, largely involving comparing the debug output from pulseaudio.exe, I believe I've determined a simple fix.
I observed that if I create this directory ahead of time, the pulseaudio.exe process launched by x2goclient.exe creates the "cookie" file under it & stays running. C:\Users\mike\.x2go\pulse\.config\pulse\
Therefore, I believe a simple fix for this bug is for x2goclient.exe, regardless of what version of pulseaudio.exe is installed, to: that path. If the cookie is not in that location, fall back to
".pulse-cookie". We already have this logic for Linux.
I plan to write, test, and (hopefully) commit this fix tomorrow night.
Note that we cannot override the cookie location due to PulseAudio Bug 75006: https://bugs.freedesktop.org/show_bug.cgi?id=75006
Note that although I am not sure why PulseAudio.exe is incapable of creating this file when launched by x2goclient.exe, compared to when it is launched by cmd.exe, I believe this is still safe approach to solving the bug. I say this because PulseAudio devs's comments & commit messages make it clear that they support both the directory already existing, and the directory not already existing. For example: http://cgit.freedesktop.org/pulseaudio/pulseaudio/commit/src/pulsecore/authk...
Hi Michael,
On Fr 14 Mär 2014 06:24:58 CET, Michael DePaulo wrote:
After spending lots of time debugging this issue, largely involving comparing the debug output from pulseaudio.exe, I believe I've determined a simple fix.
I observed that if I create this directory ahead of time, the pulseaudio.exe process launched by x2goclient.exe creates the "cookie" file under it & stays running. C:\Users\mike\.x2go\pulse\.config\pulse\
Therefore, I believe a simple fix for this bug is for x2goclient.exe, regardless of what version of pulseaudio.exe is installed, to: that path. If the cookie is not in that location, fall back to
- Create that directory (if it DNE).
- Include logic around onmainwindow.cpp:5149 to use the cookie at
".pulse-cookie". We already have this logic for Linux.
Gosh! Very good work!!! Let's go that approach.
I plan to write, test, and (hopefully) commit this fix tomorrow night.
Note that we cannot override the cookie location due to PulseAudio Bug 75006: https://bugs.freedesktop.org/show_bug.cgi?id=75006
Note that although I am not sure why PulseAudio.exe is incapable of creating this file when launched by x2goclient.exe, compared to when it is launched by cmd.exe, I believe this is still safe approach to solving the bug. I say this because PulseAudio devs's comments & commit messages make it clear that they support both the directory already existing, and the directory not already existing. For example: http://cgit.freedesktop.org/pulseaudio/pulseaudio/commit/src/pulsecore/authk...
Maybe the pulse directory does not get created because of .config
being missing. The pulsecore/core-utils.c contains a function name
pa_make_secure_dir which will create a directory for the pulse
cookies, but it (AFAICT) assumes that the parent dir (.config) already
exists.
It also may be that we don't set XDG variables not appropriately [1].
The pulseaudio patch you mention earlier [2] alludes that, too.
[1] http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
[2]
http://cgit.freedesktop.org/pulseaudio/pulseaudio/commit/?id=7fad67c46188991...
I guess assuring that the .config/pulse dir exists is a simple
approach and we should go that instead of playing with XDG env vars
(which are part of the freedesktop specs and X2Go Client is not about
being compliant with freedesktop specs if run on Windows).
Greets, Mike
--
DAS-NETZWERKTEAM mike gabriel, herweg 7, 24357 fleckeby fon: +49 (1520) 1976 148
GnuPG Key ID 0x25771B31 mail: mike.gabriel@das-netzwerkteam.de, http://das-netzwerkteam.de
freeBusy: https://mail.das-netzwerkteam.de/freebusy/m.gabriel%40das-netzwerkteam.de.xf...