netbrain / zwift

Easily zwift on linux
The Unlicense
265 stars 28 forks source link

Is there a way to edit Zwift config files? #41

Closed johnatas-henrique closed 9 months ago

johnatas-henrique commented 11 months ago

Hi all, I'm using this on my Linux PC and it's working better than I ever dreamed (works better than my other Windows PC). But, I'd like to change the graphics a bit and put a FPS counter, in Windows I can find the config files, in this solution I couldn't find the config files.

I searched in the mountpoint (/var/lib...) and in the docker volume (mounting it with BusyBox) and didn't found anything.

Thanks in advance

netbrain commented 11 months ago

Well where in windows are these config files you mention?

Only the mounpoint /home/user/Zwift is mapped to the volume, so if the files resides somewhere else then you would have to add another volume mapping.

However im pretty certain that everything zwift related is mapped to the volume mount.

You could also try starting zwift, and then docker exec -it <container-id> bash in order to view the files from the containers perspective.

johnatas-henrique commented 11 months ago

In Windows, the "config" folder are inside the "data" folder, and the data folder have way more items than the zwift folder when I ran the container with busybox. I found the files in the container perspective when I started Zwift and entered the container, there was a folder named ".wine" and inside that folder, I found the "Windows path" of Zwift, where I found the files. But the container is destroyed after we close Zwift, so changing anything inside the container is in vain, right? What I was thinking about, is to find where this ".wine" folder is and alter the files there, but I didn't found where this folder is.

netbrain commented 11 months ago

Yes that's right, the container is removed after exit, so either you can create your own script to keep a zwift container hanging around, and modify the files you want and simply do a docker restart <container>on every start of zwift.

Or another option is to docker create <container> then copy over the files you want overridden in the .wine folder through docker copy /path/to/my/config/file <container>:/home/user/.wine/... and then docker start <container>. though this would have to be run on every run, but a script could fix that for you.

The third option is to see if you can mount a volume in the .wine path and see if you can replace the config file like that. It depends if it's already there in the base image or not i think.

We should probably look into creating a container that doesn't contain a pre-downloaded and installed zwift, and let it be installed on the first run and stored to a named volume. Been looking to do that with: #28