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
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