rimago / rpi-kodi

Dockerized Kodi with audio and video
https://hub.docker.com/r/rimago/rpi-kodi
GNU General Public License v3.0
15 stars 6 forks source link

Usb mouse-keyboard support #3

Open matteopiccioni opened 3 years ago

matteopiccioni commented 3 years ago

Hello, Thanks for your work. I have a mini keyboard Wireless (with touchpad that works as mouse). This device works when I had standard Kodi. Using docker I am not able to make it works. How should I do? Thanks

legarasu commented 2 years ago

Hello,

I have the same problem, I have tried using scripts in /etc/udev/rules.d like this without success:

# input
KERNEL=="mouse*|mice|event*",   MODE="0660", GROUP="input"
KERNEL=="ts[0-9]*|uinput",      MODE="0660", GROUP="input"
KERNEL=="js[0-9]*",             MODE="0660", GROUP="input"

# tty
SUBSYSTEM=="tty", KERNEL=="tty[0-9]*", GROUP="tty", MODE="0666"

Is it some kind of permissions problem? in Debian stretch this error did't happen

Thanks

stsichler commented 8 months ago

I'm very late on this, but I had the same problem and solved it.

For me, it was a permission problem: All /dev/input/* devices have crw-rw---- 1 root input permissions, so the kodi user inside the container must be member of the input group to be able to access them (and of course the /dev/input folder needs to be mapped into the container).

Unfortunately, in my case, the GID of the input group in the host system was different from that in the docker container (seems that GID is not "standardized"?). So, although the kodi user inside the container was member of the input group, it was still not allowed to access any devices in /dev/input/*, because it didn't match the correct GID on the host system. I tried using uid/gid mappings without any success, but in the end, I solved the problem by mounting /etc/passwd, /etc/shadow and /etc/group from the host system inside the container in read-only mode. Note, that of course in that case there must also be a kodi user on the host system with an UID identical to that in the container, being member of the input group.

Maybe another solution could be to copy the /etc/passwd, /etc/shadow and /etc/group files into the container meanwhile building to force all UIDs/GIDs inside to match those outside.