Skip to content

Instantly share code, notes, and snippets.

@ikorolev93
Created October 30, 2015 01:01
Show Gist options
  • Save ikorolev93/40801dcd619711f26286 to your computer and use it in GitHub Desktop.
Save ikorolev93/40801dcd619711f26286 to your computer and use it in GitHub Desktop.
Script for running WC3 (or any fullscreen game, i guess) in separate X
#!/bin/sh
export WINEPREFIX="$(realpath ./wineprefix)" # required to make separate wineserver session
export WINEARCH="win32" # might as well
# X dies when client stops executing
# unfortunately, windows programs tend to fork
# so we tie to wineserver by executing it in foreground,
# then we put it to background manually to run wine and then wait for wineserver to die
exec xinit /bin/sh -c 'wineserver -f & wine w3l.exe -opengl; wait' -- :1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment