Форум

How can I reset my video after every game?

Xrandr after Spelunky

Автор Replies
smitty_the_smith Wednesday 16 September 2015 at 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 Wednesday 16 September 2015 at 10:00
petch
Developer

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

Вы находитесь здесь: Index > PlayOnLinux > How can I reset my video after every game?