Skip to content

Instantly share code, notes, and snippets.

@sxiii
Created March 4, 2021 19:40
Show Gist options
  • Star 15 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sxiii/6b5cd2e7d2321df876730f8cafa12b2e to your computer and use it in GitHub Desktop.
Save sxiii/6b5cd2e7d2321df876730f8cafa12b2e to your computer and use it in GitHub Desktop.
How to launch games via Proton from CLI (useful for debug)

How to launch games via Proton from CLI (useful for debug)

In just 2 steps

First. Run this:

export STEAM_COMPAT_DATA_PATH=~/.local/share/Steam/steamapps/compatdata

Second. Now in the same terminal, run your game (this example: Raft)

~/.local/share/Steam/steamapps/common/Proton\ 5.13/proton run ~/.local/share/Steam/steamapps/common/Raft/Raft.exe

If you want different proton version, replace it in the first part of path, for example, this is "Breathedge" game on Proton-Experimental:

~/.local/share/Steam/steamapps/common/Proton\ -\ Experimental/proton run ~/.local/share/Steam/steamapps/common/Breathedge/Breathedge.exe

I recommend you doing (and publishing) your own notes if your app is running, but unstable.

Q & A

Q: What actually is Proton? A: Improvement to WINE written by Valve/Steam. More info here: https://en.wikipedia.org/wiki/Proton_(software)

Q: Will my game "X" actually run with proton? Which Proton version do I need? A: Check out the database by typing your game name in search here: http://protondb.com

Q: I've tried my game with proton, it does not work, what else to do? A: Check if guys at WINE itself was able to run it, by searching in "Browse Apps" here: http://appdb.winehq.org. Also, as with proton, try different versions of wine, and maybe even on different linux distros or with different hardware (CPU, GPU, etc.)

Q: My game still don't work neither with WINE nor with Proton, can I try something else? A: Yes, you can also try different other ways:

Q: I want to manage Wine Bottles, or run different software, but I don't want to do it via CLI. I need GUI. How do I do that? A: There are plenty of different software for that. Check out:

Q: Nothing helped! What else I can do? A: Run VirtualBox, VMWare, Parallels, add GPU-passthrough, or just make a dual-boot with Windows.

@thugcee
Copy link

thugcee commented Jun 25, 2022

It doesn't work for me. I get error:

Traceback (most recent call last):
  File "/home/user/.local/share/Steam/steamapps/common/Proton 7.0/proton", line 1407, in <module>
    g_session.init_session(sys.argv[1] != "runinprefix")
  File "/home/user/.local/share/Steam/steamapps/common/Proton 7.0/proton", line 1209, in init_session
    g_compatdata.setup_prefix()
  File "/home/user/.local/share/Steam/steamapps/common/Proton 7.0/proton", line 723, in setup_prefix
    steamdir = os.environ["STEAM_COMPAT_CLIENT_INSTALL_PATH"]
  File "/usr/lib/python3.8/os.py", line 675, in __getitem__
    raise KeyError(key) from None
KeyError: 'STEAM_COMPAT_CLIENT_INSTALL_PATH'

@pichi
Copy link

pichi commented Oct 18, 2022

Same here. This How To doesn't work with Proton 7.0

@MaxSandulsky
Copy link

It doesn't work for me. I get error:

Traceback (most recent call last):
  File "/home/user/.local/share/Steam/steamapps/common/Proton 7.0/proton", line 1407, in <module>
    g_session.init_session(sys.argv[1] != "runinprefix")
  File "/home/user/.local/share/Steam/steamapps/common/Proton 7.0/proton", line 1209, in init_session
    g_compatdata.setup_prefix()
  File "/home/user/.local/share/Steam/steamapps/common/Proton 7.0/proton", line 723, in setup_prefix
    steamdir = os.environ["STEAM_COMPAT_CLIENT_INSTALL_PATH"]
  File "/usr/lib/python3.8/os.py", line 675, in __getitem__
    raise KeyError(key) from None
KeyError: 'STEAM_COMPAT_CLIENT_INSTALL_PATH'

Same, solved by
export STEAM_COMPAT_CLIENT_INSTALL_PATH=~/.local/share/Steam/steamapps/compatdata

@xAlpharax
Copy link

Same, solved by
export STEAM_COMPAT_CLIENT_INSTALL_PATH=~/.local/share/Steam/steamapps/compatdata

Not quite sure why it should be set to that location but any location works in my experience.

@xAlpharax
Copy link

Turns out, by looking at the config files made by proton, the CLIENT_INSTALL_PATH should really just be ~/.local/share/Steam

Do: export STEAM_COMPAT_CLIENT_INSTALL_PATH=~/.local/share/Steam/

@sxiii
Copy link
Author

sxiii commented Jun 11, 2023

That's correct. Modern way of running stuff (example for proton 8.0)

export STEAM_COMPAT_DATA_PATH=~/.local/share/Steam/steamapps/compatdata
export STEAM_COMPAT_CLIENT_INSTALL_PATH=~/.local/share/Steam/
~/.local/share/Steam/steamapps/common/Proton\ 8.0/proton run ~/.local/share/Steam/steamapps/common/YOURGAME/YOURGAME.exe

Obviously, change YOURGAME/YOURGAME.exe and proton version according to your needs.

@Baerbeisser
Copy link

Baerbeisser commented Jan 4, 2024

That doesn't work for me.
With proton-ge, it just does nothing.
With proton experimental i get lots of
Failed to load plugin '/usr/share/steam/.../gstreamer-1.0/....so: wrong ELF-Class: ELFCLASS64
errors and
wine: configuration in L"~/.local/share/Steam/steamapps/compatdata/pfx" has been updated.
and nothing else.
With wine, kenshi at least launches, but crashes while creating a new game.

@Mateoo303
Copy link

It doesn't work for me:
STEAM_COMPAT_DATA_PATH=~/.local/share/Steam/steamapps/compatdata STEAM_COMPAT_CLIENT_INSTALL_PATH=~/.local/share/Steam/ ~/.local/share/Steam/steamapps/common/Proton\ 8.0/proton run /home/mateoo/Games/Melatonin/Melatonin.exe

Proton: Upgrading prefix from None to 8.0-103 (/home/mateoo/.local/share/Steam/steamapps/compatdata/)
fsync: up and running.
wine: RLIMIT_NICE is <= 20, unable to use setpriority safely
MESA-INTEL: warning: Haswell Vulkan support is incomplete
MESA-INTEL: warning: Haswell Vulkan support is incomplete
MESA-INTEL: warning: Haswell Vulkan support is incomplete
MESA-INTEL: warning: Haswell Vulkan support is incomplete
MESA-INTEL: warning: Haswell Vulkan support is incomplete
Wine cannot find the FreeType font library.  To enable Wine to
use TrueType fonts please install a version of FreeType greater than
or equal to 2.0.5.
http://www.freetype.org
Wine cannot find the FreeType font library.  To enable Wine to
use TrueType fonts please install a version of FreeType greater than
or equal to 2.0.5.
http://www.freetype.org
MESA-INTEL: warning: Haswell Vulkan support is incomplete
MESA-INTEL: warning: Haswell Vulkan support is incomplete

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment