[libcamera-devel] libcamera as non-root

Laurent Pinchart laurent.pinchart at ideasonboard.com
Tue Dec 29 23:32:22 CET 2020


On Tue, Dec 29, 2020 at 08:31:27PM +0000, Kieran Bingham wrote:
> On 29/12/2020 18:31, Erik Sohns wrote:
> > Hello,
> > 
> > I have a question for the list.
> > 
> > I am trying to integrate libcamera into my Linux application.
> > I am making some progress and am enumerating the existing devices on my
> > system. It turns out, however, that no devices are found when I am not
> > root. Is there a way around this ? Also, the qcam and cam programs only
> > seem to work when the user is root.
> > 
> > Any ideas ? Please answer directly, I am not a subscriber of the list.
> 
> You'll likely need to add your user account to the 'video' group
> 
>   $ sudo usermod -aG video $USER
>   $ newgrp video

Most distributions use the video group for V4L2 video device nodes, but
some may not put media controller devices in that group. You may want to
check ownership of all related devices with

ls -l /dev/video* /dev/v4l-* /dev/media*

If some of those devices are not in the video group, this should be
reported to the distribution.

> The newgrp command adds the group to your current session, but you'll
> probably just want to log out and back in again completely to make sure
> it takes effect.
> 
> Hope this helps, do let us know what you're integrating libcamera into -
> it's interesting to know where the library gets used.

-- 
Regards,

Laurent Pinchart


More information about the libcamera-devel mailing list