Bug 75298 - Documentation: section on module-native-protocol-unix should explain how cookie file is found
Summary: Documentation: section on module-native-protocol-unix should explain how cook...
Status: RESOLVED FIXED
Alias: None
Product: PulseAudio
Classification: Unclassified
Component: misc (show other bugs)
Version: unspecified
Hardware: All All
: medium normal
Assignee: pulseaudio-bugs
QA Contact: pulseaudio-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-21 05:43 UTC by jonasthiem
Modified: 2014-03-07 11:34 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description jonasthiem 2014-02-21 05:43:19 UTC
There is a docs section for the module-native-protocol-unix module:

http://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Modules/#index22h3

It documents an auth cookie process which is apparently a file based authentication (it doesn't mention really what a cookie is for pulseaudio: it is some file with randomly generated stuff serving as a temporary login key file thing I suppose? It may be obvious to some, but to newcomers it could be helpful adding a line or two of explanation for that).

It says the default location is ~/.pulse-cookie and there is an auth-cookie option to specify another location. Now, my default.pa doesn't use that option, so I naturally assumed it was in ~/.pulse-cookie. However, there is no such file.

What happened? Apparently (I got this from some guy on IRC), pulseaudio uses some environment vars to determine it ends up in /run/user/1000 or something?

I'm not really objecting to that process itself, but it would be really helpful if this was actually documented in the section I linked. If it is already documented elsewhere, please add a helpful reference to the section I linked so people can find out where their auth cookie file is actually located, and why.
Comment 1 jonasthiem 2014-02-21 05:52:09 UTC
If that should be relevant, the environment variable in question is XDG_RUNTIME_DIR. However, I have no idea what that means or why pulseaudio cares about it for cookie placement. - which is probably my own fault for not knowing it very well, I suppose I should read up on the X11 integration modules which are probably related?

But still, please consider clearing this up a bit more at http://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Modules/#index22h3 and e.g. linking to the relevant X11 integration sections for altered cookie auth file default placement, if that is actually what is going on here.
Comment 2 Tanu Kaskinen 2014-03-07 11:34:17 UTC
(In reply to comment #0)
> There is a docs section for the module-native-protocol-unix module:
> 
> http://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/
> Modules/#index22h3
> 
> It documents an auth cookie process which is apparently a file based
> authentication (it doesn't mention really what a cookie is for pulseaudio:
> it is some file with randomly generated stuff serving as a temporary login
> key file thing I suppose? It may be obvious to some, but to newcomers it
> could be helpful adding a line or two of explanation for that).

Thanks for the suggestion, I now added a short explanation of the cookie file. I'll close this bug, please reopen if you think the explanation should be more elaborate.

> It says the default location is ~/.pulse-cookie and there is an auth-cookie
> option to specify another location. Now, my default.pa doesn't use that
> option, so I naturally assumed it was in ~/.pulse-cookie. However, there is
> no such file.
> 
> What happened? Apparently (I got this from some guy on IRC), pulseaudio uses
> some environment vars to determine it ends up in /run/user/1000 or something?

It doesn't end up in the runtime directory (/run/user/1000), it ends up in the configuration directory (~/.config/pulse) and the default file name is now "cookie".


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.