You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you don't want to run screen-server with --privileged (you shouldn't), and you don't want to bind the entire /dev/input (violates principle of least privilege), you're left with having to map a directory that contains the sole event device. It has to be directory, because device nodes come and go (hotplug). i.e. plug creates inode 1 -> disconnect -> plug creates inode 2. If you'd naively map --device /dev/input/logitech and start a container, during the whole lifecycle of the container it'd refer to inode 1.
Here's my /etc/udev/rules.d/80-screen-server.rules:
# Logitech should be visible for screen-server
ACTION=="add", KERNEL=="event[0-9]*", ATTRS{name}=="Logitech K400", RUN+="/bin/sh -c 'mkdir -p /dev/input/screen-server && ln $devnode /dev/input/screen-server/logitech'"
ACTION=="remove", KERNEL=="event[0-9]*", ATTRS{name}=="Logitech K400", RUN+="/bin/sh -c 'rm /dev/input/screen-server/logitech'"
And docker-compose file:
version: "3.5"services:
screens:
labels:
traefik.frontend.rule: Host:screens.mydomain.comenvironment:
SCREEN_1: "5900,800,1280,Galaxy Tab 2,/dev/input/screen-server/logitech"image: fn61/screen-server:20201218_1758_3beeef8dshm_size: 512M# Firefox and Chrome crash on default (64 M) if website is heavy in any wayports:
- "5900:5900"devices:
- "/dev/input/screen-server"networks:
default: nullnetworks:
default:
external:
name: mynetwork
The text was updated successfully, but these errors were encountered:
Why is it a hardlink: tl;dr: hotplug support.
If you don't want to run screen-server with
--privileged
(you shouldn't), and you don't want to bind the entire/dev/input
(violates principle of least privilege), you're left with having to map a directory that contains the sole event device. It has to be directory, because device nodes come and go (hotplug). i.e. plug creates inode 1 -> disconnect -> plug creates inode 2. If you'd naively map--device /dev/input/logitech
and start a container, during the whole lifecycle of the container it'd refer to inode 1.Here's my
/etc/udev/rules.d/80-screen-server.rules
:And docker-compose file:
The text was updated successfully, but these errors were encountered: