Title: Document keyboard udev rule · Issue #2 · function61/screen-server · GitHub
Open Graph Title: Document keyboard udev rule · Issue #2 · function61/screen-server
X Title: Document keyboard udev rule · Issue #2 · function61/screen-server
Description: 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 ...
Open Graph Description: 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...
X Description: 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 princi...
Opengraph URL: https://github.com/function61/screen-server/issues/2
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Document keyboard udev rule","articleBody":"Why is it a hardlink: tl;dr: hotplug support.\r\n\r\nIf 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 -\u003e disconnect -\u003e 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.\r\n\r\nHere's my `/etc/udev/rules.d/80-screen-server.rules`:\r\n\r\n```\r\n# Logitech should be visible for screen-server\r\n\r\nACTION==\"add\", KERNEL==\"event[0-9]*\", ATTRS{name}==\"Logitech K400\", RUN+=\"/bin/sh -c 'mkdir -p /dev/input/screen-server \u0026\u0026 ln $devnode /dev/input/screen-server/logitech'\"\r\nACTION==\"remove\", KERNEL==\"event[0-9]*\", ATTRS{name}==\"Logitech K400\", RUN+=\"/bin/sh -c 'rm /dev/input/screen-server/logitech'\"\r\n```\r\n\r\nAnd docker-compose file:\r\n\r\n```yaml\r\nversion: \"3.5\"\r\nservices:\r\n screens:\r\n labels:\r\n traefik.frontend.rule: Host:screens.mydomain.com\r\n environment:\r\n SCREEN_1: \"5900,800,1280,Galaxy Tab 2,/dev/input/screen-server/logitech\"\r\n image: fn61/screen-server:20201218_1758_3beeef8d\r\n shm_size: 512M # Firefox and Chrome crash on default (64 M) if website is heavy in any way\r\n ports:\r\n - \"5900:5900\"\r\n devices:\r\n - \"/dev/input/screen-server\"\r\n networks:\r\n default: null\r\nnetworks:\r\n default:\r\n external:\r\n name: mynetwork\r\n```","author":{"url":"https://github.com/joonas-fi","@type":"Person","name":"joonas-fi"},"datePublished":"2021-04-03T11:19:35.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/2/screen-server/issues/2"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:e047cd4a-8612-0007-d05a-153259b4a841 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B108:2AB98E:360BE7:4A6C42:6A4C7CAC |
| html-safe-nonce | 41fcd19418d4c81ab07fa5ca61b22891e4b2485feb9fa5704055d608ce8039b8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMTA4OjJBQjk4RTozNjBCRTc6NEE2QzQyOjZBNEM3Q0FDIiwidmlzaXRvcl9pZCI6IjU0MjU0NjYyOTQyNjEyODQwMTIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 282b62b52fc48cc1489b80d11ed834ba540def6842b2624bb24ac240051810d1 |
| hovercard-subject-tag | issue:849637528 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/function61/screen-server/2/issue_layout |
| twitter:image | https://opengraph.githubassets.com/0bb255ad10d6a86f620a6ba6507b5c6f60afd9663079df61a262477fa61b2dc6/function61/screen-server/issues/2 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/0bb255ad10d6a86f620a6ba6507b5c6f60afd9663079df61a262477fa61b2dc6/function61/screen-server/issues/2 |
| og:image:alt | 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... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | joonas-fi |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3d11bb817438277de2a940854450e83a7d32b6aeb5014e9e6b00a6423900251c |
| turbo-cache-control | no-preview |
| go-import | github.com/function61/screen-server git https://github.com/function61/screen-server.git |
| octolytics-dimension-user_id | 22049800 |
| octolytics-dimension-user_login | function61 |
| octolytics-dimension-repository_id | 271008840 |
| octolytics-dimension-repository_nwo | function61/screen-server |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 271008840 |
| octolytics-dimension-repository_network_root_nwo | function61/screen-server |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | cd470457e909b9d062f8002cf438ba870e6acff6 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width