Ubuntu: Pulseaudio on root usermode



Question:

I need to enable sound on root user mode, I am on Ubuntu 12.04 when I login as root I can see the volume control is disabled, I searched and found that pulse audio wont work on root user mode, but I also found that System-Wide Daemon, so just applied this for root as shown below.

addgroup --system pulse  adduser --system --ingroup pulse --home /var/run/pulse pulse  addgroup --system pulse-access    # Some distributions restrict access to the sound devices to a group audio  adduser pulse audio    # Add a user to the pulse-access group  adduser root pulse-access  

But while reboot still the volume control is disabled. What could be the issue, how can enable sound on root mode.

Basically what I want to do is using libao play some audio in root usermode, but when running the program I am getting the error like

ALSA lib pcm_dmix.c:1018:(snd_pcm_dmix_open) unable to open slave  


Solution:1

I solved it by running,

pulseaudio -D as root on each start up.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »