Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Automatic Bluetooth Mouse Script

Programming languages, Coding, Executables, Package Creation, and Scripting.
Post Reply
Message
Author
Neelosh
Posts: 3
Joined: 2006-11-24 02:50

Automatic Bluetooth Mouse Script

#1 Post by Neelosh »

i was hoping that i could write a perl script that would automatically configure my bluetooth mouse and make it work each time. the commands i need to type are "hcidtool scan" and then as root "hidd --server" followed by "hidd --connect " followed by my mouses address. i can't figure out a way to become a root. i had a simple script

#/usr/lib/perl -w

system("hcidtool scan");
system("hidd --server");
system("hidd --connect 00:07:61:4c:7b:ad");

but it obviously doesnt work. is there another way to do this?

marwal
Posts: 14
Joined: 2006-11-17 07:26

#2 Post by marwal »

You could SUID the script.
chmod u+s the-script
sudo chown root:root the-script

it then runs with the priviliges of the script-owner (root).

Post Reply