Because there isn’t too much answer to my question, i’ve thought i have to ask something other. I have 2 questions:
Is it possible to create a disposable sys-usb VM so that instead of the two commands in the documentation, the sys-usb VM is immediately disposable? If yes, how should i do it?
How can i delete a disposable sys-usb if i’m already connected to it? I’ve checked the documentations, but is there any other way where i don’t have to shut off the existing disp-sys-usb?
Unfortunately i have only 1 USB controller, and there is no PS/2 input on my PC.
Note: Most of the commonly used USB controllers (all Intel integrated controllers) require the -o no-strict-reset=True option to be set. Instructions detailing how this option is set can be found here.
(recommended) Disable the appmenus-dispvm feature, as disp-sys-usb is not itself a DisposableVM template (Note: this is only necessary if you enabled the appmenus-dispvm feature for the DisposableVM template):
At this point, your mouse may not work. Edit the qubes.InputMouse policy file in dom0, which is located here:
/etc/qubes-rpc/policy/qubes.InputMouse
Add a line like this to the top of the file:
disp-sys-usb dom0 allow,user=root
Your pci device like usb and keyboard is connected through this vm, if you delete this sys-usb that mean you need to detach usb device like keyboard or mouse and attach it back to dom0, while your keyboard doesn’t work you can’t attach it right ? that’s why you need to reboot.
Thanks! These are the commands as in the documentation, aren’t they? Can I use this as a substitute for the sudo qubesctl state.sls qvm.sys-usb command? And after this i should use the sudo qubesctl state.sls qvm.usb-keyboard command to enable the keyboard for login? And that’s it? As if i’d followed the normal automata sys-usb creation after install (the 2 commands from the docu)? sudo qubesctl state.sls qvm.sys-usb sudo qubesctl state.sls qvm.usb-keyboard
S i just unplug and replug the keyboard and mouse and it will work as if there’s no sys-usb right?
I’ve thought about to copy paste the commands from the documentation, but I thought it was clear from the linked document and the context of the thread which ones I could have been thinking of. Next time i won’t make this mistake!
I know that i can’t delete a template with running qubes, but how should i delete it (the sys-usb VM) if i don’t need it and i have only 1 USB controller attached to the sys-usb VM?
In order to use a USB keyboard, you must first attach it to a USB qube, then give that qube permission to pass keyboard input to dom0. Edit the qubes.InputKeyboard policy file in dom0, which is located here:
/etc/qubes-rpc/policy/qubes.InputKeyboard
Add a line like this one to the top of the file:
sys-usb dom0 allow
(Change sys-usb to your desired USB qube.)
You can now use your USB keyboard to login and for LUKS decryption during boot.
If you like manual then do above, otherwise sudo qubesctl state.sls qvm.usb-keyboard
If you want to attach the USB mouse automatically anyway, you have to edit the qubes.InputMouse policy file in dom0, located at:
/etc/qubes-rpc/policy/qubes.InputMouse
The first line should read similar to:
sys-usb dom0 ask,default_target=dom0
which will ask for conformation each time a USB mouse is attached. If the file is empty or does not exist, maybe something went wrong during setup, try to rerun qubesctl state.sls qvm.sys-usb in dom0.
In case you are absolutely sure you do not want to confirm mouse access from sys-usb to dom0 , you may add the following line on top of the file:
Boot into Qubes, but interrupt grub to remove the section that hides the
usb controller from dom0.
Stop sys-usb.
Delete sys-usb.
Make the changes to default grub, and rebuild grub.