Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webcam not available for Ring #86

Closed
DBLouis opened this issue Nov 11, 2018 · 2 comments
Closed

Webcam not available for Ring #86

DBLouis opened this issue Nov 11, 2018 · 2 comments
Labels

Comments

@DBLouis
Copy link

DBLouis commented Nov 11, 2018

I am trying to use Ring in docker. I used your XFCE image as a base.
The --webcam option seems to work, I see /dev/video0, but Ring does not detect a camera.
I tried on the host of course and it work (with Cheese).
I noticed that the /dev/video0 not own by the video group in the container, contrarily to the host.

Here is the Dockerfile: https://framagit.org/snippets/2693

@mviereck
Copy link
Owner

mviereck commented Nov 11, 2018

Thanks for reporting!

I've build your Dockerfile and can confirm that gnome-ring does not work ootb.

I got it to work with two changes:

  • I've also installed cheese in image. It seems that gnome-ring is missing a dependency that gets installed along with cheese. (I did not track down which one it is).
  • I run the image with --systemd and --privileged like so:
x11docker --webcam --systemd --gpu --desktop -- --privileged -- gnome-ring-image

Running with --privileged is a breakdown of container isolation, I cannot recommend it. Maybe it can be tracked down to a less privileged setup.
Though, I once failed to run cheese with less privileges than --privileged. I doubt it will be better with gnome-ring, but I don't know.
(Other webcam applications like guvcview don't need --privileged.)

I noticed that the /dev/video0 not own by the video group in the container, contrarily to the host.

That does work here, /dev/video0 belongs to group video in container. Can you please show me ls -l /dev/video0 in container and, for comparision, on host?

mviereck added a commit that referenced this issue Nov 12, 2018
@mviereck
Copy link
Owner

mviereck commented Nov 12, 2018

Good news!
I found that gnome-ring and cheese need some device information from udev.
Option --webcam now shares read access to /run/udev/data.

Now it is enough for cheese and gnome-ring to run with --webcam and --systemd or --dbus-system. No special privileges except webcam access are needed anymore.

Please update to latest master version or run with --sharedir /run/udev/data if you want to stay with current stable release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants