Fail to run Rotatrix software on wayland

Hey-hey!

I reinstalled my OS recently and use Plasma on Wayland. The Rotatrix appimage fail to start with the following stack trace:

> ./Rotatrix-1.5.0-linux-x86_64.AppImage
Traceback (most recent call last):
  File "rotatrix_main.py", line 3, in <module>
  File "pyimod02_importers.py", line 457, in exec_module
  File "rotatrix/app/launcher.py", line 51, in <module>
  File "pyimod02_importers.py", line 457, in exec_module
  File "rotatrix/os/input/global_hotkeys.py", line 11, in <module>
  File "pyimod02_importers.py", line 457, in exec_module
  File "pynput/__init__.py", line 40, in <module>
  File "pyimod02_importers.py", line 457, in exec_module
  File "pynput/keyboard/__init__.py", line 31, in <module>
  File "pynput/_util/__init__.py", line 78, in backend
ImportError: this platform is not supported: ('failed to acquire X connection: Can\'t connect to display ":0": b\'Authorization required, but no authorization protocol specified\\n\'', DisplayConnectionError(':0', b'Authorization required, but no authorization protocol specified\n'))

Try one of the following resolutions:

 * Please make sure that you have an X server running, and that the DISPLAY environment variable is set correctly
[PYI-9255:ERROR] Failed to execute script 'rotatrix_main' due to unhandled exception

Could you consider supporting the Wayland environment natively?

Checked the new appimage from Rotatrix 1.6 Beta: Better Navigation, Object Manipulation & OpenAxis SDKs

Looks like the issue is fixed there

Great! Yup, the need to query X was removed in 1.6 because another user reported a similar issue. However, it still looks for the keyboard layout from the X server, and falls back to the US standard if it can’t get it.

I believe all Wayland distros still have XWayland available for running X11 apps, but issues like missing env variables can prevent connection.

What distro are you using?