timothycrosley / streamdeck-ui

A Linux compatible UI for the Elgato Stream Deck.
https://timothycrosley.github.io/streamdeck-ui/
MIT License
1.12k stars 240 forks source link

ImportError: this platform is not supported #285

Closed VortexAcherontic closed 1 year ago

VortexAcherontic commented 1 year ago

Describe the bug streamdeck_ui does not start

To Reproduce Steps to reproduce the behaviour:

  1. Install streamdeck_ui as per guide (manual)
  2. Launch
  3. Does not show up

Expected behavior UI to show up

Log

vortexacherontic@z004:~> streamdeck 
Traceback (most recent call last):
  File "/home/vortexacherontic/.local/bin/streamdeck", line 5, in <module>
    from streamdeck_ui.gui import start
  File "/home/vortexacherontic/.local/lib/python3.10/site-packages/streamdeck_ui/gui.py", line 11, in <module>
    from pynput import keyboard
  File "/home/vortexacherontic/.local/lib/python3.10/site-packages/pynput/__init__.py", line 40, in <module>
    from . import keyboard
  File "/home/vortexacherontic/.local/lib/python3.10/site-packages/pynput/keyboard/__init__.py", line 31, in <module>
    backend = backend(__name__)
  File "/home/vortexacherontic/.local/lib/python3.10/site-packages/pynput/_util/__init__.py", line 76, in backend
    raise ImportError('this platform is not supported: {}'.format(
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

Running streamdeck_ui within distrobox (openSUSE Tumbleweed) gives also the same errors both running on X11 and Wayland.

Operating system (please complete the following information)

Stream Deck Version

Additional notes Other python 3.10 based GUI apps work just fine, namely: bottles.
Other X11 only apps work fine: namely xclock
streamdeck_ui does also not work if running Gnome in X11, same error as above.

dodgyrabbit commented 1 year ago

See https://github.com/timothycrosley/streamdeck-ui/issues/284#issuecomment-1374604563 as it may work for you

dodgyrabbit commented 1 year ago

Review https://timothycrosley.github.io/streamdeck-ui/docs/installation/opensuse/ and install 2.0.13.