(added pulseaudio-discuss back to CC) On Tue, 2014-08-19 at 16:26 -0600, Glenn Golden wrote: > Tanu Kaskinen <tanu.kaskinen at linux.intel.com> [2014-08-19 23:21:58 +0300]: > > On Tue, 2014-08-19 at 13:44 -0600, Glenn Golden wrote: > > > $ pulseaudio -v --check > > > I: [pulseaudio] main.c: Daemon not running > > > > > > > > > Why? > > > > Probably because $XDG_RUNTIME_DIR points to the other user's directory. > > The --check option uses $XDG_RUNTIME_DIR to figure out where to look for > > the pid file. > > > > Thanks Tanu, and also for your quick response, much appreciated. Figured it > was something like that. > > Permit me to grouse momentarily though about the man page text, which says: > > --check > Return 0 as return code when the PulseAudio daemon is already > running for the calling user, or non-zero otherwise > > This is completely misleading: The test that is performed by the --check > option evidently has _nothing whatsoever_ to do with the "calling user", > it is determined entirely by the XDG_RUNTIME_DIR envar, regardless of the > user who executed the "pulaseaudio --check" command. The blurb should simply > state that the check is performed based on the user whose runtime pid dir > is pointed to by XDG_RUNTIME_DIR, and then it will be entirely accurate and > complete. I'd rather say that the check is performed with the assumption that XDG_RUNTIME_DIR is set correctly for the calling user. The check is non-functional if XDG_RUNTIME_DIR points to the wrong directory, because the answer will always be "not running", because most likely pulseaudio won't have access to the directory that XDG_RUNTIME_DIR points to. Also, if you're going to mention XDG_RUNTIME_DIR in the documentation, you should probably also mention that if XDG_RUNTIME_DIR isn't set at all, then the check assumes that HOME[1] is set correctly. [1] or whatever is used on the platform, on Windows it was some other environment variable > As phrased, it's just asking for confusion. I doubt I'd be able to find any > experienced Unix/Linux user who would read the phrase "the calling user" in > the given context and not interpret it to mean the UID or EUID of the user > who executed the "pulseaudio --check" command. I agree. -- Tanu