SUDO and sound, how to make them work together

Basically inside a sudo session, even one emulating another none root user (sudo -u username command) there is no sound available.

Inside a sudo session sound appears disabled.

I need sound, how do I fix it?


I've solved this before by running pulseaudio in "system mode" where it is available to all users instead of just the user running the desktop. You can read more about it here:

http://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/SystemWide

Note that there's some good reasons not to do this:

http://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/WhatIsWrongWithSystemWide

Unfortunately I don't know of any other way to solve the problem on a system running pulseaudio.