[pulseaudio-tickets] [PulseAudio] #222: pacmd doesn't work with pulseaudio running as a system-wide daemon

PulseAudio trac-noreply at tango.0pointer.de
Sat Feb 9 13:13:12 PST 2008


#222: pacmd doesn't work with pulseaudio running as a system-wide daemon
-------------------------+--------------------------------------------------
  Reporter:  JeroenHoek  |       Owner:  lennart
      Type:  defect      |      Status:  new    
  Priority:  normal      |   Milestone:         
 Component:  daemon      |    Severity:  normal 
Resolution:              |    Keywords:         
-------------------------+--------------------------------------------------
Comment (by hrubi):

 first of all you have to set correct PULSE_RUNTIME_PATH environment
 variable set (this is not documented as far as i know). on my system i set
 it to /var/run/pulse, can differ on your system.

 as i've looked in the code, pacmd is trying to send signal 0 to the
 daemon, to check if daemon is alive, then it tries to send SIGUSR2, so the
 module-cli-protocol-unix is loaded. none of these succeeds as you lack
 permissions to do that as an ordinary user.

 i've made a workaround for this via sudo, it's rather ugly, but it works:

 put these lines into /etc/sudoers

 {{{
 Defaults:<your_user>    env_keep=PULSE_RUNTIME_PATH
 <your_user> ALL=(pulse) NOPASSWD: /usr/bin/pacmd
 }}}

 then you can create some alias like this:[[BR]]
 {{{
 alias pacmd='PULSE_RUNTIME_PATH=/var/run/pulse sudo -u pulse pacmd'
 }}}


 i know it's just a weird hack, but it works for this time.

-- 
Ticket URL: <http://www.pulseaudio.org/ticket/222#comment:1>
PulseAudio <http://pulseaudio.org/>
The PulseAudio Sound Server


More information about the pulseaudio-bugs mailing list