[pulseaudio-discuss] starting multiple pulseaudio instances for the same user
antoine at nagafix.co.uk
Wed Apr 13 10:06:59 PDT 2011
On 04/13/2011 11:50 PM, Colin Guthrie wrote:
> 'Twas brillig, and Antoine Martin at 08/04/11 22:20 did gyre and gimble:
>> How can I start multiple copies of pulseaudio for the same $USER, but in
>> different contexts?
>> This was working a while back (last year or so - not sure about version
>> numbers).. but doesn't any more?
>> Can you please advise on how to restore this functionality?
> This is something that is not supported.
> PA is, plain and simple, a per-user daemon.
IMO this should be made clearer (as the current man page implies the
opposite), and if possible workarounds like the one I found should be
> If you want to direct sound from different DISPLAYs to different PA
> servers/sinks you can use the PULSE_SERVER and/or PULSE_SINK property on
> the X11 root window.
> This functionality will get even more difficult to hack round in the
> future when XDG_SESSION_DIR is supported (i.e. when it's rolled out via
> systemd and supported by PA) so I'd recommend trying to find a way that
> works where just one PA daemon per-user is started but appropriate
> hacking of the X11 root window properties is done instead to acheive the
> same result.
> There will ultimately likely always be ways to get the end result you
> need tho' :)
Using the $HOME trick will do for now.
However please bear in mind that the solutions you suggest (X11
properties) are unusable in a number of scenarios, for example:
* in my case applications should be able start running and talk to a
pulseaudio server whether the session is actually shown anywhere or not.
The sound can then be dispatched wherever it is needed (clients over the
network). The X11 root window properties does not help here as you
cannot change the value after the application is started (well, you can
but it just won't have any effect)
* when running over slow-ish links. Last time I measured it, my solution
using gstreamer+vorbis consumes 25KB/s (albeit lossy) whereas pulseaudio
would require close to 1MB/s using its tcp sockets..
I understand the rationale for wanting only one server per user, but
please bear in mind that others may have different environments and
valid reasons for doing things differently.
More information about the pulseaudio-discuss