netbrain / zwift

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

[HELP (Not Launching/ Crashing)] - zwift.sh exits with warning on my system (never starts container). #133

Closed netbrain closed 2 months ago

netbrain commented 2 months ago

Checklist

Describe the issue

+ WINDOW_MANAGER=Other
+ IMAGE=docker.io/netbrain/zwift
+ VERSION=latest
+ NETWORKING=bridge
+ '[' '!' ']'
++ command -v podman
+ '[' -x '' ']'
+ CONTAINER_TOOL=docker
++ id -u
+ ZWIFT_UID=1000
++ id -g
+ ZWIFT_GID=100
+ [[ -f /home/netbrain/.config/zwift/config ]]
+ ZWIFT_CONFIG_FLAG='--env-file /home/netbrain/.config/zwift/config'
+ source /home/netbrain/.config/zwift/config
++ ZWIFT_USERNAME=xxx
++ ZWIFT_PASSWORD=xxx
++ ZWIFT_GID=1000
++ ZWIFT_UID=1000
+ [[ -f /home/netbrain/.config/zwift/netbrain-config ]]
+ '[' wayland == wayland ']'
+ '[' -z ']'
+ WINDOW_MANAGER=XWayland
++ id -u
+ '[' 1000 -ne 1000 ']'
++ id -g
+ '[' 1000 -ne 100 ']'
+ msgbox warning 'Wayland does not support ZWIFT_UID/ ZWIFT_GID.' 5
+ TYPE=warning
+ MSG='Wayland does not support ZWIFT_UID/ ZWIFT_GID.'
+ TIMEOUT=5
+ RED='\033[0;31m'
+ NC='\033[0m'
+ BOLD='\033[1m'
+ UNDERLINE='\033[4m'
+ case $1 in
+ echo -e '\033[1m\033[4mWarning - Wayland does not support ZWIFT_UID/ ZWIFT_GID.\033[0m'
Warning - Wayland does not support ZWIFT_UID/ ZWIFT_GID.
+ '[' 5 -eq 0 ']'
+ sleep 5
+ exit 0

As you can see i've set ZWIFT_GIT and ZWIFT_UID in my config in order to prevent the chown stuff which takes a few seconds. As my user is 1000 on the host and in the container i can get away with it. The only difference is the group which on host is 100 and in container is 1000.

With the new zwift.sh, zwift doesn't start. I think we should remove the exit 0 after the wayland warning and simply try to truck on after displaying the warning.

I can confirm that zwift works if i comment out the exit 0.

Distribution Details

Running NixOS with:

Env: XAUTHORITY is not set. WAYLAND_DISPLAY=wayland-1 DISPLAY=:0

Reproduction steps

  1. Set a different ZWIFT_GID than what your id -g shows
  2. With XWayland try to start zwift (i.e ZWIFT_GID=1000 zwift.sh)
  3. See Warning - Wayland does not support ZWIFT_UID/ ZWIFT_GID.
sHedC commented 2 months ago

Ok I will check it could be that only UID is the issue, let me run and fix.