[pulseaudio-discuss] starting multiple pulseaudio instances for the same user

Antoine Martin antoine at nagafix.co.uk
Fri Apr 8 13:20:03 PDT 2011


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?

My software starts a virtual X server (xpra, vnc..), dbus and a
dedicated pulseaudio server for each "session application" it launches.
This allows it to redirect the sound (in and out) to/from remote
machines (potentially multiple at once too, some directly, some via
gstreamer+vorbis over ssh) - all this together with the display. see (1)

Each "application session" gets its own environment and starts
pulseaudio with:
/usr/bin/pulseaudio --start -vvvv --disable-shm=true --daemonize=false
--use-pid-file=false --system=false --exit-idle-time=-1 -n
--load=module-suspend-on-idle --load=module-null-sink
"--load=module-native-protocol-unix socket=/tmp/pulse-$DISPLAY/native"

A single $USER may start dozens of those sessions, each with a different
(virtual) $DISPLAY.
Now, when I start the second instance I can see that it somehow finds
the previous copy (not the one used by my local X11 session)
[pid  3044]
[pid  3044] fcntl(5, F_SETLKW, {type=F_WRLCK, whence=SEEK_SET, start=0,
>From that point onwards, nothing happens.

Can you please advise on how to restore this functionality?



More information about the pulseaudio-discuss mailing list