Sophie

Sophie

distrib > Mageia > 6 > i586 > media > core-release > by-pkgid > 43d9350a24d265cf7c5d0ede0333ada3 > files > 1

pulseaudio-module-x11-10.0-1.mga6.i586.rpm

#!/bin/sh
# to be sourced

if [ -f /etc/sysconfig/pulseaudio ]; then
	. /etc/sysconfig/pulseaudio
fi

if [ -n "$PULSE_SERVER_TYPE" -a "$PULSE_SERVER_TYPE" != "none" ]; then

SESSION=${SESSION##*/}

	case "$SESSION" in
		GNOME|gnome-session|mate-session|cinnamon-session-cinnamon|startgnome_classic| \
		KDE*|startkde| \
		afterstep| \
		enlightenment_start| \
		xfce4|startxfce4)
			# XDG is supported so we don't need to do anything.
			# as XDG Autostart will "just work"(tm)
			;;
		*)
			/usr/bin/start-pulseaudio-x11
# sometimes for some reason start-pulseaudio-x11 fails, while pulseaudio --start just works
			PULSEPID=$(pidof pulseaudio)
			if [ ! -n "$PULSEPID" ]; then
				/usr/bin/pulseaudio --start
			fi			
			;;
	esac
fi