Bash script for connect to Apple magic keyboard and mouse on startup
- Replace MAC addresses in connectToBluetooth.sh with MAC address of magic keyboard and mouse
- Run script as sudo
- Make
connectToBluetooth.shexecutable:chmod +x connectToBluetooth.sh - Create a file in
/etc/systemd/system/magicTool.service
[Unit]
Description=Magic Tool Script
[Service]
ExecStart=/path/to/connectToBluetooth.sh
[Install]
WantedBy=multi-user.target
-
Enable the service to run:
systemctl enable magicTool -
For best results power cycle magic keyboard and mouse on startup