I've been watching this thread with interest. Jeff's autopilot is quite bonkers. I've done similar in the past (bash, imagemagick, xdotool etc.) for automation, and know how fragile it can be.hiran wrote: ↑Tue Jul 02, 2024 7:06 pmI just had a closer look at Jeff's solution. It usesxdotool
to fire off keyboard input into Oolite.
xdotool works with X.org display server. However since a couple of years Ubuntu migrated towards the Wayland display server - and xdotool cannot deal with that.
Now there might be something like kdotool, dotool but they all require some extra effort.
I'm on Mint XFCE, so still use X.org. I do however have a couple of Wayland DE's set up as alternative logins on my 'lesser laptop'.
A direct effect of the improved security between client applications is that Wayland is not very 'snoop tool friendly'.
I take it Oolite is actually still not Wayland compatible, so it will use Xwayland. However, if Oolite has grown "Wayland-wings", is there an RDP server for Wayland? If so, then it might be possible to mirror the Wayland screen to a client in an 'in memory VNC Xserver', and do all the magic in that.
Terminals on Sway/Weston have two environment variables for clients, the old DISPLAY, and WAYLAND_DISPLAY. The clients if compatible, will consume the latter first, falling back on the former under X. It looks like Xwayland clients are all spawned by default in DISPLAY :0
Code: Select all
xdotool search \.\*
Another way.. Xnest. Keep all the autopilot guff in an X server while using a Wayland desktop.
Code: Select all
# Install the bits to do this. openbox is an optional lightweight DE.
apt install xnest openbox
# Spawn an X server as display :12
Xnest :12
#Now open another xterm.
DISPLAY=:12 xterm
# that terminal should appear without window handles in the Xnest.
#Now in the terminal in the Xnest:
# stop 'modern apps' spawning on Wayland, outside the Xnest
unset WAYLAND_DISPLAY
# Now launch a WM or DE, other sessions ar available. I found my xfce4-session worked fine.
openbox