On Thu, Feb 25, 2021 at 10:36:02PM +0100, Marcus Glocker wrote: > On Thu, Feb 25, 2021 at 09:14:06PM +0000, Stuart Henderson wrote: > > > On 2021/02/25 22:02, Marcus Glocker wrote: > > > On Thu, Feb 25, 2021 at 08:00:32PM +0000, Stuart Henderson wrote: > > > > > > > On 2021/02/25 20:10, Marcus Glocker wrote: > > > > > We had this discussion recently when fbtab(5) for xenodm(1) was fixed > > > > > 6 weeks ago, but we didn't come to an agreement yet. tb@ asked me the > > > > > same question yesterday whether we can add video(1) to fbtab to avoid > > > > > manual chown of /dev/video0, which I think a lot of people do today. > > > > > Therefore here another try to bring this up. > > > > > > > > I'm not sure this is something I would expect to be chmod'ed > > > > automatically.. It's a very different class of device than things > > > > currently in fbtab or Give/TakeConsole. > > > > > > > > At least if this is done we'll have to document it somewhere for people > > > > using ports like multimedia/motion. > > > > > > Um - I don't know this port, but glancing over it, it's a daemon running > > > under the _motion user which is accessing /dev/video*? So people > > > using that today are chowning /dev/video* to _motion? > > > > chown or chgrp - yes. > > I see. I wouldn't know what is the right place to document that the > video device would be owned by the console or xenodm login user. What > would you suggest, in the impacted port itself or centrally, like in the > video(4) man page?
I guess I would document it in video(4). Index: etc/etc.amd64/fbtab =================================================================== RCS file: /cvs/src/etc/etc.amd64/fbtab,v retrieving revision 1.8 diff -u -p -u -p -r1.8 fbtab --- etc/etc.amd64/fbtab 12 Feb 2021 10:26:33 -0000 1.8 +++ etc/etc.amd64/fbtab 26 Feb 2021 20:16:55 -0000 @@ -1 +1,2 @@ -/dev/ttyC0 0600 /dev/console:/dev/wskbd:/dev/wskbd0:/dev/wsmouse:/dev/wsmouse0:/dev/ttyCcfg:/dev/ttyC4:/dev/drm0:/dev/drmR128:/dev/dri/card0:/dev/dri/renderD128 +/dev/ttyC0 0600 /dev/console:/dev/wskbd:/dev/wskbd0:/dev/wsmouse:/dev/wsmouse0:/dev/ttyCcfg:/dev/ttyC4:/dev/drm0:/dev/drmR128:/dev/dri/card0:/dev/dri/renderD128:/dev/video0 +/dev/ttyC4 0600 /dev/video0 Index: etc/etc.i386/fbtab =================================================================== RCS file: /cvs/src/etc/etc.i386/fbtab,v retrieving revision 1.15 diff -u -p -u -p -r1.15 fbtab --- etc/etc.i386/fbtab 12 Feb 2021 10:26:34 -0000 1.15 +++ etc/etc.i386/fbtab 26 Feb 2021 20:16:55 -0000 @@ -1 +1,2 @@ -/dev/ttyC0 0600 /dev/console:/dev/wskbd:/dev/wskbd0:/dev/wsmouse:/dev/wsmouse0:/dev/ttyCcfg:/dev/ttyC4:/dev/drm0:/dev/drmR128:/dev/dri/card0:/dev/dri/renderD128 +/dev/ttyC0 0600 /dev/console:/dev/wskbd:/dev/wskbd0:/dev/wsmouse:/dev/wsmouse0:/dev/ttyCcfg:/dev/ttyC4:/dev/drm0:/dev/drmR128:/dev/dri/card0:/dev/dri/renderD128:/dev/video0 +/dev/ttyC4 0600 /dev/video0 Index: etc/etc.macppc/fbtab =================================================================== RCS file: /cvs/src/etc/etc.macppc/fbtab,v retrieving revision 1.13 diff -u -p -u -p -r1.13 fbtab --- etc/etc.macppc/fbtab 12 Feb 2021 10:26:34 -0000 1.13 +++ etc/etc.macppc/fbtab 26 Feb 2021 20:16:55 -0000 @@ -1,3 +1,4 @@ /dev/ttya 0600 /dev/console /dev/tty00 0600 /dev/console -/dev/ttyC0 0600 /dev/console:/dev/wskbd:/dev/wskbd0:/dev/wsmouse:/dev/wsmouse0:/dev/ttyCcfg:/dev/ttyC4:/dev/drm0:/dev/drmR128:/dev/dri/card0:/dev/dri/renderD128 +/dev/ttyC0 0600 /dev/console:/dev/wskbd:/dev/wskbd0:/dev/wsmouse:/dev/wsmouse0:/dev/ttyCcfg:/dev/ttyC4:/dev/drm0:/dev/drmR128:/dev/dri/card0:/dev/dri/renderD128:/dev/video0 +/dev/ttyC4 0600 /dev/video0 Index: share/man/man4/video.4 =================================================================== RCS file: /cvs/src/share/man/man4/video.4,v retrieving revision 1.19 diff -u -p -u -p -r1.19 video.4 --- share/man/man4/video.4 29 Dec 2020 12:28:23 -0000 1.19 +++ share/man/man4/video.4 26 Feb 2021 20:16:56 -0000 @@ -53,6 +53,15 @@ variable: kern.video.record=0 # Recording is blanked (default) kern.video.record=1 # Recording is enabled .Ed +.Pp +Primary console login or +.Xr xenodm 4 +login will change the +.Pa /dev/video0 +permissions to be owned by the login user by using +.Xr login_fbtab 3 . +This allows the usage of the primary video device without any need to change +the video device permissions manually. .Sh IOCTLS The following .Xr ioctl 2 @@ -455,11 +464,13 @@ ioctl command without blocking. .Sh FILES .Bl -tag -width /dev/video -compact .It Pa /dev/video +.It Pa /etc/fbtab .El .Sh SEE ALSO .Xr video 1 , .Xr ioctl 2 , -.Xr uvideo 4 +.Xr uvideo 4 , +.Xr fbtab 5 .Sh HISTORY The .Nm