Browse Source

enable mouse & keyboard

Fabian Peter Hammerle 3 years ago
parent
commit
36508d971c
3 changed files with 20 additions and 1 deletions
  1. 5 0
      Dockerfile
  2. 1 1
      README.md
  3. 14 0
      xorg.conf

+ 5 - 0
Dockerfile

@@ -8,6 +8,11 @@ RUN apt-get update \
         tini \
         xinit \
         xserver-xorg-core
+# TODO merge
+RUN apt-get install --yes xserver-xorg-input-evdev
+
+COPY xorg.conf /etc/X11/
+
 # TODO change user
 ENTRYPOINT ["/usr/bin/tini", "--"]
 CMD ["startx", "/usr/bin/i3"]

+ 1 - 1
README.md

@@ -5,7 +5,7 @@ sudo docker build -t xorg-test .
 sudo docker run --rm -it \
     --device /dev/tty0 --device /dev/tty2 --group-add $(stat --format=%g /dev/tty0) \
     --device /dev/dri --group-add $(stat --format=%g /dev/dri/card0) \
-    --device /dev/input --group-add $(stat --format=%g /dev/input/event0) \
+    --device /dev/input/event1 --group-add $(stat --format=%g /dev/input/event1) \
     --userns host --cap-add SYS_ADMIN --security-opt no-new-privileges \
      xorg-test
 ```

+ 14 - 0
xorg.conf

@@ -0,0 +1,14 @@
+# https://www.x.org/releases/current/doc/man/man5/xorg.conf.5.xhtml
+
+Section "ServerFlags"
+    # > The server relies on udev to provide the list of input devices. [...]
+    # > If hotplugging is enabled, InputDevice sections using the mouse,
+    # > kbd and vmmouse driver will be ignored.
+    Option "AutoAddDevices" "false"
+EndSection
+
+Section "InputDevice"
+    Identifier "InputDevice0"
+    Driver "evdev"
+    Option "Device" "/dev/input/event1"
+EndSection