LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-26-2005, 05:00 PM   #1
Gneisbaard
LQ Newbie
 
Registered: Apr 2004
Posts: 16

Rep: Reputation: 0
xdm, no sound for users in audio group


Hi,
I wanted to start x every time i started my laptop, so i added xdm to the default runlevel
with "rc-update add xdm default"
But now my user account can't play audio anymore (can't access /dev/mixer and the likes).
When i just use startx as the user i can play audio.
If i reboot, log in as root and start the xdm script (or if i start xdm without the script), i'm not able to play audio as a user.
However if i reboot, log in as the user and su to root and run the script, i am able to play audio.

Does anyone know how to solve this problem?
i'd really like to be able to have x started automatically, and xdm seems to be the right way to accomplish this.
 
Old 07-26-2005, 06:52 PM   #2
danns
Member
 
Registered: Nov 2003
Posts: 40

Rep: Reputation: 15
What distro and what window manager are you using when you log into via xdm. Is it the same window manager you get when you run startx?
 
Old 07-26-2005, 08:24 PM   #3
alienDog
Member
 
Registered: Apr 2004
Location: Europe
Distribution: Debian, Slackware
Posts: 505

Rep: Reputation: 46
If the group of /dev/mixer and such is "audio" or something similar, then it's possible that it's listed in /etc/login.defs in CONSOLEGROUPS. The way it works is that the user is "joined" to the CONSOLEGROUPS every time (s)he logs in from the console. If you use xdm, there is no console login, and thus the user wont be joined to any groups listed in CONSOLEGROUPS. This of course would mean that the users don't have sufficient permissions to access audio devices. Just guessing though... You can find out which groups the user belongs to by running a command called groups on the terminal.

Did you try changing the default runlevel of your system in /etc/inittab instead of adding xdm to your current runlevel? Another thing you could try is manually adding users to the required groups in /etc/group.

Last edited by alienDog; 07-26-2005 at 08:32 PM.
 
Old 07-27-2005, 03:40 AM   #4
Gneisbaard
LQ Newbie
 
Registered: Apr 2004
Posts: 16

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by danns
What distro and what window manager are you using when you log into via xdm. Is it the same window manager you get when you run startx?
I'm using gentoo and xfce, and except for the rights everything seems to be the same.


Quote:
Originally posted by alienDog
If the group of /dev/mixer and such is "audio" or something similar, then it's possible that it's listed in /etc/login.defs in CONSOLEGROUPS. The way it works is that the user is "joined" to the CONSOLEGROUPS every time (s)he logs in from the console. If you use xdm, there is no console login, and thus the user wont be joined to any groups listed in CONSOLEGROUPS. This of course would mean that the users don't have sufficient permissions to access audio devices. Just guessing though... You can find out which groups the user belongs to by running a command called groups on the terminal.

Did you try changing the default runlevel of your system in /etc/inittab instead of adding xdm to your current runlevel? Another thing you could try is manually adding users to the required groups in /etc/group.
Though i don't really understand your explanation, i did check in the /etc/login.defs and in the login.defs manpage and i didn't find anything about CONSOLEGROUPS.
Even when the audio doesn't work cause i logged in with xdm, the command groups indicates that the user is a member of the audio group.
I didn't try changing the default runlevel, because though i did read into it a bit, i don't understand much of it yet and i don't like fiddling around with things i don't understand.
 
Old 07-27-2005, 07:23 AM   #5
Gneisbaard
LQ Newbie
 
Registered: Apr 2004
Posts: 16

Original Poster
Rep: Reputation: 0
I've chowned /dev/dsp /dev/audio /dev/mixer to group audio, and chmodded them to 660
Now it works, but i don't really know if this is a decent solution,
for instance it seems the xfce volume-control thingamajig seems unable to access the mixer.

Ok it seems it isn't a solution, when i rebooted the it no longer worked..

Last edited by Gneisbaard; 07-27-2005 at 07:42 AM.
 
Old 07-29-2005, 06:18 PM   #6
alienDog
Member
 
Registered: Apr 2004
Location: Europe
Distribution: Debian, Slackware
Posts: 505

Rep: Reputation: 46
The problem isn't with consolegroups if audio groups is listed when you use the groups command. I'll try to explain it better anyway

Consolegroups is a list of groups that the users of the system get membership to when they login from the text mode (from the console). If you use xdm instead of text-mode login, consolegroups has no effect. This is what Slackware's login.defs says about it:

# List of groups to add to the user's supplementary group set
# when logging in on the console (as determined by the CONSOLE
# setting). Default is none.

Oh, and by the way it seems to be CONSOLE_GROUPS, not CONSOLEGROUPS like I told you earlier, sorry about that. Manpage of login.defs also reveals that if you are using PAM (Pluggable Authentication Modules), the whole login.defs does nothing. I'm not sure if this is the case with Gentoo. PAM to my understanding is not without problems, and it's quite possible that your audio problems are related to it. However, since I don't use PAM myself, I'm unable to help you with it.

When it comes to xdm, it really should be used by changing the runlevel of the system, that's the way it's meant to work. It's real easy too, just look into your /etc/inittab file and find a line that says:

id:3:initdefault:

Then change the number 3 on that line to whatever your X runlevel is (probably 4 or 5, help is usually available in inittab file). Worth a shot anyway.

You can also set the runlevel when booting the system if you want to test it before editing inittab. Type linux 4 (or linux 5) at the boot prompt.
 
Old 07-29-2005, 09:06 PM   #7
danns
Member
 
Registered: Nov 2003
Posts: 40

Rep: Reputation: 15
I'm going to go out on a limb here as I haven't run gentoo in over a year. The problem is that the devices are being set up with permission assigned to root as owner and root as group. Thus, when you reboot, the audio devices have their owner, owning group, and permission reset to the defaults preventing your account from accessing them.

If Gentoo is using devfs take a look at /etc/devfs/conf.d for the alsa file. That file set the initial owner, owning group and permissions. I'm using Ubuntu now and this is what mine looks like:

# device permissions for ALSA sound devices.
REGISTER ^snd/.* PERMISSIONS root.audio 0660
REGISTER ^snd/controlC0 CFUNCTION GLOBAL symlink /proc/asound/oss/sndstat sndstat


AlienDog, I've been a long time Slackware user also. The first thing that struck me as odd with Ubuntu is that the only run level that does not have gdm is run level 1. Switching to run level 3, the default in Slackware, still produces the X login. Ubuntu's default run level is 2 so for me to have it closer to Slackware I had to remove the gdm links in /etc/rc2.d and /etc/rc3.d. Just thought I would pass that on. I'm not sure if there are any other distros that set gdm/kdm/xdm at run levels 2-5.
 
Old 07-30-2005, 06:54 AM   #8
alienDog
Member
 
Registered: Apr 2004
Location: Europe
Distribution: Debian, Slackware
Posts: 505

Rep: Reputation: 46
Ah, ok I wonder why they've chosen to do it that way, seems to make no sense to me...
 
Old 07-31-2005, 04:26 AM   #9
Gneisbaard
LQ Newbie
 
Registered: Apr 2004
Posts: 16

Original Poster
Rep: Reputation: 0
changing the default runlevel seems to have helped, thanks for your help!!
my system is slowly getting more and more functional ( though it has a long way to go ).
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
/etc/group - the group users empty Artanicus Linux - General 2 02-22-2005 05:25 AM
Can't logon to non-root users from wdm,xdm websinger Debian 4 12-20-2004 06:50 PM
get users in group hindrik Linux - General 2 08-12-2004 09:05 AM
add all users as audio group Kocil Linux - Security 1 07-27-2004 03:28 AM
login with xdm without window manager for some users Saak Linux - Software 5 05-17-2004 06:32 PM


All times are GMT -5. The time now is 04:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration