The patch below attaches X11 properties to a Screen, not a Display. Using it, I am able to do the following:<br><br>leszek# pax11publish -D ":0.0" -O alsa_output.pci-0000_01_06.0.analog-stereo -e<br><br>leszek# pax11publish -D ":0.1" -O alsa_output.pci-0000_00_07.0.analog-stereo -e<br>
<br>leszek# xprop -root -display ":0.0" | grep PULSE<br>PULSE_COOKIE(STRING) = "3ac2381a17c704d94ef0edb1b8fdf289ff003587b59a45d6ae3aa0f3c1586032192d180896ffb9412193d7531ea1cdddd869e53c3c3ffb9c2c5fcd0dd036baccdac959992a599fa398823fb35d61a07fd17466e095cc00ffa22c9c14ff9d982ee368c6c16c24014b150bbed5facac7b37c35507b4fb73d9d0bd2efe22bbd4f86a7de42d8d105c8900ecc3462f0dece7d1a6b845275b095a301112544f1409ab3beb84989bc5ae19459b57c3415275334b849824659c9696e6c797d46be53d0957831569fa9a535713a8a1f216cfa7aeb6d6faa35f4b9a7fed5f4fc21dfb47ca9514f26fd118f09836e5c2308be49254189d967c20d258a65cd1fc2d4aa2f2652"<br>
PULSE_SINK(STRING) = "alsa_output.pci-0000_01_06.0.analog-stereo"<br>PULSE_SERVER(STRING) = "leszek-desktop"<br>PULSE_SESSION_ID(STRING) = "571eae318b6377f95367e6524abdec09-1256566213.375419-376893987"<br>
<br>leszek# xprop -root -display ":0.1" | grep PULSE<br>PULSE_COOKIE(STRING) = "3ac2381a17c704d94ef0edb1b8fdf289ff003587b59a45d6ae3aa0f3c1586032192d180896ffb9412193d7531ea1cdddd869e53c3c3ffb9c2c5fcd0dd036baccdac959992a599fa398823fb35d61a07fd17466e095cc00ffa22c9c14ff9d982ee368c6c16c24014b150bbed5facac7b37c35507b4fb73d9d0bd2efe22bbd4f86a7de42d8d105c8900ecc3462f0dece7d1a6b845275b095a301112544f1409ab3beb84989bc5ae19459b57c3415275334b849824659c9696e6c797d46be53d0957831569fa9a535713a8a1f216cfa7aeb6d6faa35f4b9a7fed5f4fc21dfb47ca9514f26fd118f09836e5c2308be49254189d967c20d258a65cd1fc2d4aa2f2652"<br>
PULSE_SINK(STRING) = "alsa_output.pci-0000_00_07.0.analog-stereo"<br>PULSE_SERVER(STRING) = "leszek-desktop"<br><br>Now I try playing something from :0.0 - sound correctly gets routed to alsa_output.pci-0000_01_06.0.analog-stereo<br>
<br>However when I try to play something from :0.1, all I can hear is silence. I notice that for some reason PULSE_SESSION is missing from :0.1's root window. I add it:<br><br>leszek# xprop -root -display ":0.1" -f PULSE_SESSION_ID 8s -set PULSE_SESSION_ID 571eae318b6377f95367e6524abdec09-1256566213.375419-376893987<br>
<br>..and everything works!<br><br>Apart the problem with PULSE_SESSION, there is another one: the above confuses gnome-volume-manager which seems to completely disregard the X11 props. <br><br>*****************************************************************************<br>
diff -Naur pulseaudio-0.9.19-old/src/pulsecore/x11prop.c pulseaudio-0.9.19-new/src/pulsecore/x11prop.c<br>--- pulseaudio-0.9.19-old/src/pulsecore/x11prop.c 2009-10-26 23:07:57.000000000 +0800<br>+++ pulseaudio-0.9.19-new/src/pulsecore/x11prop.c 2009-10-26 22:36:46.000000000 +0800<br>
@@ -32,12 +32,12 @@<br> <br> void pa_x11_set_prop(Display *d, const char *name, const char *data) {<br> Atom a = XInternAtom(d, name, False);<br>- XChangeProperty(d, RootWindow(d, 0), a, XA_STRING, 8, PropModeReplace, (const unsigned char*) data, (int) (strlen(data)+1));<br>
+ XChangeProperty(d, DefaultRootWindow(d), a, XA_STRING, 8, PropModeReplace, (const unsigned char*) data, (int) (strlen(data)+1));<br> }<br> <br> void pa_x11_del_prop(Display *d, const char *name) {<br> Atom a = XInternAtom(d, name, False);<br>
- XDeleteProperty(d, RootWindow(d, 0), a);<br>+ XDeleteProperty(d, DefaultRootWindow(d), a);<br> }<br> <br> char* pa_x11_get_prop(Display *d, const char *name, char *p, size_t l) {<br>@@ -49,7 +49,7 @@<br> char *ret = NULL;<br>
<br> Atom a = XInternAtom(d, name, False);<br>- if (XGetWindowProperty(d, RootWindow(d, 0), a, 0, (long) ((l+2)/4), False, XA_STRING, &actual_type, &actual_format, &nitems, &nbytes_after, &prop) != Success)<br>
+ if (XGetWindowProperty(d, DefaultRootWindow(d), a, 0, (long) ((l+2)/4), False, XA_STRING, &actual_type, &actual_format, &nitems, &nbytes_after, &prop) != Success)<br> goto finish;<br> <br>
if (actual_type != XA_STRING)<br><br>