[pulseaudio-discuss] Using PULSE_SINK and PULSE_SOURCE
gmane at colin.guthr.ie
Thu Sep 16 01:55:52 PDT 2010
'Twas brillig, and Alexander Todorov at 15/09/10 18:40 did gyre and gimble:
> Colin Guthrie wrote:
>>> So my question is:
>>> 1) How can I configure different sound cards to be used by different users? The
>>> envs above look like the correct answer.
>> No, I think you're on the wrong track here.
>> You should really be looking at udev permissions and ACLs. These are
>> much lower level than PulseAudio but PA will honour the details given to it.
>> Ultimately, in order for a user to be allowed to use a sound card, they
>> must have r/w permission on the relevant device nodes in /dev/snd/. This
>> is generally acheived by a bit of software called Console Kit that
>> "registers" user logins and such like. Only one user at a time can be
>> "Active" on any given seat. With two seats two users can be active.
> All users are in the audio group so r+w permissions are OK.
I ultimately think that that is the wrong approach. Users should not
have to be in special groups. The ACL system + consolkit and udev-acl
should take care of all the permissions issues.
In actual fact, all the users being in the audio group actually causes
the problems here. Because all users can access all devices, you have to
make sure only one user uses their appropriate device at some higher
level which is prone to both malicious tampering and accidental cockup
(one user "hogging" the card that is meant for the other).
> I agree that I need
> to explore ConsoleKit. Do you have any useful pointers for setting CK ACL's
> otherwise I'll go read the docs.
Ultimately I only really know what I've picked up in passing. I know
that udev and consolekit work together on this one but not 100% sure
which triggers the other. I know that the udev-acl command ultimately
writes the ACLs themselves.
>From the consolekit package these folders/file should be interesting:
So you would likely define your seats in the /etc/ConsoleKit/seats.d
folder by putting a file in there - e.g. "01-secondary.seat" or
something similar. What goes in that file I don't know.
The udev package then provides this file:
It's a binary run whenever a new seat is setup. It's responsible for
writing the acl permissions.
If you need to add your own scripts (e.g. for debug) then you'd put them
in /etc/ConsoleKit/*.d folders - the /usr/lib/ConsoleKit/*.d folders
being reserved for packaged files, not user files.
I know these are the building blocks, but how *exactly* they fit
together, I'm not totally certain. Hopefully it'll point you in the
right direction tho' :)
Tribalogic Limited [http://www.tribalogic.net/]
Mandriva Linux Contributor [http://www.mandriva.com/]
PulseAudio Hacker [http://www.pulseaudio.org/]
Trac Hacker [http://trac.edgewall.org/]
More information about the pulseaudio-discuss