Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

I've got a chroot environment with the same architecture as host environment. I'm trying to get apps from chroot be able to play sound with PulseAudio. I've tried the tutorial from Arch Wiki and http://blog.einval.com/2010/11/12, neither of them worked for me. My $HOME is set to /root, and I have root permissions in the chroot environment. I get the following error:

root@chroot:/# paplay -v /root/test.wav
Opening a playback stream with sample specification 's16le 2ch 44100Hz' and channel map 'front-left,front-right'.
Connection failure: Connection refused
pa_context_connect() failed: Connection refused

EDIT: I've just been stupid and assumed /var/lib/dbus/ is mounted in chroot while it wasn't mounted. Following http://blog.einval.com/2010/11/12 carefully fixed everything. Thanks for your attention.

share|improve this question

closed as too localized by Jorge Castro, Marco Ceppi Jul 14 '11 at 21:56

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer 1

You may need to run Pulse Audio as root in system wide mode by passing the option --system on startup. This will also involve to manually add system user and group pulse and pulse-access:

addgroup --system pulse
adduser --system --ingroup pulse --home /var/run/pulse pulse
addgroup --system pulse-access
adduser pulse audio

adduser <username> pulse-access # to add users other than root

Running PulseAudio in system wide mode is not encouraged as there are security issues, limited functionality and limited support from the maintainers.

share|improve this answer
I'm afraid this is not an option in my case because I can't tweak the host system so aggressively, but thanks anyway. –  Shnatsel Jul 10 '11 at 13:11
@Shnatsel: may be a wise decision :) –  Takkat Jul 10 '11 at 13:57

Not the answer you're looking for? Browse other questions tagged or ask your own question.