diff --git a/Dockerfile b/Dockerfile index bc4bca7..7dd7334 100644 --- a/Dockerfile +++ b/Dockerfile @@ -170,6 +170,7 @@ RUN \ xfonts-base \ xorg \ xserver-xorg-core \ + xserver-xorg-input-evdev \ xserver-xorg-input-libinput \ xserver-xorg-legacy \ xserver-xorg-video-all \ @@ -498,7 +499,8 @@ ENV \ ENABLE_VNC_AUDIO="true" \ NEKO_PASSWORD=neko \ NEKO_PASSWORD_ADMIN=admin \ - ENABLE_SUNSHINE="false" + ENABLE_SUNSHINE="false" \ + ENABLE_EVDEV_INPUTS="false" # Configure required ports ENV \ diff --git a/overlay/etc/cont-init.d/70-configure_xorg.sh b/overlay/etc/cont-init.d/70-configure_xorg.sh index 77b46e4..9b1eb84 100644 --- a/overlay/etc/cont-init.d/70-configure_xorg.sh +++ b/overlay/etc/cont-init.d/70-configure_xorg.sh @@ -74,6 +74,14 @@ function configure_x_server { # Enable xvfb supervisord script sed -i 's|^autostart.*=.*$|autostart=true|' /etc/supervisor.d/xvfb.ini fi + + # Enable KB/Mouse input capture with Xorg if configured + if [ ${ENABLE_EVDEV_INPUTS:-} = "true" ]; then + echo "Enabling evdev input class on pointers, keyboards, touchpads, touch screens, etc." + cp -fv /usr/share/X11/xorg.conf.d/10-evdev.conf /etc/X11/xorg.conf.d/10-evdev.conf + else + echo "Leaving evdev inputs disabled" + fi } if ([ "${MODE}" != "s" ] && [ "${MODE}" != "secondary" ]); then