Add optional KB/Mouse input capture with Xorg

This commit is contained in:
Josh.5
2022-10-05 07:43:20 +13:00
committed by Josh Sunnex
parent 829754b8fb
commit 1e255f822d
2 changed files with 11 additions and 1 deletions

View File

@@ -170,6 +170,7 @@ RUN \
xfonts-base \ xfonts-base \
xorg \ xorg \
xserver-xorg-core \ xserver-xorg-core \
xserver-xorg-input-evdev \
xserver-xorg-input-libinput \ xserver-xorg-input-libinput \
xserver-xorg-legacy \ xserver-xorg-legacy \
xserver-xorg-video-all \ xserver-xorg-video-all \
@@ -498,7 +499,8 @@ ENV \
ENABLE_VNC_AUDIO="true" \ ENABLE_VNC_AUDIO="true" \
NEKO_PASSWORD=neko \ NEKO_PASSWORD=neko \
NEKO_PASSWORD_ADMIN=admin \ NEKO_PASSWORD_ADMIN=admin \
ENABLE_SUNSHINE="false" ENABLE_SUNSHINE="false" \
ENABLE_EVDEV_INPUTS="false"
# Configure required ports # Configure required ports
ENV \ ENV \

View File

@@ -74,6 +74,14 @@ function configure_x_server {
# Enable xvfb supervisord script # Enable xvfb supervisord script
sed -i 's|^autostart.*=.*$|autostart=true|' /etc/supervisor.d/xvfb.ini sed -i 's|^autostart.*=.*$|autostart=true|' /etc/supervisor.d/xvfb.ini
fi 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 if ([ "${MODE}" != "s" ] && [ "${MODE}" != "secondary" ]); then