[pulseaudio-discuss] ubuntu flash pulseaudio multiuser
Colin Guthrie
gmane at colin.guthr.ie
Wed Dec 22 15:05:29 PST 2010
'Twas brillig, and duportail at 22/12/10 22:08 did gyre and gimble:
> Op 22-12-2010 21:12, Colin Guthrie schreef:
>> 'Twas brillig, and duportail at 22/12/10 19:51 did gyre and gimble:
>>> Op 22-12-2010 20:37, Colin Guthrie schreef:
>>>> 'Twas brillig, and duportail at 22/12/10 19:26 did gyre and gimble:
>>>>> I have a multi-user system with four usb soundcards.I use
>>>>> pulseaudio per
>>>>> user.
>>>>> I set default soundcard per user.However flash uses always the
>>>>> first usb
>>>>> soundcard.Other applications use the user's default soundcard.
>>>>> Is there a solution or is it a flash issue?
>>>> Do you use system-wide PA or a separate PA process for each user
>>>> (recommended).
>>>>
>>>> If the latter, then all you need to do is setup the ACLs correctly
>>>> (probably via some custom udev trickery) so that a given user is *only*
>>>> allowed to use the one USB card.
>>>>
>>>> This setup will mean each user can only use one sound card by
>>>> virtual of
>>>> file-system permissions and PA is designed to respect these
>>>> permissions.
>>>>
>>>> Col
>>>>
>>> I use a separate PA process for each user.
>> So can each user see multiple sinks or just the one? (in e.g.
>> pavucontrol)
>>
>>> With padevchooser I set the default sink for that user.
>> padevchooser is rubbish and unsupported and obsolete. I strongly
>> recommend not using it at all.
>>
>> Ideally each users PA process will only have one sink and thus there is
>> really no option for any apps in the first place.
>>
>>
>>> Al program's,such as mediaplayers sends the
>>> sound to the correct usb device that is set as default for this user.
>>> Only flash player in firefox or opera sends the sound to the first
>>> soundcard.And not to the default soundcard for this user.
>> Well I'm confused as if there is only one sink listed for each user in
>> their own private PA daemon, this suggests that these applications are
>> bypassing PA and accessing ALSA directly. Not sure why they would do
>> that, but flash does have a habbit of being rubbish with such things.
>> Still if the ACLs on the sound devices themselves are restricted then
>> even if it does bypass PA each user should still only have access to one
>> sound device each.
>>
>> Col
>>
> Well, it worked in ubuntu 10.04, but not in 10.10 anymore.
> With padevchooser you can see all sinks, and the user has to set the
> default.
I really cannot see how padevchooser should be able to see all the sinks
if the users are not allowed to access them, so I'm guessing your setup
technically allows users to use any sink they want.
This isn't really the best setup. Like I say, setting the ACLs is by far
and away the most appropriate way to achieve the right setup.
> However, on my multi-user systems i have a script (with password) to set
> the default sink .So the users cannot change this
Hmm, padevchoser does not set the default sink. It operates in a
completely different way to any concept of "default" sinks in the PA
daemon (which is not really a 'default' anyway - more of a 'fallback').
To explain, padevchooser sets properties on the X11 root window (see
xprop -root | grep PULSE). The libpulse client will look at these
properties when connecting to PA or initiating streams.
In PA itself, there is a concept of a "default" or "fallback" sink. This
is often used but PA will also remember which device a given program
prefers (e.g. if it was moved via pavucontrol in the past, it will
remember that device).
Over all, as I said, the most stable and secure setup will be to only
include one sink in each user's PA daemon. Using the ACLs via udev rules
is likely to be the best way to achieve this, but a custom default.pa
for each user that does not use udev-detect and instead hard codes
module-alsa-card loads (with differetn device_id= arguments) would also
work fine.
> Again all is working weel, except flash.
> It's kde 4.5, maybe it is phonon?
Well Phonon routing (when done correctly as I believe it is with the
latest Kubuntu 10.10) is quite different to a simple default and it may
indeed work differently. Each user will have a priority list of devices.
See http://pulseaudio.org/wiki/KDE for some screenshots.
I really can't stress enough however that the best setup would be to
only give each user access to the sink they should be using.
Also, please drop padevchooser. it's deprecated and unsupported.
Hope this helps.
Col
--
Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/
Day Job:
Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
Mageia Contributor [http://www.mageia.org/]
PulseAudio Hacker [http://www.pulseaudio.org/]
Trac Hacker [http://trac.edgewall.org/]
More information about the pulseaudio-discuss
mailing list