gow
gow copied to clipboard
Unprivileged udev
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/
ltgm, do you want to merge this before or after #76
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.