|
| Like some other folk sound didn't work for me out of the box.
First thing to try was to unmute (F8 has "alsaunmute" command!)
but that didn't do it.
Some Google work showed you can fix this problem with
"yum remove alsa-plugins-pulseaudio". This didn't do it.
Using the sound card configuration utility
("system-config-soundcard") I fiddled with the settings, changing
the default PCM and another setting from the default for AC'97
to one that included another parameter, iec### I think it was.
That worked but for root but didn't work for non-root.
I guessed (after checking with Google) to change the owner
of some files in /dev, by configuring PAM's console permissions
file ("/etc/security/console.perms.d/50-default.perms").
That didn't help. So, how does one find out which files
need to be readable (or read/write) by others for sound to
work for everyone?
I came up with strace. Checking the man page allowed me to
limit the output to open system calls, which list the pathname
of the file being opened. Unfortunately it seems the "play"
command I traced also "stat"s some files first, and doesn't
attempt to open them if it would fail. (More skill with
various tracing tools would no doubt have lead to a
simpler solution. :-)
In the end I created a list of files opened by "play", by root
and by a non-root user, and then I compared the two lists.
The one file different was /etc/asound.conf, which was mode 600.
changing that to 644 fixed the sound for all users!
The strace command I used (one in a root xterm, one in a non-root
xterm) was:
strace -fFqe trace=open play /usr/share/sounds/phone.wav 2>&1 \
|awk -F'"' '{print $2}' |sort |xargs /bin/ls -ld 2>/dev/null
The output of strace is processed by awk, which extracts just
the pathname of the file being opened. Sorting the list makes
comparisons between windows easy (could have used diff or comm too).
the /dev/null is used to eliminate the errors of attempts to
open non-existent files, which "play" does a lot.
I think this general technique will work for finding permission
problems for most stuff, when stuff works for root only.
-Wayne
|
|