# Any way to mute all sound from just one user?



## break19 (Jul 2, 2012)

My 4 year old daughter shares my FreeBSD box, I have a login set up for her with several icons, and she usually likes to leave her games running so she can "save her place". Problem is, the sound is very distracting, especially when I'm using the sound to watch videos or listen to music, etc. 

So, other than just closing her app, is there any way to temporarily disable access, or simply mute JUST her login?

I'm not using pulseaudio, but I could install it, if it is the only way.


----------



## SirDice (Jul 3, 2012)

It's an all or nothing setting really. The soundcard driver has no idea about the user that's sending data to it. So there's no way to distinguish between users.

Pulseaudio might be a solution but I'm not sure if you can set the levels on a per user basis.


----------



## break19 (Jul 3, 2012)

Hmm, it just occurred to me.. permissions.  I wonder what would happen if I changed perms and ownership of the sound devices -while- her user was accessing them... would her sound instantly stop?

It'd be a dirty hack, but somebody's gotta do it. 

Might have to try it when I get a few minutes.  I'm sure her sound would stop.. The question is, would it automagically restart once permissions were corrected, or would she have to log out and back in, thereby nullifying the whole "keep her stuff running" thing.....


----------



## robbak (Jul 3, 2012)

Hey, try it, the worst that might happen is that you will annoy your daughter, and what are parents for anyway?

But, I'd think not. The permissions would only be checked on opening. Once the device is opened, permissions are irrelevant.

All I can think of is creating a mini daemon that you run from /etc/devfs.conf, and route all her audio through it. You could then give it a kill switch, sending it all to /dev/null unless you agree.

Hmm. Does your system have more than one sound device? Many do. Maybe that could be leveraged.


----------

