In our X-Org server setup, if the server is running and we unplug the USB Mouse then the server doesn't really do anything (no errors or warnings.) If we replug the device, even then the server doesn't recognize that device is there now, since it looks for the device only on startup. I need the server to handle the unplug event gracefully and, at the least, exit if the USB mouse has unplugged. Using shell, how can I identify if the USB Mouse has unplugged?
My xorg config file:
Section "ServerFlags"
Option "AutoAddDevices" "no"
Option "DontVTSwitch" "yes"
Option "DontZap" "yes"
Option "BlankTime" "off"
Option "StandbyTime" "off"
Option "SuspendTime" "off"
Option "OffTime" "off"
Option "NoPM" "yes"
Option "AllowMouseOpenFail" "yes"
EndSection
Section "InputDevice"
Identifier "Touchscreen"
Option "CorePointer"
Driver "evdev"
Option "Device" "/dev/input/by-id/usb-ILITEK_ILITEK-TP-event-if00"
Option "Mode" "Absolute"
EndSection
Section "ServerLayout"
Identifier "Layout"
InputDevice "Touchscreen" "CorePointer"
#InputDevice "Keyboard0" "CoreKeyboard"
EndSection
We run the server via a docker container. (P.S.: I am new to X-Org server.)