I'm using Linux, precisely Mint 13 Maya, which is based on Ubuntu Precise.
I was wondering if there was any way to mute sound coming from other virtual displays, or to only have sound playing from application launched in the current display, whichever works.
Right now, I sometimes launch a VNC server that creates a new display on :1, while still using and displaying the "normal" virtual display on :0. If I launch an application that produces sound on :1, though, I can hear it, even though I can't see the application on my current display.
For example, if I launch the command
DISPLAY=:1 vlc /path/to/sound.ogg, I can hear VLC even while I'm using and displaying only the :0 display.
Is there any way to stop that from happening, and mute all sound coming from an application launched on :1? Or, as an alternative, is there any way to instruct pulseaudio to always mute a sound coming from a specific application, every time it is launched, and even if the application isn't producing sound for now, without any user intervention? For example, by launching the application through a script that will tell pulseaudio to mute the application right away?
EDIT: I seem to have found a temporary solution, but it can probably be made better. By starting the application with the environment variable
PULSE_SERVER=/dev/null, all calls to Pulseaudio fail and no audio from the application is played.