How to kill all Wine process exiting an script

Questions about Wine on Linux
Locked
albmm
Newbie
Newbie
Posts: 3
Joined: Wed Sep 14, 2022 5:15 am

How to kill all Wine process exiting an script

Post by albmm »

Hi friends.

I'm ussing some simple bash scripts to launch many "old" directx portable games using Wine, (games launched with EmulationStation):

#!/bin/bash

cd "path/of/th/game"

wine executable.exe


My problem is that after exits a game some process must be open, and do not able to me to suthdown the computer (sometimes cannot exit the game with ESC or ATL+F4), especially when I update to WineHQ 7.x versions.

So, what I could add to my bash script launcher to kill all wine process on exit (after pressing ALT + F4)? I'd like to get a very consistent launcher.

Many thanks in advice.
jkfloris
Level 12
Level 12
Posts: 3136
Joined: Thu Aug 14, 2014 10:10 am

Re: How to kill all Wine process exiting an script

Post by jkfloris »

You can stop (kill) all Wine processes with winserver -k
Locked