[pulseaudio-tickets] [Bug 75006] neither XDG_CONFIG_HOME or PULSE_COOKIE is respected

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sat Jun 14 09:42:28 PDT 2014


https://bugs.freedesktop.org/show_bug.cgi?id=75006

--- Comment #25 from Michael DePaulo <mikedep333 at gmail.com> ---
(In reply to comment #24)
> (In reply to comment #23)
> > Hi Tanu, 
> > 2nd, remember that X2Go users might downgrade their PulseAudio version on
> > Windows. We have supported PulseAudio downgrades on Windows. So both
> > .pulse-cookie and .config/pulse/cookie might exist when PulseAudio 1.1 is
> > installed.
> 
> This should be no problem, if after the downgrade both the server and the
> clients are using the same version of libpulse. As long as the server and
> the clients use the same logic for finding the cookie, things should work.
> 
Actually, we have been making PulseAudio servers and clients talk to eachother
even when they have very different versions of libpulse. For example, Ubuntu
10.04 has libpulsecore-0.9.21.so (although the 10.04 package version number is
supposedly 0.9.22), while Ubuntu 14.04 has libpulsecore-4.0.so. Yet having
those 2 machines talk to eachother is something we support with X2Go.

Let's discuss that in a separate email thread though.

> > When we did not set auth-cookie at all, if the following conditions were
> > met, PulseAudio failed to create the cookie and therefore failed to start:
> > 1. PulseAudio 3.0 & later on Windows
> > 2. PA was launched by X2Go Client, rather than from the command line.
> > 3. Neither ".pulse-cookie", ".config/pulse/cookie" or ".config/pulse/"
> > existed.
> > It took me a long time to figure out that we could fix the issue by creating
> > the empty dir ".config/pulse/". We considered just creating said empty dir,
> > but we talked with you and decided on specifying auth-cookie instead. We
> > only specify auth-cookie if PulseAudio 3.0 or later is installed. We check
> > the version by running "pulseaudio.exe --version" and then reading the
> > stdout.
> > This is a long bug report, but I documented it here:
> > http://bugs.x2go.org/cgi-bin/bugreport.cgi?bug=422
> > 
> > I might have fixed said issue (condition #2) with x2goclient commit 6d3998f6:
> > Windows: Fix compatibility with current PulseAudio master branch by
> > replacing forward shashes with backslashes in file/folder paths.
> > (Yes, I made a typo in the commit message.)
> > That commit was actually necessary for the current PA master branch to work
> > with x2goclient. The fact that we had specified %USERPROFILE% as an 8.3
> > filepath with forward slashes seemed like a bug in our code, so I changed it
> > to an 8.3 filepath with backslashes. I tested the change with master, 5.0,
> > and old versions of PulseAudio, and then committed it to our code.
> 
> PulseAudio should create the necessary directories if they don't exist. The
> slash issue indeed sounds like a probable cause for the directory creation
> failure.
> 
> > Anyway, I need to do some actual testing. (My weekend is coming up, so I
> > have time available.) If said commit fixed the issue with cookie creation on
> > versions 3.0 through 5.0, then I could update x2goclient code to upload the
> > correct cookie depending upon which version of PulseAudio is installed.
> > However, it seems like less work for me to just specify an absolute cookie
> > path, or to specify %XDG_CONFIG_HOME%.
> 
> Setting XDG_CONFIG_HOME is probably not a good idea. If I understood
> correctly, you'd set USERPROFILE to "C:\Users\mike.DEPAULO\.x2go\pulse" and
> XDG_CONFIG_HOME to "C:\Users\mike.DEPAULO\.x2go". That probably works, but
> doesn't make sense conceptually. It would be similar to setting
> XDG_CONFIG_HOME on Linux to /home, and assuming that the user name is
> "pulse".
I see what you mean, I didn't think of that. I'll avoid doing this if at all
possible.

So I tried passing an absolute 8.3 filepath (with backslashes) to auth-cookie.
The result was not pretty:
http://pastebin.com/aYdxQ2d1
C:\Users\mike.DEPAULO\.x2go\pulse\.esd_auth was created successfully and it is
16 bytes.
However,
C:\Users\mike.DEPAULO\.x2go\pulse\.config\pulse\C was created instead of the
absolute path I specified. "C" is the beginning of the absolute path.
Furthermore, this cookie is only 0 bytes.
I think patch 9/9 is relevant to this behavior.

So what I'd prefer to do is fix PulseAudio's logic for determining/using
absolute paths on Windows, and then have x2goclient specify an absolute path to
C:\Users\mike.DEPAULO\.x2go\pulse\.pulse-cookie .

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pulseaudio-bugs/attachments/20140614/eaa74b39/attachment.html>


More information about the pulseaudio-bugs mailing list