Re: Which X server gets to use sound
- From: f95-msv@xxxxxxxx (Mårten Svantesson)
- Date: Mon, 25 Jul 2005 12:38:58 +0200
hans_schulze98@xxxxxxxx (Hans Schulze) writes:
> f95-msv@xxxxxxxx (=?iso-8859-1?Q?M=E5rten?= Svantesson) wrote in message news:<h6b64v57bry.fsf@xxxxxxxxxxxxxxxxxxx>...
>> hans_schulze98@xxxxxxxx (Hans Schulze) writes:
>>
>> > I am running several X servers (all with KDE), all on the same
>> > monitor. How
>> > do I know (and control) which one gets to use the sound output?
>> > Apparently only one at a time can make sound, but sometimes none of
>> > them can and usually the one I need can not.
>>
>> The X servers have nothing to do with the sound.
>
> You are right. All programs using sound that I know run under X, but
> that does not necessarily mean that X is needed.
>
>> On Linux it works something like this:
>> When you log in on the console the ownership of some devices,
>> especially audio devices, are given to you. So, if you log in locally
>> on several accounts you get in trouble.
>
> In this case, nobody ever logs in on the text console (there may not
> be any text consoles) but there are X servers. If only the active
> server (the one who has the screen) gets to use sound there should be
> no trouble.
I didn't specify text console. I meant any console, including X. And
as I said, think users, not servers.
>
>> You probably have a file /etc/security/console.perms
>
> Unfortunately not. I have no idea which script sets this. Looked but
> did not find.
No script at all. It's normally handled by the PAM framework, Pluggable
Authentication Modules. The relevant module is pam_console. It's
configured in console.perms.
See pam(8), pam_console(8) and console.perms(5). Now RTFM ;)
>> manually set the permissions for your audio device to
>> something appopriate you should be fine. This is a common scheme:
>>
>> Add all the users that should be able to use the audio-device
>> to the group audio and then
>>
>> chown root.audio /dev/dsp
>> chmod 660 /dev/dsp
>
> Thanks Marten, these permissions work. Now everyone has audio access.
> How do I set this up to start every time I run X?
The trick is turning of the mechanism that changes the permissions
upon login. See the man pages I mentioned above.
> Better yet, how can I change the owner of that file every time the
> virtual console (vt7, vt8, ...) changes? Is there a script that gets
> run on vt change?
Nothing I've heard of... It seems to be possible for a program to get
a signal when changing from a vt, but I don't know if that is usable.
I suspect not since I've never seen it used for these purposes.
--
- Mårten
mail: msv@xxxxxx *** ICQ: 4356928 *** mobile: +46 (0)707390385
.
- References:
- Which X server gets to use sound
- From: Hans Schulze
- Re: Which X server gets to use sound
- From: Mårten Svantesson
- Re: Which X server gets to use sound
- From: Hans Schulze
- Which X server gets to use sound
- Prev by Date: Re: How to diagnose xdnd slowness?
- Next by Date: Microcontroller and PC communicaiton using USB
- Previous by thread: Re: Which X server gets to use sound
- Next by thread: Re: XFree86 Frequently Asked Questions
- Index(es):
Relevant Pages
|