Advice re mouse/keyboard

I am setting qubes up as my daily driver and have my laptop connected to a monitor. I also want it to work with a mouse and keyboard.

So just with a wireless mouse plugged in I get a message after booting (and when sys-usb starts!) asking me to select the target domain for the mouse which is dom0. Clicking on this activates my mouse. All good.

So when I hooked this all up I plugged in my usb hub which has my wireless mouse plugged into it. When booting up I get the same message about the mouse (it doesn’t recognise the hub). I attach it to dom0 (as before) and this allows the mouse to work and it also allows me to attach memory sticks in the normal manner.

I am not sure how I should go about attaching a keyboard. If I plug a keyboard into the usb hub I can’t get it to attach to individual qubes for some reason. It is recognised but I can’t get it to attach.

What I want is a keyboard that will work across qubes so I can, for example, I have an email qube open, one for browsing, one for banking etc and have the keyboard work without having to attach it separately when I switch between tasks.

I’ve had a look at the documentation etc but I’m really unsure how to do this in the best way. I haven’t made any alterations in dom0 yet until I get some pointers on the best way to achieve what I want.

I apologise if this is a well worn question but I couldn’t find the solution for my situation so I appreciate any help.

The USB qubes documentation page has your answer, under Manual setup for USB keyboards. You just need to edit /etc/qubes-rpc/policy/qubes.InputKeyboard to have sys-usb dom0 allow at the top of the file. Similarly, for the mouse you need to edit /etc/qubes-rpc/policy/qubesInputMouse to have sys-usb dom0 allow at the top of the file. These files must of course be edited in dom0.

1 Like

Thanks for that reply. I am aware of that doc.

I’ll be honest that I got stumped on how to actually edit something with nano in dom0. This is not my strong point. I finally worked out that I didn’t have a space where I should have. But I followed the above and now I have what I want. Keyboard and mouse attaching in dom0 automatically.

I’ve read the security warnings etc about the keyboard and pw in LUKS but this is not really an issue for lil ol me. Its the convenience that I wanted.

I have no idea if this is related, but since doing this my sys-usb starts every time now whereas before it would only start 50% of the time. In a previous installation of qubes where I bought the laptop already set up with the mouse/keyboard attached to dom0 I never had an issue with sys-usb starting.

I am aware that my setup may not be what a hard core security conscious user may use but this works for me and I am wondering if it fixed this sys-usb issue I asked about elsewhere as it was only with a fresh install that the sys-usb thing became a thing for me.

Thanks for taking time to reply to a beginner.

1 Like

You really don’t need to apologise - everyone starts somewhere.

You can start nano editing the file, like this:
nano /etc/qubes-rpc/policy/qubes.InputKeyboard
That’s the best way to work on an existing file.

From inside nano, you can read in a file using Ctrl+r, and then save it
out overwriting the file you read in.

If you get “permission denied” then you can try running nano as root with sudo nano

When you use sys-usb, the keyboard is attached to that qube, but the
InputKeyboard means that key presses are passed through to dom0. Since
dom0 has control over all the other qubes, the keyboard then is used in
those other qubes.

I never presume to speak for the Qubes team.
When I comment in the Forum or in the mailing lists I speak for myself.
1 Like

Thanks for taking the time to reply. I really appreciate it. Although I have been using qubes for a couple of years it is only now that I am getting into really making changes such as this. Using editors like nano is another area that I’m just jumping into so I appreciate your patience and taking time to post.