Hi, This patch has been contributed through Debian's bug tracker. Please review it and consider accepting it to the project's code base if you find it useful.
Thanks, Balint
From 3345277fe7491c0250462dd836e1a440e35d98a6 Mon Sep 17 00:00:00 2001 From: Alexander Kurtz <[email protected]> Date: Sun, 13 Apr 2014 19:49:02 +0200 Subject: [PATCH 3/4] daemon: Stop session-started PA daemon when exiting X session BugLink: http://bugs.debian.org/594001 --- src/daemon/start-pulseaudio-x11.in | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/daemon/start-pulseaudio-x11.in b/src/daemon/start-pulseaudio-x11.in index 620e50f..747e8ae 100755 --- a/src/daemon/start-pulseaudio-x11.in +++ b/src/daemon/start-pulseaudio-x11.in @@ -19,6 +19,13 @@ set -e +# check if pulseaudio has already been started by someone else +if @PA_BINARY@ --check; then + EXIT_WITH_X_SESSION=no +else + EXIT_WITH_X_SESSION=yes +fi + @PA_BINARY@ --start "$@" if [ x"$DISPLAY" != x ] ; then @@ -34,3 +41,9 @@ if [ x"$DISPLAY" != x ] ; then @PACTL_BINARY@ load-module module-x11-xsmp "display=$DISPLAY session_manager=$SESSION_MANAGER" > /dev/null fi fi + +# fork and wait for X-session to end, then quit pulseaudio +if [ "$EXIT_WITH_X_SESSION" = yes ]; then + xprop -root -spy > /dev/null 2>&1 || true + @PA_BINARY@ --kill +fi & -- 1.7.10.4
signature.asc
Description: OpenPGP digital signature
_______________________________________________ pulseaudio-discuss mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
