Comment 40 for bug 1246929

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Hi Brian,

so the first steps in fixing this are as follows:

1. in /etc/libvirt/qemu.conf add the lines
vnc_allow_host_audio = 1
user=bmullan
group=bmullan

2. in /etc/init/libvirt-bin.conf, add the line
        export QEMU_AUDIO_DRV=pa
right before the final exec, so 'script' block at the bottom of the file
becomes:

script
        [ -r /etc/default/libvirt-bin ] && . /etc/default/libvirt-bin
        export QEMU_AUDIO_DRV=pa
        exec /usr/sbin/libvirtd $libvirtd_opts
end script

3. Add the following lines to /etc/apparmor.d/abstractions/libvirt-qemu :

  @{HOME}/.config/pulse/cookie rwk,
  @{HOME}/.config/pulse/** rwkl,
  @{HOME}/.config/ r,
  @{HOME}/.config/pulse/ rw,
  owner /run/shm/pulse-* rw,
  /usr/bin/pulseaudio PUx,
  /etc/pulse/daemon.conf r,
  /tmp/pulse*/*.lock rwk,
  /proc/* r,
  /proc/*/fd/ r,

With all this, though I still do *not* have working sound. There may be a
pulseaudio server setting I haven't found, or there may be a silent apparmor
denial.

If we get this working then we can put most of the apparmor lines in the
policy, and to put hints in the config files for the rest.