All of lore.kernel.org
 help / color / mirror / Atom feed
* Check for connections and disable bluetooth in shell
@ 2010-08-31  5:58 Jonathan Haug
  2010-08-31  6:04 ` Gustavo F. Padovan
  0 siblings, 1 reply; 3+ messages in thread
From: Jonathan Haug @ 2010-08-31  5:58 UTC (permalink / raw)
  To: linux-bluetooth


Dear bluetooth-experts,

I want to disable bluetooth on my system (via commandline), if there is
no active bluetooth connection -- without being root.

Therefor I need a way to

1.  check if there is an active bluetooth connection

2.  disable bluetooth without being root


For the second part I found

dbus-send --system --type=method_call --dest=org.bluez $(dbus-send
--system --print-reply --dest=org.bluez / org.bluez.Manager.ListAdapters
| awk -F'"' '/at/ {print $2}') org.bluez.Adapter.SetProperty
string:Powered variant:boolean:false

but this doesn't really disable bluetooth: I'm still able to deactivate
bluetooth in the panel.

For the first part I could not find a solution so far.

I'm running Ubuntu 10.04.

Thanks for your help!

Jonathan Haug



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-10-07  5:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-31  5:58 Check for connections and disable bluetooth in shell Jonathan Haug
2010-08-31  6:04 ` Gustavo F. Padovan
2010-10-07  5:01   ` Jonathan Haug

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.