Fedora Linux Support Community & Resources Center
  #1  
Old 6th August 2006, 12:26 AM
conebox Offline
Registered User
 
Join Date: Aug 2006
Posts: 6
Thumbs up Audio support with multiple users

I've just spent the past few hours struggling to find a way to enable audio for multiple users at the same time (Fedora Core 5). I'm posting my solution in case anyone else wants to know how I did it. Also, I would love input from some linux guru out there that knows whether I'm doing something terrible to my system by doing it this way. (I'm very new to Linux.)

Motivation:

My wife and I both use the same computer, but we log in separately. I usually log in first, then she logs in by getting a new GUI terminal (using "System Tools --> New Login" in the gnome menus). Her terminal is on VT9 (Ctrl-Alt-F9), mine is on VT7 (Ctrl-Alt-F7). To my surprise, I found out quickly that only the first user to log in (usually me) can play audio!

Solution:

PART 1 - Permissions

First, I needed to change the default permissions on the sound devices. This can be done by editing the following line in "/etc/security/console.perms.d/50-default.perms". I used the following values:

Original <sound> line:
Code:
<console>  0600 <sound>      0600 root
My changes:
Code:
<console>  0660 <sound>      0660 root.sound
This means that anyone in the "sound" group can read and write to the various sound devices. ("/dev/snd", "/dev/mixer", etc.)

Next, I created a "sound" group and added all the users to that group that I wanted to be able to access the sound device. This means that both my wife and myself are now members of the "sound" group. So, we now have full read/write access to the various sound devices.

After rebooting, these two steps got me half-way there. At this point, both users can change the volume using the gnome volume control. However, only 1 user has the ability to actually play audios.

PART 2 - Console Locking

My next step was to figure out why only 1 user gets access to the sound system. After digging for a while, I discovered that the program "ainit" is the culprit. When the first user logs in, he obtains a console lock. This triggers the call to "ainit", which locks the alsa sound system for a specific user. The next user to log in tries to get a console lock, but can't, since the first user has it. Thus, "ainit" never gets called for the second user, and the alsa sound system continues to be locked for that user.

So, here's the sketchy part of my solution. I commented out the call to "ainit" when a new user obtains a console lock. (Somebody please tell me if this is a bad thing!) I commented out the following lines in "/etc/security/console.handlers":

Code:
#/usr/bin/ainit lock user start
#/usr/bin/ainit unlock user stop
That did it! When I rebooted, I was able to log in both users and play audio simultaneously. Hopefully, someone will be helped by this. But, please, I hope someone who truly knows linux will respond and let us all know if this is a valid solution. I'm really not sure if "ainit" does something important for me (it doesn't appear to make any difference).

Thanks!
Reply With Quote
  #2  
Old 27th August 2006, 02:03 AM
commonplace Offline
Registered User
 
Join Date: May 2006
Location: Bardstown, KY, USA
Age: 35
Posts: 134
I just followed this process, step by step, and it worked great. My wife thanks you very much! (We were in the exact same boat as you, with my wife having no audio because I usually logged in first.)

If anyone knows of a reason why this is bad, let us know. So far, so good, and my wife is thrilled.
Reply With Quote
  #3  
Old 27th August 2006, 03:31 AM
conebox Offline
Registered User
 
Join Date: Aug 2006
Posts: 6
Thanks for the feedback -- glad to know this helped you. I've been running this way for several weeks now, and I haven't yet found any problems with it.
Reply With Quote
  #4  
Old 15th December 2006, 03:03 AM
cooney Offline
Registered User
 
Join Date: Apr 2005
Location: Paradise
Posts: 211
This sound conundrum has been sort of bugging me for a year or two or three.

I just found this post while searching for a solution to this very problem. Thanx. As soon as I finish the two sesions I'm logged into, I'm gonna try and implement the above solution. I'm still using fc4. I'll post back with the results. btw, May take a day or three.

thanx again,

bob
__________________
Comfortably Numb

Last edited by cooney; 15th December 2006 at 03:13 AM.
Reply With Quote
  #5  
Old 16th December 2006, 07:59 AM
cooney Offline
Registered User
 
Join Date: Apr 2005
Location: Paradise
Posts: 211
more of a nuisance than mandatory

Unfortunately this solution that worked for you did not work for me. Keep in mind I'm running fc4. When I edited /etc/security/console.handlers, not only did I not get sound on the second login, I couldn't get sound with that user until I rebooted. In otherwords, the user who logged in first, was the only user to have sound until reboot. It didn't matter if it was user 1 or 2.

Another crazy thing I stumbled across. I would su - to root and chmod the /dev/dsp file to root then reboot. The owner of that file became the first user who logged in, even though I attempted to manually set it's ownership as root.

Another question; In 'Part 2 - Console Locking', you stated that "I commented out the call to 'ainit' when a new user obtains a console lock". You then gave the following example:


Code:

#/usr/bin/ainit lock user start
#/usr/bin/ainit unlock user stop

When you stated that you commented out the call to ainit, did you edit another file that was not included in the instructions provided or did you simply comment out the two 'ainit' statements above?

bob

ps at least Part 1 got rid of the "No volume control and/or elements found" error
__________________
Comfortably Numb

Last edited by cooney; 16th December 2006 at 08:08 AM. Reason: speeling ;)
Reply With Quote
Reply

Tags
audio, multiple, support, users

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Pulseaudio - Multiple users xawen Using Fedora 8 31st July 2013 01:56 PM
a script for creating multiple users cukerko Using Fedora 2 6th March 2008 02:41 PM
multiple users jtravnick Installation, Upgrades and Live Media 2 3rd October 2007 06:38 PM
Multiple users cant access audio hardware CTR_Mint Using Fedora 1 22nd February 2006 02:25 AM
add multiple users - squirrelmail xchido Using Fedora 4 14th February 2006 12:26 AM


Current GMT-time: 16:47 (Saturday, 25-10-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat
Novi Sad - Katras Travel Photos on Instagram - Vilyuchinsk Photos