1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-11 18:12:23 +01:00
Clone
7
Building OpenRCT2 on Windows Subsystem for Linux
matheusvb3 edited this page 2025-12-08 06:39:19 -03:00

Building

See building OpenRCT2 on Linux.

Execute

Download and install: https://vcxsrv.com/ (follow the step-by-step installation guide). This will allow WSL to launch graphical applications. If the X server is running and OpenRCT2's window still won't show up, try the command export DISPLAY=:0 before attempting to launch the game.

If you want audio, download and extract: https://www.freedesktop.org/wiki/Software/PulseAudio/Ports/Windows/Support/

Add the following to etc/pulse/default.pa where you extracted PulseAudio:

load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1 auth-anonymous=1

If you want to prevent the audio server from exiting some time after disconnecting, add the following to etc/pulse/deamon.conf:

exit-idle-time = -1

Install PulseAudio on WSL by:

$ sudo add-apt-repository ppa:therealkenc/wsl-pulseaudio
$ sudo apt-get update
$ sudo apt-get install pulseaudio libpulse0

Save the following at /usr/local/bin/openrct2-wsl and make it executable with chmod +x /usr/local/bin/openrct2-wsl:

#!/bin/bash -e
/mnt/c/Program\ Files/VcXsrv/vcxsrv.exe :99 -swrastwgl &
/mnt/c/Program\ Files\ \(x86\)/Pulseaudio/bin/pulseaudio.exe &

Save the following at /usr/local/bin/openrct2 and make it executable with chmod +x /usr/local/bin/openrct2:

#!/bin/bash -e
DISPLAY=:99 PULSE_SERVER=tcp:localhost ./openrct2

Launch OpenRCT2 by:

$ openrct2-wsl
$ openrct2

References