Here's an experiment that may help you get the answer. For convenience, I'll refer to your default Steam library location as $STEAM
(the default is ~/.local/share/Steam/
). Proton is installed by default to $STEAM/steamapps/common/Proton 3.7
, I'll call this $PROTON
.
So, when I tried running The Witcher, Steam ran this command:
"$PROTON/dist/bin/wine-preloader" "$PROTON/dist/bin/wine" "Z:\$STEAM\steamapps\common\The Witcher Enhanced Edition\System\witcher.exe"
Where $STEAM
has backslashes instead of slashes, as it's a Windows path. In addition, it set something like 70 environment variables (related to Wine, Steam, various hardware/drivers, libraries, etc.). A single variable, WINESERVERSOCKET
referred to the wine server started for this instance. If I omitted this variable and used all the rest, I could start the game from the command line.
Steps:
Replace $PROTON/dist/bin/wine-preloader
with a wrapper script that saves the environment somewhere:
PROTON="$HOME/.local/share/Steam/steamapps/common/Proton 3.7" # adjust to your settings
mv "$PROTON/dist/bin/wine-preloader" "$PROTON/dist/bin/wine-preloader-orig"
printf "%s\n" '#! /bin/sh' 'env --null | grep -vz WINESERVERSOCKET > ~/env' > "$PROTON/dist/bin/wine-preloader"
printf 'exec %q "$@"\n' "$PROTON/dist/bin/wine-preloader-orig" >> "$PROTON/dist/bin/wine-preloader"
chmod +x "$PROTON/dist/bin/wine-preloader"
The script is essentially this:
#! /bin/sh
env --null | grep -vz WINESERVERSOCKET= > ~/env
printf "%s\0" "$0"-orig "$@" > ~/cmd
exec /home/user/.local/share/Steam/steamapps/common/Proton\ 3.7/dist/bin/wine-preloader-orig "$@"
It saves the environment, except for WINESERVERSOCKET
, in ~/env
, the command to run and arguments in ~/cmd
and runs the actual file with the arguments provided. It uses ASCII null characters to separate everything, since the actual environment variables may contain newlines.
Note that I save the command with -orig
added for convenience.
Run the game from the Steam GUI. The wrapper script will create these files.
You can load the environment and run the command from these files. In bash
mapfile -d '' -t env < ~/env
mapfile -d '' -t cmd < ~/cmd
env "${env[@]}" "${cmd[@]}"
-d ''
here tells bash the files use the ASCII null character as delimiter.
This much was sufficient for The Witcher to run for me. All of those environment variables probably won't be necessary. I leave it to you to test which aren't.
Of course, all of these might be completely unnecessary. Looking at Steam's command-line options, we have:
-applaunch <appID> [launch parameters] Launches an Game or Application through Steam.
And when I ran:
steam -applaunch 20900 foo bar
the Wine command was:
"$PROTON/dist/bin/wine" "Z:\$STEAM\steamapps\common\The Witcher Enhanced Edition\System\witcher.exe" foo bar
So Steam did pass on foo
and bar
as arguments to the game. This might be all you need.
Best Answer
VirtualBox isn't the best solution, since it requires 2 operating systems to run simultaneously, along with a game. Plus, you will often experience problems with the mouse not working properly.
There is a better solution. There's a program called PlayOnLinux, which is a frontend for Wine. Here's the download link: PlayOnLinux Download If you download it here, you will be able to get the latest version, which you don't get via the Software Center.
After that, you can install Steam via PlayOnLinux, and you will be able to install your Steam games through that, as long as you make sure it is the right Wine version.
You can check which Wine versions you have to use for your games, here: Wine version
You can also browse games to install from PlayOnLinux, and you will be able to use the Steam version in some of them (I believe that Skyrim is one of those games, but I'm not sure). It's easier, because it finds the right Wine version for you, but of course, the PlayOnLinux doesn't feature all games, and you will have to find some of them yourself, and install them manually.
I did this, and most of my games work. Also, on the WineHQ site, you will be able to see how the games work via Wine, if there is large amount of bugs, or anything like that.