Re: pulseaudio == disaster ??

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



OK, here's what I had to do to make it possible to start pulseaudio.

1)  Edit /etc/udev/rules.d/40-alsa.rules to set MODE="0666" to all
"snd" files:
  # do not edit this file, it will be overwritten on update

  KERNEL=="controlC[0-9]*",       NAME="snd/%k", MODE="0666"
  KERNEL=="hwC[D0-9]*",           NAME="snd/%k", MODE="0666"
  KERNEL=="pcmC[D0-9cp]*",        NAME="snd/%k", MODE="0666"
  KERNEL=="midiC[D0-9]*",         NAME="snd/%k", MODE="0666"
  KERNEL=="timer",                NAME="snd/%k", MODE="0666"
  KERNEL=="seq",                  NAME="snd/%k", MODE="0666"
  KERNEL=="mixer0",               SYMLINK+="mixer"
  KERNEL=="dsp0",                 SYMLINK+="dsp"
  KERNEL=="audio0",               SYMLINK+="audio"

I guess we just have to ignore the admonition not to edit this file;
there seems to be no other way to do it.

The clue that permissions were too restrictive came from running
    aplay -lL
When root did it, the sound card was detected and displayed
reasonably;  when non-root did it, no sound devices were found.
This contrasts with Fedora 7, where it works identically for all.

In the original Fedora 8 configuration we had:
  # ll /dev/snd
  total 0
  crw-rw----+ 1 root root 116, 8 2007-11-17 10:09 controlC0
  crw-rw----+ 1 root root 116, 4 2007-11-17 10:09 midiC0D0
  crw-rw----+ 1 root root 116, 7 2007-11-17 10:09 pcmC0D0c
  crw-rw----+ 1 root root 116, 6 2007-11-17 10:09 pcmC0D0p
  crw-rw----+ 1 root root 116, 5 2007-11-17 10:09 pcmC0D1p
  crw-rw----+ 1 root root 116, 3 2007-11-17 10:09 seq
  crw-rw----+ 1 root root 116, 2 2007-11-17 10:08 timer

With only root able to access these file, it was impossible for an
ordinary user to start the pulseaudio daemon.

2)  Edit /etc/passwd to set the home directory of user pulse to
/var/run/pulse, eg,
  pulse:x:492:488:PulseAudio daemon:/var/run/pulse:/sbin/nologin

This is necessary to allow the --system option to work properly.
On startup, pulseaudio must create directories .gconf and .gconfd in
its home directory.  This it cannot do when the home directory is /.

3)  On my system, certain files in /var/run and directory
/tmp/gconfd-pulse/ had somehow become owned by user kismet:kismet.
I can't imagine how this happened, but it blocked use by pulseaudio,
which complained in /var/log/messages.
I removed these files and restarted pulseaudio with no more
complaints.

4)  Edit /etc/pulse/default.pa to comment out the x11 lines:
  ### Publish connection data in the X11 root window
    ## .ifexists /usr/lib/pulse-0.9/modules//module-x11-publish.so
    ## load-module module-x11-publish
    ## .endif

Attempting to load this module outside of X will make pulseaudio fail
to start.  Its absence seems to be harmless.

5)  Edit /etc/rc.d/rc.local to add these lines;
  # Start the pulseaudio daemon
  echo "/usr/bin/pulseaudio -D --system --log-target=syslog"
  /usr/bin/pulseaudio -D --system --log-target=syslog
  /usr/bin/aplay /usr/share/sounds/startup3.wav

With the above fixes, the --system option works properly when root
starts pulseaudio, extending to all users the full use of the sound
system.  The last line confirms proper behaviour.

When xfce is started all users inherit the ability to run aplay and
other X sound programs such as xmms.  Any console user can use aplay.
Crontab entries of any user can use aplay.

I simply cannot comprehend why Fedora 8 starts the pulseaudio daemon as
a gnome task.  With the above fixes, it is perfectly possible to start
it in /etc/rc.d/rc.local.  With only a bit more effort, it should be
possible to come up with a simple startup script in /etc/init.d so that
this daemon is treated the same as any other proper Linux daemon.

-- 
	David A. De Graaf    DATIX, Inc.    Hendersonville, NC
	dad@xxxxxxxx         www.datix.us


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux