自動起動用のスクリプトを設定できません

自動起動用のスクリプトを設定できません

Bluetooth の自動接続を設定しようとしています。手動で実行すると機能する Bluetooth に接続するスクリプトを作成できましたが、セッション マネージャーを使用して設定した後でも起動時に開始されません。

このプロセスをLubuntuで再現しようとしています。 ログイン時に Bluetooth スピーカーを自動接続するにはどうすればよいですか?

[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 コード:

#!/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

関連情報