mviereck / x11docker

Run GUI applications and desktops in docker and podman containers. Focus on security.
MIT License
5.62k stars 378 forks source link

webcam: group "video" is not x11docker default #241

Closed mdhooge closed 4 years ago

mdhooge commented 4 years ago

Hello,

On my up-to-date Archlinux with x11docker 6.6.1, I don't have access to the /dev/video files in the guests (e.g. it doesn't work with x11docker/check). As expected, the /dev/video files are owned by group video; but my host user doesn't belong to that group. Maybe this is Archlinux specific, but according to the Wiki, this is udev that does the magic!

In the x11docker source, function setup_webcam has the following comment: Unprivileged users need to be in group video (x11docker default). But this is not the case with my configuration…

If I put the following line just below the comment, then everything is fine (check & cheese images tested so far). Containerusergroups="$Containerusergroups video"

I searched through the source, only the --gpu option adds this group to the user list.

HTH M.

mviereck commented 4 years ago

Thank you for the report and the detailed investigation! Is fixed now in master branch with exactly your suggestion.

Once x11docker always added the user to group video, later I decided to do that only if needed (with --gpu). But I forgot to adjust --webcam, too.