Forums

How can I reset my video after every game?

Xrandr after Spelunky

Auteur Réponses
smitty_the_smith Mercredi 16 September 2015 à 7:47
smitty_the_smithAnonymous

Some programs that I run in playonlinux don't exit nicely. So I want to insert a script so that when the game exits it'll run xrandr -s 0.  I think I can work this as a batch command but I don't know how to work it with the Playonlinux gui.

petch Mercredi 16 September 2015 à 10:00
petch

Hi,

There's no support for that in the GUI (but you can use a hack, see below), from either install scripts or manually you have to add your statement at the end of the shortcut script (that resides in ~/.PlayOnLinux/shortcuts/)

echo 'xrandr -s 0' >> ~/.PlayOnLinux/shortcuts/'Shortcut name'

If the game starts asynchronously you may have to add a "wineserver -w" statement before your xrandr statement.

But if you insist in using the GUI, it can be done with a hack:

Configure button > (select shortcut) > Miscellaneous tab > Commands to run before the program:

trap 'xrandr -s 0' EXIT

Which will run your statement on shortcut exit, achieving the same thing

This site allows content generated by members, and we promptly remove any content that infringes copyright according to our Terms of Service. To report copyright infringement, please send a notice to dmca-notice@playonlinux.com