Fix bug preventing input after the first startup of the container

Xorg was starting before udev could finish the monitor command. This prevented the X server from having access to the input devices. For some reason, any subsequent starts would be fine.

Adding a small delay to the X server start and triggering a request for device events from the kernel after a delay seems to fix this issue.
This commit is contained in:
Josh.5
2022-10-06 22:26:50 +13:00
parent 93fb8f858c
commit 54911cb97b
12 changed files with 122 additions and 36 deletions

View File

@@ -8,15 +8,14 @@
# Last Modified: Wednesday, 26th January 2022 5:38:23 pm
# Modified By: Console and webGui login account (jsunnex@gmail.com)
###
#
# I made this wrapper script so that I could easily try a range of desktop environments
#
source /usr/bin/common-functions.sh
# CATCH TERM SIGNAL:
_term() {
kill -TERM "$desktop_pid" 2>/dev/null
}
trap _term SIGTERM
trap _term SIGTERM SIGINT
# CONFIGURE:
@@ -31,6 +30,8 @@ ln -sf /usr/share/backgrounds/steam.jpg /etc/alternatives/desktop-background
# EXECUTE PROCESS:
# Wait for the X server to start
wait_for_x
# Run the desktop environment in order of priority
if [[ -e /usr/bin/cinnamon-session ]]; then
/usr/bin/cinnamon-session --display=${DISPLAY} &