If you run wine from a script (or have a wrapper script) the following does the job: #!/bin/sh cleanup() { wineserver -k xrandr -s 0 xgamma -g 1.0 } trap cleanup 0 1 2 3 6 15 wine yourapp.exe
If you run wine from a script (or have a wrapper script) the following does the job: #!/bin/sh cleanup() { wineserver -k xrandr -s 0 xgamma -g 1.0 } trap cleanup 0 1 2 3 6 15 wine yourapp.exe