Skip to content
Artur Paiva edited this page Oct 8, 2022 · 4 revisions

Why you made this script?

Well... I was having issues with two specific bugs on proton, the first one is related to installing games in other drives: https://github.com/ValveSoftware/steam-runtime/issues/470 and the second one is the fact that %command% doesn't work with non-steam games: https://github.com/ValveSoftware/steam-for-linux/issues/6046.

The easy way was to run proton with an independent prefix other than Steam defaults. But that requires setting up several variables, so I made this script that detects some stuff automatically and make proton behave very similar to wine.

What can I run with protonlaunch

I've tested proton and it seems to behave similarly to Wine, so anything that runs on Wine should run fine under Proton with protonlaunch. Check ProtonDB for more information.

Can I run this script without Steam?

I did some tests with Steam closed and Proton seems to work fine without Steam, but the Proton version on Steam is meant to be run with Steam, so I recommend you always run it with Steam open.

Can I change the default prefix path?

This was the most important part for me, so the short answer is YES, you can. You can specify a prefix path to any folder you want using STEAM_COMPAT_DATA_PATH or PROTONPREFIX. By default Steam uses STEAM_COMPAT_DATA_PATH to determine the default prefix path, but to shorten the command I also linked PROTONPREFIX. You can use any of the, but the default variable will always take precedence if present.

If none is set the default prefix path is ${HOME}/.proton.

You can set the prefix like wine

env PROTONPREFIX="/your/prefix/path" protonlaunch your-program

I've installed Proton in another path

If you take a look at your library management you will notice you can install Proton in any Steam library folder. Protonlaunch will try to find all your Proton versions installed on all your libraries, but it may fail. You can add extra library paths by setting the PL_LIBRARY_PATH variable to the Steam libraries you have Proton installed. The sintax is similar to posix PATH environment variable.

env PL_LIBRARY_PATH="/your/steam/library/path:/your/other/steam/library/path" protonlaunch your-program

Your Steam library path is the folder before the steamapps folder. By default Steam names it SteamLibrary but that name can be changed.

Can I change the proton version?

By default protonlaunch will automatically detect and use the newest version of Proton in your Steam Libraries. This is only useful if you have a single proton installation in your Steam Library since that's the most common use case and protonlaunch will always prefer stable releases over Proton Experimental. The version being used will be visible in the CLI.

If you have more than one Proton installation on your Steam or need to use a specific version, you can set the PL_PROTON_VERSION variable to the version you want to run, you can run different versions for different prefixes.

env PL_PROTON_VERSION="Proton 6.3" protonlaunch your-program

The version specified is the name of the proton folder on your-steam-library/steamapps/common/.

Protonlaunch is not detecting my Steam installation

Steam installs itself at ${HOME}/.local/share/Steam or ${HOME}/.steam/steam and Protonlaunch uses some tricks to try and find your Steam install location even if its not one of those but this might fail. You need to launch Steam at least once to install all files on your steam path.

If you need to customize your Steam installation or it's not detected, you can set STEAM_COMPAT_CLIENT_INSTALL_PATH which is the default variable that Proton uses to detect the Steam install folder. I've also created an alias for that variable named PL_STEAM_PATH.

env PL_STEAM_PATH="/your/steam/installation" protonlaunch your-program

If Steam is not found you'll receive the following error message: unable to find Steam path, please set PL_STEAM_PATH.

Can I redistribute this script / license information

YES, Protonlaunch is distributed under the BSD-Three Clause license which allows the following rights:

Copyright (c) 2022, Artur 'h0m3' Paiva dr.hoome@gmail.com All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  • Neither the name of protonlaunch nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

I would appreciate any extra credits ;)