I’m writing a simple menu using the
dialog utility in a bash script.
The idea is that the menu script will run in a screen session which I can connect to over SSH (or whatever else).
I want to then use the menu to start/stop applications running on the machine. For example there might be a menu item called “Start/Stop gEdit”. When it’s selected, one of two things could happen:
- If gEdit is not currently running, it starts it
- If gEdit is currently running, it stops it
My question is, what is the best way to launch (and close) applications from my bash script? This is on Debian.