blueman-applet enables bluethooth when it starts

Bug #1763221 reported by pqwoerituytrueiwoq on 2018-04-11
This bug affects 3 people
Affects Status Importance Assigned to Milestone
blueman (Ubuntu)

Bug Description

When the blueman-applet starts it changes turn the bluetooth hardware on
This makes the AutoEnable option in /etc/bluetooth/main.conf pointless

The applet should not change the state of bluetooth on startup

Line 76 of /usr/lib/python3/dist-packages/blueman/plugins/applet/ turns the applet on
furthermore line 75 does not respect the value set on line 28

The applet should check the AutoEnable variable defined in /etc/bluetooth/main.conf
in the event it is not defined it should check for the for it under the old name of InitiallyPowered

On another note we have this:
    def on_manager_state_changed(self, state):
        if state:
            def timeout():
                self.adapter_state = self.get_adapter_state()
                if self.get_option("auto-power-on"):
                    self.RequestPowerState(True, force=True)
            GObject.timeout_add(1000, timeout)
it would be better to do this:
    def on_manager_state_changed(self, state):
        if state:
            def timeout():
                if self.get_option("auto-power-on"):
                    self.RequestPowerState(True, force=True)
            GObject.timeout_add(1000, timeout)
as there is no need to make a variable for something are are using only once especically when we do not know that we even need to check the adapter state yet

but the real question is why we need a auto-power-on option anyway
we could just drop lines 25-32 and do this
    def on_manager_state_changed(self, state):
        if state:
            def timeout():
            GObject.timeout_add(1000, timeout)

The only reason I can imaging we would want to turn bluetooth on when the applet starts is if the user manually started it as that would mean they have a bluetooth device they want to it

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: blueman 2.0.5-1ubuntu1
ProcVersionSignature: Ubuntu 4.15.0-13.14-generic 4.15.10
Uname: Linux 4.15.0-13-generic x86_64
ApportVersion: 2.20.9-0ubuntu4
Architecture: amd64
CasperVersion: 1.393
CurrentDesktop: XFCE
Date: Wed Apr 11 23:00:25 2018
LiveMediaBuild: Xubuntu 18.04 LTS "Bionic Beaver" - Alpha amd64 (20180411)
 PATH=(custom, no user)
SourcePackage: blueman
UpgradeStatus: No upgrade log present (probably fresh install)

The attachment "/usr/lib/python3/dist-packages/blueman/plugins/applet/" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch

I just finished a better patch and sent it upstream

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in blueman (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.