mirror of
https://github.com/joleuger/vuinputd.git
synced 2026-11-05 01:17:20 +00:00
[GH-ISSUE #6] sytemd-nspawn Bind cannot bind mount with dev option #4
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
joleuger/vuinputd#4
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Markus328 on GitHub (Feb 17, 2026).
Original GitHub issue: https://github.com/joleuger/vuinputd/issues/6
I have an issue about systemd-nspawn containers and
--placement on-host. It seems like systemd-nspawn cannot bind mount with dev option a path within anodev/runFirstly, I was not using
--placement on-hostand it worked fine, but I want to use nspawn with--private-users=pickand I got permission issues of devices created on/dev/input.seatdrejects inputs with messed ownership even though it has read permission (libinput debug-eventsworks very well, but sway cannot enumerate any device because seatd doesn't want to).I tried many ways of mounting
/dev/inputwithdev, but I cannot afford to do it while usingidmapmounts (to fix ownership). I found out a way that simply mounts a tmpfs on /run/.../dev-input withdevoption and here systemd-nspawn copies those options in container, and I can have access to input devices on container.and the passing
Bindin nspawn I could get a valid/dev/inputinside container.@joleuger commented on GitHub (Feb 19, 2026):
Hi @Markus328 , thanks a lot for digging into this and for documenting your findings so clearly. I guess what is missing is appropriate documentation. Currently, it is only written down as a side note under https://github.com/joleuger/vuinputd/blob/main/docs/USAGE.md#--placement-on-host :
I guess explicitly mentioning the option of mounting a tmpfs or providing an example systemd service file would have helped you a lot. For this reason I have added a warning message ( see code ). Seems it was not helpful.
Another option seems to be to create the device with the uid and gid of the parent directory. I actually plan to checkin such a solution, but I haven't managed it yet to do my test setup to confirm that such a solution is working.
Thanks again for the detailed report. Do you mind to attach your service files? Those might help other users having similar issues.
@Markus328 commented on GitHub (Feb 23, 2026):
Sorry for late reply, I just forgot this issue. I really noticed the container would have the /dev mounted as dev option, I think using other container solution I could pass dev in the bind mount. On nspawn at least, it wasn't possible. If mounting the actual host's
/run/vuinputd/.../dev-inputas tmpfs using dev option should be done, I liked it would be done automatically by the tool.As I said, I don't knew or know if podman, lxc or so can give me the option to just bind mount passing dev option to the mounted dir in the container (I need to read the docs, but I don't use them as often), and if not, it would be good to clarify better at the docs or even mount the host's
/run/.../dev-inputautomatically to avoid those issues or manual mouting.There's nothing special with my service configs, I'm using a nixos file to define the whole nspawn container as well as firewall setup and vuinputd daemon on host. I've used a
ExecStartPrewith a script that mounts/run/vuinputd/vuinput/dev-inputastmpfswith dev option to make the container work with:idmapbind mount.