netbrain / zwift

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

When using ZWIFT_UID/ZWIFT_GID in Docker does not work under wayland #114

Closed sHedC closed 1 month ago

sHedC commented 2 months ago

Describe the bug When using for example "ZWIFT_UID=1200 ZWIFT_GID=1200 zwift" and running under wayland the window fails to open and it exist.

Note that this has always been an issue with this since implementation of the ZWIFT_UID option.

To Reproduce Steps to reproduce the behavior:

  1. ZWIFT_UID=1200 ZWIFT_GID=1200 zwift
  2. Exits, if using -it inplace of -d in zwift it shows can't open window.

Expected behavior Open the XWayland window correctly

Screenshots N/A

Additional context The reason is that docker starts as root and re-assigns the /run/user/$ZWIFT_UID as the new user id, this fails to pass through to gosu user:user correctly and so wine is not able to open an xwindow as has no permissions for some reason.

sHedC commented 2 months ago

Note: I was looking at the docker remap functionality, which may work in most cases extept Redhat and CentOS (for stupid reasons) I will test.

sHedC commented 2 months ago

Does not work in Podman or Docker as can't pass over permissions to XAuthority or Xhost to the use ID's.

sHedC commented 1 month ago

Don't think we should fix this, not sure what a use case would be. Wayland requires the host UID to have access to the correct resources or it can't start the window or access the audio.