xdotool sometimes works sometimes not
by Skaperen from LinuxQuestions.org on (#5QMZQ)
i am trying to use xdotool key to automate some startup actions when i first login. the problem is that sometimes it works just fine and sometimes the actions just don't happen although the command execution produces no error codes or error messages. it's like it thinks it works. maybe it did work but Xorg is ignoring these key inputs. what is suspicious is that in a given reboot all commands either work or all fail. there has never been a partial failure.
a startup script is executing 3 xdotool key commands after doing wmctrl -s to switch to the desired workspace. and there a sleep 10 command between everything to be sure actions have enough time to complete. the failure is that the key inputs do not come in. the oddity is that sometimes it works. if i run the script manually, it works every time.
does anyone who knows how this stuff works have any idea what is going on? what should i check on?
i suspect X because every xdotool key command fails when one does. yet i can follow that by running the script manually and that always works. sorry, the actual whole script is not available because it contains some confidential parts. i might spend some time to make and try a minimal script and see how that works.
i am running Xubuntu 18.04.6 LTS last upgraded this morning (a bunch of qemu stuff this time)
a startup script is executing 3 xdotool key commands after doing wmctrl -s to switch to the desired workspace. and there a sleep 10 command between everything to be sure actions have enough time to complete. the failure is that the key inputs do not come in. the oddity is that sometimes it works. if i run the script manually, it works every time.
does anyone who knows how this stuff works have any idea what is going on? what should i check on?
i suspect X because every xdotool key command fails when one does. yet i can follow that by running the script manually and that always works. sorry, the actual whole script is not available because it contains some confidential parts. i might spend some time to make and try a minimal script and see how that works.
i am running Xubuntu 18.04.6 LTS last upgraded this morning (a bunch of qemu stuff this time)