1#!/bin/sh 2 3# This file is part of PulseAudio. 4# 5# PulseAudio is free software; you can redistribute it and/or modify 6# it under the terms of the GNU Lesser General Public License as published by 7# the Free Software Foundation; either version 2 of the License, or 8# (at your option) any later version. 9# 10# PulseAudio is distributed in the hope that it will be useful, but 11# WITHOUT ANY WARRANTY; without even the implied warranty of 12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13# General Public License for more details. 14# 15# You should have received a copy of the GNU Lesser General Public License 16# along with PulseAudio; if not, see <http://www.gnu.org/licenses/>. 17 18set -e 19 20if [ x"$DISPLAY" != x ] ; then 21 22 @PACTL_BINARY@ load-module module-x11-publish "display=$DISPLAY xauthority=$XAUTHORITY" > /dev/null 23 @PACTL_BINARY@ load-module module-x11-cork-request "display=$DISPLAY xauthority=$XAUTHORITY" > /dev/null 24 25 # KDE plasma versions older than 5.17.0 use module-device-manager's routing API. 26 # Check for current plasma version and load module if it's necessary. 27 if [ x"$KDE_FULL_SESSION" = x"true" ]; then 28 plasmaversion="$(plasmashell -v 2>/dev/null | sed -n 's/^plasmashell \([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)/\1*1000000+\2*1000+\3/p' | head -1)" 29 if [ -n "$plasmaversion" ] && [ "$(($plasmaversion))" -lt "5017000" ]; then 30 @PACTL_BINARY@ load-module module-device-manager "do_routing=1" > /dev/null 31 fi 32 fi 33 34 if [ x"$SESSION_MANAGER" != x ] ; then 35 @PACTL_BINARY@ load-module module-x11-xsmp "display=$DISPLAY xauthority=$XAUTHORITY session_manager=$SESSION_MANAGER" > /dev/null 36 fi 37fi 38