×

INDI Library v2.0.7 is Released (01 Apr 2024)

Bi-monthly release with minor bug fixes and improvements

Startup Script to bind Bluetooth

  • Posts: 281
  • Thank you received: 29
Hi.
I have created a desktop launcher to a) bind to the bluetooth adapter and b) to start Kstars in one go. When initiating the script manually in the terminal (just enterting the name), I can verify that binding took place (running ls -al /dev/rfcomm0). When initiating the script via clicking on desktop icon, this is not working. I think it must have to do with "sudo", so I added a line using "visudo", but that did not help, i.e.

"astroberry ALL= NOPASSWD: /usr/local/sbin/startup"

This my script (path /usr/local/sbin/startup), for which I run "sudo chmod +x startup":

#!/bin/bash

sudo rfcomm bind hci0 20:17:09:18:52:58 1
sleep 10
sudo chown astroberry /dev/rfcomm0
kstars

Under path astroberry/Desktop/Startup, I have placed a file as follows:

[Desktop Entry]
version=0.1
Name=Startup
Comment=Bluetooth
Exec=/usr/local/sbin/startup
Icon=/home/astroberry/Pictures/Gold_Telescope.png
Terminal=false
Type=Application
Categories=Utility; Application;

Any ideas really appreciated!

Best, Helge
6 years 2 months ago #22964

Please Log in or Create an account to join the conversation.

Time to create page: 0.125 seconds