a compact version (essentially the same procedure – this worked better for me):
- Install libbluetooth-dev .
- Download hidclient source code for Ubuntu. (Check the official page to make sure that's not out of date.) Put it in a folder by itself and extract its contents.
makeand press Enter to compile the source.
- Back up and edit your Bluetooth configuration:
sudo cp /etc/bluetooth/main.conf /etc/bluetooth/main.conf.old
gksu gedit /etc/bluetooth/main.conf
#DisablePlugins = network,inputadd the line
DisablePlugins = input(no
• Add a
#to the beginning of
Class = 0x000100; under it, write
• Save the file and quit the text editor.
- If you want to be able to run
hidclientlike a normal command:
sudo cp hidclient /usr/local/bin.
• Check if
/usr/local/binis in your path with
• If it's not, add it with any of these methods.
If you skip this step, you can run
hidclientby making sure you're in the directory where you compiled it, and running
hidclient --help(or see the bottom of the web page) to see how to use it.
Except when run with the
hidclientmust be run as root. So use
sudo hidclient(followed by whatever options you're specifying, as explained in the help).
Basically, there's two steps:
sudo hidclient -lfor a numbered list of devices.
sudo hidclient -eN -x, replacing
Nwith the number of the device you want to "forward" over Bluetooth. In your case, this will be the keyboard.
You're all set. Tell your mobile device (iPad) to use a Bluetooth keyboard.
The last thing you need to be able to do is to stop using the keyboard for Bluetooth input. See, when
hidclientis running, the device you select is no longer giving input to your Ubuntu system. If it were anything but the keyboard (say, the mouse), you could quit
hidclientby pressing Ctrl+C in the Terminal.
But you cannot do that, because keyboard input won't go to the Terminal or any other Ubuntu program. The keyboard is acting as a Bluetooth device!
So, when "forwarding" the keyboard, quit
hidclientby closing the Terminal window (or tab) in which it's running, with the mouse (or trackpad).
- Of course, if your Ubuntu machine has multiple keyboards, you could "forward" one as a Bluetooth device and continue to use the other on your computer.
- hidclient program and project page, by Anselm Martin Hoffmeister
- This Server Fault answer by Capt.Nemo, which pointed me in the right direction.
awesome man! this really helped me out.ReplyDelete