How to share a bluetooth mouse between linux and windows

If you have a dual-boot system with linux and windows and you are using a bluetooth mouse you can't share it, you have to re-pair it every time that we boot a different OS.

To solve this problem and to become able to switch without problem between the two OS we have to pair the mouse without authentication in both of them; Usually Linux doesn't connect the mouse with authentication but Windows always connect it in this way and for this we have to repair the mouse every time that we change OS.

If instead of a mouse we have to share a keyboard, everything is different as you can see here.

To share a mouse between linux-windows you have to connect it in them without authentication as you can see here:

  • Boot linux, connect the mouse and indicate it as trusted in way to make it able to automatically connect at start
  • Boot windows and search the available bluetooth devices

Ricerca Mouse

  • In the list of the available devices right click on the mouse and select Properties

Seleziona Mouse Proprietà Mouse

  • Now in the tab Services check spuntare Drivers for keyboard, mice, etc. (HID) and select Apply

Driver Mouse

In this way windows will automatically install the drivers for the devices without authentication.

If instead we connected the mouse as standard windows would connect the mouse with authentication not allowing us to share it on multiple operating systems.

Now we have to be sure that the bluetooth controller name is the same on linux and windows, so:

  • Right click on the bluetooth icon
  • Open Settings -> Hardware -> Properties -> Advanced
  • Check the name

Now we have to boot linux:

su
hciconfig
hciconfig hci0 name windowsname

where windowsname is the controller name on windows.