[pulseaudio-discuss] Multiple users (kde) on Debian

Mark Cross markcross.gpg.01 at gmx.com
Mon Jul 26 07:23:02 PDT 2010


Colin Guthrie wrote:

> 'Twas brillig, and Mark Cross at 26/07/10 04:54 did gyre and gimble:
>> In a situation where there is a single physical seat (i.e. one keyboard
>> and monitor) but there are multiple logical seats, the PA logic is to
>> cork (mute) the first user, and enable sound for the next logged-in
>> user.
>> 
>> However, with CTRL-ALT-F7 CTRL-ALT-F8, etc it is possible to switch
>> user's X screens without "logging in".
>> 
>> Furthermore, if one user starts a console session to a different user
>> with "sudo -i -u user2 bash", there is no log-in process, and the second
>> user (user2) does not get to activate sound.
>> 
>> Assuming no user is in the "audio" group.
>> 
>> Is there a way to allow concurrent (local) sounds for both users?
> 
> There is always a way :D

:-)

> The problem is that this is not the normal setup (imaging User A setting
> up their Brittany Spears Discog on a loop and locking the screen! How
> evil can a human be?!?)

A very evil scenario, Indeed. :-)
 
> But ultimately you can run PA in system mode. Lots of things don't work
> as nicely (such as module loading and such like) and efficiency
> mechanisms (i.e. using SHM for data passing which is much faster) will
> be lost.

Yes, I am aware of that option. However, on reading this:
	http://pulseaudio.org/wiki/WhatIsWrongWithSystemMode

One gets very discouraged to do so. For example:
    "  Security: all users that have access to the server can sniff
       into each others audio streams, listen to their mikes, and so on.  "

And, in particular:
    " You are using PA against the explicit recommendations of the
      maintainers, so don't expect particularly enthusiastic support
      from them in doing so. "

Which essentially says: "You are on your own". Having to cope (even more) 
with each change on the sound system, or HAL, or Policy-kit, because this 
is a not "supported option" is not an interesting future.

So, there must be a way "supported by maintainers" to have two PA instances 
form two users that share access to the sound system.

The problem Pulseaudio was supposed to solve was to have mixing of several 
streams, but in doing so, PA took total ownership of the sound hardware, 
not allowing any other service to access the hardware, not even a second 
instance of PA. That have just shift the mixing issue from ALSA to PA, with 
seemingly equivalent basic problems. Yes, it has several interesting and 
useful features, but I wonder: what is the "supported" way to have several 
services access the sound system?

As the developers decided to completely take ownership of the sound 
hardware:

Shouldn't exist an option like: [ xhost +local:user2 (X-server) ] for PA?

-- 
Mark Cross




More information about the pulseaudio-discuss mailing list