How can i set up environment variables for all my games?

I’m trying to set some environment variables in the preferences / system option. But i guess it’s not working because $GAMEDIR only work with a install script…

How can i replicate something like this for all my already installed games. Can i use the game options “wineprefix” or the “working directory” path with a variable ? I can’t find any documentation.

system:
env:
__GL_SHADER_DISK_CACHE_PATH: $GAMEDIR/prefix

Yeah Python and Bash don’t mix unless you want them to :slight_smile:

Anything you set in there will be set in the launch environment, but it’s down to WINE or whatever the runner is to make use of it.

If you want to know what variables are in use, take a WINE game, create a script like
#!/bin/bash
env > ~/lutrisWINEenv.dump
exit 0
…make it executable, put it in as the pre-script to a WINE game, and run it.

Exit the game, look at the file, and you’ll see most of the variables you can override in variables, or play with in pre scripts.
Can turn it into a script with a function.

If you are thinking of a good use case for this feature, mention it to the devs.

Frankly i won’t be hoping for a response and i was like … Just made a sh script and get by.

Thanks you, I will manage by myself :slight_smile: