KDE version check in start-pulseaudio-x11 is broken
Summary
KDE version check in start-pulseaudio-x11 is broken (at least on my system).
I think the problem is that it use $DESKTOP_SESSION
env variable which doesn't exist on my system:
$ echo $DESKTOP_SESSION
This check was introduced in !162 (merged) and it's part of pulseaudio 13.0
cc: @ngraham @nicolasfella @arun @markg85
environment
pulseaudio --version pulseaudio 13.0-dirty
plasmashell --version plasmashell 5.17.0
Distro: Arch Linux
I start plasma session with startplasma-x11
within xinit.
Note that I'm not pasting pa-info
output because it's not relevant for this issue.
Steps to reproduce
Run /usr/bin/start-pulseaudio-x11
. The version check looks like below:
if [ x"$KDE_FULL_SESSION" = x"true" ]; then
plasmaversion=`grep "X-KDE-PluginInfo-Version" $DESKTOP_SESSION.desktop | cut -d "=" -f2 | cut -d "." -f1,2 | tr -d "."`
if [ "$plasmaversion" -lt "517" ]; then
/usr/bin/pactl load-module module-device-manager "do_routing=1" > /dev/null
fi
fi
What is the current bug behavior?
Execution of it fails like below (after adding +x to /usr/bin/start-pulseaudio-x11):
+ '[' x:0 '!=' x ']'
+ /usr/bin/pactl load-module module-x11-publish display=:0
+ '[' xtrue = xtrue ']'
++ grep X-KDE-PluginInfo-Version .desktop
++ cut -d = -f2
++ cut -d . -f1,2
++ tr -d .
grep: .desktop: No such file or directory
+ plasmaversion=
+ '[' '' -lt 517 ']'
/usr/bin/start-pulseaudio-x11: line 27: [: : integer expression expected
What is the expected correct behavior?
grep "X-KDE-PluginInfo-Version" $DESKTOP_SESSION.desktop | cut -d "=" -f2 | cut -d "." -f1,2 | tr -d "."
should show something useful.