netbrain / zwift

Easily zwift on linux
The Unlicense
230 stars 27 forks source link

./zwift.sh: line 180: xhost: command not found #126

Closed netbrain closed 2 months ago

netbrain commented 2 months ago

Describe the bug Some distributions don't have xhost, i.e wayland only.

To Reproduce Steps to reproduce the behavior:

  1. System doesn't have xhost
  2. Launch zwift
  3. See error

Script should probably only invoke xhost if it finds it on the path. something ala.

command -v xhost && xhost ....

sHedC commented 2 months ago

I will pick this up and update to improve authority/ site checking.

Example, first check what environment X11, XWayland, Wayland. then set parameters based on the manager with a default fall back.

Next check XAuthority or others to add/ remove correct checks then check Xhost if required to run

Finally display a message to say if you do nto see the window please raise an issue. And update the issues so we can ask specifically things liek what distro / env variables etc. I have done some templates in my https://github.com/sHedC/homeassistant-mastertherm that when you raise an issue it asks for specific info?

netbrain commented 2 months ago

Sure, sounds like a good plan.

sHedC commented 2 months ago

Did a first update to the zwift.sh, and some fancy stuff.

What you think ? https://github.com/netbrain/zwift/tree/sHedC/issue126

I did try to use Pipewire instead of Pulse in wayland but no idea if it worked as even without the pulse settings I still got sound.

Also just did minor updates to make sure wayland can work, as setting it in the run-zwift.sh is too late so set it in build and then use DISPLAY to indicate if wayland experimental or X.