gow icon indicating copy to clipboard operation
gow copied to clipboard

Unprivileged udev

Open zb140 opened this issue 2 years ago • 2 comments

After much research and experimentation, I've learned that udev can run without network_mode: host and privileged: true by using nsenter.

nsenter is a bit like chroot, but for namespaces; launching the udev daemon through it will allow udev to see the necessary netlink messages from the host.

I've tested with mouse, keyboard, and controller in both Steam and Retroarch in headless mode, but I don't currently have the equipment to test host-desktop mode (I really gotta fix that :grin:). Since host-desktop mode doesn't even run udev I think it shouldn't be affected by this change, but 🤷 .

Edit: meant to add some links to more info about nsenter:

  • https://man7.org/linux/man-pages/man1/nsenter.1.html
  • https://linuxhint.com/nsenter-linux-command/

zb140 avatar Sep 04 '22 00:09 zb140

ltgm, do you want to merge this before or after #76

Sparticuz avatar Sep 12 '22 15:09 Sparticuz

I could go either way. I think #76 still needs some more testing, but at the same time there isn't a pressing reason why this needs to be merged sooner rather than later.

zb140 avatar Sep 14 '22 14:09 zb140