Hi there,
I'm trying to play a game where the only graphics-related option I can modify is resolution, through WINE.
Here's the deal: I have 2 monitors. My standard resolution is 1280x1024. I'm using POL and configured WINE to start in an emulated desktop with the resolution of 1280x1024.
The game was too slow (old GPU and heavy game), so I tried setting the resolution in-game to 1024x768. It worked great, except it went to Window mode, and out of full-screen.
So I tried setting WINE's virtual desktop to 1024x768 first. It obviously didn't help, since the virtual desktop no longer appeared "full-screen" (or otherwise, it didn't span all over my actual desktop, since the resolutions mismatched).
I did solve it by setting my actual PC's resolution to 1024x768, and then the game remained in full screen when starting it.
So heres what I want to achieve: I want to make this process automated, by a bash script or any way possible. Whenever I start the game (the WINE application, the POL profile), the resolution would be changed to 1024x768, preferably on both monitors (keeping them mirrored), or otherwise it could be just one monitor of my choice. Upon exiting the WINE session, the resolution would be reverted to 1280x1024, mirroring the monitors.
Is this achievable somehow? Thanks in advance.
Temporarily change resolution for Wine session
Re: Temporarily change resolution for Wine session
wine's virtual desktop mode is windowed, so first off try disabling that and most of the time wine will switch resolution like you'd expect. If not...
It should be possible to write a script that calls xrandr appropriately. I don't know how it handles multiple monitors, check the manpage for that maybe. This should get you started at least:
That last line should set the monitor to the default / largest resolution, for a single monitor anyway, and that's about all I've ever used xrandr for so that's about as much help I can be, I think. 
It should be possible to write a script that calls xrandr appropriately. I don't know how it handles multiple monitors, check the manpage for that maybe. This should get you started at least:
Code: Select all
#!/bin/sh
xrandr --size 1024x768
cd ~/.wine/drive_c/whatever
wine whatever.exe
xrandr -s 0
