I want to launch an app in a separate X server. It needs a window manager behind it, though.
I created a script
#!/bin/sh
x-window-manager &
my-gui-app
and launched it with
xinit myscript.sh -- :1
The problem is: even after closing the app, the window manager keeps running. I want it to quit after my-gui-app
exits.
Is it possible to achieve it?
$!
. See How to get the pid of the last executed command in shell script? – allo Oct 17 '17 at 15:13