Bash script for KDeplasma login.
by Neljor from LinuxQuestions.org on (#5G2V4)
Dear people,
Created a script to be executed at KDE login, the script works fine after login but cannot be executed at login (autostart), likely because pulse is not loaded completely yet.
Do you have any advice on this?
Thanks in advantage!
Code:FILE="/sys/devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.2/interface"
SCARLETT="Scarlett 2i2 USB"
test -f "$FILE" && head -n 1 "$FILE" | while read -r name
do
if [ "$name" = "$SCARLETT" ]; then
pacmd load-module module-remap-source source_name=mono master=alsa_input.usb-Focusrite_Scarlett_2i2_USB_Y81V7690CABC66-00.analog-stereo master_channel_map=front-left,front-right channel_map=mono,mono
fi
done
exit 0


Created a script to be executed at KDE login, the script works fine after login but cannot be executed at login (autostart), likely because pulse is not loaded completely yet.
Do you have any advice on this?
Thanks in advantage!
Code:FILE="/sys/devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.2/interface"
SCARLETT="Scarlett 2i2 USB"
test -f "$FILE" && head -n 1 "$FILE" | while read -r name
do
if [ "$name" = "$SCARLETT" ]; then
pacmd load-module module-remap-source source_name=mono master=alsa_input.usb-Focusrite_Scarlett_2i2_USB_Y81V7690CABC66-00.analog-stereo master_channel_map=front-left,front-right channel_map=mono,mono
fi
done
exit 0