I am trying to setup auto connect for bluetooth. I was able to create a script to connect to bluetooth that works when manually executed, however it does not start on startup even after setting it up using session manager.
Trying to replicate this process on Lubuntu- How do I get a Bluetooth speaker to auto-connect at login?
[Desktop Entry]
Comment=Starts Bluetooth speaker
Exec=/bin/bash /home/e3rth/bin/btautoconnect.sh
Hidden=false
Name=BTAutoConnect
NoDisplay=false
Type=Application
X-GNOME-Autostart-Delay=5
X-GNOME-Autostart-enabled=true
btautoconnect.sh code:
#!/bin/bash
bluetoothctl
sleep 10
echo "connect 83:B4:83:DE:7E:AD" | bluetoothctl
sleep 12
echo "connect 83:B4:83:DE:7E:AD" | bluetoothctl
exit