Subject: Bug#422: Just Create the .config/pulse/ dir!

From: Michael DePaulo <[email-masked]>
Date: Fri, 14 Mar 2014 01:24:58 -0400

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:
1. Create that directory (if it DNE).
2. Include logic around onmainwindow.cpp:5149 to use the cookie at
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/authkey.c?id=a91359956f166005749247eaa5f4001a4555689d