<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - "refusing to start/autospawn" with multi-user setup"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=94167#c1">Comment # 1</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - "refusing to start/autospawn" with multi-user setup"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=94167">bug 94167</a>
              from <span class="vcard"><a class="email" href="mailto:tanuk@iki.fi" title="Tanu Kaskinen <tanuk@iki.fi>"> <span class="fn">Tanu Kaskinen</span></a>
</span></b>
        <pre>So userA and userB run in the same graphical login session? I suppose you want
to use the same audio hardware for both users. Starting separate pulseaudio
servers will likely cause problems, because both pulseaudio instances can't use
the sound card at the same time. Therefore, I think it's best to use only one
pulseaudio instance, just like you use only one X instance.

userB doesn't have access to /run/user/1000/pulse/native, which is why userB
tries to start its own pulseaudio instance. And even if userB has access to the
socket, pulseaudio will reject the connection attempt by a different user.
There are a few steps to make this work:

Copy /etc/pulse/default.pa to /home/userA/.config/pulse/default.pa and change
this line

    load-module module-native-protocol-unix

to

    load-module module-native-protocol-unix auth-anonymous=true

After that change anyone having access to the socket will be allowed to
connect. Then give userB access to /run/user/1000/pulse/native (setfacl can
probably be used to grant access to only that user, but I don't know the exact
command).

It's probably also a good idea to not rely on the x11 property to point userB
to userA's pulseaudio socket, so you can add "default-server =
/run/user/1000/pulse/native" to /home/userB/.config/pulse/client.conf (I'm
assuming that userB is only used from within userA's login sessions, so we
don't need to support the case where userB logs in separately).</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the QA Contact for the bug.</li>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>