protonscr

Override settings for each app

protonclosed Feature Request
ValveSoftware/Proton#2281 · opened 2019-01-29 by exception13 · updated 2020-03-24 · 3 comments · github
2 matching comments, n / p to jump
Eexception13 2019-01-29 github

Feature Request

Description

By default Proton use common settings for all installed apps. I propose to add the ability to define settings for each installation separately.

Just add in user_settings.py code like this:

import os
import json

STEAM_COMPAT_DATA_PATH = os.environ["STEAM_COMPAT_DATA_PATH"]

user_settings = {
}

try:
    with open(STEAM_COMPAT_DATA_PATH + "/settings.json", "r") as f:
        override_settings = json.load(f)

        user_settings.update(override_settings)
except:
    pass

example override settings for Subnautica:

cat 264710/settings.json 
{
    "PROTON_USE_WINED3D": "1"
}
?ghost 2019-01-29 github

This is currently just done by setting environment variables in the steam launch options of games through the Steam client's GUI, which I personally think is easier than creating a json file in the prefix directory. Example:

PROTON_USE_WINED3D=1 %command%

Kkisak-valve maintainer 2019-01-29 github

Previously discussed at #1413.

Ppchome 2019-01-29 github

See https://github.com/simons-public/protonfixes

Example:
user_settings.py

user_settings = {
}
import protonfixes

~/.config/protonfixes/localfixes/264710.py

from protonfixes import util

def main():
    """ Override settings for Subnautica
    """
    util.disable_dxvk()
    # or 
    # util.set_environment('PROTON_USE_WINED3D11', '1')

Launch options

Launch lines