Request to autoconnect chromium to bluez

The Chromium web browser has support for Web Bluetooth.

This is still considered experimental on Linux and must be enabled in the Browser setting via chrome://flags/#enable-experimental-web-platform-features.

Although technically it is experimental, we have found that it works perfectly well for our web app. https://code.pybricks.com/

The app can detect if a browser supports Web Bluetooth or not. For example if using Firefox (which doesn’t have Web Bluetooth support) or using Chromium with experimental web features disabled, users will see this error message when clicking the Bluetooth button.

If Web Bluetooth is enabled, users will see this dialog box instead.

image

However, we recently discovered that Chromium installed via snap does neither. Clicking the Bluetooth button simply does nothing. This can be fixed by manually connecting the Chromium snap to the BlueZ interface.

It does not seem reasonable to expect all web developers using Web Bluetooth to add a special case to their web app to detect Chromium running in a snap without bluez connected (and this is very probably not even technically possible at this point in time) and to communicate to their users that there are extra steps needed to manually configure their web browser via a terminal window.

Therefore we are requesting that the chromium snap be allowed to automatically connect to the bluez interface.

1 Like

Some things for the store-requests team to consider:

  • Browsers are generally built to be secure.
  • Even with an auto-connection, user choice is preserved by the permissions dialog in Chromium itself.
    image
1 Like

Note that the bluez plug was recently added to the chromium snap, and verified to allow WebBluetooth to work when connected.

@oSoMoN - can you please comment whether this (auto-connect of bluez) is something that you wish for chromium as these requests must come from the snap publisher themselves, not third-parties.

I think this has value for users of the snap, otherwise WebBluetooth won’t work and it’s hard to tell why without understanding how snap confinement works.
So yes, you can consider the request as coming from me.

2 Likes

Based on the feedback from @galgalesh and the fact that this is precisely why we allow audio-record and camera to auto-connect (and because chromium is a major browser from a well-known publisher), +1 to auto-connect.

@reviewers - can others please vote?

2 Likes

+1 from me too for the same reasons we allow camera / audio-record already for chromium.

+2 votes for, 0 votes against. This is now live.